// We fetch rounded_corner_box2 from here - a box with rounded corners and blocks of a given width on the corner. use ; // Measurements are in millimeter. wall_thickness = 2; // A slit is a vent hole in the side of the box. slit_thickness = 2.2; // The 'print' is the DC-DC converter board that we want to place inside the box. print_width = 22; print_length = 45+10; print_height = 15; corner_block_width = 5; // The lid extrusion is the blocks on the lid that will keep it in place once it's on the box. lid_extrusion_height = 2; // Margin relative to the position of the wall of the box, so it fits within the walls without being too snug. lid_extrusion_margin = 0.55; // Print these out separately for best results. // Maybe your 3D printer is better than the one I had access to, but jumping between 2 individual prints tends to just be a bad idea. /* Box */ /**/ difference() { rounded_corner_box2(print_width, print_length, print_height, wall_thickness, corner_block_width); // 3 rows of 9 slits. for (level = [1:3]) { for (idx = [-4:4]) { translate([0,idx*slit_thickness*slit_thickness,(level*1.1)*slit_thickness*2]) rotate([45,0,0]) cube([print_width+(slit_thickness*2),slit_thickness,slit_thickness], center=true); } } // 2 rows of 8 slits that are offset horizontally half the distance between 2 slits. for (level = [1:2]) { for (idx = [-4:3]) { translate([0,(slit_thickness*(slit_thickness/2))+(idx*slit_thickness*slit_thickness),(level)*slit_thickness*slit_thickness+slit_thickness+.2]) rotate([45,0,0]) cube([print_width+(slit_thickness*2),slit_thickness,slit_thickness], center=true); } } // The holes on the short edges to allow the cables to be fed into the box. translate([0,(print_length+wall_thickness)/2,(print_height+wall_thickness*2)/2]) rotate([90,0,0]) cylinder(d=5,h=4, $fa=1, $fs=0.5, center=true); translate([0,-(print_length+wall_thickness)/2,(print_height+wall_thickness*2)/2]) rotate([90,0,0]) cylinder(d=5,h=4, $fa=1, $fs=0.5, center=true); } /* Lid */ /**/ translate([print_width*1.2,0,0]) { union() { // The lid itself - height is 0 so there is no wall, just the bottom. rounded_corner_box(print_width, print_length, 0, wall_thickness); // Narrow side, Y+ translate([0,(print_length - lid_extrusion_margin - wall_thickness)/2,(lid_extrusion_height+wall_thickness)/2]) cube([print_width - 2*(corner_block_width + lid_extrusion_margin),wall_thickness,wall_thickness], center=true); // Narrow side, Y- translate([0,-(print_length - lid_extrusion_margin - wall_thickness)/2,(lid_extrusion_height+wall_thickness)/2]) cube([print_width - 2*(corner_block_width + lid_extrusion_margin),wall_thickness,wall_thickness], center=true); difference() { union() { // Wide side, X+ translate([(print_width - lid_extrusion_margin - wall_thickness)/2,0,(lid_extrusion_height+wall_thickness)/2]) cube([wall_thickness,print_length - 2*(corner_block_width + lid_extrusion_margin),wall_thickness], center=true); // Wide side, X- translate([-(print_width - lid_extrusion_margin - wall_thickness)/2,0,(lid_extrusion_height+wall_thickness)/2]) cube([wall_thickness,print_length - 2*(corner_block_width + lid_extrusion_margin),wall_thickness], center=true); } // Cut out to have the Wide side extrusion disappear in the middle translate([0,0,wall_thickness]) cube([print_width+wall_thickness, print_width+wall_thickness, 3*wall_thickness], center=true); } } }