mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-05 03:49:24 -05:00
CutOffEdits ports the WinForms manual cut-off edits, each one undo step under its WinForms label: Add Cut-Off (a Sheet Cut-Off line, stopped at the first crossing unless full length), Trim/Extend Cut-Off and Swap Through-Cut, applied to the definitions in Plate.CutOffs, rebuilt with RegenerateCutOffs and placed with PlateSequencing.PlaceCutOffs. CutOffDrag is the Move Cut-Off drag, taking the joined lines along. SheetCutOffTool (Space turns the axis, Tab toggles full length for the view) and TrimExtendCutOffTool (Tab switches mode) are plate tools; the Select tool now drags a pressed cut-off. AutomaticCutOffSession holds the Automatic Scrap Cutoffs dialog's logic: unit-aware defaults, parsing, planning and applying through AutomaticCutOffBatch as one step, and the status, details and per-plate table texts. The WinForms actions, cut-off handler, junction menu and dialog now delegate to it with unchanged behavior, except that releasing a cut-off without moving it no longer rebuilds the cut-offs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using OpenNest.CutOffs;
|
|
using OpenNest.Desktop;
|
|
|
|
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. The rules live in
|
|
/// <see cref="SavedCutOffHeadLock"/>; this reads and writes them through the app settings.
|
|
/// </summary>
|
|
internal static class CutOffHeadLockDefaults
|
|
{
|
|
internal static void Load(CutOffSettings settings, Units units) =>
|
|
new SavedCutOffHeadLock(
|
|
Properties.Settings.Default.CutOffLockHeadHeight,
|
|
Properties.Settings.Default.CutOffHeadLockOvercutInches)
|
|
.ApplyTo(settings, units);
|
|
|
|
internal static void Save(SavedCutOffHeadLock saved)
|
|
{
|
|
Properties.Settings.Default.CutOffLockHeadHeight = saved.LockHeadHeight;
|
|
Properties.Settings.Default.CutOffHeadLockOvercutInches = saved.OvercutInches;
|
|
Properties.Settings.Default.Save();
|
|
}
|
|
}
|
|
}
|