/Designs/Measuring_instruments/AWS02A/CAD/src/rounded_screen/rounded_screen_cap.scad
0,0 → 1,56
r = 35;
h = 20.32;
thickness = 2;
 
shield_top();
 
module shield_top(){
difference(){
top(r,h);
translate([0,0,-thickness]){top(r-thickness,h-thickness);}
}
difference(){
intersection(){
union(){
translate([-thickness/2,thickness-r,0]){cube([thickness,2*r-thickness*2,h]);}
translate([thickness-r,-thickness/2,0]){cube([2*r-thickness*2,thickness,h]);}
}
translate([0,0,-thickness]){top(r-thickness,h-thickness);}
}
rotate([0,0,45]){
cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h*5],center=true);
}
}
 
rotate([0,0,45]){
translate([0,0,h/6]){
difference(){
difference(){
cube([sqrt(2*pow(r/1.6,2)),sqrt(2*pow(r/1.6,2)),h/3],center=true);
cube([sqrt(2*pow(r/1.6,2))-thickness*2,sqrt(2*pow(r/1.6,2))-thickness*2,h/2],center=true);
}
rotate([0,90,0]){
translate([0,(sqrt(2*pow(r/1.6,2))+thickness)/4,0]){
cube([1.5*thickness,4*thickness,sqrt(2*pow(r/1.6,2)+thickness)+thickness],center=true);
}
}
}
}
}
}
 
module top(r,h){
difference(){
intersection(){
translate([-r,-r,0]){cube([2*r,2*r,h]);}
cylinder(h=h, r=r,$fn=100);
}
translate([0,0,h/5]){
difference(){
translate([-r,-r,0]){cube([r*2,r*2,h+1]);}
resize([0,0,h*5/3]){sphere(r=r,$fn=100);}
}
}
}
 
}