-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimplePlanetaryToy.scad
124 lines (106 loc) · 3.1 KB
/
SimplePlanetaryToy.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
include <./MCAD/involute_gears.scad>;
// Differential Planetary Gearset
fourgears();
//ring1();
//ring2();
//armature();
//assembly();
d1=60;// diameter of lower ring
t=4;// thickness of all gears
t1=1.2;// thickness of ring faces
b=0.25;// backlash
c=0.2;// clearance
pa=20;// pressure angle
s=0.4;// vertical clearance
td=0.8;// thickness of planet disk
pd=1.1;// planet disk diameter / pitch diameter
dp=0.85;// ring gear diameter / outside ring diameter
ns=10;// number of teeth on sun (lower)
np1=20;// number of teeth on lower planet
plug=2;
plugGapModifier=1.2;
//--------- Don't edit below here unless you know what you're doing.
nr1=ns+2*np1;// number of teeth on lower ring
pitch=nr1/(d1*dp);// diametral pitch of all gears
R1=(1+nr1/ns);// sun to planet-carrier ratio
Rp=(np1+ns)/np1;// planet to planet-carrier ratio
R=R1;
echo(str("na is : ",nr1));
echo(str("Gear Ratio is 1 : ",R1));
module assembly(){
color([0.5,0.5,0.5])ring1();
translate([0,0,0])rotate([0,0,180/ns+360*R*$t])
color([1,0,0])sun();
rotate([0,0,360*R*$t])translate([(ns+np1)/pitch/2,0,0])rotate([0,0,-360*R*(1+Rp)*$t])
color([0,0,1])planet();
rotate([0,0,120+360*R*$t])translate([(ns+np1)/pitch/2,0,0])rotate([0,0,-120-360*R*(1+Rp)*$t])
color([0,0,1])planet();
rotate([0,0,-120+360*R*$t])translate([(ns+np1)/pitch/2,0,0])rotate([0,0,120-360*R*(1+Rp)*$t])
color([0,0,1])planet();
rotate([0,0,360*R*$t])translate([(ns+np1)/pitch/2,0,0]) color([0,0,1])arm();
rotate([0,0,120+360*R*$t])translate([(ns+np1)/pitch/2,0,0]) color([0,0,1])arm();
rotate([0,0,-120+360*R*$t])translate([(ns+np1)/pitch/2,0,0]) color([0,0,1])arm();
}
module fourgears(){
sun();
for(i=[0,120,-120])
rotate([0,0,i])translate([2*(ns+np1)/pitch/2,0,0])
rotate([0,0,-i])planet();
}
module sun()
union(){
gear(number_of_teeth=ns,
diametral_pitch=pitch,
gear_thickness=t,
rim_thickness=t,
hub_thickness=t,
bore_diameter=0,
backlash=b,
clearance=c,
pressure_angle=pa);
cylinder(r=plug, h=t*3);
}
module planet()
union(){
gear(number_of_teeth=np1,
diametral_pitch=pitch,
gear_thickness=t+s+td/2,
rim_thickness=t+s+td/2,
hub_thickness=t+s+td/2,
bore_diameter=0,
backlash=b,
clearance=c,
pressure_angle=pa);
cylinder(r=plug,t*2);
}
module arm()
translate([0,0,t])color([0,1,0])
difference(){
union(){
cylinder(r=4,t*.9);
translate([t,0,t*.40])rotate([90,0,-120])cube([t/2,t/2,t*7]);
}
translate([0,0,-t/2]) cylinder(r=plug*plugGapModifier,h=t*2);
}
module armature() rotate([0,180,0]){
rotate([0,0,360*R*$t])translate([(ns+np1)/pitch/2,0,0]) color([0,0,1])arm();
rotate([0,0,120+360*R*$t])translate([(ns+np1)/pitch/2,0,0]) color([0,0,1])arm();
rotate([0,0,-120+360*R*$t])translate([(ns+np1)/pitch/2,0,0]) color([0,0,1])arm();
}
module ring1() insidegear(nr1);
module insidegear(n)
//rotate([180,0,0])translate([0,0,-t])
difference(){
cylinder(r=n/pitch/2/dp,h=t+t1);
// translate([0,0,-0.5])cylinder(r=3,h=t+t1+1);
translate([0,0,-.5])
gear(number_of_teeth=n,
diametral_pitch=pitch,
gear_thickness=t+5,
rim_thickness=t+5,
hub_thickness=t+5,
bore_diameter=0,
backlash=-b,
clearance=0,
pressure_angle=pa);
}