← back to pin list

Part-list packer ENGINE — part_list_nest.pack() (built 2026-09-01)

kerfmaster pin list · Nesting

recordStates what the code does today. Auditable against the code — this is the only type that can go stale.

Content last changed 2026-09-01 — computed from the item itself, not typed.

What exists: part_list_nest.pypack(items, sheet_w, sheet_h, table_gap, standoff). items rows: {id, opts (sampled true outline), lpts (sampled lead+pierce, optional), qty, rotate, bridge, filler}. Returns placements per sheet (world = R(rot)·part + (x,y)), asked/filled per id, excluded, bridges (value+source), ruled_gap, adjacencies, hunt, used_x, audit minima.

Column semantics in code

Pack shape

Transposed-frame shelf packer (nest_y_first lineage): rows are real full-height columns, so fill-Y-first holds and the remnant stays one clean vertical slab (used_x per sheet in the report). Placement score = (sheet, projected real-X use, existing-row-first, tightest slide, least rotation) — found the hard way: scoring the row frame alone made rotate=90 pick the variant that tripled the remnant spend. Later rows cap their predecessors (cap_h/cap_b), so a backfilled part can never grow a closed band into the column above it.

Hunt (the regrouping lever)

Jordan: if larger-governs pushes the sheet count up, 'you need to start hunting for areas where you can improve by applying the smaller bridges.' Column advance charges max(part bridge, previous column's max bridge); every time the previous column's larger value governed, the report's hunt list names the part, what it paid and what regrouping could recover. The sort already groups equal-size parts by bridge so same-bridge columns form on their own.

Audit

pack() re-measures the placed points at the ruled values (pairwise max gap, max(standoff, pair gap) for leads, per-part edge) with separate arithmetic from the construction slide and raises on any miss — engine promise, never a warning. Not built yet: true free-pocket backfill across columns (pocket_backfill stays the reference), nest-in-hole toggle (operator option, engine slot reserved), delivery surface (waits for the real test job).