When we travel we have a various number of AA and AAA batteries for various things.. they tend to get out of hand and mixed up in various bags.
I figured I could design a simple friction fit case that could hold 2, 4, 3 batteries either in a linear or 2x2 array.
The case has a top and a bottom and we use a simple heuristic: If the dimple is facing up the battery is charged.
Print.. this works for the AA batteries we have, but depending on the tolerances of your 3d printer you may need to fiddle the radius of the batteries.
It is parametric so to generate a different holder you need to edit the scad file, select the right size and the right layout you want to use and generate away
Original model from user scanner from Thingiverse.