How would one parametrically create a LEGO-compatible gear?
I have 3D printed gears that mesh well with Lego Technic gears. I had the same issue as you that although the module(m) = 1, the root and tip diameters are not specified anywhere.
I used digital calipers to measure the tip diameter as accurately as I could and got the following results:




Gear teeth (z)
Measured Tip Diameter




8
9.80mm


12
13.30mm


16
17.37mm


20
21.36mm


24
25.75mm


28
29.50mm


36
37.31mm


40
41.63mm


56
57.80mm


60
61.35mm




Doing a linear regression on this table yielded: TipDiameter = mz + 1.494
I used these parameters in Sketchup with the &quot;Rack &amp; Pinion&quot; plugin to draw the involute gear profile. If you are a developer you can view the code of this plugin to see exactly how it calculates point coordinates and then uses these to create a curve entity for each part of each tooth. I can't imagine you want to do that by hand though!
Of course if you're printing standard technic sizes, you can always just convert the ldraw DAT file for the part you're interested in into STL and print that? It works surprisingly well (3D print on the left)