Files
OpenNest/OpenNest.Core/CNC/RapidMove.cs
T
aj aec0523062 style: apply CSharpier formatting to all C# sources
Repo-wide sweep with the pinned CSharpier 1.3.0 tool. Whitespace and
line-wrapping only; OpenNest.Engine.Tests (109) and OpenNest.IO.Tests
pass after reformat, full solution builds 0 errors.

Added .csharpierignore so csproj/config XML keeps its existing layout
(CSharpier's XML wrapping churns attributes with zero benefit).

Formatting is now enforceable: dotnet csharpier check . passes.
2026-09-20 16:41:50 -04:00

50 lines
1.1 KiB
C#

using System.Collections.Generic;
using OpenNest.Geometry;
namespace OpenNest.CNC
{
public class RapidMove : Motion
{
public RapidMove()
{
Feedrate = CNC.Feedrate.UseMax;
}
public RapidMove(Vector endPoint)
{
EndPoint = endPoint;
}
public RapidMove(double x, double y)
{
EndPoint = new Vector(x, y);
}
public override CodeType Type
{
get { return CodeType.RapidMove; }
}
public override ICode Clone()
{
return new RapidMove(EndPoint)
{
Suppressed = Suppressed,
VariableRefs =
VariableRefs != null ? new Dictionary<string, string>(VariableRefs) : null,
};
}
public override string ToString()
{
return ToString(DefaultDecimalPlaces);
}
public override string ToString(int decimalPlaces)
{
var dp = "N" + decimalPlaces;
return string.Format("G00 X{0} Y{1}", EndPoint.X.ToString(dp), EndPoint.Y.ToString(dp));
}
}
}