Skip to content

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.

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.

game.bgi.yaml
schema_version: 1
project:
id: first-insert
name: My first insert
box:
inner_mm: [220, 160, 45]
side_clearance_mm: [1, 1, 1, 1]
top_reserve_mm: 3
material:
profile: de-mdf-3mm
overrides:
thickness_mm: 3
kerf_mm: 0.16
fit_clearance_mm: 0.10
components:
- 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: auto
layout:
mode: auto
construction_mode: full_box
search:
budget: 100
top_k: 3

The file makes five decisions:

SectionWhat you have told BGI
boxThe inside of the game box is 220 × 160 × 45 mm. Leave 1 mm at each side and 3 mm above the insert.
materialPlan with 3 mm MDF and sample laser and joint settings. Prepare your material explains how to set them for your sheet.
componentsKeep all 60 cards in one stack, with extra handling space. Reserve the stated space for the tokens.
assembliesMake one grid: compartments that share a floor, outer walls, and a divider. Put both contents in it.
layoutLet 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.

Open a terminal in the folder containing game.bgi.yaml. Run:

Terminal window
bgi game.bgi.yaml

BGI 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/.

Open these files in build/first-insert/candidate-001/:

FileWhat to look for
preview/layout.svgThe two compartments and their divider. For this single grid, the drawing shows the insert’s footprint, rather than the surrounding game box.
preview/parts.svgThe floor, walls, and divider as flat parts.
README.mdThe 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.

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.