diff --git a/OpenNest.Reporting/NestPdfWriter.cs b/OpenNest.Reporting/NestPdfWriter.cs index 31661fe2..d0b31c0a 100644 --- a/OpenNest.Reporting/NestPdfWriter.cs +++ b/OpenNest.Reporting/NestPdfWriter.cs @@ -729,7 +729,7 @@ public static class NestPdfWriter } // Zero thickness means "unset" in a new nest; never present it as a genuine value. - // A standard gauge or plate fraction leads, as the thickness box lists it: "16 ga - 0.0598 in". + // The machine config's name for the thickness leads: "16 ga - 0.0598 in". private static string Thickness(NestReportSnapshot snapshot) => snapshot.Thickness <= 0 ? "Not specified" : snapshot.ThicknessName.Length > 0 ? $"{snapshot.ThicknessName} - {Number(snapshot.Thickness)} {snapshot.Units}" diff --git a/OpenNest.Reporting/NestReportSnapshot.cs b/OpenNest.Reporting/NestReportSnapshot.cs index 46e9435f..d93b4f4a 100644 --- a/OpenNest.Reporting/NestReportSnapshot.cs +++ b/OpenNest.Reporting/NestReportSnapshot.cs @@ -63,9 +63,9 @@ public sealed record NestReportSnapshot(string Name, string Customer, string Not public long TotalSheets => Plates.Aggregate(0L, (total, plate) => checked(total + plate.Copies)); /// - /// The standard gauge or plate fraction the thickness matches ("16 ga", "1/4\""), shown - /// before the decimal; empty when it matches none. Reporting has no thickness table of its - /// own, so the caller supplies it. + /// The name the nest machine's config gives this thickness ("16 ga"), shown before the + /// decimal; empty when it has none. Reporting does not read machine configs, so the caller + /// supplies it. /// public string ThicknessName { get; init; } = ""; diff --git a/OpenNest/Forms/EditNestForm.cs b/OpenNest/Forms/EditNestForm.cs index 18b456e7..b9f5ebb8 100644 --- a/OpenNest/Forms/EditNestForm.cs +++ b/OpenNest/Forms/EditNestForm.cs @@ -848,10 +848,11 @@ namespace OpenNest.Forms // Reporting must have no accounting side effects: no quantity refresh, no // selection or dirty-state change. Only the detached snapshot reaches the writer. var material = targets.Nest.Material; + var machine = MachineSettings.FindMachine(targets.Nest.Machine); var catalogDensity = Data.MaterialDensityLookup.Resolve( material?.Name, material?.Grade, - MachineSettings.FindMachine(targets.Nest.Machine), + machine, MachineSettings.LoadMaterials() ); var snapshot = NestReportBuilder.Capture( @@ -861,8 +862,8 @@ namespace OpenNest.Forms catalogDensity ) with { - ThicknessName = - Data.StandardThicknesses.Find(targets.Nest.Thickness, targets.Nest.Units)?.Name ?? "", + // The name the machine config gives the nest's thickness ("16 ga"), if any. + ThicknessName = Data.MachineCuttingDefaults.Find(machine, targets.Nest)?.Name?.Trim() ?? "", }; NestPdfWriter.Write(snapshot, destination); } diff --git a/docs/nest-reports.md b/docs/nest-reports.md index 4efd42fb..83e9d84a 100644 --- a/docs/nest-reports.md +++ b/docs/nest-reports.md @@ -112,10 +112,11 @@ beside the ID; complete drawings show no status. Cards without a weight show a table row, so a card never splits across pages. The summary's header lists the job and material on the left and the totals on -the right, to leave room for part cards on the first page. A thickness that -matches a standard gauge or plate fraction leads with its name, as the -thickness box lists it ("16 ga - 0.0598 in"); the desktop supplies the name, -since Reporting has no thickness table of its own. +the right, to leave room for part cards on the first page. When the nest +machine's config names the thickness (its **Name / Gauge**, matched as the +[machine cutting defaults](machine-cutting-defaults.md) match it), the name +leads the decimal: "16 ga - 0.0598 in". The desktop supplies it, since +Reporting does not read machine configs. Stock sizes read **width x length** in job units. Plate tables use **Quantity** and **Parts per plate**; the plate quantity multiplies per-plate part counts for