fix: correct Size width/length axis mapping throughout codebase
The Size fix (d4222db) changed Size.Width to Y axis and Size.Length to
X axis but only updated DrawPlate/LayoutViewGL. BoundingBox, WorkArea,
rotations, DXF export, and engine code still used the old Width=X
convention, causing the fill engine to get a swapped work area (60x120
instead of 120x60) and parts to fill in the wrong direction.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+12
-12
@@ -145,30 +145,30 @@ namespace OpenNest.IO
|
||||
{
|
||||
case 1:
|
||||
pt1 = new XYZ(0, 0, 0);
|
||||
pt2 = new XYZ(0, plate.Size.Length, 0);
|
||||
pt3 = new XYZ(plate.Size.Width, plate.Size.Length, 0);
|
||||
pt4 = new XYZ(plate.Size.Width, 0, 0);
|
||||
pt2 = new XYZ(0, plate.Size.Width, 0);
|
||||
pt3 = new XYZ(plate.Size.Length, plate.Size.Width, 0);
|
||||
pt4 = new XYZ(plate.Size.Length, 0, 0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
pt1 = new XYZ(0, 0, 0);
|
||||
pt2 = new XYZ(0, plate.Size.Length, 0);
|
||||
pt3 = new XYZ(-plate.Size.Width, plate.Size.Length, 0);
|
||||
pt4 = new XYZ(-plate.Size.Width, 0, 0);
|
||||
pt2 = new XYZ(0, plate.Size.Width, 0);
|
||||
pt3 = new XYZ(-plate.Size.Length, plate.Size.Width, 0);
|
||||
pt4 = new XYZ(-plate.Size.Length, 0, 0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
pt1 = new XYZ(0, 0, 0);
|
||||
pt2 = new XYZ(0, -plate.Size.Length, 0);
|
||||
pt3 = new XYZ(-plate.Size.Width, -plate.Size.Length, 0);
|
||||
pt4 = new XYZ(-plate.Size.Width, 0, 0);
|
||||
pt2 = new XYZ(0, -plate.Size.Width, 0);
|
||||
pt3 = new XYZ(-plate.Size.Length, -plate.Size.Width, 0);
|
||||
pt4 = new XYZ(-plate.Size.Length, 0, 0);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
pt1 = new XYZ(0, 0, 0);
|
||||
pt2 = new XYZ(0, -plate.Size.Length, 0);
|
||||
pt3 = new XYZ(plate.Size.Width, -plate.Size.Length, 0);
|
||||
pt4 = new XYZ(plate.Size.Width, 0, 0);
|
||||
pt2 = new XYZ(0, -plate.Size.Width, 0);
|
||||
pt3 = new XYZ(plate.Size.Length, -plate.Size.Width, 0);
|
||||
pt4 = new XYZ(plate.Size.Length, 0, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user