Public Domain Involute Parameterized Gears
Description
The SCAD file also includes an example gear train. If you use the View/Animate command in OpenSCAD, you can see the gears and rack mesh and rotate together. If you change the number of teeth, the animation still rotates correctly.
This is not as powerful as other gears on Thingiverse, but it's public domain, so you don't have to worry about issues like GPL vs. LGPL. There are lots of missing features. Perhaps someone could build on this to create a public domain gear script with all the bells and whistles.
Instructions
Use the gear() or rack() module. Call the functions defined at the bottom of the file to find out the parameters of the generated gear. Two gears will mesh if they have the same mm_per_tooth and pressure_angle, and if their centers are separated by the sum of their pitch radii. You can find the pitch radius of a gear by calling pitch_radius(). Calling outer_radius() gives the radius of a circle that encloses the entire gear.
You must be logged in to post a comment.
It would be great if there were a function to create a outer ring gear, ie the barrell of a epicyclic gearbox. I'm no coder, any thoughts and i'd be very greatful.
This is trivial to do with openscad! Make a cylinder that's the right size and thickness for the gear you want, then subtract a gear from it:
difference() {
cylinder(r=1,h=1);
gear(0.9*3.14159/20,20,1,0);
}
that would give you a gear with 20 teeth, 1.8cm inner-diameter, and a wall thickness of about 1mm, 1cm high. Modify as you please.
This is very good!! I do love the faceting of the teeth, almost even. Thanks a lot!
I just enclosed between comments the last lines of the script (to disable the example) and then played a little some code like:
include
&
lt;publicDomainGearV1.1.0.scad
&
gt;
PI=3.141592;
pitch_d=0; // Pitch diameter for the 1st gear
// set as zero and will be computed from "circular_p" parameter.
circular_p=4; // Circular pitch for the 1st gear
n1 = 17; // 1st gear number of teeth
n2 = 9; // 2nd gear number of teeth
mm_per_tooth=pitch_d != 0 ? pitch_d*PI/n1 : circular_p;
pressure_angle=28;
thickness = 5;
hole = 3.5;
clearance = 0.0;
backslash = 0.0;
d12=pitch_radius(mm_per_tooth,n1) + pitch_radius(mm_per_tooth,n2);
echo("Distance between gears axes:", d12);
rotate([0,0,-($t+n1/2)*360/n
1])
translate([0,0,thickness/2])
gear(mm_per_tooth=mm_per_tooth,
number_of_teeth=n1,
thickness=thickness,
clearance=clearance,
pressure_angle=pressure_angle,
hole_diameter=hole,
backlash=backslash);
translate([0,d12,thickness/2])
rotate([0,0,($t+n2/2)*360/n2])
gear(mm_per_tooth=mm_per_tooth,
number_of_teeth=n2,
thickness=thickness,
clearance=clearance,
pressure_angle=pressure_angle,
hole_diameter=hole,
backlash=backslash);
Try to run the animation (i.e. FPS
&
amp; Steps set to 25)
Thanks a lot for sharing !!
here is an unfinished project that incorporates a modified version of your code:
http://www.thingiverse.com/thi...
thanks for making it public domain!
There are other gear libraries, but I really like this because you've made it public domain. I, or anyone, might like to just take a snippet from here and there, and this will accelerate innovation.
I've been considering making some of my own wandering designs public domain for similar reasons. So, this is very inspirational.
That's awesome! I was wondering where this thing went to. (Thanks for the rack!)
Collections
License

It seems like line 118 should be:
assign(t = a/2*cos(pressure_angle)) //tooth side is tilted so top/bottom corners move this amount
Rather than what it is.
You're right. I'll fix that, and give an attribution in the comments.