Hackpad/case.scad

33 lines
1.0 KiB
OpenSCAD
Raw Normal View History

2023-03-25 09:10:14 +00:00
outer_width = 75;
outer_length = 102;
outer_height = 10;
inner_width = 72;
inner_length = 96;
inner_height = 6.5;
2023-03-25 09:10:14 +00:00
mx = 19;
mx_top=14.6;
difference(){
translate([-(outer_width-inner_width)/2,-(outer_length-inner_length)/2]) cube([outer_width, outer_length, outer_height],false);
//switches
for (i = [0:3]){
for (j = [0:3]) {
translate([i*mx + 0.25, j*mx, 0]) cube([mx_top, mx_top, outer_height]);
}
}
//pro micro and diode cutouts
translate([0,4*mx-1.5]) cube([inner_width, outer_length-(outer_length-inner_length)/2 -4*mx-3, 1.2*outer_height]);
cube([inner_width, inner_length, inner_height]);
// usb hole
translate([inner_width,inner_length-11.5,2]) minkowski(1){ sphere(1); cube([2,18,8], true);}
2023-03-25 09:10:14 +00:00
// drill holes
$fn=20;
for (i = [0:2:2]) {
for (j = [0:2:2]) {
translate([i*mx+17, j*mx+17]) cylinder(2*outer_height, 1.1, center=true);
2023-03-25 09:10:14 +00:00
}
}
translate([1*mx+17, 1*mx+17]) cylinder(2*outer_height, 1, center=true);
}