Files
OpenNest/OpenNest.Engine/Sequencing/PlateHelper.cs
AJ Isaacs 42f2475f3c 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>
2026-03-17 16:20:24 -04:00

23 lines
582 B
C#

using OpenNest.Geometry;
namespace OpenNest.Engine.Sequencing
{
internal static class PlateHelper
{
public static Vector GetExitPoint(Plate plate)
{
var xExtent = plate.Size.Length;
var yExtent = plate.Size.Width;
return plate.Quadrant switch
{
1 => new Vector(xExtent, yExtent),
2 => new Vector(0, yExtent),
3 => new Vector(0, 0),
4 => new Vector(xExtent, 0),
_ => new Vector(xExtent, yExtent)
};
}
}
}