Rev Author Line No. Line
3883 vinchi9 1 r = 35;
2 h = 20.32;
3 thickness = 2;
4 a = 10.16;
5 d = 1.6;
6  
7 shield_bottom();
8 rotate([0,0,135]){translate([140,0,0]){bottom2();}}
9 //color("blue"){rotate([0,0,45]){translate([0,-(sqrt(2*pow(r/1.6,2))+thickness)/4,thickness+30]){cube([10,2,60],center=true);}}} // SHT25V01A
10  
11  
12 for(i=[[1,-1],[2,1]/*,[3,-1]*/]){
13 rotate([0,0,90*i[1]]){translate([0,0,i[0]*h]){shield_part();}}
14 }
15  
16 rotate([0,0,-90]){translate([0,0,3*h]){shield_top(r,h,thickness);}}
17  
18 module shield_top(){
19 difference(){
20 top(r,h);
21 translate([0,0,-thickness]){top(r-thickness,h-thickness);}
22 }
23 difference(){
24 intersection(){
25 union(){
26 translate([-thickness/2,thickness-r,0]){cube([thickness,2*r-thickness*2,h]);}
27 translate([thickness-r,-thickness/2,0]){cube([2*r-thickness*2,thickness,h]);}
28 }
29 translate([0,0,-thickness]){top(r-thickness,h-thickness);}
30 }
31 rotate([0,0,45]){
32 cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h*5],center=true);
33 }
34 }
35  
36 rotate([0,0,45]){
37 translate([0,0,h/6]){
38 difference(){
39 difference(){
40 cube([sqrt(2*pow(r/1.6,2)),sqrt(2*pow(r/1.6,2)),h/3],center=true);
41 cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h/2],center=true);
42 }
43 rotate([0,90,0]){
44 translate([0,(sqrt(2*pow(r/1.6,2))+thickness)/4,0]){
45 cube([1.5*thickness,4*thickness,sqrt(2*pow(r/1.6,2)+thickness)+thickness],center=true);
46 }
47 }
48 }
49 }
50 }
51 }
52  
53 module top(r,h){
54 difference(){
55 intersection(){
56 translate([-r,-r,0]){cube([2*r,2*r,h]);}
57 cylinder(h=h, r=r,$fn=100);
58 }
59 translate([0,0,h/5]){
60 difference(){
61 translate([-r,-r,0]){cube([r*2,r*2,h+1]);}
62 resize([0,0,h*5/3]){sphere(r=r,$fn=100);}
63 }
64 }
65 }
66  
67 }
68  
69 module shield_part(){
70 difference(){
71 difference(){
72 translate([0,0,0.01]){scale(0.999){part(r,h);}}
73 resize([2*r-thickness*2,2*r-thickness*2,0]){part(r,h);}
74 }
75 union(){
76 translate([0,0,1.3*h-h/8]){cube([2*r/1.5,thickness,0.3*h],center=true);
77 cube([thickness,2*r/1.5,0.3*h],center=true);}
78 }
79 }
80  
81 difference(){
82 difference(){
83 intersection(){
84 union(){
85 translate([-thickness/2,thickness-r,0]){cube([thickness,2*r-thickness*2,h]);}
86 translate([thickness-r,-thickness/2,0]){cube([2*r-thickness*2,thickness,h]);}
87 }
88 resize([2*r-thickness*2,2*r-thickness*2,0]){part(r,h);}
89 }
90 translate([0,0,-0.1]){cylinder(h=h,r=r/1.6-thickness,$fn=100);}
91 }
92 cylinder(h=h*2,r1=r/1.6-2*thickness,r2=r*0.8,$fn=100);
93 }
94 rotate([0,0,45]){
95 translate([0,0,h/6]){
96 union(){
97 difference(){
98 difference(){
99 cube([sqrt(2*pow(r/1.6,2)),sqrt(2*pow(r/1.6,2)),h/3],center=true);
100 cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h/2],center=true);
101 }
102 rotate([0,90,0]){
103 translate([0,(sqrt(2*pow(r/1.6,2))+thickness)/4,0]){
104 cube([1.5*thickness,4*thickness,sqrt(2*pow(r/1.6,2)+thickness)+thickness],center=true);
105 }
106 }
107 }
108 translate([(sqrt(2*pow(r/1.6,2))-thickness*3)/2,-(sqrt(2*pow(r/1.6,2))+thickness)/4,2.9*h/6]){
109 cube([thickness,thickness*3.95,h*1.3],center=true);}
110 translate([-(sqrt(2*pow(r/1.6,2))-thickness*3)/2,-(sqrt(2*pow(r/1.6,2))+thickness)/4,2.9*h/6]){
111 cube([thickness,thickness*3.95,h*1.3],center=true);}
112  
113 translate([-(sqrt(2*pow(r/1.6,2))-thickness*3)/2-thickness,-(sqrt(2*pow(r/1.6,2))+thickness)/4,h-(1.5*thickness/6)+0.05]){
114 rotate([0,0,90]){
115 difference(){
116 cube([thickness*3.95,thickness,thickness],center=true);
117 translate([-thickness*2,thickness/2,-thickness/2]){rotate([45,0,0]){cube(thickness*4);}}
118 }
119 }
120 }
121 translate([(sqrt(2*pow(r/1.6,2))-thickness*3)/2+thickness,-(sqrt(2*pow(r/1.6,2))+thickness)/4,h-(1.5*thickness/6)+0.05]){
122 rotate([0,0,-90]){
123 difference(){
124 cube([thickness*3.95,thickness,thickness],center=true);
125 translate([-thickness*2,thickness/2,-thickness/2]){rotate([45,0,0]){cube(thickness*4);}}
126 }
127 }
128 }
129 }
130 }
131 }
132 }
133  
134 module part(r,h){
135 difference(){
136 intersection(){
137 translate([-r,-r,0]){cube([2*r,2*r,h]);}
138 cylinder(h=h, r=r,$fn=100);
139 }
140 translate([0,0,h/5]){
141 difference(){
142 translate([-r,-r,0]){cube([r*2,r*2,h+1]);}
143 resize([0,0,h*5/3]){sphere(r=r,$fn=100);}
144 }
145 }
146 }
147 cylinder(h=1.3*h,r=r/1.5,$fn=100);
148 }
149  
150  
151 module shield_bottom(){
152 difference(){
153 difference(){
154 translate([0,0,0.01]){scale(0.999){cylinder(h=1.3*h,r=r/1.5,$fn=100);}}
155 cylinder(h=1.3*h,r=r/1.5-thickness,$fn=100);
156 }
157 union(){
158 translate([0,0,1.3*h-h/8]){cube([2*r/1.5,thickness,0.3*h],center=true);
159 cube([thickness,2*r/1.5,0.3*h],center=true);}
160 translate([(sqrt(2*pow(r/1.6,2))-thickness*3)/2,0,19]){rotate([90,0,-45]){cylinder(h=r*2,r=1,$fn=100,center=true);}}
161 }
162 }
163  
164 rotate([0,0,45]){
165 translate([0,0,h/6]){
166 translate([(sqrt(2*pow(r/1.6,2))-thickness*3)/2,-(sqrt(2*pow(r/1.6,2))+thickness)/4,2.9*h/6]){
167 cube([thickness,thickness*3.95,h*1.3],center=true);}
168 translate([-(sqrt(2*pow(r/1.6,2))-thickness*3)/2,-(sqrt(2*pow(r/1.6,2))+thickness)/4,2.9*h/6]){
169 cube([thickness,thickness*3.95,h*1.3],center=true);}
170  
171 translate([-(sqrt(2*pow(r/1.6,2))-thickness*3)/2-thickness,-(sqrt(2*pow(r/1.6,2))+thickness)/4,h-(1.5*thickness/6)+0.05]){
172 rotate([0,0,90]){
173 difference(){
174 cube([thickness*3.95,thickness,thickness],center=true);
175 translate([-thickness*2,thickness/2,-thickness/2]){rotate([45,0,0]){cube(thickness*4);}}
176 }
177 }
178 }
179 translate([(sqrt(2*pow(r/1.6,2))-thickness*3)/2+thickness,-(sqrt(2*pow(r/1.6,2))+thickness)/4,h-(1.5*thickness/6)+0.05]){
180 rotate([0,0,-90]){
181 difference(){
182 cube([thickness*3.95,thickness,thickness],center=true);
183 translate([-thickness*2,thickness/2,-thickness/2]){rotate([45,0,0]){cube(thickness*4);}}
184 }
185 }
186 }
187 }
188 difference(){
189 translate([0,-(sqrt(2*pow(r/1.6,2))+thickness)/4,thickness+5]){cube([10+2*thickness,2+2*thickness,10],center=true);}
190 translate([0,-(sqrt(2*pow(r/1.6,2))+thickness)/4,thickness+30]){cube([10,2,60],center=true);}
191 }
192 }
193 difference(){
194 cylinder(h=thickness,r=r/1.5-thickness,$fn=100);
195 translate([-5,5,0]){cylinder(h=thickness*3,r=6,$fn=100,center=true);}
196 }
197 difference(){
198 difference(){
199 rotate([0,0,-45]){translate([-50-r/1.5,0,7.5]){cube([120,15,15],center=true);}}
200 cylinder(h=3*h,r=r/1.5-thickness,$fn=100,center=true);
201 }
202 rotate([0,0,-45]){translate([-140,0,0]){cylinder(h=3*20,r=10,center=true,$fn=100);}}
203 }
204 difference(){
205 rotate([0,0,-45]){translate([-140,0,0]){
206 difference(){
207 union(){
208 difference(){
209 cylinder(h=20,r=14,$fn=100);
210 cylinder(h=3*20,r=10,center=true,$fn=100);
211 }
212 difference(){
213 translate([2+1,0,10]){cube([4,50,20],center=true);}
214 cylinder(h=3*20,r=10,center=true,$fn=100);
215 }
216 }
217 translate([-15+1,0,10]){cube(30,center=true);}
218 }
219 }
220 }
221 union(){
222 rotate([0,0,-45]){translate([-140,19.5,10]){rotate([0,90,0]){cylinder(h=10,r=3,$fn=100);}}}
223 rotate([0,0,-45]){translate([-140,-19.5,10]){rotate([0,90,0]){cylinder(h=10,r=3,$fn=100);}}}
224 }
225 }
226 }
227  
228  
229 module bottom2(){
230 difference(){
231 difference(){
232 union(){
233 difference(){
234 cylinder(h=20,r=14,$fn=100);
235 cylinder(h=3*20,r=10,center=true,$fn=100);
236 }
237 difference(){
238 translate([2+1,0,10]){cube([4,50,20],center=true);}
239 cylinder(h=3*20,r=10,center=true,$fn=100);
240 }
241 }
242 translate([-15+1,0,10]){cube(30,center=true);}
243 }
244 union(){
245 translate([0,19.5,10]){rotate([0,90,0]){cylinder(h=10,r=3,$fn=100);}}
246 translate([0,-19.5,10]){rotate([0,90,0]){cylinder(h=10,r=3,$fn=100);}}
247 }
248 }
249 }