Worked example
Module 1 gives the 20T gear a 20 mm pitch diameter and the 40T gear a 40 mm pitch diameter. Nominal shaft spacing is 30 mm. The outside diameters are 22 mm and 42 mm.
Use the pitch distance as your rigid nominal CAD layout. Adjust backlash or tooth thickness in the tooth design as appropriate for your printer and mounting tolerances, then verify the mesh on the actual shafts.
Nominal center distance 30 mm
Formulas
Module (mm) = 25.4 / DPPitch diameter d = m ZOutside diameter = d + 2mRoot diameter = d − 2.5mCenter distance = (d₁ + d₂) / 2Base diameter = d cos αContact ratio = [√(rₐ₁² − rᵦ₁²) + √(rₐ₂² − rᵦ₂²) − C sin α] / (π m cos α)