//small drive wheel for light weight rotator //D shaft //21st June 2021 // smaller shaft hole to fit motor //print time 25 min module gear ( mm_per_tooth = 3, //this is the "circular pitch", the circumference of the pitch circle divided by the number of teeth number_of_teeth = 11, //total number of teeth around the entire perimeter thickness = 6, //thickness of gear in mm hole_diameter = 3, //diameter of the hole in the center, in mm twist = 0, //teeth rotate this many degrees from bottom of gear to top. 360 makes the gear a screw with each thread going around once teeth_to_hide = 0, //number of teeth to delete to make this only a fraction of a circle pressure_angle = 28, //Controls how straight or bulged the tooth sides are. In degrees. clearance = 0.0, //gap between top of a tooth on one gear and bottom of valley on a meshing gear (in millimeters) backlash = 0.0 //gap between two meshing teeth, in the direction along the circumference of the pitch circle ) { assign(pi = 3.1415926) assign(p = mm_per_tooth * number_of_teeth / pi / 2) //radius of pitch circle assign(c = p + mm_per_tooth / pi - clearance) //radius of outer circle assign(b = p*cos(pressure_angle)) //radius of base circle assign(r = p-(c-p)-clearance) //radius of root circle assign(t = mm_per_tooth/2-backlash/2) //tooth thickness at pitch circle assign(k = -iang(b, p) - t/2/p/pi*180) { //angle to where involute meets base circle on each side of tooth difference() { for (i = [0:number_of_teeth-teeth_to_hide-1] ) rotate([0,0,i*360/number_of_teeth]) linear_extrude(height = thickness, center = true, convexity = 10, twist = twist) polygon( points=[ [0, -hole_diameter/10], polar(r, -181/number_of_teeth), polar(r, r