/* pcb_box_slide_with_tabs.scad * By Nicholas C Lewis - Jan 1, 2011 * http://www.thingiverse.com/thing:5396 * * derived from pcb_box_slide.scad * Parametric, open PCB-box (slide-in) by chlunde * http://www.thingiverse.com/thing:4071 * * CHANGES * - adjusted to fit Arduino Mega * - added mounting tabs * - turned off cutouts * - adjusted bottom cutout size * * 25-2-2023 Circuits Online MarcoB */ // Quality of cylinders/spheres $fa = 10; $fs = 0.4; $fn = 100; //Uno is 2.7" x 2.1" which is 68.58 mm x 53.34 mm //Round up to 69 mm x 54 mm pcb_width = 25.00; pcb_length = 45.00; pcb_height = 1.62; slisse = 1.00; offset = 3.00; pcb_bottom_margin = 2.50; pcb_top_margin = 7.50; wall_width_thick = 3.50; bottom_hole_margin = 9.00; //tab parameters tab_hole_radius = 2.00; tab_outer_radius = 5.00; // calculations wall_width = wall_width_thick - slisse; outside_x = pcb_width + wall_width; outside_y = pcb_length + wall_width; outside_z = pcb_height + pcb_bottom_margin + pcb_top_margin; box_height = outside_z; inside_x = pcb_width - slisse * 2; inside_y = pcb_length - slisse; inside_z = box_height - wall_width_thick/2; botom_hole_x = inside_x - bottom_hole_margin*2; botom_hole_y = inside_y - bottom_hole_margin*2; //main difference() { box(); pcb(); bottom_hole(); } tabs(); module box() { difference() { cube([outside_x, outside_y, outside_z], true); translate([ wall_width_thick/-2, 0, wall_width_thick/4]) cube([inside_x + wall_width_thick, inside_y, inside_z], true); } } module pcb() { translate([ wall_width_thick/-2, 0, pcb_bottom_margin + inside_z/-2]) cube([pcb_width + wall_width_thick/2 , pcb_length, pcb_height], true); } module bottom_hole (){ translate([0, 0, inside_z/-2]) cube([botom_hole_x, botom_hole_y, wall_width_thick], true); } module tab_up() { difference() { union() { cylinder(h = wall_width_thick/2, r = tab_outer_radius, center = true); translate([-tab_outer_radius, 0, 0]) cube([ tab_outer_radius*2, tab_outer_radius*2, wall_width_thick/2], true); } cylinder(h = wall_width_thick/2, r = tab_hole_radius, center = true); } } module tab_down() { difference() { union() { cylinder(h = wall_width_thick/2, r = tab_outer_radius, center = true); translate([tab_outer_radius/1, 0, 0]) cube([ tab_outer_radius*2, tab_outer_radius*2, wall_width_thick/2], true); } cylinder(h = wall_width_thick/2, r = tab_hole_radius, center = true); } } module tabs() { translate([outside_x/-2 - tab_outer_radius, 0, inside_z/-2]) tab_down(); translate([outside_x/2 + tab_outer_radius, outside_y/2 - tab_outer_radius, inside_z/-2]) tab_up(); translate([outside_x/2 + tab_outer_radius, outside_y/-2 + tab_outer_radius, inside_z/-2]) tab_up(); }