-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTriebwerkHalter.py
65 lines (55 loc) · 1.84 KB
/
TriebwerkHalter.py
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
from solid import *
from solid.utils import *
pipeRadius = 65
pipe_height = 60
screw_width = 20
screw_height = 5
def pipe(innerRadius,thickness,height):
return difference()(
cylinder(r=innerRadius + thickness,h=height),
cylinder(r=innerRadius,h=height)
)
def trapetz(length,thickWidth,smallWidth,height):
return polyhedron(points=[[0,0,0], [0,(thickWidth-smallWidth)/2,height],
[0,(thickWidth-smallWidth)/2 + smallWidth,height], [0,thickWidth,0],
[length,0,0], [length,(thickWidth-smallWidth)/2,height],
[length,(thickWidth-smallWidth)/2 + smallWidth,height], [length,thickWidth,0]],
faces=[[0,1,2,3],[4,5,6,7],[0,3,4,7],
[1,2,5,6],
[0,4,5,1],[3,4,6,7],[2,3,6,7]])
def screw_holder(width,height):
return difference()(
cube([width,width,height]),
translate([width/2,width/2,0])(
cylinder(r=3,h=height)
)
)
d = union()(
#trapetz(20,15,10,10),
translate([pipeRadius,-screw_width/2,0])(
screw_holder(screw_width,screw_height)
),
translate([-pipeRadius-screw_width,-screw_width/2,0])(
screw_holder(screw_width,screw_height)
),
translate([-screw_width/2,-pipeRadius-screw_width,0])(
screw_holder(screw_width,screw_height)
),
translate([-screw_width/2,pipeRadius,0])(
screw_holder(screw_width,screw_height)
),
difference()(
pipe(pipeRadius,5,pipe_height),
translate([-pipeRadius-2,0,pipe_height-10])(
rotate([0,0,45])(
cylinder(r1=7.5,r2=5,h=10,segments=4)
)
),
translate([pipeRadius+2,0,pipe_height-10])(
rotate([0,0,45])(
cylinder(r1=7.5,r2=5,h=10,segments=4)
)
)
)
)
scad_render_to_file(d, 'triebwerk.scad', file_header = '$fn = 1000;')