fix: CadConverter SetRotation ignored rotation parameter

SetRotation always forced CW regardless of the requested rotation,
so cutouts (which should be CCW for kerf-left) were also set to CW.
Now uses the rotation parameter to set the correct winding direction.

Also reverts the Shape.OffsetEntity cutout side inversion since the
correct fix is proper winding from the converter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 19:41:42 -05:00
parent af00fa36eb
commit 1c4015ac62
2 changed files with 2 additions and 4 deletions

View File

@@ -459,10 +459,8 @@ namespace OpenNest.Geometry
lastEntity = entity;
}
var cutoutSide = side == OffsetSide.Left ? OffsetSide.Right : OffsetSide.Left;
foreach (var cutout in definedShape.Cutouts)
offsetShape.Entities.AddRange(((Shape)cutout.OffsetEntity(distance, cutoutSide)).Entities);
offsetShape.Entities.AddRange(((Shape)cutout.OffsetEntity(distance, side)).Entities);
return offsetShape;
}