Full example
Start with two things to store: a deck of cards and a collection of tokens. You will tell BGI how much space they need and ask it to arrange two compartments inside a game box. You do not need to draw the dividers.
This walkthrough uses sample measurements so you can try the whole process.
1. Describe what the insert must hold
Section titled “1. Describe what the insert must hold”Our small game has 60 sleeved cards, measuring 66 × 91 mm with a 30 mm stack, and tokens that need a 40 × 50 × 25 mm space. Keep the cards and tokens separate. Both can turn through 90° in the box; the cards stay flat.
Create a text file called game.bgi.yaml and copy the complete project below into it. YAML uses indentation to show which settings belong together. Use spaces, and keep the indentation shown here.
schema_version: 1project: id: first-insert name: My first insertbox: inner_mm: [220, 160, 45] side_clearance_mm: [1, 1, 1, 1] top_reserve_mm: 3material: profile: de-mdf-3mm overrides: thickness_mm: 3 kerf_mm: 0.16 fit_clearance_mm: 0.10components: - id: cards kind: cards count: 60 card_outer_mm: [66, 91] stack_measurements_mm: [30] split_counts: [60] allowance_total_mm: [4, 4, 2] orientations: [flat_xy, flat_yx] - id: tokens kind: explicit clear_min_mm: [40, 50, 25] orientations: [xy, yx]assemblies: - id: insert kind: grid construction: open_grid_box assembly: glue_allowed members: [cards, tokens] interior: id: compartments kind: autolayout: mode: auto construction_mode: full_box search: budget: 100 top_k: 3The file makes five decisions:
| Section | What you have told BGI |
|---|---|
box | The inside of the game box is 220 × 160 × 45 mm. Leave 1 mm at each side and 3 mm above the insert. |
material | Plan with 3 mm MDF and sample laser and joint settings. Prepare your material explains how to set them for your sheet. |
components | Keep all 60 cards in one stack, with extra handling space. Reserve the stated space for the tokens. |
assemblies | Make one grid: compartments that share a floor, outer walls, and a divider. Put both contents in it. |
layout | Let BGI choose the compartment arrangement. Try up to 100 arrangements and keep up to three successful candidates. |
The cards need at least 70 × 95 × 32 mm inside their compartment: their measured size plus the total allowance on each axis. The token dimensions already describe usable storage space. BGI adds panel thickness when working out the insert’s outside dimensions. The project setup guide explains how to enter other contents.
2. Generate and compare layouts
Section titled “2. Generate and compare layouts”Open a terminal in the folder containing game.bgi.yaml. Run:
bgi game.bgi.yamlBGI searches for compartments, then generates drawings, cutting files, and a rendered image for every retained layout. Open build/first-insert/README.md to compare the top-down drawings and assembled views. Each suggestion is a candidate with its own folder and saved recipe. If only one layout is found, its complete bundle is already in candidate-001/.
The report orders candidates by height, part count, material area, and cutting length. That gives you a starting point; it cannot decide which arrangement will be most convenient during play. For this first run, inspect candidate-001/.
3. Inspect the chosen suggestion
Section titled “3. Inspect the chosen suggestion”Open these files in build/first-insert/candidate-001/:
| File | What to look for |
|---|---|
preview/layout.svg | The two compartments and their divider. For this single grid, the drawing shows the insert’s footprint, rather than the surrounding game box. |
preview/parts.svg | The floor, walls, and divider as flat parts. |
README.md | The dimensions, assigned contents, parts list, and assembly sequence. |
cuts/parts/insert/ | SVG cutting files for the individual panels. |
You now have a proposed insert, its construction, and the files needed to make it.
4. Make it yours
Section titled “4. Make it yours”Try changing a storage decision first. For example, two smaller card stacks may be easier to reach than one large deck. Replace split_counts: [60] with [30, 30], then replace stack_measurements_mm with the two measured stack heights. BGI will plan separate compartments for those stacks; the assembly’s members: [cards, tokens] still includes all of them.
Run bgi game.bgi.yaml again after changing the project; it refreshes its own output folder and the comparison gallery. The separate solve and build commands remain available when you need to inspect or automate individual steps.
To design the full insert for your game, continue with Measure the box and contents. The following guides take you through describing storage, getting suggestions, choosing a layout, and making the parts. If the arrangement needs a fixed card area or another deliberate feature, manual and mixed layouts explain how to keep control of it.