fix(engine): leave scribe marks out of layout bounds and salvage

The job runner already checked sheet bounds on material contours only,
but the benchmark validator and salvage scoring used Part.BoundingBox,
which includes scribe/etch moves. A PEP bend tick that ends a hair past
the part's edge passed the runner yet failed the benchmark when placed
flush to the sheet edge, and it could shrink the credited offcut. Marks
only mark the surface, so bounds and salvage now use material only.

Benchmark before/after (all five built-in engines, local fixtures,
salvage 0.5): no job changed validity or cost. Regression tests pin the
new rule: a protruding tick flush to the sheet edge is valid in all four
quadrants, and a tick past the parts envelope no longer shrinks salvage
(targeted fixture cost 130 -> 120).

Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
aj
2026-09-25 08:56:49 -04:00
co-authored by Codex Claude Opus 5.5
parent 7f63c725e6
commit 896ed2026a
5 changed files with 79 additions and 14 deletions
+3 -1
View File
@@ -3,7 +3,9 @@ using OpenNest.Geometry;
namespace OpenNest.Engine.Jobs;
/// <summary>Shared numerical contract for layout validation.</summary>
/// <summary>Shared numerical contract for layout validation.
/// Only material contours (SpecialLayers.IsMaterial) count for bounds, clearance and scoring.
/// Scribe/etch marks never affect these checks or salvage envelopes, even outside the sheet.</summary>
public static class NestTolerances
{
/// <summary>Arc chord tolerance used by both validators. The layout check circumscribes