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