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.

76 lines
2.8 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=50;
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]) cube([w2,r*2,h],center=true);}
translate([holes_x,0,0]) {cylinder(r=r,h=h); translate([w/2,0,h/2]) cube([w,r*2,h],center=true);}
translate([0,holes_y,0]) {cylinder(r=r,h=h); translate([-w2/2,0,h/2]) cube([w2,r*2,h],center=true);}
translate([holes_x,holes_y,0]) {cylinder(r=r,h=h); translate([w/2,0,h/2]) cube([w,r*2,h],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, 20,13);
translate([0,0,pi_z-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);
}