Skip to content

Example 35: Automatic 3x4 Instance Grid

Twelve individual items are arranged in a three by four grid of compartments.

BGI / EXAMPLE 35Dimensions in mm
Rendered assembled view of Automatic 3x4 Instance Grid
The assembled insert.

This section shows the named copies of the game pieces:

instances: [item-a, item-b, item-c, item-d, item-e, item-f, item-g, item-h, item-i, item-j, item-k, item-l]

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

schema_version: 1
readme: "Twelve individual items are arranged in a three by four grid of compartments."
project:
id: auto-3x4-instances
name: Automatic 3x4 Instance Grid
box:
inner_mm: [110, 110, 35]
material:
profile: de-mdf-3mm
overrides:
thickness_mm: 3
kerf_mm: 0.16
fit_clearance_mm: 0.10
components:
- id: item-template
kind: explicit
clear_min_mm: [20, 20, 25]
orientations: [xy]
instances: [item-a, item-b, item-c, item-d, item-e, item-f, item-g, item-h, item-i, item-j, item-k, item-l]
assemblies:
- id: grid
kind: grid
construction: open_grid_box
assembly: glue_allowed
members: [item-a, item-b, item-c, item-d, item-e, item-f, item-g, item-h, item-i, item-j, item-k, item-l]
interior:
id: all
kind: auto
layout:
mode: auto
construction_mode: full_box
search:
budget: 4
top_k: 2
allowed_shapes: [grid-3x4]

Open 35-auto-3x4-instances.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.