Rename CircularMove to ArcMove

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 08:16:43 -05:00
parent 2d956fd3f7
commit 255d3962a6
9 changed files with 40 additions and 40 deletions
+3 -3
View File
@@ -85,7 +85,7 @@ namespace OpenNest
return img;
}
private static void AddArc(GraphicsPath path, CircularMove arc, Mode mode, ref Vector curpos)
private static void AddArc(GraphicsPath path, ArcMove arc, Mode mode, ref Vector curpos)
{
var endpt = arc.EndPoint;
var center = arc.CenterPoint;
@@ -186,8 +186,8 @@ namespace OpenNest
switch (code.Type)
{
case CodeType.CircularMove:
AddArc(path, (CircularMove)code, mode, ref curpos);
case CodeType.ArcMove:
AddArc(path, (ArcMove)code, mode, ref curpos);
break;
case CodeType.LinearMove:
+4 -4
View File
@@ -184,9 +184,9 @@ namespace OpenNest.IO
switch (code.Type)
{
case CodeType.CircularMove:
var arc = (CircularMove)code;
AddCircularMove(arc);
case CodeType.ArcMove:
var arc = (ArcMove)code;
AddArcMove(arc);
break;
case CodeType.LinearMove:
@@ -235,7 +235,7 @@ namespace OpenNest.IO
curpos = pt;
}
private void AddCircularMove(CircularMove arc)
private void AddArcMove(ArcMove arc)
{
var center = arc.CenterPoint.ToNetDxf();
var endpt = arc.EndPoint.ToNetDxf();
+13 -13
View File
@@ -311,30 +311,30 @@ namespace OpenNest.IO
{
switch (code.Type)
{
case CodeType.CircularMove:
case CodeType.ArcMove:
{
var sb = new StringBuilder();
var circularMove = (CircularMove)code;
var arcMove = (ArcMove)code;
if (circularMove.Rotation == RotationType.CW)
if (arcMove.Rotation == RotationType.CW)
{
sb.Append(string.Format("G02X{0}Y{1}I{2}J{3}",
Math.Round(circularMove.EndPoint.X, OutputPrecision),
Math.Round(circularMove.EndPoint.Y, OutputPrecision),
Math.Round(circularMove.CenterPoint.X, OutputPrecision),
Math.Round(circularMove.CenterPoint.Y, OutputPrecision)));
Math.Round(arcMove.EndPoint.X, OutputPrecision),
Math.Round(arcMove.EndPoint.Y, OutputPrecision),
Math.Round(arcMove.CenterPoint.X, OutputPrecision),
Math.Round(arcMove.CenterPoint.Y, OutputPrecision)));
}
else
{
sb.Append(string.Format("G03X{0}Y{1}I{2}J{3}",
Math.Round(circularMove.EndPoint.X, OutputPrecision),
Math.Round(circularMove.EndPoint.Y, OutputPrecision),
Math.Round(circularMove.CenterPoint.X, OutputPrecision),
Math.Round(circularMove.CenterPoint.Y, OutputPrecision)));
Math.Round(arcMove.EndPoint.X, OutputPrecision),
Math.Round(arcMove.EndPoint.Y, OutputPrecision),
Math.Round(arcMove.CenterPoint.X, OutputPrecision),
Math.Round(arcMove.CenterPoint.Y, OutputPrecision)));
}
if (circularMove.Layer != LayerType.Cut)
sb.Append(GetLayerString(circularMove.Layer));
if (arcMove.Layer != LayerType.Cut)
sb.Append(GetLayerString(arcMove.Layer));
return sb.ToString();
}
+1 -1
View File
@@ -263,7 +263,7 @@ namespace OpenNest.IO
break;
}
}
program.Codes.Add(new CircularMove()
program.Codes.Add(new ArcMove()
{
EndPoint = new Vector(x, y),
CenterPoint = new Vector(i, j),