MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now


Satisfying Gears(Involute Gear Pair Generator)

by Snaxxus Jul 27, 2018
Download All Files

Thing Apps Enabled

Please Login to Comment

Comments deleted.

Great job. I'm new to SCAD. Is there a way to separate the two gears a little bit for easier printing?

There's GearAExists and GearBExists arguments. If you set these to = false, the corresponding gear will disappear. Then render and save the stl file. After that set it back to true and set the other gear false, render and save the stl. You can set nice variables at the top of the file for this. I usually make a series of existance flags for rendering individual parts.

Also old cura used to split assemblies into their parts but I cannot find that feature in the new versions of cura.

Use the Exists flags.

Thanks for using the gears

This seems like it would be an awesome way to generate gears for things like Gregs, or the Pitan or something.
I'd like to suggest two things here:
1) An additional couple debug options that add a pillar at a given distance from the origin, for when you know how far your gears need to be center-to-center, and also a small hole in the debug cylinder of the gear that you can use to line up with the aforementioned cylinder. This should allow you to basically tweak values until you get gears that are perfectly sized for your application.
2) Additional configuration options that let you specify central holes for your gears based on a few criteria, such as: hex hole with a backplate, for putting the gears on a bolt; round hole with a flat for d-shafts on motors; round hole with a capture nut slot for grub screws; and possibly others.

I've made some real rough tweaks to the scad file for my own usage that accomplish both of these tasks but none of my changes are really production-worthy at the moment.

Here's a try at figuring out the parameters for planetary gears. I think it works when the center distances are identical. How do we calculate the gear reduction for planetary gear sets?

Updated a few parameters and added it to the examples.

Thanks for the feed back! There is a function that will return the distance between the gears give a set of the arguments. I agree it would be nice to constrain the gear center distance and let another parameter float. I'll get back to this after the next version of the mecanum wheel generator I'm working on.

Have you found the gears useful?

Hey thanks for the quick feedback! Yeah I've generated up a pair of gears for my own Pitan build, one with the D-shaft and one with an M5 bolt hole in the center. I stripped the original Pitan gears right to pieces so I wanted something with a beefier primary gear. As soon as I get my temporary extruder in the mail tomorrow, I'll be printing up these gears and I'll let you know how they work out!

Also, I just saw the output that shows the center-to-center distance when you render. That's super useful, and I hadn't realized that was a thing. Thanks for pointing that out! On the bright side I can confirm that my method was accurate to within 0.0026mm, which is probably good enough for something with a 0.4mm nozzle. lol.

Excellent! My mission is to see cool things happen.

But what is Gregs or Pitan? Got any pics or links?

Pitan is an extruder type :D

Greg's extruder is a modified version of Wade's extruder; link here: https://www.thingiverse.com/thing:8252
The PITAN is just a [P]rintable T[itan] extruder that's designed to be a super small geared extruder. It's not an exact copy of the actual Titan, it's reworked to be a little better for 3d printing. Link here: https://www.thingiverse.com/thing:2728600
My problem with the PITAN was the limited strength of the gears, especially the primary as it is very small. Barely larger than the OD of the motor shaft.

Attached is a file comparing the original PITAN gears (bottom) to the generated ones from your library (top). The individual teeth are smaller, but there's also more of them, and the smaller gear is quite a bit more robust compared to the original. On my printed small gear, the teeth separated from the interior portion of the gear, rather than the teeth breaking individually. This beefier gear should prevent that.

Greg's Hinged Accessible Extruder
Pitan (as in printed Titan :-) Geared Extruder

how do you make herringbone gears with this?
some further instructions would be nice.

Include a Layers=2 argument when to call the module in OpenScad. Also you can set HelixFaceAngle to other angles than the default.


All of the parameters in the module have defaults. Read the comments in the library file where all the parameters are described.

To calculate the center distance, call the CalcCenterDistance function. Note the Default DiametralPitch (Teeth/PitchDiameter in mm) is 0.6 and default PressureAngle is 20 degrees. Maybe I need to put the defaults in the CalcCenterDiatance function.
OurCenterDistanceNamedBob = CalcCenterDistance(TeethA=20,TeethB=15,DiametralPitch=0.6,PressureAngle=20);

Play with the examples and remember that values set in openScad inside of the curly brackets do not remain when you leave the curly brackets. I know right!

Good luck and just say if you need anything.

Also is it possible to give the script a negative backlash value, thus we can use it as a cutting tool to make the spur gear and the pinion.

Thank you for this great work. It helped me alot. There is nothing similar on thingiverse. Is it possible to add support to generate a spur gear with edges pointing inside to make planetary gear set ? If this feature is supported it will be complete solution. Also is it possible to have gear edges on flat bar ?

If you use it to make an internal gear you might have to manually set the dedendum argument and addendum argument except swapped. See


I learned everything I know for this project, so correct me if I'm wrong. You might be able to use the difference operation with a large cylender. You probably want to set the chamfer width to zero. You can make your own chamfers by using difference with a cylender with two diameters where one diameter is small or zero.

You could find the pitch radius calculations in the library. I Don't think I limited the backlash values to positive numbers. I think you can have negative values and tighten the teeth.

Thanks for using it. I might have to add improvement with this in mind when I get back to my real computer. I'm camping.:D