using OpenNest.CNC; namespace OpenNest.WinForms.Tests; /// Part programs the desktop tests share. internal static class TestPrograms { /// A width x height rectangle from the origin, counterclockwise: +X first. public static Program Rectangle(double width, double height) { var program = new Program(); program.MoveTo(0, 0); program.LineTo(width, 0); program.LineTo(width, height); program.LineTo(0, height); program.LineTo(0, 0); return program; } /// A size x size square from the origin, counterclockwise: +X first. public static Program Square(double size) => Rectangle(size, size); /// A size x size square from the origin, clockwise: up first. public static Program ClockwiseSquare(double size) { var program = new Program(); program.MoveTo(0, 0); program.LineTo(0, size); program.LineTo(size, size); program.LineTo(size, 0); program.LineTo(0, 0); return program; } }