refactor: move CutParameters to OpenNest.Api namespace with new properties

Relocates CutParameters from OpenNest namespace to OpenNest.Api, adds
LeadInLength and PostProcessor properties, and provides a typed Default
factory. Updates Timing.cs, the WinForms project reference, and the three
consuming forms to resolve the type from the new namespace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 08:25:32 -04:00
parent cfe8a38620
commit b6bd7eda6e
7 changed files with 57 additions and 11 deletions

View File

@@ -0,0 +1,35 @@
using OpenNest.Api;
namespace OpenNest.Tests.Api;
public class CutParametersTests
{
[Fact]
public void Default_HasExpectedValues()
{
var cp = CutParameters.Default;
Assert.Equal(100, cp.Feedrate);
Assert.Equal(300, cp.RapidTravelRate);
Assert.Equal(TimeSpan.FromSeconds(0.5), cp.PierceTime);
Assert.Equal(Units.Inches, cp.Units);
}
[Fact]
public void Properties_AreSettable()
{
var cp = new CutParameters
{
Feedrate = 200,
RapidTravelRate = 500,
PierceTime = TimeSpan.FromSeconds(1.0),
LeadInLength = 0.25,
PostProcessor = "CL-707",
Units = Units.Millimeters
};
Assert.Equal(200, cp.Feedrate);
Assert.Equal(0.25, cp.LeadInLength);
Assert.Equal("CL-707", cp.PostProcessor);
}
}