mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-04 19:39:25 -05:00
Plan Cutting's heat-aware order is now one setting, "Don't start above (°C rise)" (CuttingParameters.HeatStartLimit, 0 = off, saved per material and thickness), with the same rule for single parts and for the lines of large grids: before each next piece, estimate the temperature where it starts when the tool gets there; cut the plain order's next piece when it is at or under the limit, else the nearest piece under it, else the coolest. A move across parts already cut is a heat jump, reached with the head raised and counted in HeatRaises; parts that cannot take a raise are reached head-down only when nothing else is ready. The weighted block layouts and the grid prototype's static switch and Alternate mode are gone; every-other-line on the washer grid falls out of the rule. The rule counts the heat of the part just cut: leaving it out halved the raises on a 0.06 in sheet but left the starts' P90 at 32-36 C instead of about 3 C. Re-plans after a learned order rule replay the parts already cut into the estimate and the crossing test, and an order the heat never moved stays the plain one, so a limit the estimate never reaches changes nothing. Measured (HeatOrderMeasurementTests, docs/plate-heat-map.md): washer grid line starts 63 -> 6 C for +1.5% travel and 1-2 raises; 0.06 in sheet zone P95 -25% for +10-15% travel, +2% cut time; 0.25 in sheet at 10 C zone P95 -18% for +15% travel (the old weight: -10% for +51%). No fallback raises. Limit 0 is byte-identical (characterization digests, problem-nest part-order and grid areas pass). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
3.2 KiB
C#
73 lines
3.2 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using OpenNest.CNC.CuttingStrategy;
|
|
|
|
namespace OpenNest.Data;
|
|
|
|
/// <summary>
|
|
/// The Cutting Parameters dialog's settings beyond leads for one thickness: lead-in angle
|
|
/// rounding, tabs and pierce. Lengths are in the machine's units. A thickness without them
|
|
/// (<see cref="ThicknessConfig.Cutting"/> null) takes this PC's last cutting settings.
|
|
/// </summary>
|
|
public class ThicknessCuttingConfig
|
|
{
|
|
public bool RoundLeadInAngles { get; set; }
|
|
public double LeadInAngleIncrement { get; set; } = 5;
|
|
|
|
/// <summary>Whether parts are tabbed at all: by the support grid, or by size with <see cref="TabBySize"/>.</summary>
|
|
public bool Tabs { get; set; }
|
|
|
|
/// <summary>With <see cref="Tabs"/>, ignore the support grid and tab parts whose narrow side is in the size range.</summary>
|
|
public bool TabBySize { get; set; }
|
|
|
|
public double TabSize { get; set; } = 0.03;
|
|
|
|
public double TabSizeMinWidth { get; set; }
|
|
|
|
/// <summary>The widest part tabbed by size; 0 tabs nothing by size.</summary>
|
|
public double TabSizeMaxWidth { get; set; }
|
|
|
|
/// <summary>Whether cutouts the support grid can't hold level have their slugs sliced; written only when on.</summary>
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
|
public bool SliceTippingSlugs { get; set; }
|
|
|
|
/// <summary>What Plan Cutting etches in each part's label box; written only when not off.</summary>
|
|
[JsonConverter(typeof(JsonStringEnumConverter))]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
|
public PartLabelMode LabelMode { get; set; }
|
|
|
|
/// <summary>
|
|
/// Read only: the old on/off part label option, which meant the number with its bend
|
|
/// groups. Never written; files saved with it load as <see cref="PartLabelMode.PartNumberAndBendGroups"/>.
|
|
/// </summary>
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
|
public bool EtchPartLabels { get; set; }
|
|
|
|
/// <summary>
|
|
/// <see cref="LabelMode"/>, or the full label when only the old on/off option is set. A number
|
|
/// that names no mode (the reader accepts numbers) loads as the old option, so as Off without it.
|
|
/// </summary>
|
|
[JsonIgnore]
|
|
public PartLabelMode ResolvedLabelMode =>
|
|
LabelMode != PartLabelMode.Off && System.Enum.IsDefined(LabelMode) ? LabelMode
|
|
: EtchPartLabels ? PartLabelMode.PartNumberAndBendGroups
|
|
: PartLabelMode.Off;
|
|
|
|
/// <summary>
|
|
/// The estimated temperature rise, in °C, above which Plan Cutting's order does not start the
|
|
/// next part or grid line (docs/plate-heat-map.md#sequencing); 0 orders by travel alone.
|
|
/// Written only when set.
|
|
/// </summary>
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
|
public double HeatStartLimit { get; set; }
|
|
|
|
public double PierceClearance { get; set; } = 0.0625;
|
|
|
|
/// <summary>The pierce zone's diameter; 0 turns it off.</summary>
|
|
public double PierceDiameter { 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; }
|
|
}
|