Commit Graph
6 Commits
Author SHA1 Message Date
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 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
ajandClaude Fable 5.1 d317a90f1e perf(engine): cut Auto Nest time on many-part jobs
A 67-drawing, 118-part job took about six minutes through the desktop
Auto Nest path and was cancelled before any layout appeared. Almost all
of it was the cutout pre-pass, the rest the Irregular engine.

Cutout pre-pass (317 s -> 8 s on that job, same bundles and poses):
- The lattice and NFP searches prepare the frame's and the occupants'
  validation outlines once per search (NestLayoutCheck.Prepare) instead
  of re-outlining and re-triangulating the frame at every candidate, and
  test candidates against the small occupants before the frame. Answers
  match the pairwise check exactly, including its leftmost-inflated rule.
- A hole's proposal is replayed for the same frame, hole and offered
  inserts: automatic-rotation inserts ask the same question at every
  frame angle.

Irregular engine (40 s -> 15 s, benchmark 42 s -> 19 s, same layouts):
- Concave no-fit polygons are built as the union of pairwise convex sums
  of each footprint's convex pieces (ear clipping plus Hertel-Mehlhorn
  merging on the Clipper lattice) instead of n*m edge-pair quads; a
  footprint that cannot be decomposed keeps the old sweep.
- Pair and block catalogs share one private drawing per part geometry,
  owned by the engine instance, so each part's best-fit search runs once
  per instance and across a pipeline's trial and ordinary solves.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 21:13:15 -04:00
ajandClaude Sonnet 5 eda4a846f0 fix(irregular): charge nested block-fill cost against the work budget
BlockCatalog's PrepareBlocks pre-pass ran a full independent NFP-based
pack (PrivatePlateFill.Run) for up to 8 attempts per part type, but that
cost never touched the engine's WorkCounter/WorkBudget. For jobs with
several part types at double-digit quantities, these uncounted nested
solves could burn the entire 5-minute timeout inside the first sheet of
the first strategy variant, so Solve() never returned and nothing was
ever committed.

Charge quantity^2 * outline vertex count against the shared counter
before each nested fill, and stop issuing new block proposals once the
budget is exhausted, so the existing effort governor actually sees and
bounds this cost.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-05 09:29:46 -04:00
aj 418f75916b refactor(engine): share the private-plate Fill run between blocks and future callers
Move BlockCatalog's private-drawing Fill invocation (BestFitCache stabilization plus
the Default FillItem call) into PrivatePlateFill so the cutout fill can reuse it
without duplicating the cache handling. Behavior unchanged; Irregular filter 96/96.
2026-10-04 19:40:49 -04:00
aj c01a348243 feat(irregular): offer certified Fill blocks for repeated parts 2026-10-01 16:17:25 -04:00