union() { translate ([0, box_depth, box_height]) rotate ([180, 0, 0]) { // supports supports(); difference() { // the box box_bevel(box_width, box_depth, box_height, box_corner_round); // remove the interior translate([box_tickness,box_tickness,-box_tickness]) box_bevel(box_width-2*box_tickness, box_depth-2*box_tickness, box_height, box_corner_round-box_tickness); // make dents for the cover pcb_cover_dents(1.5); // make the holes holes(); } } union() { // reduce cover to fit, 0.5 mm in x and y scale([1-0.5/box_width, 1-0.5/box_depth, 1]) { // cover color("green") translate([box_tickness, box_depth+5, 0]) box_bevel(box_width-2*box_tickness, box_depth-2*box_tickness, box_tickness, box_corner_round-box_tickness); // dents to lock the cover translate([0, box_depth+3-0.3, 0]) pcb_cover_dents(0); } // pcb foots translate([box_tickness, box_depth+5, 0]) pcb_foot(); } }