Created
July 27, 2015 11:15
-
-
Save traverseda/6a0465e9565c0fbd730f to your computer and use it in GitHub Desktop.
openscad tiny gears (Might work for layer cutting?)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//cube([5,5,10]); | |
//cylinder(r=0.6,h=20); | |
holeWidth=1.6; | |
toothWidth=holeWidth+0.3; | |
pi=3.14159265359; | |
module gear(teath){ | |
circumference=teath*toothWidth; | |
diameter=circumference/pi; | |
difference(){ | |
circle(diameter); | |
for (i = [1 : teath]){ | |
rotate([0,0,i *360/teath])translate([diameter,0])circle(holeWidth,$fn=18); | |
} | |
circle(r=diameter-toothWidth-0.5); | |
} | |
for(i = [1 : teath/2]){ | |
rotate([0,0,i *360/(teath/2)])translate([diameter/2-toothWidth,0]) | |
square([diameter,toothWidth], center=true); | |
} | |
} | |
module internalGear(teath){ | |
circumference=teath*toothWidth; | |
diameter=circumference/pi; | |
circle(diameter); | |
for (i = [1 : teath]){ | |
rotate([0,0,i *360/teath])translate([-diameter,0])circle(holeWidth,$fn=18); | |
} | |
} | |
function gearDiameter (teath)=(teath*toothWidth)/pi; | |
module holeGear(){ | |
translate([(gearDiameter(8)*2)-toothWidth/2,0]) | |
rotate([0,0,22]) | |
linear_extrude(height=0.3*2)difference(){ | |
union(){ | |
gear(8); | |
circle(3); | |
} | |
circle(1.2,$fn=10); | |
} | |
} | |
holeGear(); | |
translate([11,0,0])holeGear(); | |
translate([22,0,0])holeGear(); | |
linear_extrude(height=0.3*2)gear(8); | |
translate([-25,0,0]) | |
difference(){ | |
union(){ | |
linear_extrude(height=0.3*5)for(i = [1 : 3]){ | |
rotate([0,0,i *360/3]) | |
translate([0,gearDiameter(21)+3])rotate([0,0,i *360/3]) | |
circle(r=2); | |
} | |
linear_extrude(height=0.3*5) | |
difference(){ | |
circle(gearDiameter(21)+3); | |
rotate([0,0,45])internalGear(21); | |
} | |
difference(){ | |
cylinder(r=gearDiameter(21)+3,h=0.3); | |
translate([0,0,-0.1])cylinder(r=gearDiameter(8),h=2); | |
} | |
} | |
linear_extrude(height=10)for(i = [1 : 3]){ | |
rotate([0,0,i *360/3]) | |
translate([0,gearDiameter(21)+3])rotate([0,0,i *360/3]) | |
circle(r=1); | |
} | |
} | |
translate([0,25,0]){ | |
linear_extrude(height=0.3*6)gear(8); | |
linear_extrude(height=0.3*2) | |
for(i = [1 : 3]){ | |
rotate([0,0,i *360/3]) | |
difference(){ | |
union(){ | |
translate([0,(gearDiameter(8)*2)-toothWidth/2])circle(r=2.5); | |
translate([-2.5,0])square([5,8.6]); | |
} | |
translate([0,(gearDiameter(8)*2)-toothWidth/2])circle(1.2,$fn=10); | |
} | |
} | |
} | |
translate([0,-25,0]) | |
difference(){ | |
union(){ | |
cylinder(r=gearDiameter(21)+3,h=0.3); | |
linear_extrude(height=0.3)for(i = [1 : 3]){ | |
rotate([0,0,i *360/3]) | |
translate([0,gearDiameter(21)+3])rotate([0,0,i *360/3]) | |
circle(r=2); | |
} | |
} | |
translate([0,0,-0.1])cylinder(r=2,h=4); | |
linear_extrude(height=0.4)for(i = [1 : 3]){ | |
rotate([0,0,i *360/3]) | |
translate([0,gearDiameter(21)+3,])rotate([0,0,i *360/3]) | |
circle(r=1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment