fix: flip ComputeNormal for CCW arcs on concave contour features

CCW arcs (e.g. the top of a U-slot) had the radial normal pointing
into the part material instead of into the scrap. This caused the
lead-in preview to flip sides on concave features.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 17:37:26 -04:00
parent e8fe01aea2
commit c1f1c829dc

View File

@@ -169,6 +169,12 @@ namespace OpenNest.CNC.CuttingStrategy
{
// Radial direction from center to point
normal = point.AngleFrom(arc.Center);
// For CCW arcs the radial points the wrong way — flip it.
// CW arcs are convex features (corners) where radial = outward.
// CCW arcs are concave features (slots) where radial = inward.
if (arc.Rotation == RotationType.CCW)
normal += System.Math.PI;
}
else if (entity is Circle circle)
{