Either choose your battery size and number of cells through the customizer, or use this as an includable library in another project or directly from the .scad file.
Wires can be passed through the ports in either end and wrapped around the small bars at either end of the battery holder. Route them and add a bit of solder for a solid joint. The built-in spring will help secure the battery.
It is possible to load the batteries in with either the negative or positive terminals toward the "spring". Wire your holder accordingly.
To include this in another project simply use:
// call the battery module with this call:
//battery(type = <battery name>, n = <num parallel cells>, m = <num series cells>, alt = <true/false>);
// EXAMPLE: 2 Parallel AA cells with non-alternating symbols:
battery(type = AA, n = 2, alt = false);
// EXAMPLE 3 series C cells:
battery(type = C, m = 3);
// EXAMPLE 4 Side-by-side AAA cells with alternating symbols:
battery(type = AAA, n = 4, alt = true);