Files
OpenNest/OpenNest.Core/CNC/CuttingStrategy/Tabs/NormalTab.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

42 lines
1.2 KiB
C#

using System.Collections.Generic;
using OpenNest.Geometry;
namespace OpenNest.CNC.CuttingStrategy
{
public class NormalTab : Tab
{
public double CutoutMinWidth { get; set; }
public double CutoutMinHeight { get; set; }
public double CutoutMaxWidth { get; set; }
public double CutoutMaxHeight { get; set; }
public override List<ICode> Generate(
Vector tabStartPoint,
Vector tabEndPoint,
double contourNormalAngle,
RotationType winding = RotationType.CW
)
{
var codes = new List<ICode>();
if (TabLeadOut != null)
codes.AddRange(TabLeadOut.Generate(tabStartPoint, contourNormalAngle, winding));
codes.Add(new RapidMove(tabEndPoint));
if (TabLeadIn != null)
codes.AddRange(TabLeadIn.Generate(tabEndPoint, contourNormalAngle, winding));
return codes;
}
public bool AppliesToCutout(double cutoutWidth, double cutoutHeight)
{
return cutoutWidth >= CutoutMinWidth
&& cutoutWidth <= CutoutMaxWidth
&& cutoutHeight >= CutoutMinHeight
&& cutoutHeight <= CutoutMaxHeight;
}
}
}