- translate([-batt_len/2-eps, 0, 0]) rotate([0, 90, 0])
- cylinder(r=batt_diam/2, h=batt_len+2*eps);
+ translate([-batt_len/2+eps, 0, 0]) rotate([0, 90, 0])
+ cylinder(r=batt_diam/2, h=batt_len-2*eps);
+ hull() {
+ difference() {
+ translate([-batt_len/2-cable_sep-wall, 0, 0]) rotate([0, 90, 0])
+ cylinder(r=batt_diam/2-wall-lid_sep, h=batt_len+2*wall+2*cable_sep);
+ translate([-infty/2, -batt_diam/2, -infty-wire_sep/2-wire_thick/2])
+ cube([infty, batt_diam, infty]);
+ };
+ translate([-batt_len/2-cable_sep-wall, batt_diam/2-pcb_width+0.5*wall+0.5*lid_sep, batt_diam/2 + pcb_comp_h+pcb_thick-wall-lid_sep])
+ cube([batt_len + 2*wall + 2* cable_sep, pcb_width-1.5*wall-1.5*lid_sep, eps]);
+ };
+ // holes for the mounting clips on the body
+ for (x = [-1, 1]) scale([x, 1, 1]) hull() {
+ for (x0 = [0-wall, 10+wall])
+ translate([batt_len/2-wall-wire_thick-x0, batt_diam/2-lid_sep+eps, 0])
+ rotate([-90, 0, 0]) scale([rear_clip_aspect, 1, 1])
+ cylinder(r=batt_diam/2 + 2*wall + wire_thick+lid_sep/rear_clip_aspect, h=wall+lid_sep+eps);
+ };