Gear Generator for 3D Printing

Grid 5 mm · section 25 mm
Rendering exact preview…
Rendering exact preview…
Module2 mmTeeth24Pressure angle20°Tip ⌀52.0 mmThickness10 mm

Guide

Gear Generator for 3D Printing

Build an involute gear from its module, tooth count and mounting dimensions, then download an STL. The editor supports spur, helical, herringbone and internal gears, racks, bevel pairs and complete planetary gear sets. Start with the dimensions of the mechanism you want to build: tooth size and shaft spacing determine the gear before its outside diameter does.

Choose the gear type for your mechanism

Start with the motion you need and the position of the shafts. The choices below connect those mechanical layouts to the gear types available in this generator.

Reference for the shaft arrangements: KHK: gear types and shaft arrangements.

Scroll the table sideways to compare the pairing and assembly checks.

Supported gear types by mechanism, shaft layout and assembly checks
Mechanism and shaft layoutGeneratorPairing and assembly
Build a simple rotating pairParallel shaftsSpur gearA straightforward starting point for a prototype. Match module and pressure angle, then check center distance and each shaft fit.
Use gradual tooth engagementParallel shaftsHelical gearMatch the module system, pressure-angle definition and helix-angle magnitude with opposite hands. Design the supports to take axial force.
Combine opposing helical halvesParallel shaftsHerringbone gearOpposing halves can balance axial force when equally loaded. Match the mating helices and V orientation, and leave a workable assembly path. Uneven contact can leave residual thrust.
Run a pinion inside a ringParallel pinion and ring axesInternal gearGenerate the external pinion separately and check tooth interference. A planetary layout also needs a carrier, planet shafts and supports designed around the gear set.
Create a planetary reduction stageSun and ring share an axis; planet axes orbitPlanetary gear setGenerate matched sun, planets and ring together. The fixed-ring animation does not supply a carrier. Check mounting, axial assembly and print fit separately.
Transfer rotation around a cornerIntersecting shaftsBevel gear pairCheck both tooth counts, the shaft angle and the common pitch-cone apex. Position and support both gears in the assembly; the mesh files do not set their installed alignment.
Convert rotation to straight-line travelPinion shaft perpendicular to rack travelRack and pinionGenerate the rack and a compatible spur pinion separately. Match module and pressure angle, then design a guide that maintains the rack's engagement with the pinion.

What you can download: Spur, helical, herringbone, internal and rack modes each export one STL. Generate a compatible mate separately. Bevel mode exports a ZIP containing the wheel and pinion as two STL files. Planetary mode exports a ZIP with sun, three or four planets, ring and complete recipe, or one component STL. Shafts, bearings, housings and planetary carriers are separate design work.

What the settings control

Module and teeth
Module sets tooth size in millimeters. For a spur gear, module multiplied by tooth count gives the pitch diameter. The pitch circle is a reference circle, not the visible tooth tips.
Pressure angle
Use the same pressure angle for both gears in a mating spur pair. Keep it consistent when adjusting tooth counts instead of choosing each gear independently. Planetary mode fixes this angle at 20 degrees.
Height and profile shift
Height sets the axial thickness. Profile shift changes the tooth geometry; leave it at zero for the unshifted example below. A shifted pair needs its own geometry check. Planetary mode uses zero profile shift.
Bore
Choose a circular, square, hexagonal or keyed opening where available. The circular-hole field is a radius: a 6 mm diameter shaft starts with a nominal 3 mm radius before fit adjustment. Planetary mode instead uses sun and planet bore diameters in millimeters; 0 makes a solid gear.
Type-specific settings
Helical gears expose helix angle, direction and module system. Internal gears add a ring outside diameter. Planetary sets use radial ring wall, tangential backlash and extra root clearance. Racks and bevel pairs expose their own length or mating-tooth settings.

Worked example: an unshifted 20/40-tooth spur pair

With module 2 mm, the pitch diameters are 40 mm and 80 mm. The theoretical center distance is (40 + 80) / 2 = 60 mm. A 20-tooth driver turning a 40-tooth external gear gives a 2:1 speed reduction and reverses rotation. These are geometry results, not a tested print fit or a torque rating.

  • Both gears: spur, module 2 mm, pressure angle 20°, profile shift 0.
  • First gear: 20 teeth. Second gear: 40 teeth.
  • Example height: 10 mm. Choose each bore to suit its shaft.
  • Generate the two gears separately and check both parts in your slicer.

From settings to a first print

  1. Select a gear type or template. For a first mating pair, choose spur gears so the module and center-distance calculation is easy to inspect.
  2. Set module, pressure angle and tooth count. Check the displayed pitch, tip and root diameters before adding a bore.
  3. Adjust height and mounting features. Resolve geometry errors in the editor, then rotate the preview to inspect the tooth roots and opening.
  4. Download the STL or the set ZIP, then check its dimensions in the slicer. Print a small fitting trial before committing to the final gear pair or housing.

Create and restore a planetary set

Select planetary mode to start with sun 24, planet 24 and derived ring 72, using three equally spaced planets. Ring teeth = sun teeth + twice planet teeth. At module 2, center distance is 48 mm and (24 + 72) / 3 = 32 satisfies equal-spacing tooth phasing.

Defaults are thickness 10 mm, sun and planet bore diameters 8 and 4 mm, ring wall 4 mm, backlash 0.2 mm and extra root clearance 0 mm. Bores are diameters; 0 is solid and there is no automatic print allowance. Backlash is total tangential clearance per mesh. Extra root clearance extends the dedendum beyond standard 0.25-module clearance. Both are separate from bore fit.

Version 1 uses straight, unshifted teeth and a fixed 20 degree pressure angle. The paused animation illustrates a fixed ring: four sun revolutions produce one orbit of the planet axes in the same direction. This would be the speed of your own carrier; no carrier or output shaft is exported.

Resolve geometry errors, inspect the complete preview, then export the set ZIP or select the sun, one planet or ring as a component STL. A single planet export needs three or four copies for assembly. Importing either artifact restores the complete recipe. Carrier, shafts, bearings, housing and retention remain separate. This is not a physically tested print-in-place gearbox.

Reference: Drivetrain Hub: planetary kinematics.

Calculate shaft spacing before drawing the housing

For standard unshifted external spur gears, d = m × z and a = m × (z1 + z2) / 2. Both gears must have compatible module and pressure angle. Use the module calculator to distinguish pitch diameter from outside diameter, then use the center-distance calculator for the pair.

That shortcut does not cover every gear in the editor. Internal gears use a difference of pitch diameters. Helical gears need the correct normal or transverse module interpretation. Profile-shifted and bevel gears require their corresponding relationships.

Reference: KHK: calculation of gear dimensions.

Check the printed pair, not just the preview

The preview shows the requested geometry. It does not measure shaft alignment, printer error or friction in your assembly. Begin with one pair, record your material and slicer settings, and inspect whether tight spots occur around the whole rotation or at a particular tooth.

There is no universal clearance that fits every printer and material. Check the bore and tooth engagement separately so a tight shaft hole is not mistaken for a meshing problem.

Reference: Prusa: designing printable features and fitting parts.

Frequently asked questions

Does this export an editable CAD model?

The generator downloads STL meshes for slicing or mesh import. An STL is not a parametric CAD feature tree. Save the design in the tool library when you want to return to its settings.

Can I enter diametral pitch instead of module?

The gear editor uses module. Convert diametral pitch to metric module before entering the value: module in millimeters = 25.4 / diametral pitch in teeth per inch. Do not enter the diametral-pitch number directly in the module field.

Will changing the bore add printing clearance automatically?

Legacy circular-bore controls specify a radius; planetary sun and planet controls specify diameters. Treat it as the requested geometry and choose any fit adjustment deliberately. Do not assume an automatic universal allowance or add the same adjustment twice.

Can I make a complete planetary gearbox here?

You can generate a matched sun, three or four identical planets and ring as one gear set. A working gearbox also needs a carrier, shafts, bearings, housing and retention. Those parts are not exported. No physical print or load tests are claimed.