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