-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtriebwerk.scad
126 lines (111 loc) · 3.18 KB
/
triebwerk.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
// Generated by SolidPython 1.1.3 on 2022-04-23 11:14:19
$fn = 1000;
union() {
translate(v = [65, -10.0000000000, 0]) {
difference() {
cube(size = [20, 20, 5]);
translate(v = [10.0000000000, 10.0000000000, 0]) {
cylinder(h = 5, r = 3);
}
}
}
translate(v = [-85, -10.0000000000, 0]) {
difference() {
cube(size = [20, 20, 5]);
translate(v = [10.0000000000, 10.0000000000, 0]) {
cylinder(h = 5, r = 3);
}
}
}
translate(v = [-10.0000000000, -85, 0]) {
difference() {
cube(size = [20, 20, 5]);
translate(v = [10.0000000000, 10.0000000000, 0]) {
cylinder(h = 5, r = 3);
}
}
}
translate(v = [-10.0000000000, 65, 0]) {
difference() {
cube(size = [20, 20, 5]);
translate(v = [10.0000000000, 10.0000000000, 0]) {
cylinder(h = 5, r = 3);
}
}
}
difference() {
difference() {
cylinder(h = 60, r = 70);
cylinder(h = 60, r = 65);
}
translate(v = [-67, 0, 50]) {
rotate(a = [0, 0, 45]) {
cylinder($fn = 4, h = 10, r1 = 7.5000000000, r2 = 5);
}
}
translate(v = [67, 0, 50]) {
rotate(a = [0, 0, 45]) {
cylinder($fn = 4, h = 10, r1 = 7.5000000000, r2 = 5);
}
}
}
}
/***********************************************
********* SolidPython code: **********
************************************************
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;')
************************************************/