This is a remix and expansion of Duncan's battery boxes.
I've had the worst luck when it comes to batteries leaking. Invariably, once one battery starts to leak, the corrosion triggers others to leak. Thus, my primary requirement for battery storage is that no battery should touch any other battery. His design achieves this while also being somewhat compact.
This remix aims to consolidate as much as possible into a single parametric design while adding the ability to use cylindrical cuts and the standard half-disc coin battery cuts as well as magnetically latched lids. Open the "Configuration Table" and activate the desired battery type. Parameters not in the configuration table are available via the "Modify, Change Parameters" command.
One goal is that the design should be able to reproduce exactly the shapes that Duncan's design created. A perfect match probably isn't straightforward due to the fact that the slack included in Duncan's design varies by battery type. However, all other design aspects should be identical, when using the supplied parameters (except I think I use a larger divider thickness of 1.2 instead of 0.8). The extrusions and face offsets are copied directly from his design for the tabs, pips and such.
Selecting the configuration options of cut type as rectangle, outer buffer as no, and latching as tab will produce a Duncan style box. Update: The grip configuration should be "no" unless the latching type is magnetic. It's the extra body volume that accommodates the magnets that is used for the grip recess. Otherwise, the cut may not leave enough material to prevent the print from coming apart.
The included battery types are:
I followed the techniques that Duncan used on his original design along with extracting any non-parametric values into configuration and user parameters. I consolidated all battery types as configurations within a single Fusion360 design file.
Another difference is that for the battery storage cells, I sketched and created a single cut, then created a 2d linear pattern for the cut feature as opposed to using the linear pattern within the sketch tool.
I also ended up with Fusion360 misbehaving by flipping the direction of dimensions when the driving parameters changed. This is due to the fact that Fusion360 does not store the direction of the dimension, only the value. Thus, if a sketch line is set to be a particular distance from another line, that sketch line can suddenly get moved to the other side of the reference line. There are reports of this happening to many users under a variety of conditions. I experienced it most often when a configuration option could be set to a zero value for a particular variant. Then when the value was changed back to a non-zero value, the direction wasn't preserved.
The solution is to use line offsets rather than linear dimensions. Use the "Modify, Offset" command on the reference line. This command actually stores the direction chosen into the timeline. (The state of the "Flip" button in the command dialog.) A new line will be created at the specified offset and direction. You can then use the "coincident" and "colinear" constraints to specify the position of your sketch items. Remember to set the new offset line to be construction geometry so that it doesn't influence later operations like extrusions, etc.
The specifics for the different options are:
battery_width
and battery_depth
are padded with the slack_rect
amount and extruded as cuts for a distance of half the sum of the battery_height
and slack_height
battery_width
+ slack_dia
are likewise extruded as cuts for half of the total of battery_height
and slack_height
. The value of battery_depth
is ignored.battery_width
and a depth of the battery_height
plus slack_coin_height
is fully revolved as a cut using the right edge of the rectangle as the axis.buffer_thick_mag
which specifies how much distance should be included around the magnet so that it doesn't touch the edge of the part. Update 7-Oct-2023: This buffer is only added to the sides of the magnets on the outer edge now. The chamfer on the overlap provides sufficient clearance. This should save space, time, filament to at least some degree.grip_cutter_axis_offset
parameter defines how far from the edge of the box the centerline of the cutting shape will be.grip_cutter_axis_start_offset
parameter defines how far back from the front and rear walls should the cutting shape endcaps be.grip_cutter_radius
defines the overall radius of the cutting cylinder and half spheres. This value should be larger than the first parameter (axis offset) or the cutting shape will miss the box completely.
There are several additional options that influence the part but are probably not exceedingly useful at this point. Configuration parameters specifying the minimum width, depth and height are included in the calculations that produce the part.
My original intent was to include the ability to define multiple sections. Each section would be a grid of cells for a specific battery type. This would be a generic method of generating the popular AA / AAA combination boxes as well as one box that could hold a variety of the odd coin type batteries.
When combining multiple different sized storage grids, there needs to be a way to align them into a single rectangular volume. The idea was that setting minimums would be an easy way to get things aligned. Unfortunately, I've found that both Fusion360 and OnShape have issues with creating configurable arrays of parts where both the number as well as the type of subpart could vary.
The minimum width and depth features are active, but only come into effect when the minimums specified are larger than the most compact design possible. The most compact (i.e., best) design dimension is the size of the cut in that dimension times the number of cuts combined with the number of walls in that dimension times the minimum desired wall thickness. The minimum height parameter is used to calculate distance between the top and bottom plates, but the cut is based on the battery height and slack. If the minimum width or depth parameter specifies a larger size, the wall thickness in that dimension is expanded such that the cuts are evenly distributed across that dimension.
Another feature I've considered adding is a recess along the side of the box say 5 mm tall and 2mm deep that would provide a more stable grip for those who may have weaker fingers. (Update 7-Oct-2023: This has been added, but as described in the update text above.)
The author remixed this model.
7-Oct-2023 Update:
The major differences include: