refactor(engine): expose the layout validation contract to engines
Engines had to reverse-engineer the benchmark validator: Opus55 assumed a 0.01 arc tolerance (the validator uses 0.001), Gpt6Astra added hand-tuned paddings and copied the validator's check order, Qwen picked its chord tolerance to stay under a constant it could not reference. NestTolerances publishes the validator's arc tolerance, the Clipper grid and SafeClearanceMargin (with its derivation). NestLayoutCheck moves the benchmark NestValidator's checks into OpenNest.Engine as a public API (Clears for a part pair, Violations for a whole result); NestValidator is now a thin wrapper. Verdicts are unchanged: tests compare ordered violation lists against a frozen copy of the old validator, and a tangent-disc stress test covers 432 pairs at the safe margin. Co-Authored-By: Codex <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ internal static class NestJobPlacementValidator
|
||||
// Flattening for placement overlap/spacing checks: the same 0.001 the benchmark's
|
||||
// NestValidator and Part.Intersects use. Arcs are inscribed, so a layout placed exactly at
|
||||
// the spacing passes; outward arcs may come up to this much closer than the spacing.
|
||||
private const double PlacementChordTolerance = 0.001;
|
||||
private const double PlacementChordTolerance = NestTolerances.ValidationOutline;
|
||||
|
||||
internal static void ValidateCandidate(
|
||||
PlateCandidate candidate,
|
||||
|
||||
Reference in New Issue
Block a user