+ // outer part of the clip behind the battery contacts
+ for (x=[1, -1]) scale([x, 1, 1]) translate([batt_len/2+2*wall+cable_sep+lid_sep, 0, 0]) hull() {
+ translate([0, -batt_diam/2 - wall, -body_top_h-wall/2-lid_sep])
+ cube([wall-lid_sep, batt_diam + 2*wall, wall/2]);
+ difference() {
+ scale([0.3, 1, 1])
+ sphere(batt_diam/2+wall);
+ translate([-infty/2, -infty/2, -infty-body_top_h-lid_sep+2*wall])
+ cube(infty);
+ translate([-infty-clip_pretension, -infty/2, -infty/2])
+ cube(infty);
+ };
+ translate([-clip_pretension,
+ batt_diam/2 - pcb_width,
+ batt_diam/2+2*pcb_comp_h+pcb_thick+wall])
+ cube([wall-lid_sep, pcb_width+wall, eps]);
+ };