mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-22 04:17:40 -05:00
Irregular overran DeadlineNestingEngine's 30 s limit by up to 50x in the ML flag-sweep pilot (1,537 s on a 450-per-sheet part). Stack samples put every second of the overrun in BlockCatalog.Rectangles: after a sheet fill places a Lattice block of hundreds of detailed parts, the next block preparation builds the free region one Clipper difference per part and then sorts out every maximal rectangle with a quadratic dominance pass, and neither checked the token. It shows only once best fits are cached (a warm app, worker or sweep process), which is when the fill gets there within the limit. MaximalRectangles.InRegion now takes a token and a `largest` count: it stops dominance checks past that rank, keeping every result tied in area with the last, so its results are exactly the full search's down to that area and Rectangles' top two are unchanged. The free region checks the token per part. Layouts do not change; the reproducing job's whole solve now takes 34 s instead of over 1,000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>