Shamelessly remixed from https://www.youmagine.com/designs/battery-box-for-aa-cells and https://www.youmagine.com/designs/aaa-and-aa-dummy-batteries with a few modifications for convenience. For the battery holder you can specify type and number of batteries. I've also made an Openscad module for double-length dummy batteries that may come in handy.There's a separate battery_flange module for attaching mounting flanges (takes the same arguments as the battery_box module). And flange() for attaching parametrized flanges to whatever you want.Depending on how good your bed adhesion is, you may want to print these with a raft or brim.