fix(opus55): cut clearance margin to 0.003 and drop etch marks from geometry
The 0.022 margin assumed validators flatten arcs at 0.01; NestValidator uses 0.001, so a pair can read at most 0.002 closer than true. 0.003 covers that plus the 1e-4 Clipper grid, returning ~0.019 per gap. Arc, disc, obround and zero-spacing tests still pass. Part geometry filtered only rapids, so scribe/etch moves counted as material - the bug OpenNest fixed in 1b5e1b1. Use SpecialLayers.IsMaterial. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -191,6 +191,24 @@ public class Opus55NestingEngineTests
|
||||
Assert.Equal(Describe(first), Describe(second));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EtchMarksAreLeftOutOfNestingGeometry()
|
||||
{
|
||||
// A bend tick starts on material and ends 1.0 into a side notch, outside the part but
|
||||
// inside its bounding box (the PEP case that crashed nesting before 1b5e1b1). As
|
||||
// material it is open geometry leaving the part; as a mark it must be ignored.
|
||||
var etched = Polyline((0, 0), (10, 0), (10, 4), (8, 4), (8, 6), (10, 6), (10, 10), (0, 10));
|
||||
etched.Codes.Add(new RapidMove(7.5, 5));
|
||||
etched.Codes.Add(new LinearMove(9, 5) { Layer = LayerType.Scribe });
|
||||
var job = Job(new[] { Part("part", etched, 2, RotationPolicy.Fixed(0)) }, new[] { Stock("sheet", 10.4, 20.6, spacing: 0.2) });
|
||||
|
||||
var result = new Opus55NestingEngine().Solve(job);
|
||||
|
||||
AssertValid(job, result);
|
||||
Assert.Equal(NestJobStatus.Complete, result.Status);
|
||||
Assert.Equal(2, Assert.Single(result.Plates).Placements.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HasPublicParameterlessConstructorForPluginDiscovery()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user