Files
OpenNest/OpenNest.Core/CNC/Motion.cs
AJ Isaacs 2d956fd3f7 Restructure project layout to flatten directory structure
Move all projects from Source/ to repository root for simpler navigation.
- Remove External/ dependency DLLs (will use NuGet packages)
- Remove Installer/ NSIS script
- Replace PartCollection/PlateCollection with ObservableList
- Add packages.config for NuGet dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 20:29:12 -05:00

46 lines
1.0 KiB
C#

namespace OpenNest.CNC
{
public abstract class Motion : ICode
{
protected const int DefaultDecimalPlaces = 4;
public Vector EndPoint { get; set; }
public bool UseExactStop { get; set; }
public int Feedrate { get; set; }
protected Motion()
{
Feedrate = CNC.Feedrate.UseDefault;
}
public virtual void Rotate(double angle)
{
EndPoint = EndPoint.Rotate(angle);
}
public virtual void Rotate(double angle, Vector origin)
{
EndPoint = EndPoint.Rotate(angle, origin);
}
public virtual void Offset(double x, double y)
{
EndPoint = new Vector(EndPoint.X + x, EndPoint.Y + y);
}
public virtual void Offset(Vector voffset)
{
EndPoint += voffset;
}
public abstract CodeType Type { get; }
public abstract ICode Clone();
public abstract string ToString(int decimalPlaces);
}
}