Rack and Pinion Generator

Generate a rack and pinion set as printable STLs and turn rotation into straight-line motion. Set the module and pressure angle, size the rack by tooth count or by length in millimeters, and generate a matching pinion with the spur generator at the same settings. Camera sliders, plotter axes, drawer mechanisms: this is the drive for them.

Open full generator →Free · Open Source · No Signup
Open full generator →

What a rack and pinion generator does

The rack is the straight member of a gear drive. Its flanks follow the chosen pressure angle and its linear tooth pitch is π × module. The generator sizes it by tooth count or target length and exports the rack geometry. Generate the pinion separately with compatible module and angle, then check interference and mounting. This is not a complete guided linear actuator.

How far does one revolution travel?

The pinion advances along the rack by pi times module per tooth, so one full revolution travels pi times module times the pinion's tooth count. A 20-tooth pinion at module 2 moves 125.7 mm per turn; at module 1.5 the same pinion moves 94.2 mm. Choose the module from the load and the pinion tooth count from the travel resolution you want per motor step or servo degree.

For stepper-driven axes it pays to pick combinations where the travel per step lands on a friendly number: module 2 with 20 teeth on a 200-step motor gives 0.63 mm per full step. See the module and pitch guide for how module ties into tooth size across every generator on this site.

Printing and mounting the rack

Inspect long racks for warping and provide support appropriate to their length, section and load. A fixed support interval is not suitable for every design. For an unshifted standard pinion, the distance from rack pitch line to pinion axis is m × z / 2; this is not measured from an arbitrary outer rack face. Generate the spur pinion and use the module guide to identify reference geometry.

Frequently asked questions

Which pinion works with my generated rack?

Start with a standard spur pinion using the same module and pressure angle. Check profile shift, interference, rack pitch-line position and printed fit. Generate it separately with the spur tool; shared geometry does not validate the complete mounting.

How do I calculate rack travel per pinion revolution?

Travel equals pi times module times pinion tooth count. Example: module 2 and 20 teeth give 3.1416 times 2 times 20, which is 125.7 mm per revolution.

Can I join several printed racks into one long rack?

Yes. Size each segment by tooth count and butt them tooth-pitch-aligned: the joint must continue the pitch spacing of pi times module exactly. A printed alignment key under the joint keeps the spacing honest.

What holds the pinion against the rack?

The mesh pushes the pinion away from the rack at the pressure angle, so the pinion bearing must be rigid in that direction. In printed builds a second smooth roller on the rack's back side, opposite the pinion, keeps the mesh depth constant.

Related generators