-
Notifications
You must be signed in to change notification settings - Fork 1
/
twist.js
37 lines (31 loc) · 795 Bytes
/
twist.js
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
function partCylinder(iR, oR, h) {
return difference(
[
cylinder({r: oR, h: h}),
cylinder({r: iR, h: h}),
translate([0, 0, 0], cube({ size: [oR, oR, h]})),
translate([-oR, 0, 0], cube({ size: [oR, oR, h]})),
translate([0, -oR, 0], cube({ size: [oR, oR, h]})),
translate(
[-oR, -oR, h/2],
rotate([30,0,0],
cube({size: [oR*2, oR*2, h]})
)
)
]
);
}
function main () {
var shapes = [];
for(var i=0; i < 13; i++){
shapes.push(
rotate([0,0,i*22.5],
translate([0,4,0],
partCylinder(5,6,10)
)
))
}
return union(
shapes
)
}