mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-29 13:41:05 -04:00
Stock can arrive up to 1.5 in wider than nominal, so only the origin-side edge is certain. A cut-off with a head-locked overcut cuts past the nominal far edge with the head height locked, covering the oversize. With that lock, Plan Cutting may start the far-edge segment at the far edge: overcut outward, rapid back still locked, unlock, cut toward the origin. Without it the direction stays fixed, as decided in Project Memory a20ea455. - CutOff.HeadLockOvercut / FarEdgeFirst, persisted in .nest; HEAD HEIGHT LOCK/UNLOCK comment markers; far edge is quadrant-aware. - Planner offers the reversed far-edge segment in the joint search, the safest route and segment insertion; Apply records the direction. - Cincinnati CL and CI Fiber posts gain lock/unlock code settings and refuse head-locked cut-offs while either is empty. - Automatic cut-off dialog setting (off by default, 1.5 in), kept between sessions and used for new cut-offs. Lock codes and machine behaviour with the head locked are unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
namespace OpenNest
|
|
{
|
|
/// <summary>
|
|
/// Whether new cut-offs lock the head height and overcut the far sheet edge, kept between
|
|
/// sessions with the overcut in inches and converted to each nest's units.
|
|
/// </summary>
|
|
internal static class CutOffHeadLockDefaults
|
|
{
|
|
private const double DefaultOvercutInches = 1.5;
|
|
private const double MillimetersPerInch = 25.4;
|
|
|
|
internal static void Load(CutOffSettings settings, Units units)
|
|
{
|
|
var inches = Properties.Settings.Default.CutOffHeadLockOvercutInches;
|
|
if (!double.IsFinite(inches) || inches <= 0)
|
|
inches = DefaultOvercutInches;
|
|
settings.LockHeadHeight = Properties.Settings.Default.CutOffLockHeadHeight;
|
|
settings.HeadLockOvercut = units == Units.Millimeters ? inches * MillimetersPerInch : inches;
|
|
}
|
|
|
|
internal static void Save(bool lockHeadHeight, double overcut, Units units)
|
|
{
|
|
Properties.Settings.Default.CutOffLockHeadHeight = lockHeadHeight;
|
|
Properties.Settings.Default.CutOffHeadLockOvercutInches =
|
|
units == Units.Millimeters ? overcut / MillimetersPerInch : overcut;
|
|
Properties.Settings.Default.Save();
|
|
}
|
|
}
|
|
}
|