You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

106 lines
4.2 KiB

wall = 2.0;
tolerance = 0.4;
corner = 20.0;
width=90;
length=38+30+38;
height=58.0;
hdmi_y_space = 33.0;
pi_z = 40;
$fn=250;
module base(x, y, z, thick, bottom_thick) {
translate([corner,corner,-bottom_thick])
difference() {
minkowski() {
cube([x-2*corner,y-2*corner,z]);
cylinder(r=corner+thick,h=0.1);
}
difference() {
translate([0,0,bottom_thick]) minkowski() {
cube([x-2*corner,y-2*corner,z+2]);
cylinder(r=corner,h=0.1);
}
translate([-corner+2,-corner+2,0]) cylinder(r=corner,h=z-8-tolerance); // pi_z+wall+pi_thick
translate([x-corner-2,-corner+2,0]) cylinder(r=corner,h=z-8-tolerance); // z-8
translate([-corner+2,y-corner-2,0]) cylinder(r=corner,h=z-8-tolerance); // bottom_thick+53
translate([x-corner-2,y-corner-2,0]) cylinder(r=corner,h=z-8-tolerance);
}
translate([x/2-corner,y/2-corner+4,-bottom_thick]) cylinder(r=23/2+tolerance,h=3*bottom_thick);
translate([-corner/2,-corner/2,z-8-8]) cylinder(r=2.5/2,h=8+0.2);
translate([x-1.5*corner,-corner/2,z-8-8]) cylinder(r=2.5/2,h=8+0.2);
translate([-corner/2,y-1.5*corner,z-8-8]) cylinder(r=2.5/2,h=8+0.2);
translate([x-1.5*corner,y-1.5*corner,z-8-8]) cylinder(r=2.5/2,h=8+0.2);
}
}
module holes(r, h, w,w2) {
holes_x=58.0;
holes_y=23.0;
translate([0,0,0]) {cylinder(r=r,h=h); translate([-w2/2,0,h/2-2]) cube([w2,r*2,h-4],center=true);}
translate([holes_x,0,0]) {cylinder(r=r,h=h); translate([w/2,0,h/2-2]) cube([w,r*2,h-4],center=true);}
translate([0,holes_y,0]) {cylinder(r=r,h=h); translate([-w2/2,0,h/2-2]) cube([w2,r*2,h-4],center=true);}
translate([holes_x,holes_y,0]) {cylinder(r=r,h=h); translate([w/2,0,h/2-2]) cube([w,r*2,h-4],center=true);}
}
difference() {
union() {
translate([-4-3.5-5,-hdmi_y_space,0]) base(width, length, height, wall, wall);
difference() {
holes(3.5, pi_z+4, 20,13);
translate([0,0,pi_z+4-16]) holes(2.0/2+0.2, pi_z, 0,0);
}
translate([58-(41.4-3.5),-28,pi_z+1.8]) rotate([90,0,0]) { // usb
cylinder(r=6.0/2+tolerance,h=6);
}
}
translate([58-(12.4-3.5),-hdmi_y_space-1+(20/2),pi_z+1.8]) { // hdmi
cube([22,20,13], center=true);
translate([0,-2*wall,0]) cube([17.5,20,9], center=true);
}
translate([58-(41.4-3.5),-25,pi_z+1.8]) rotate([90,0,0]) { // usb
cylinder(r=3.0/2+tolerance,h=15);
translate([0,20/2,7.5]) cube([3.0+2*tolerance,20,15], center=true);
}
#translate([width/2-4-3.5-5,length/2+5,-2*wall]) {
translate([-20,0,0]) cylinder(r=5.0/2+tolerance,h=3*wall); // led1
translate([+20,0,0]) cylinder(r=5.0/2+tolerance,h=3*wall); // led2
}
//#translate([32.4,24.2,57/2-wall]) cube([46,30,57-wall],center=true);
}
module lid() {
z=8.0;
translate([100+corner,0,-wall])
difference() {
minkowski() {
cube([width-2*corner-2*(wall+tolerance),length-2*corner-2*(wall+tolerance),z]);
cylinder(r=corner+wall,h=0.1);
}
difference() {
translate([0,0,wall]) minkowski() {
cube([width-2*corner-2*(wall+tolerance),length-2*corner-2*(wall+tolerance),z+2]);
cylinder(r=corner,h=0.1);
}
translate([-corner+2,-corner+2,0]) cylinder(r=corner,h=z); // pi_z+wall+pi_thick
translate([width-corner-2,-corner+2,0]) cylinder(r=corner,h=z); // z-8
translate([-corner+2,length-corner-2,0]) cylinder(r=corner,h=z); // bottom_thick+53
translate([width-corner-2,length-corner-2,0]) cylinder(r=corner,h=z);
}
translate([-wall-tolerance,-wall-tolerance,0]) {
translate([-corner/2,-corner/2,z-8]) {cylinder(r=3.0/2,h=8+0.2); cylinder(r=6/2,h=3);}
translate([width-1.5*corner,-corner/2,z-8]) {cylinder(r=3.0/2,h=8+0.2); cylinder(r=6/2,h=3);}
translate([-corner/2,length-1.5*corner,z-8]) {cylinder(r=3.0/2,h=8+0.2); cylinder(r=6/2,h=3);}
translate([width-1.5*corner,length-1.5*corner,z-8]) {cylinder(r=3.0/2,h=8+0.2); cylinder(r=6/2,h=3);}
}
}
}
%lid();