refactor: move material and thickness from Plate to Nest

Material and thickness are properties of the nest (all plates share the
same material/gauge), not individual plates. This moves them to the Nest
class, removes them from Plate and PlateSettings, and updates the UI so
EditNestInfoForm has a material field while EditPlateForm no longer shows
thickness. The nest file format gains top-level thickness/material fields
with backward-compatible reading from PlateDefaults for old files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 21:00:59 -04:00
parent 3e340e67e0
commit 9db7abcd37
18 changed files with 101 additions and 160 deletions

View File

@@ -58,7 +58,6 @@ namespace OpenNest.Forms
var controls = new[]
{
numericUpDownThickness,
numericUpDownPartSpacing,
numericUpDownEdgeSpacingBottom,
numericUpDownEdgeSpacingLeft,
@@ -110,12 +109,6 @@ namespace OpenNest.Forms
set { numericUpDownPartSpacing.Value = (decimal)value; }
}
public double Thickness
{
get { return (double)numericUpDownThickness.Value; }
set { numericUpDownThickness.Value = (decimal)value; }
}
public int Quantity
{
get { return (int)numericUpDownQty.Value; }
@@ -163,7 +156,6 @@ namespace OpenNest.Forms
PartSpacing = plate.PartSpacing;
Quantity = plate.Quantity;
Quadrant = plate.Quadrant;
Thickness = plate.Thickness;
}
private void Save()
@@ -176,7 +168,6 @@ namespace OpenNest.Forms
plate.PartSpacing = PartSpacing;
plate.Quantity = Quantity;
plate.Quadrant = Quadrant;
plate.Thickness = Thickness;
}
private void textBox1_TextChanged(object sender, EventArgs e)