Rev Author Line No. Line
3884 vinchi9 1 r = 35;
2 h = 20.32;
3 thickness = 2;
4  
5 /*
6 for(i=[[0,1],[1,-1],[2,1],[3,-1]]){
7 rotate([0,0,90*i[1]]){translate([0,0,i[0]*h]){shield_part();}}
8 }*/
9  
10  
11 shield_part();
12  
13 module shield_part(){
14 difference(){
15 difference(){
16 translate([0,0,0.01]){scale(0.999){part(r,h);}}
17 resize([2*r-thickness*2,2*r-thickness*2,0]){part(r,h);}
18 }
19 union(){
20 translate([0,0,1.3*h-h/8]){cube([2*r/1.5,thickness,0.3*h],center=true);
21 cube([thickness,2*r/1.5,0.3*h],center=true);}
22 }
23 }
24  
25 difference(){
26 difference(){
27 intersection(){
28 union(){
29 translate([-thickness/2,thickness-r,0]){cube([thickness,2*r-thickness*2,h]);}
30 translate([thickness-r,-thickness/2,0]){cube([2*r-thickness*2,thickness,h]);}
31 }
32 resize([2*r-thickness*2,2*r-thickness*2,0]){part(r,h);}
33 }
34 translate([0,0,-0.1]){cylinder(h=h,r=r/1.6-thickness,$fn=100);}
35 }
36 cylinder(h=h*2,r1=r/1.6-2*thickness,r2=r*0.8,$fn=100);
37 }
38 rotate([0,0,45]){
39 translate([0,0,h/6]){
40 union(){
41 difference(){
42 difference(){
43 cube([sqrt(2*pow(r/1.6,2)),sqrt(2*pow(r/1.6,2)),h/3],center=true);
44 cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h/2],center=true);
45 }
46 rotate([0,90,0]){
47 translate([0,(sqrt(2*pow(r/1.6,2))+thickness)/4,0]){
48 cube([1.5*thickness,4*thickness,sqrt(2*pow(r/1.6,2)+thickness)+thickness],center=true);
49 }
50 }
51 }
52 translate([(sqrt(2*pow(r/1.6,2))-thickness*3)/2,-(sqrt(2*pow(r/1.6,2))+thickness)/4,2.9*h/6]){
53 cube([thickness,thickness*3.95,h*1.3],center=true);}
54 translate([-(sqrt(2*pow(r/1.6,2))-thickness*3)/2,-(sqrt(2*pow(r/1.6,2))+thickness)/4,2.9*h/6]){
55 cube([thickness,thickness*3.95,h*1.3],center=true);}
56  
57 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]){
58 rotate([0,0,90]){
59 difference(){
60 cube([thickness*3.95,thickness,thickness],center=true);
61 translate([-thickness*2,thickness/2,-thickness/2]){rotate([45,0,0]){cube(thickness*4);}}
62 }
63 }
64 }
65 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]){
66 rotate([0,0,-90]){
67 difference(){
68 cube([thickness*3.95,thickness,thickness],center=true);
69 translate([-thickness*2,thickness/2,-thickness/2]){rotate([45,0,0]){cube(thickness*4);}}
70 }
71 }
72 }
73 }
74 }
75 }
76 }
77  
78 module part(r,h){
79 difference(){
80 intersection(){
81 translate([-r,-r,0]){cube([2*r,2*r,h]);}
82 cylinder(h=h, r=r,$fn=100);
83 }
84 translate([0,0,h/5]){
85 difference(){
86 translate([-r,-r,0]){cube([r*2,r*2,h+1]);}
87 resize([0,0,h*5/3]){sphere(r=r,$fn=100);}
88 }
89 }
90 }
91 cylinder(h=1.3*h,r=r/1.5,$fn=100);
92 }