mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-11 13:14:13 -04:00
PreferredContourEntries resolves one entry per hole by walking the proposed hole route BACKWARD from the already-chosen perimeter entry. Each hole ranks against the downstream contour's ACTUAL emitted pierce (first non-rapid motion of the owned probe emission, native rounding included), so the cut chain flows toward the outside start rather than chaining on nominal points that rounding may move. Catalogue is the S04 merged list (preferred kinds where present, compass/arc fallbacks otherwise — pure circles included); ordering is the S05 facing/tier/travel ranker; feasibility is one S08-bounded pick per hole through caller-supplied S07 verdicts. A hole with no feasible candidate yields an explicit no-preference proposal naming the contour and reason — never a silent skip, never a partial chain. Arrival proxies (part arrival for the first hole, previous hole centre otherwise) keep the pass deterministic and circularity-free. Deterministic (repeat runs identical), cancellation-aware, ownership- checked, source program untouched, fresh owned probe programs only. This is a recommended-v1 proposal: nothing is installed into the search and no rapid is certified here — S12 wires it and must handle a blocked preferred rapid. Tests: circle pair flows hole->hole->outside via actual pierces (each pierce strictly nearer downstream than the opposite compass pierce); rectangular holes pick right-facing corners under all-clear evaluation; blocked ideal candidate falls back to next-ranked on the same hole; blocked hole yields honest no-preference finding; permutation integrity in route order excluding the perimeter; determinism; foreign perimeter refused; cancellation; fingerprint/ownership/fresh-program invariants. Gate 9/0/0; full Core 3580/25skip/0; cross-build 0 errors; scoped format verify 0; facing-drop and silent-skip mutants killed; nominal- vs-actual-pierce mutant documented near-equivalent.