mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-28 09:21:34 -05:00
fix(engine): stop rejecting arc pairs placed at the part spacing
On a plate with clamps, MaterialsTooClose measured gaps on polygons faceted at 0.001, which understate an arc gap by more than the 0.0005 slack. A pair interlocked exactly at the spacing read as too close, so FillGroup discarded every copy and the fill silently placed nothing. Confirm the gap on NativeContours, as the layout check and pre-post review already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ca8b0debf
commit
508b7db0df
2 files changed
+44
-10
No files matched your search
@@ -124,16 +124,10 @@ internal static class InteractiveClamps
|
||||
return true;
|
||||
if (spacing <= NestTolerances.SpacingSlack)
|
||||
return false;
|
||||
var ringsA = new List<Polygon> { outerA };
|
||||
var ringsB = new List<Polygon> { outerB };
|
||||
if (holesA != null) ringsA.AddRange(holesA);
|
||||
if (holesB != null) ringsB.AddRange(holesB);
|
||||
foreach (var ringA in ringsA)
|
||||
foreach (var ringB in ringsB)
|
||||
if (Clearance.BoundaryDistance(ringA, ringB).Distance
|
||||
< spacing - NestTolerances.SpacingSlack)
|
||||
return true;
|
||||
return false;
|
||||
// The profiles are already in world space. Facets at the polygons' tolerance understate
|
||||
// an arc gap by more than the slack, which would reject a pair placed at the spacing.
|
||||
return NativeContours.Of(a, new Vector(0, 0))
|
||||
.TooClose(NativeContours.Of(b, new Vector(0, 0)), spacing);
|
||||
}
|
||||
|
||||
private static List<Polygon> HolePolygons(ShapeProfile profile)
|
||||
|
||||
Reference in new issue
Block a user