-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathescapement.scad
247 lines (239 loc) · 7.14 KB
/
escapement.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
// Sourced from rloginunix: https://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_general;action=display;num=1437253052
module ring(
outerRadius,
innerRadius,
thickness,
nFrags = 32 )
{
difference()
{
cylinder( h = thickness, r = outerRadius, $fn = nFrags );
cylinder( h = thickness, r = innerRadius, $fn = nFrags );
}
}
module ewTooth(
ewtHeight,
ewtTrailingAngle,
ewtIncludedAngle,
ewtThickness )
{
rotate( -ewtTrailingAngle, [ 0, 0, 1 ] )
rotate( 180, [ 0, 0, 1 ] )
difference()
{
cube( [ ewtHeight, ewtHeight, ewtThickness ] );
translate( [ 0, 0.85, 0 ] ) // Tooth tip thickness.
rotate( ewtIncludedAngle, [ 0, 0, 1 ] )
cube( [ ewtHeight * 2, ewtHeight, ewtThickness ] );
}
}
module ringWithTeeth(
ewTipRadius,
ewRootRadius,
ewRimWidth,
ewToothCount,
ewThickness )
{
ewRimRadius = ewRootRadius - ewRimWidth - 0.75; // Hide teeth' roots.
union()
{
ring( ewRootRadius, ewRimRadius, ewThickness );
for ( t = [ 0 : ewToothCount ] )
{
rotate( t * EwAngularPitch, [ 0, 0, 1 ] )
translate( [ ewTipRadius, 0, 0 ] )
children( 0 );
}
}
}
module ew(
ewTipRadius,
ewRootRadius,
ewRimWidth,
ewToothCount,
ewtTrailingAngle,
ewtIncludedAngle,
ewSpokesCount,
ewHubOuterRadius,
ewHubInnerRadius,
ewThickness = StdThickness )
{
ewToothHeight = ewTipRadius - ewRootRadius + ewRimWidth;
ewSpokeHeight = ewRootRadius - ewHubInnerRadius;
union()
{
/*
The escape wheel's hub.
*/
ring( ewHubOuterRadius, ewHubInnerRadius, ewThickness );
/*
The wheel itself plust the teeth.
*/
ringWithTeeth( ewTipRadius,
ewRootRadius,
ewRimWidth,
ewToothCount,
ewThickness )
ewTooth( ewToothHeight,
ewtTrailingAngle,
ewtIncludedAngle,
ewThickness );
/*
The spokes.
*/
for ( s = [ 0 : ewSpokesCount ] )
{
rotate( s * EwInterSpokeAngle, [ 0, 0, 1 ] )
translate( [ ewHubInnerRadius, -EwSpokeWidth / 2, 0 ] )
cube( [ ewSpokeHeight, EwSpokeWidth, ewThickness ] );
}
}
}
module entryPallet()
{
union()
{
cube( [ ForkOuterRadius, ForkOuterRadius, StdThickness ] );
rotate( DnCnF, [ 0, 0, 1 ] )
cube( [ ForkOuterRadius, ForkOuterRadius, StdThickness ] );
}
}
module dbfork(
fHubOuterRadius,
fHubInnerRadius,
fThickness = StdThickness )
{
/*
The vertical axis of symmetry of the fork is OX.
*/
union()
{
/*
The fork's hub.
*/
ring( fHubOuterRadius, fHubInnerRadius, fThickness );
/*
The Entry pallet. The fork's arm goes first.
*/
rotate( 90 + ForkEntryArmAngle, [ 0, 0, 1 ] )
translate( [ fHubInnerRadius, -(ForkArmWidth+ForkArmExtraWidth) / 2, 0 ] )
cube( [ ForkArmLength, ForkArmWidth, fThickness ] );
/*
The pallet itself.
*/
intersection()
{
ring( ForkOuterRadius, ForkInnerRadius, fThickness );
translate( [ -ImpFcX, ImpFcY, 0 ] )
rotate( -CnFW - DnCnF, [ 0, 0, 1 ] )
entryPallet();
/*
This cube cuts off the extra ring.
*/
rotate( 90 + ForkEntryArmAngle, [ 0, 0, 1 ] )
cube( [ ForkOuterRadius, ForkOuterRadius, fThickness ] );
}
/*
The Exit pallet. The fork's arm goes first.
*/
rotate( -90 - ForkExitArmAngle, [ 0, 0, 1 ] )
translate( [ fHubInnerRadius, -ForkArmWidth / 2, 0 ] )
cube( [ ForkArmLength, ForkArmWidth, fThickness ] );
/*
The pallet itself.
*/
intersection()
{
ring( ForkOuterRadius, ForkInnerRadius, fThickness );
translate( [ -ImpFcX, -ImpFcY, 0 ] )
rotate( -( 90 - CnFW + DnCnF ), [ 0, 0, 1 ] )
cube( [ ForkOuterRadius, ForkOuterRadius, fThickness ] );
/*
This cube cuts off the extra ring.
*/
rotate( 180 - ForkExitArmAngle, [ 0, 0, 1 ] )
cube( [ ForkOuterRadius, ForkOuterRadius, fThickness ] );
}
}
}
/*
A Basic Scaling Unit for the entire drawing.
*/
BSU = 1.0;
StdThickness = 3 * BSU;
/*
The Escape Wheel parameters.
*/
EwTipRadius = 60 * BSU; // Distance from the center of the wheel to the tip of the tooth.
EwRootRadius = 0.75 * EwTipRadius;
EwRimWidth = 0.085 * EwTipRadius;
EwToothCount = 30;
EwToothTrailingAngle = 18;
EwToothIncludedAngle = 12;
EwSpokesCount = 5;
EwSpokeWidth = EwRimWidth;
// EwHubOuterRadius = 7 * BSU;
EwHubOuterRadius = 6.5/0.55 * BSU;
EwHubInnerRadius = 0.55 * EwHubOuterRadius;
EwAngularPitch = 360 / EwToothCount;
EwInterSpokeAngle = 360 / EwSpokesCount;
/*
The Deadbeat Fork parameters.
*/
ForkToothSpanCount = 7.5;
ForkEntryArmAngle = 35;
ForkExitArmAngle = 32;
ForkLockAngle = 1;
ForkDropAngle = 1;
ForkLiftAngle = 2;
ForkPalletAngularWidth = EwAngularPitch / 2 - ForkDropAngle;
ForkWheelPalletAngle = ( EwAngularPitch * ForkToothSpanCount ) / 2;
ForkWheelDistance = EwTipRadius / cos( ForkWheelPalletAngle );
ForkOuterRadius = sqrt( pow( EwTipRadius, 2 ) +
pow( ForkWheelDistance, 2 ) -
2 * EwTipRadius * ForkWheelDistance *
cos( ForkWheelPalletAngle + ForkPalletAngularWidth / 2 ) );
ForkInnerRadius = sqrt( pow( EwTipRadius, 2 ) +
pow( ForkWheelDistance, 2 ) -
2 * EwTipRadius * ForkWheelDistance *
cos( ForkWheelPalletAngle - ForkPalletAngularWidth / 2 ) );
ForkPalletLinearWidth = ForkOuterRadius - ForkInnerRadius;
LnFW = asin( ( EwTipRadius / ForkOuterRadius ) *
sin( ForkWheelPalletAngle + ForkPalletAngularWidth / 2 ) );
CnFW = LnFW - ForkLockAngle;
ImpFcX = ForkOuterRadius * cos( CnFW );
ImpFcY = ForkOuterRadius * sin( CnFW );
CnDn = sqrt( pow( ForkOuterRadius, 2 ) +
pow( ForkInnerRadius, 2 ) -
2 * ForkOuterRadius * ForkInnerRadius *
cos( ForkLiftAngle ) );
DnCnF = asin( (ForkInnerRadius / CnDn ) * sin( ForkLiftAngle ) );
// This makes the fork arms thicker so they flex less.
ForkArmExtraWidth = 3;
ForkArmWidth = ForkPalletLinearWidth+ForkArmExtraWidth;
// ForkHubOuterRadius = 5 * BSU;
// ForkHubInnerRadius = 0.5 * ForkHubOuterRadius;
ForkHubOuterRadius = EwHubOuterRadius+ForkArmExtraWidth;
// ForkHubInnerRadius = EwHubInnerRadius;
ForkHubInnerRadius = 624_pilot_hole_r;
ForkArmLength = ForkOuterRadius - ForkHubInnerRadius;
module escapement_wheel()
{
ew( EwTipRadius,
EwRootRadius,
EwRimWidth,
EwToothCount,
EwToothTrailingAngle,
EwToothIncludedAngle,
EwSpokesCount,
EwHubOuterRadius,
EwHubInnerRadius );
}
/*
The fork's axis of symmetry is along the OX axis.
*/
module escapement_fork()
{
translate( [ ForkWheelDistance, 0, 0 ] )
dbfork( ForkHubOuterRadius, ForkHubInnerRadius );
}