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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user