-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nima17.coscad
40 lines (30 loc) · 1.11 KB
/
Nima17.coscad
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
shaft_len = 22
shaft_radius = 2.5
motorBody_len = 47.5
motorBody_width = 42
motorRing_radius = 11
motorRing_height = 2
mountingholes_fromcent = 15.5
mountingholes_radius = 1.5
mountingholes_depth = 4.5
motorBody = new Cube
size: [motorBody_width, motorBody_width, motorBody_len]
center: [0, 0, motorBody_len / 2]
ring = new Cylinder
h: motorRing_height
r: motorRing_radius
center: [0, 0, motorBody_len]
shaft = new Cylinder
h: shaft_len
r: shaft_radius
center: [0, 0, motorBody_len + motorRing_radius]
mountingholes = new Cylinder
h: mountingholes_depth
r: mountingholes_radius
center: [0, 0, motorBody_len - (mountingholes_depth / 2) ]
motor = motorBody.union([ring, shaft])
motor = motor.subtract(mountingholes.translate [mountingholes_fromcent, mountingholes_fromcent, 0] )
motor = motor.subtract(mountingholes.translate [-mountingholes_fromcent, mountingholes_fromcent, 0] )
motor = motor.subtract(mountingholes.translate [mountingholes_fromcent, -mountingholes_fromcent, 0] )
motor = motor.subtract(mountingholes.translate [-mountingholes_fromcent, -mountingholes_fromcent, 0] )
return motor