Skip to content

Example 42: Fixed Compartments within an Automatic Grid

Preserve the two-part card and dice sections while arranging markers and gems in the remaining spaces.

BGI / EXAMPLE 42Dimensions in mm
Rendered assembled view of Fixed Compartments within an Automatic Grid
The assembled insert.

This section shows the compartments BGI must keep together:

fixed_subtrees:
- id: fixed-cards
kind: split
axis: y
clear_mm: [40, 63, 25]
first: {id: card-slot-a, kind: compartment, clear_mm: [40, 30, 25], contents: [card-a]}
second: {id: card-slot-b, kind: compartment, clear_mm: [40, 30, 25], contents: [card-b]}
- id: fixed-dice
kind: split
axis: y
clear_mm: [40, 63, 25]

The shaded lines mark that section in the complete YAML. This is the same project file linked below.

schema_version: 1
readme: "Preserve the two-part card and dice sections while arranging markers and gems in the remaining spaces."
project:
id: auto-fixed-subtrees
name: Fixed Compartments within an Automatic Grid
box:
inner_mm: [100, 110, 35]
material:
profile: de-mdf-3mm
overrides:
thickness_mm: 3
kerf_mm: 0.16
fit_clearance_mm: 0.10
components:
- {id: card-a, kind: explicit, clear_min_mm: [40, 30, 25], orientations: [xy]}
- {id: card-b, kind: explicit, clear_min_mm: [40, 30, 25], orientations: [xy]}
- {id: dice-a, kind: explicit, clear_min_mm: [40, 30, 25], orientations: [xy]}
- {id: dice-b, kind: explicit, clear_min_mm: [40, 30, 25], orientations: [xy]}
- {id: markers, kind: explicit, clear_min_mm: [30, 30, 25], orientations: [xy, yx]}
- {id: gems, kind: explicit, clear_min_mm: [30, 30, 25], orientations: [xy]}
assemblies:
- id: grid
kind: grid
construction: open_grid_box
assembly: glue_allowed
members: [card-a, card-b, dice-a, dice-b, markers, gems]
interior: {id: all, kind: auto}
layout:
mode: auto
construction_mode: full_box
search:
budget: 40
top_k: 3
allowed_shapes: [cross]
fixed_slots:
- {slot: 1, requirement: fixed-cards}
- {slot: 3, requirement: fixed-dice}
fixed_subtrees:
- id: fixed-cards
kind: split
axis: y
clear_mm: [40, 63, 25]
first: {id: card-slot-a, kind: compartment, clear_mm: [40, 30, 25], contents: [card-a]}
second: {id: card-slot-b, kind: compartment, clear_mm: [40, 30, 25], contents: [card-b]}
- id: fixed-dice
kind: split
axis: y
clear_mm: [40, 63, 25]
first: {id: dice-slot-a, kind: compartment, clear_mm: [40, 30, 25], contents: [dice-a]}
second: {id: dice-slot-b, kind: compartment, clear_mm: [40, 30, 25], contents: [dice-b]}

Open 42-auto-fixed-subtrees.bgi.yaml and save a copy if you want to edit it in your own folder. This project asks BGI to try layouts. Follow Let BGI suggest layouts to choose a saved result before building.