Commit Graph
6 Commits
Author SHA1 Message Date
ajandClaude Fable 5.2 d2c392270d feat(engine): band every group and give each a trial in Irregular
On a saved nest of the README sample parts (130 copies, 60 x 120, 0.3
spacing, bottom clamp rail) Auto Nest ended at 105.8 where a hand layout
of tidy bands ends at 103.1. Three things kept the banded fill from it:

- Lattice's first pattern for the 24 gussets set two columns 0.04 apart.
  The band's certification rejected it and the band search stopped, so
  the gussets had no band and filled the gaps as ragged columns. The
  search now asks again just short of the rejected pattern
  (BlockCatalog.RejectedBandLength).
- Building patterns is charged to the same work meter as the trials of
  narrower and lower bands, and with the lower bands it spent the whole
  budget, so the last types in the order never had a trial. Trials now
  go round the types and may spend 25,000 work whatever the budget.
- A band taller than the height clear of the clamps lost members to
  them. The first lower band is now asked for at that height and
  searched like the full band; where such a band would stand whole in
  place of one that loses members, the bands are searched a second time
  with it there and the better sheet kept. A lower band no longer than
  the full one stands first in its place, leaving a strip beside it.

That nest now ends at 103.1, the same parts built from the README DXFs
at 104.0 instead of 106.6, the help tutorial nest at 33.6 instead of
34.2; N26-2HH stays at 103.9 and the other benchmark jobs are unchanged.
Solves of these jobs take about a tenth longer.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 17:30:23 -05:00
ajandClaude Fable 5.2 10386ec233 refactor(engine): split Irregular's banded fill into named steps
BandedFill.FillStrips was one 135-line method: the beam loop, the
look-ahead for band searches, the strip offers (a local function closing
over eight variables) and the beam selection all ran together, and Fill
carried its order search and hold-back pass inline the same way. The
next change to either pass had to be made inside that.

Each step is now its own method (BestOrder, HoldBack, NextStrips, Strip,
Densest, SearchesAhead, ColumnWidths, Finish), the work area and part
spacing are fields rather than a parameter threaded through every call,
the repeated "largest part left", "packer behind the strip" and
"full-height bands" expressions have one definition each, and the
tolerances and the three-copy column limit are named constants.

No layout changes. Every BandedFill result (poses and work-meter reading
after each call) was traced before and after on six jobs covering the
bands, strips and beam-of-one paths, with and without a clamp rail, one
to four sheets: the traces and the final layouts are byte-identical.
Engine suite and the problem-nest corpus's auto-nest area pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 09:33:50 -05:00
ajandClaude Opus 5.5 0a413dd242 feat(engine): lower, clamp-aware bands in Irregular's banded fill
Bands were always the full work-area height and placed flush to the
bottom or top edge. On N26-2HH (20 + 20 formed legs, 60 x 120, bottom
clamp rail) the larger leg's full-height band had less slack than the
rail's depth, so three copies dropped to the gap fill and Auto Nest
ended at 104.71 against a hand layout at 104.0.

Each type now also offers up to three lower bands, each asked for just
short of the last band's height and searched over three lengths, which
leave a strip along the sheet for the remaining parts. A band that would
lose members to clamps also tries the top edge and just past the clamps
lining either edge (ClampObstacles.ClearOfEdges, moved out of
EdgeFirstFill). N26-2HH now ends at 103.87; the README sample, help
tutorial and N26-2GT layouts are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:11:42 -05:00
ajandClaude Opus 5.5 bf734ea743 perf(engine): speed up Irregular's banded and strip pass without changing layouts
- Lattice band certification prepares each member's outline once instead of
  re-inflating both parts for every pair (about 40% of each pattern's cost).
- Strip packing builds each beam level's band searches ahead in parallel,
  each on its own drawing copy; prefetched patterns charge no work and bind
  no orientations until requested in strip order, so the work meter and
  results match building them in turn.
- FrontierPacker blocks seated parts in one parallel pass, not one per part.

Layouts and work counts are unchanged on the README, clamp-rail, 2x and
tutorial jobs and the synthetic nests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:34:19 -05:00
ajandClaude Opus 5.5 163c23e8bd feat(engine): place large parts first and keep small ones as filler in strips
A sheet that cannot take all the remaining parts now keeps whichever
places more part area: the ordinary fill or strips largest part first.
The ordinary fill spent skinny parts early because they cover the most
area per length, leaving awkward ones for a ragged last sheet.

Inside a strip, the strip's own part fills its column first and the
others fill around it; before, pairs of smaller parts (counted as twice
a part's area) took the strip and the large part lost it. Bands also try
largest part first as a third order.

At about twice the README sample quantities the second sheet ends at
99.9" instead of 106.2" on master (104.7" before this change), and the
help tutorial's parts at 33.6" instead of 34.9". Every other benchmark
job is unchanged or better; mixed jobs solve about two to three times
slower than master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:33:38 -05:00
ajandClaude Opus 5.5 81e70af5b6 feat(engine): pack mixed jobs in full-height strips in Irregular
Irregular decodes the job once more in full-height strips along X when
like parts group and every part shares one priority. A sheet that can
take all the remaining parts is packed two ways and the better kept:

- Bands: each type of three or more copies as its Lattice pattern in the
  narrowest strip that holds all its copies, bands side by side, the
  held-back copies and one-offs filling the gaps.
- Strips: each strip holds the largest remaining part, as its band or a
  column one to three copies wide, every other part filling its gaps; a
  beam of the four densest partial sheets carries strip to strip.

Band patterns are filled one grid unit wider than the spacing so a stack
of rings passes the strict certification, members on a clamp go to the
gap fill, and a short band moves flush to the far edge when that keeps
it off the clamps. The plan replaces the result only by beating it.

On seven sample parts (130 copies, 60 x 120) the layout ends at 102.9"
instead of 107.7", and at 104.6" instead of 108.6" with the desktop's
edge spacing and bottom clamp rail; at about twice the quantities the
second sheet ends at 104.7" instead of 106.2". Every other benchmark job
is unchanged. Solves of these jobs take about twice as long.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:33:38 -05:00