include // hack the black handle to do three things: // // 1. Cut hole in side for push button backed by bracket for button // to rest against (and be glued to eventually). // // 2. Build bar across the bottom with a nut trap on top and hole // for M3 bolt. // // 3. Add place on bar to press fit button cell battery holder. // button_wide=3.52; button_high=6.11; button_thick=3; // Import black handle and center it // module black_handle() { render() translate([-9.49-(31.83/2), -238.09-(31.83/2), 0]) import("black_handle_hollow_arduinomini.stl"); } // Build a bracket for the base of the button to rest against (this is going // to be rotated around to same angle as button, so the bracket needs to be // shaped with a steeper angle to be printable). // module button_bracket() { bracket_high=button_high-2; translate([1,0,bracket_high+1]) rotate([0,-30,0]) difference() { rotate([0,30,0]) translate([0,0,-bracket_high]) rotate([0,30,0]) difference() { rotate([0,-30,0]) translate([-2.5,0,0]) translate([0,-(button_wide+6)/2,0]) cube([2.5,button_wide+6,bracket_high]); translate([-5,-30,-50]) cube([50,50,50]); } translate([-25,-25,0]) cube([50,50,50]); } } // Module to generate the handle with the button hole and bracket added to it. // module handle_plus_button() { difference() { union() { black_handle(); rotate([0,0,60]) translate([12.05, 0, 3]) rotate([0,-16.5,0]) button_bracket(); } rotate([0,0,60]) translate([12.05, 0, 3]) rotate([0,-16.5,0]) translate([0,-button_wide/2, 0]) cube([button_thick,button_wide,button_high]); } } // Size of M3 nut for nut trap (plus a bit of slop) // m3_width=5.47+0.2; // flat to flat width of M3 nut m3_thick=2.22+0.2; // thickness of M3 nut m3_head=5.5/2; // radius of M3 head // Handy hexnut shape module hexnut(nutwidth, nutthick) { intersection() { translate([-nutwidth,-(nutwidth/2),0]) cube([nutwidth*2,nutwidth,nutthick]); rotate([0,0,60]) translate([-nutwidth,-(nutwidth/2),0]) cube([nutwidth*2,nutwidth,nutthick]); rotate([0,0,120]) translate([-nutwidth,-(nutwidth/2),0]) cube([nutwidth*2,nutwidth,nutthick]); } } // Bar to cross bottom holding a nuttrap and a 3mm hole module nutbar() { difference() { union() { translate([-29/2,-5/2,0]) cube([29,5,3]); cylinder(r=4.5,h=5,$fn=64); } translate([0,0,5.1-m3_thick]) hexnut(m3_width, m3_thick); translate([0,0,-1]) cylinder(r=3/2,h=10,$fn=64); } } // The accumulated new handle shape including the bar across bottom module handle_plus_bar() { union() { handle_plus_button(); nutbar(); } } // The final part adds another bar where we'll subtract off the battery holder // shape to leave a place to glue the battery holder. difference() { union() { render() handle_plus_bar(); translate([-6/2,-14,0]) cube([6,12,2]); } translate([0,-7,-0.01]) batt_shell(); }