using System.Text.Json;
using System.Text.Json.Serialization;
namespace OpenNest.Data;
///
/// 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
/// ( null) takes this PC's last cutting settings.
///
public class ThicknessCuttingConfig
{
public bool RoundLeadInAngles { get; set; }
public double LeadInAngleIncrement { get; set; } = 5;
/// Whether parts are tabbed at all: by the support grid, or by size with .
public bool Tabs { get; set; }
/// With , ignore the support grid and tab parts whose narrow side is in the size range.
public bool TabBySize { get; set; }
public double TabSize { get; set; } = 0.03;
/// The longest part its tab alone holds; 0 turns the rule off.
public double TabHeldMaxLength { get; set; } = 6;
public double TabSizeMinWidth { get; set; }
/// The widest part tabbed by size; 0 tabs nothing by size.
public double TabSizeMaxWidth { get; set; }
public double PierceClearance { get; set; } = 0.0625;
/// The pierce zone's diameter; 0 turns it off.
public double PierceDiameter { get; set; }
/// Fields a newer OpenNest wrote, kept so saving here does not drop them.
[JsonExtensionData]
public Dictionary? Unknown { get; set; }
}