diff --git a/gear-v3.scad b/gear-v3.scad index 9beaaea..697aeee 100644 --- a/gear-v3.scad +++ b/gear-v3.scad @@ -83,9 +83,11 @@ translate([20, 0, 16]) //ring_gear_2u_32t(); //carrier_32t_easy(); //carrier_32t_not_so_easy(); -sun_drive_32t(); +//sun_drive_32t(); //sun_drive_32t_simpler(); +double_bevel_36t(); + /* Standard 8-teeth gear */ //std_gear8(); @@ -293,6 +295,29 @@ module satellites_32t() { //------------- +// An attempt to make something like standard 36t double bevel gear... +module double_bevel_36t() { + intersection() { + union() { + translate([0, 0, 1.5]) + linear_extrude(slices=5, height=2.5, scale=(36/2+1-2.5*tan(45))/(36/2+1)) + gear_concat_flat(mm_per_tooth=3.53, number_of_teeth=36, backlash=2, clearance=0.8, trim_factor=0.7); + translate([0, 0, -1.5]) + rotate([180, 0, 0]) + linear_extrude(slices=5, height=2.5, scale=(36/2+1-2.5*tan(45))/(36/2+1)) + gear_concat_flat(mm_per_tooth=3.53, number_of_teeth=36, backlash=2, clearance=0.8, trim_factor=0.7); + translate([0, 0, -4]) + cylinder($fn=48, h=8, r=3.14*(36/2-1)/3.1415926); + translate([0, 0, -1.5]) + cylinder($fn=48, h=3, r=3.14*(36/2+1)/3.1415926); + } + translate([0, 0, -8]) linear_extrude(slices=5, height=16) + gear_concat_flat(mm_per_tooth=3.14, number_of_teeth=36); + } +} + +//------------- + // An attempt to make something like standard 20t bevel gear... module bevel_20t() { difference() { @@ -625,13 +650,13 @@ module gear( 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 + pi = 3.1415926; + p = mm_per_tooth * number_of_teeth / pi / 2; //radius of pitch circle + c = p + mm_per_tooth / pi - clearance; //radius of outer circle + b = p*cos(pressure_angle); //radius of base circle + r = p-(c-p)-clearance; //radius of root circle + t = mm_per_tooth/2-backlash/2; //tooth thickness at pitch circle + k = -iang(b, p) - t/2/p/pi*180; //angle to where involute meets base circle on each side of tooth difference() { union() { // $fn: so gear teeth edge never match cylinder segment edges @@ -678,13 +703,13 @@ module gear_teeth( 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 + pi = 3.1415926; + p = mm_per_tooth * number_of_teeth / pi / 2; //radius of pitch circle + c = p + mm_per_tooth / pi - clearance; //radius of outer circle + b = p*cos(pressure_angle); //radius of base circle + r = p-(c-p)-clearance; //radius of root circle + t = mm_per_tooth/2-backlash/2; //tooth thickness at pitch circle + k = -iang(b, p) - t/2/p/pi*180; //angle to where involute meets base circle on each side of tooth union() { for (i = [0:number_of_teeth-1]) rotate([0,0,i*360/number_of_teeth]) @@ -726,13 +751,13 @@ module gear_concat( 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 + pi = 3.1415926; + p = mm_per_tooth * number_of_teeth / pi / 2; //radius of pitch circle + c = p + mm_per_tooth / pi - clearance; //radius of outer circle + b = p*cos(pressure_angle); //radius of base circle + r = p-(c-p)-clearance; //radius of root circle + t = mm_per_tooth/2-backlash/2; //tooth thickness at pitch circle + k = -iang(b, p) - t/2/p/pi*180; //angle to where involute meets base circle on each side of tooth linear_extrude(height = thickness, center = false, convexity = 10, twist = twist) polygon( points = gear_points(r, b, c, k, number_of_teeth, number_of_teeth), @@ -749,13 +774,13 @@ module gear_concat_flat( backlash = 0.0, //gap between two meshing teeth, in the direction along the circumference of the pitch circle trim_factor = 1 ) { - 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 + pi = 3.1415926; + p = mm_per_tooth * number_of_teeth / pi / 2; //radius of pitch circle + c = p + mm_per_tooth / pi - clearance; //radius of outer circle + b = p*cos(pressure_angle); //radius of base circle + r = p-(c-p)-clearance; //radius of root circle + t = mm_per_tooth/2-backlash/2; //tooth thickness at pitch circle + k = -iang(b, p) - t/2/p/pi*180; //angle to where involute meets base circle on each side of tooth polygon( points = gear_points_trimmed(r, b, c, k, number_of_teeth, number_of_teeth, trim_factor), paths = [ range(15*(number_of_teeth)) ] @@ -832,13 +857,13 @@ module gear_original( 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 + pi = 3.1415926; + p = mm_per_tooth * number_of_teeth / pi / 2; //radius of pitch circle + c = p + mm_per_tooth / pi - clearance; //radius of outer circle + b = p*cos(pressure_angle); //radius of base circle + r = p-(c-p)-clearance; //radius of root circle + t = mm_per_tooth/2-backlash/2; //tooth thickness at pitch circle + 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]) @@ -859,10 +884,6 @@ module gear_original( } }; - - - - // these 4 functions are used by gear function polar(r,theta) = r*[sin(theta), cos(theta)]; //convert polar to cartesian coordinates function iang(r1,r2) = sqrt((r2/r1)*(r2/r1) - 1)/3.1415926*180 - acos(r1/r2); //unwind a string this many degrees to go from radius r1 to radius r2