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