include ; include ; /* * Hole for mounting the DPH3205 control panel. * * The hole is positioned so that the origin is the center of the cutout on the * panel. Epsilons are included as required. */ module dph_panel_hole(h=26*mm, grip_thickness=2*mm, grip_lip=2*mm, clearance=0.35*mm) { hole_x = 71.5*mm + clearance; hole_y = 39*mm + clearance; grip_x = 76*mm + clearance; grip_y = 13*mm + clearance; /* The panel body cutout */ translate([0, 0, h/2]) cube([hole_x, hole_y, h + 2*epsilon], center=true); translate([-grip_x/2, -grip_y/2, -epsilon]) { /* The grip cutout at the panel */ cube([grip_x, grip_y, grip_thickness + epsilon]); /* The rest of the hole, above the grip */ translate([-grip_lip, 0, grip_thickness]) cube([grip_x + 2*grip_lip, grip_y, h - grip_thickness + 2*epsilon]); } } /* * Holes for mounting the DPH3205 board itself. */ module dph_mounting_holes(h, bolt_tolerance=0.3*mm, layer_thickness=0.25*mm) { spacing = [86*mm, 64*mm]; board = [93*mm, 71*mm]; translate([board[0]/2, board[1]/2, 0]) for (x = [-1, 1]) for (y = [-1, 1]) translate([x*-spacing[0]/2, y*-spacing[1]/2, -epsilon]) { /* Bolt hole */ translate([0, 0, 4*mm + layer_thickness + epsilon]) polyhole(d=3*mm + bolt_tolerance, h=h + 2*epsilon); /* Cap hole */ polyhole(d=5.5*mm + bolt_tolerance, h=4*mm + epsilon); } } /* * Boxes for mounting the DPH3205 board itself. */ module dph_mounting_boxes(h, bolt_tolerance=0.3*mm) { spacing = [86*mm, 64*mm]; board = [93*mm, 71*mm]; translate([board[0]/2, board[1]/2, 0]) for (x = [-1, 1]) for (y = [-1, 1]) translate([x*-spacing[0]/2 - 4*mm, y*-spacing[1]/2 - 4*mm, 0]) { cube([8*mm, 8*mm, h]); } } /*difference() { cube([84, 48, 5]); translate([42, 24, 0]) dph_panel_hole(); }*/ difference() { dph_mounting_boxes(h=5); dph_mounting_holes(h=5); }