I need Battery compartments for many of my electronics projects and buy them usually in various sizes, but since i have a makerbot I am thinking about how to print them myself. So I just wrote a openscad-script that generates battery compartments. It handles various battery types from AAA to D and can generate compartments for even and odd battery numbers. Download the OpenSCAD file enter the type
![Generative Battery Compartment](https://cdn-ak-scissors.b.st-hatena.com/image/square/3d68073f77496505b9afc05f5f0c1f790d0918bf/height=288;version=1;width=512/https%3A%2F%2Fwww.local-guru.net%2Fthings%2Fbattery%2FAA2.jpg)