+ // inner hole behind the battery contacts
+ for(x=[1, -1])
+ scale([x, 1, 1]) translate([batt_len/2+wall, 0, 0]) hull() {
+ translate([0, -batt_diam/2+wall, 0])
+ cube([cable_sep + eps, batt_diam-2*wall, infty]);
+ rotate([0, 90, 0])
+ cylinder(r = batt_diam/2-wall, h = cable_sep+eps);
+ };
+ // cable lead to battery contacts
+ for (x=[1, -1]) scale([x, 1, 1])
+ rotate([-140, 0, 0])
+ translate([batt_len/2-eps, -wire_thick/2, batt_diam/2-2.7])
+ cube([wall+cable_sep+2*eps, wire_thick, 5.4]);
+
+ // mounting holes
+ for(x=[-1,1]) scale([x, 1, 1])
+ translate([batt_len/2-mounthole_w/2, batt_diam/2+wall+mounthole_h/2, -infty/2])
+ scale([1, mounthole_h/mounthole_w, 1])
+ cylinder(r = mounthole_w/2, h = infty);
+ // grabbing gap
+ for(x=[-1,1]) scale([x, 1, 1])
+ translate([batt_len/2+cable_sep+wall+10, batt_diam/2-pcb_width/2, -batt_diam/2-2*pcb_comp_h-pcb_thick-wall-eps])
+ cylinder(r1 = 10, r2 = 10 - wall, h = wall + 2*eps);
+ // plus sign - vertical line
+ translate([batt_len/2 - 1.5*wall-plus_width/2, -plus_width/2, -batt_diam/2-wall])
+ cube([wall, plus_width, infty]);
+ // plus and minus signs - horizontal line
+ for(x=[-1,1]) scale([x, 1, 1])
+ translate([batt_len/2 - wall - plus_width, -wall/2, -batt_diam/2-wall])
+ cube([plus_width, wall, infty]);
+ };
+ // clip barrier
+ for (x = [-1, 1]) scale([x, 1, 1]) hull () {
+ translate([batt_len/2+wall+cable_sep-eps, batt_diam/2-pcb_width+wall/2+lid_sep,
+ -batt_diam/2-pcb_thick-pcb_comp_h + wall + lid_sep])
+ cube([wall+eps, pcb_width-2*wall-2*lid_sep, wall]);
+ translate([batt_len/2+wall+cable_sep-eps, batt_diam/2-pcb_width+3*wall/2+lid_sep,
+ -batt_diam/2-pcb_thick-pcb_comp_h + 3*wall + lid_sep])
+ cube([eps, pcb_width-4*wall-2*lid_sep, eps]);