mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-16 18:15:34 -05:00
The CAD Converter winds every drawing's outside clockwise and its cutouts counter-clockwise (ShapeProfile.NormalizeEntities) before building the program, but the Shape Library built its programs straight from the generated entities, which run counter-clockwise. A shape part therefore cut its outside the opposite way from an imported part, and opening it in the converter showed (and on save, wrote) the reverse of what was nested. ShapeDefinition.CreateDrawing now normalizes the entities the same way, so every shape cuts outside clockwise and cutouts counter-clockwise. Tests cover each shape type, including the pipe flange's holes, and that rebuilding a shape drawing through the converter's import path keeps its directions. Drawings already made from shapes keep their stored direction until they are recreated or saved from the converter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>