# Wargame Accessory Box & Dice Tray A parametric OpenSCAD box for carrying tabletop wargaming accessories. Three printable parts: | Part | Purpose | |----------|--------------------------------------------------------------------| | `box` | Open tray. With the insert removed it doubles as a dice tray. | | `lid` | Fully detachable friction-fit lid (no hinge to get in the way). | | `insert` | Removable compartment tray for tokens, measuring tapes, etc. | ![Assembly](docs/assembly.png) ## Quick start Open `wargame_box.scad` in OpenSCAD and set the three `total_*` values to the free space in your backpack — they are **outer** dimensions and `total_z` already includes the closed lid, so the printed result fits the measured space exactly. Pick what to render with the `part` variable (or the customizer): `assembly` (exploded preview), `box`, `lid`, `insert`, `print`. Or export everything from the command line: ```sh make # exports stl/box.stl, stl/lid.stl, stl/insert.stl ``` ## Configuring the insert layout Compartments are defined by the `layout` list, one entry per row (front to back): ``` layout = [ [1.0, [1, 1, 1, 1]], // front row: 4 equal token bins [1.0, [2, 1, 1]], // middle row: 1 double-width + 2 small [0.8, [1]] // back row: full-width slot (tapes etc.) ]; ``` * The first number is the **row depth weight**. * The list is the **column width weights** within that row. Weights are relative, so the layout always fills the insert exactly no matter what box size you choose. A row weight of `2` is twice as deep as a row of weight `1`; a column weight of `2` is twice as wide as `1`. To print a second insert variant (e.g. for a different game system), just change `layout`, re-export, and swap inserts as needed. Two half-height stacked inserts are possible too: set `insert_h_override` to about half of the automatic height and print two with different layouts. ## How the parts work together * The **lid** is a flat plate with a lip that plugs into the box opening. `lid_clearance` (default 0.2 mm per side) controls the friction fit — print a test fit and adjust for your printer/material. Shallow thumb grooves on the box's front and back walls let you pry the lid off; they do **not** pierce the wall, so the dice tray stays fully closed. * The **insert** sits below the lid's lip, so the lip also keeps loose tokens from jumping compartments in the bag. Finger notches on its short walls let you lift it straight out; then the empty box is your dice tray. `tray_chamfer` puts a 45° bevel around the floor edges so dice don't lodge in the corners. ## Printing notes * No supports needed for any part. Print all parts flat side down (the lid prints plate-down, lip up). * PLA or PETG, 2–3 perimeters, ~10 % infill (the parts are mostly walls). * If the lid is too tight/loose, tune `lid_clearance` in steps of 0.05 mm. Same for the insert with `insert_clearance` (looser is fine there — it just needs to drop in and lift out easily). * A piece of felt glued into the box floor makes dice rolling quieter; if you plan this, add the felt thickness to nothing — the inner depth is generous — but you may want `tray_chamfer = 0` for a flat floor.