Files
OpenNest/OpenNest.Data/ThicknessConfig.cs
T
ajandClaude Opus 5.5 3cd7729d38 feat(cutting): keep cutting settings per machine material and thickness
Tabs suit thin plate, but on anything thicker than 0.25 in the parts
are too hard to break out of the sheet, and the Cutting Parameters
dialog was one global set for every job. Its settings now live on the
nest's machine thickness: leads on the existing Outside/Inside Cuts
tabs, and lead-in angle rounding, tabs and pierce on a new Tabs &
Pierce tab (ThicknessConfig.Cutting). In Database mode every
workstation gets the same settings through the shared machine.

The dialog and the Place Lead-in panel say what they edit, and save
back to that thickness (MachineCuttingDefaults.WriteTo, converted to
the machine's units). A thickness with no Tabs & Pierce of its own, or
a nest the machine has no thickness for, keeps this PC's settings as
before. If the machine can't be saved (server offline, a conflict),
the edit is kept on this PC for that job and the user is told.
Machine Configuration can copy one thickness's Tabs & Pierce to
thinner or thicker ones, so the 0.25 in rule takes a few clicks.

An older desktop saving a shared machine would silently erase these
settings, since it doesn't know them. Machine configuration classes
now keep unknown fields, and the server refuses a machine save that
leaves out a field the stored machine has a value for, telling the
user to update OpenNest.

The Plan Cutting status line now reports tabs from SupportTabs; since
"Tab every part" was retired it always said off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:24:39 -05:00

48 lines
1.9 KiB
C#

using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace OpenNest.Data;
public class ThicknessConfig
{
public double Value { get; set; }
/// <summary>Optional display name for the thickness, such as a gauge ("16 ga").</summary>
public string Name { get; set; } = "";
public double Kerf { get; set; }
public string AssistGas { get; set; } = "";
/// <summary>The lead-in of outside cuts (part perimeters), and of inside cuts while <see cref="InsideLeadIn"/> is null.</summary>
public LeadConfig LeadIn { get; set; } = new();
/// <summary>The lead-out of outside cuts, and of inside cuts while <see cref="InsideLeadOut"/> is null.</summary>
public LeadConfig LeadOut { get; set; } = new();
/// <summary>The lead-in of inside cuts (cutouts and holes); null uses <see cref="LeadIn"/>.</summary>
public LeadConfig? InsideLeadIn { get; set; }
/// <summary>The lead-out of inside cuts; null uses <see cref="LeadOut"/>.</summary>
public LeadConfig? InsideLeadOut { get; set; }
public CutOffConfig CutOff { get; set; } = new();
public List<string> PlateSizes { get; set; } = new();
/// <summary>The part spacing of nests in this thickness; null keeps the nest defaults'.</summary>
public double? PartSpacing { get; set; }
/// <summary>The edge spacing of nests in this thickness; null keeps the nest defaults'.</summary>
public EdgeSpacingConfig? EdgeSpacing { get; set; }
/// <summary>
/// Lead-in angle rounding, tabs and pierce for this thickness; null takes this PC's last
/// cutting settings.
/// </summary>
public ThicknessCuttingConfig? Cutting { get; set; }
/// <summary>Fields a newer OpenNest wrote, kept so saving here does not drop them.</summary>
[JsonExtensionData]
public Dictionary<string, JsonElement>? Unknown { get; set; }
}