- |
|
1 |
use <library.scad> |
- |
|
2 |
|
1 |
Clear=0.175; // size of tolerance zone |
3 |
Clear=0.175; // size of tolerance zone |
2 |
thickness = 2; // global wall thickness |
4 |
thickness = 2; // global wall thickness |
3 |
height = 15; // height of one screen element |
5 |
height = 15; // height of one screen element |
4 |
screen_radius = 75/2; // outer radius of screen |
6 |
screen_radius = 75/2; // outer radius of screen |
5 |
tube_radius=30/2; // inner radius of the space for a sensor |
7 |
tube_radius=30/2; // inner radius of the space for a sensor |
6 |
screen_bevel = 10; // bevel of outer screen wall |
8 |
screen_bevel = 10; // bevel of outer screen wall |
7 |
num_ribs = 3; // number of holding ribs |
9 |
num_ribs = 3; // number of holding ribs |
8 |
cap_radius = screen_radius * 1.5; |
10 |
cap_radius = screen_radius * 1.5; |
9 |
inner_ring_thickness = thickness *2; |
11 |
inner_ring_thickness = thickness *2; |
10 |
|
12 |
|
11 |
|
13 |
|
12 |
angle_sep = 360/num_ribs; |
14 |
angle_sep = 360/num_ribs; |
13 |
|
15 |
|
14 |
cap_height = cap_radius - sqrt(cap_radius*cap_radius - (screen_radius - screen_bevel)*(screen_radius - screen_bevel)); |
16 |
cap_height = cap_radius - sqrt(cap_radius*cap_radius - (screen_radius - screen_bevel)*(screen_radius - screen_bevel)); |
15 |
|
17 |
|
16 |
difference () { |
18 |
difference () { |
17 |
|
19 |
|
18 |
union() { |
20 |
union() { |
19 |
//cap outer shell |
21 |
//cap outer shell |
20 |
intersection () { |
22 |
intersection () { |
21 |
translate ([0,0,-cap_radius + height + cap_height]) |
23 |
translate ([0,0,-cap_radius + height + cap_height]) |
22 |
sphere(cap_radius, $fn=100); |
24 |
sphere(cap_radius, $fn=100); |
23 |
|
25 |
|
24 |
//screen outer shell |
26 |
//screen outer shell |
25 |
cylinder (h=screen_radius*(height/screen_bevel),r1=screen_radius ,r2=0,$fn=100); |
27 |
cylinder (h=screen_radius*(height/screen_bevel),r1=screen_radius ,r2=0,$fn=100); |
26 |
} |
28 |
} |
27 |
|
29 |
|
28 |
// cap hook |
30 |
// cap holder |
29 |
translate ([0,0,height + (cap_height-thickness)]) |
31 |
translate ([0,0,height + (cap_height-thickness)]) |
30 |
difference () { |
- |
|
31 |
cylinder (h=height/2,r1=screen_radius/4,r2=screen_radius/4 - thickness,$fn=100); |
- |
|
32 |
|
- |
|
33 |
translate ([0,screen_radius/4,2.5]) |
- |
|
34 |
rotate ([90,0,0]) |
- |
|
35 |
cylinder (h=screen_radius/2,r=3, $fn=100); |
- |
|
36 |
|
- |
|
37 |
translate ([-screen_radius/4,0,2.5]) |
- |
|
38 |
rotate ([0,90,0]) |
- |
|
39 |
cylinder (h=screen_radius/2,r=3, $fn=100); |
32 |
screen_holder(height, screen_radius, thickness); |
40 |
} |
- |
|
41 |
|
33 |
|
42 |
|
34 |
|
43 |
} |
35 |
} |
44 |
|
36 |
|
45 |
union() { |
37 |
union() { |
46 |
intersection () { |
38 |
intersection () { |
47 |
//cap inner cavity |
39 |
//cap inner cavity |
48 |
translate ([0,0,-cap_radius + height + cap_height ]) |
40 |
translate ([0,0,-cap_radius + height + cap_height ]) |
49 |
sphere(cap_radius-thickness, $fn=100); |
41 |
sphere(cap_radius-thickness, $fn=100); |
50 |
|
42 |
|
51 |
//screen inner cavity (height is solved by triangle similarity) |
43 |
//screen inner cavity (height is solved by triangle similarity) |
52 |
translate ([0,0, -Clear/2 ]) |
44 |
translate ([0,0, -Clear/2 ]) |
53 |
cylinder (h=(screen_radius - thickness)*(height/screen_bevel),r1=screen_radius - thickness ,r2=0,$fn=100); |
45 |
cylinder (h=(screen_radius - thickness)*(height/screen_bevel),r1=screen_radius - thickness ,r2=0,$fn=100); |
54 |
} |
46 |
} |
55 |
} |
47 |
} |
56 |
} |
48 |
} |
57 |
|
49 |
|
58 |
|
50 |
|
59 |
|
51 |
|
60 |
// center ribs |
52 |
// center ribs |
61 |
for (i = [0 : (num_ribs-1)]) { |
53 |
for (i = [0 : (num_ribs-1)]) { |
62 |
rotate ([90,0,angle_sep * i]) |
54 |
rotate ([90,0,angle_sep * i]) |
63 |
translate ([0,0,-thickness/2]) |
55 |
translate ([0,0,-thickness/2]) |
64 |
linear_extrude (height = thickness, convexity = 10) |
56 |
linear_extrude (height = thickness, convexity = 10) |
65 |
polygon(points=[[0, cap_height + height],[tube_radius + thickness - Clear, 0],[screen_radius - thickness,0],[screen_radius - screen_bevel - thickness,height]]); |
57 |
polygon(points=[[0, cap_height + height],[tube_radius + thickness - Clear, 0],[screen_radius - thickness,0],[screen_radius - screen_bevel - thickness,height]]); |
66 |
|
58 |
|
67 |
} |
59 |
} |