SPURGEAR draws a spur gear to standard proportions from the numbers an engineer actually has: the tooth count, the module or diametral pitch, and the pressure angle. The tooth flanks are true involutes computed from the geometry, not arcs fitted by eye, so the drawing can be trusted for manufacture, for checking a mating pair, or for cutting on a machine.
What SpurGear does
Standard proportions:
addendum = 1.00 m outside dia = D + 2m
dedendum = 1.25 m root dia = D - 2.5m
pitch dia = N m base dia = D cosφ
where m is the module. In imperial the module is 1/P, P being the diametral pitch, and the same formulae hold throughout.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
SPURGEAR. - Give the number of teeth, the module or diametral pitch, and the pressure angle.
- Pick the centre.
- Read any warning about the outside diameter being cut back — see below.
How it works
An involute is the curve traced by the end of a string unwound from a circle — the base circle. It is the only tooth shape that transmits motion at a constant ratio regardless of small errors in the centre distance, which is why every standard gear uses one.
The useful form is polar. At any radius r on the flank, the half thickness of the tooth in angle is
ψ(r) = π/2N + inv(φ) - inv(α)
where inv(a) = tan(a) - a is the involute function, φ is the pressure angle, and α = acos(rb/r) is the pressure angle at that radius.
At the pitch circle α equals φ and ψ comes out at π/2N, which is half the circular pitch — exactly as it should be. Higher up the tooth α grows, inv(α) grows, and ψ shrinks, which is why teeth taper to the tip.
No involute exists inside the base circle, because the string has not begun to unwind. Where the root falls below it — which happens on any gear with fewer than about forty teeth — the flank is continued as a radial line and blended into the root circle with a proper tangent fillet.
If the tooth would come to a point below the nominal tip, which happens when the count is very low, the outside diameter is cut back to where the flanks actually meet and you are told by how much.
Notes and limits
- Low tooth counts get the outside diameter cut back, and the amount is reported rather than applied silently.
- Module or diametral pitch — give whichever your data is in.
- Standard proportions are assumed. Profile-shifted gears need the addendum and dedendum adjusting.
- One undo group covers the gear.
Download and details
| Name | SpurGear — draw an involute spur gear from tooth count, module and pressure angle |
| Download | SpurGear.lsp — 22.4 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | SPURGEAR |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 22.4 KB, 478 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- CAM LISP — the other computed profile: plate cams from a motion law
- THREAD LISP — screw threads in section
- MACHFEAT LISP — the machined features around it
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program