Involute spur gear primitive, complete with tooth undercut and all-quad topology. Unencrypted and fully open for further hacking.

Script
By Swordslayer · Credited author: Vojtech Cada · 2016-04-24
Involute spur gear primitive, complete with tooth undercut and all-quad topology. Unencrypted and fully open for further hacking.

For two gears to mesh well, their modules and pressure angles have to be the same. The distance of their centers should be the sum of their extended pitch diameters (i.e. with the profile shift included). There's also 'mm per Unit' spinner in case you work in generic units/different scale.
To learn more about the terminology and basics of gear design, see The ABC's of Gears (start with page 12, chapters 2, 3 and 4).
Installation: Copy the .ms file to your scripts\startup folder or run as a script if you only want to try it out. The object primitive will be available under Examples in the Create panel.
Acknowledgments: Writing this script would be next to impossible without this book:
Stephen P. Radzevich; Darle W. Dudley (21 October 1994). Handbook of Practical Gear Design. CRC Press. ISBN 978-1-56676-218-2.
Tags: primitive, scripted plugin, Cog, gear, cog wheel, cogwheel, gearwheel, spur gear, toothed wheel, toothed gear
Works fine with version 2025.3
besergrafik · 2026-02-17
I am currently using 3ds Max 2025 sp3 without any problems.
in 3ds Max 2020.3 - working good, and need additional options)
x_OL · 2020-02-02
Thanks for you work
3ds Max 2020.3 - working good! Installed today and don`t noticed any bugs)
Turbosmooth work good with this object also. I agree with cj - and think that additional options like bevel, spokes, holes in the gear disk itself, thickening around the shaft hole etc - will be very usefull and make work with such object more flexible and non-destructive
old man · 2019-12-03
more option like (bevel gear) (worm gear) and input-output gear designing match together
No longer works in 2018
DavidKing · 2019-06-12
I looked at the code, but I'm too much of a noob to figure it out.

Max 2016 good!
jeffreysbrown · 2016-06-17
Works fine in 2016. Really well implemented -- thanks!
Powerful Script
luckmc · 2016-05-27
When do the animation industry is more suitable.
kavek · 2021-01-01
very useful
kavek · 2016-05-25
it doesn't work with verson2016
It's a scripted primitive...
Swordslayer · 2016-05-26
...so there are a few steps you should make sure you didn't skip - if you just evaluate it, it will create a new category called "Examples" in the Geometry tab of the Create panel, so it won't automatically start the object creation and it might seem it does nothing. See the attached image showing how to locate it (screengrabs from max 9 and max 2017).

Now, evaluating it as a script will only make this primitive accessible until the max session ends, if you want to have it there all the time, put it in the Startup scripts folder, as indicated in the 'Installation' part of the description.
Anyway, as your comment-history is full of complaints that script XY doesn't work with max version ABCD while it works there perfectly well, I recommend reading through the tutorial on how to install scripts first.
Works fine with version 2016
To-mos · 2020-12-31
I am currently using 3ds Max 2016 SP4 without any problems.
Perfect gear
3dline · 2016-05-11
at last someone who understand mechanic built a gear for 3Ds MAX...
thanks a lot
beautiful
Nik · 2016-04-27
+1
Perfect
visualizer · 2016-04-27
Technically perfect approach of making model sin max...!
May be gradually we get almost all typical models with their technical creation parameters to generate in max!
Swordslayer · 2016-04-27
Tell me what models you miss and I'll see what I can do about that.
lightcube · 2016-04-24
Another masterful slice of the sword!
mad · 2016-04-24
diky ;)
Good script.
luxxeon · 2016-04-24
I particularly like the variation in the profile shapes. It allows for some interesting objects beyond standard gears. Also keeping things quads was a very good idea.
Nice script
Turnim · 2016-04-24
Very nice script and a cool timesaver.
Installed it on 3ds 2016 and it works as advertised
Great job
Thank you