Rev Author Line No. Line
3882 vinchi9 1 r = 35;
2 h = 20.32;
3 thickness = 2;
4  
5 shield_top();
6  
7 module shield_top(){
8 difference(){
9 top(r,h);
10 translate([0,0,-thickness]){top(r-thickness,h-thickness);}
11 }
12 difference(){
13 intersection(){
14 union(){
15 translate([-thickness/2,thickness-r,0]){cube([thickness,2*r-thickness*2,h]);}
16 translate([thickness-r,-thickness/2,0]){cube([2*r-thickness*2,thickness,h]);}
17 }
18 translate([0,0,-thickness]){top(r-thickness,h-thickness);}
19 }
20 rotate([0,0,45]){
21 cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h*5],center=true);
22 }
23 }
24  
25 rotate([0,0,45]){
26 translate([0,0,h/6]){
27 difference(){
28 difference(){
29 cube([sqrt(2*pow(r/1.6,2)),sqrt(2*pow(r/1.6,2)),h/3],center=true);
30 cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h/2],center=true);
31 }
32 rotate([0,90,0]){
33 translate([0,(sqrt(2*pow(r/1.6,2))+thickness)/4,0]){
34 cube([1.5*thickness,4*thickness,sqrt(2*pow(r/1.6,2)+thickness)+thickness],center=true);
35 }
36 }
37 }
38 }
39 }
40 }
41  
42 module top(r,h){
43 difference(){
44 intersection(){
45 translate([-r,-r,0]){cube([2*r,2*r,h]);}
46 cylinder(h=h, r=r,$fn=100);
47 }
48 translate([0,0,h/5]){
49 difference(){
50 translate([-r,-r,0]){cube([r*2,r*2,h+1]);}
51 resize([0,0,h*5/3]){sphere(r=r,$fn=100);}
52 }
53 }
54 }
55  
56 }