-
Notifications
You must be signed in to change notification settings - Fork 0
/
gear-test.scad
123 lines (95 loc) · 2.21 KB
/
gear-test.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
/* Test the orrery gear mesh and couplers */
include <gears.scad>
teeth1=18;
teeth2=30;
dist=(teeth1+teeth2)*pitch / (2*PI) + 0.5;
module planet1_gear()
{
bore=5;
color("red") {
orrery_gear(teeth1, height=5-washer, bore_diameter=bore, direction=+1);
washer(bore);
shaft_top(25, bore, 2);
}
}
module planet2_gear()
{
bore=8;
color("blue") {
orrery_gear(teeth2, height=5-washer, bore_diameter=bore, direction=+1);
shaft_top(15, bore, 2);
washer(bore);
}
}
module drive_gear()
{
bore=5;
orrery_gear(teeth2, 5, pitch=pitch, direction=-1, bore_diameter=bore);
translate([0,0,5])
orrery_gear(teeth1, 5-washer, pitch=pitch, direction=-1, bore_diameter=bore);
// no washer, since it has a physical one
//translate([0,0,5]) washer(bore);
}
module base_plate()
{
render() difference()
{
hull() {
cylinder(d=20, h=10-washer);
translate([dist,0,0]) cylinder(d=20, h=10-washer);
}
translate([0,0,0])
{
translate([0,0,-1]) cylinder(d=5,$fn=32,h=10+2);
hexnut(5);
translate([0,0,10-3.5]) hexnut(5);
}
translate([dist,0,0]) {
translate([0,0,-1]) cylinder(d=5,$fn=32,h=10+2);
hexnut(5);
translate([0,0,10-3.5]) hexnut(5);
}
translate([dist/2,0,-1]) cylinder(d=18,h=12);
}
//washer(5);
//%cylinder(d=5,h=50);
translate([dist,0,0]) {
//washer(5);
//%cylinder(d=5,h=50);
}
}
module top_plate()
{
render() difference() {
hull() {
cylinder(d=20, h=5);
translate([dist,0,0]) cylinder(d=20, h=5);
}
// for the output shaft, inner 8, outer 10
translate([0,0,-1]) cylinder(d=11, h=5+2, $fn=32);
// for the input shaft
translate([dist,0,-1]) cylinder(d=5, h=5+2, $fn=32);
translate([dist,0,2]) hexnut(5);
translate([dist/2,0,-1]) cylinder(d=18,h=12);
}
}
module assembly()
{
translate([0,0,0*height]) base_plate();
translate([0,0,4*height]) top_plate();
rotate([0,0,180/teeth1])
translate([0,0,2*height]) planet1_gear();
rotate([0,0,180/teeth2])
translate([0,0,3*height]) planet2_gear();
translate([dist,0,2*height]) drive_gear();
}
module plate()
{
translate([0,30,0]) top_plate();
//translate([0,30,0]) base_plate();
translate([0,60,0]) planet1_gear();
translate([50,60,0]) planet2_gear();
//translate([70,10,0]) drive_gear();
}
//assembly();
plate();