IT/Robot
[Robot] Cycloidal Gear (OpenSCAD)
블랙오닉스
2024. 2. 1. 22:37
re = 60/2;
te = 2;
rp = 5/2;
np = 12;
e = 2;
ap = 360/np;
module ecc(re, te, rp, np ,e, ap){
difference(){
color("white") cylinder(r=re, te, $fn=32);
for(i = [0:1024-1]){
xr=re*cos(360*i/1024) + e*cos(360*i * np/1024);
yr=re*sin(360*i/1024) + e*sin(360*i * np/1024);
translate([xr,yr,-1])
cylinder(r=rp,te+2, $fn=32);
}
}
}
module ecc_holes(re, te, rp, np ,e, ap){
translate([0,0,-1]) cylinder(r=19/2,te+2, $fn=32); //6800 D=19
N=4;
for(i = [0:N-1]){
rotate([0,0,360/N*i]) translate([re/2,0,-1]) cylinder(r=rp+e,te+2, $fn=32); //6800 D=19
}
}
module bb_6800(){
difference(){
translate([0,0,0]) cylinder(d=19, 5, $fn=32); //6800 D=19
translate([0,0,-1]) cylinder(d=10,5+2, $fn=32); //6800 d=10
}
}
module ecc_shaft(re, te, rp, np ,e, ap){
difference(){
translate([0,0,0]) cylinder(d=10, te, $fn=32); //6800 D=19
translate([e,0,-1]) cylinder(d=5,te+2, $fn=32); //6800 D=19
}
}
module pins(re, te, rp, np ,e, ap){
for(i = [0:np-1]){
rotate([0,0,360/np*i]) translate([re,0,-1]) cylinder(r=rp,te+2, $fn=32); //6800 D=19
}
}
module top(re, te, rp, np ,e, ap){
difference(){
translate([-e,0,0]) ecc(re, te, rp, np ,e, ap);
translate([-e,0,0]) ecc_holes(re, te, rp, np ,e, ap);
}
// bb_6800();
translate([-e,0,0]) color("black") ecc_shaft(re, te, rp, np ,e, ap);
translate([re/2,0,0]) color("black") cylinder(r=rp, te, $fn=32); //6800 D=19
color("red") pins(re, te, rp, np ,e, ap);
}
top(re, te, rp, np ,e, ap);