-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbottle.scad
87 lines (78 loc) · 2.28 KB
/
bottle.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
//bottle(
//height = 20,
//diameter = 60,
//thickness = 3,
//filter_diameter = 50,
//filter_height = 4,
//nossle_diameter = 5,
//nossle_height = 20
//);
module skirt_element(h1=1, h2=1, h3=1, w1=1, w2=1, height=1)
{
linear_extrude(height=height) {
polygon(points = [
[0, 0],
[h1, 0],
[h1, w1],
[h1+h2, w1],
[h1+h2, 0],
[h1+h2+h3,0],
[h1+h2+h3,w1+w2],
[0,w1+w2]
]);
}
}
module skirt_guide(
nossle_radius,
skirt_start_height,
skirt_height,
skirt_width)
{
skirt_depth = skirt_width * 2;
translate([skirt_width,nossle_radius,skirt_start_height])
rotate([0,-90,0])
skirt_element(
h2=skirt_height,
w1=skirt_width,
height=skirt_depth);
translate([skirt_width,-nossle_radius,skirt_start_height+2+skirt_height])
rotate([0, 90,180])
skirt_element(
h2=skirt_height,
w1=skirt_width,
height=skirt_depth);
}
module bottle(
height
, diameter
, thickness
, nossle_height
, nossle_diameter
, filter_diameter
, filter_height
, skirt_height=2
, skirt_width=5
)
{
radius = diameter/2;
filter_radius = filter_diameter/2;
nossle_radius = nossle_diameter/2;
first = nossle_height / 2;
second = nossle_height / 2;
rotate_extrude($fn=200)
polygon(points = [
[radius, 0]
, [radius, height]
, [filter_radius, height + first ]
, [filter_radius, height + first + filter_height]
, [nossle_radius, height + first + second + filter_height]
, [nossle_radius + thickness , height + first + second + filter_height]
, [filter_radius + thickness , height + first + filter_height]
, [filter_radius + thickness , height + first ]
, [radius + thickness, height]
, [radius + thickness, 0]
]
);
skirt_start_height = height+nossle_height+filter_height-1;
skirt_guide(nossle_radius, skirt_start_height, skirt_height, skirt_width);
}