mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-13 23:55:08 -05:00
On an enclosed machine a cutout slug that tips once cut free can stand up above the sheet and catch the enclosure door when the pallet changes. The head already keeps off cut cutouts, so this is about clearing the door, not the head. Cutting Settings > Cutouts > "Slice slugs the support grid can't hold level" (CuttingParameters.SliceTippingSlugs, off by default, saved per machine thickness and written only when on) makes Plan Cutting cut each such slug along the bed's contact lines (grid rows and columns, slat center lines) before the cutout, so no piece keeps a contact and the pieces drop between the supports. Each slice stops a kerf short of the cutout, so the pieces stay attached until the cutout's own kerf frees them together. A slug the bed holds level, or one on no contact, is left whole; a cutout holding another part or another of its part's cuts is never sliced. Slices are break cuts emitted right after the drawing's own break cuts, pierced on themselves and led straight back to their start. The released-contour proof now leaves out straight break cuts lying wholly inside one of the part's closed holes, since the grid cells they free are scrap; break cuts in material still take part. The plan fingerprint only changes when the setting is on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
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;
|
|
|
|
/// <summary>The longest part its tab alone holds; 0 turns the rule off.</summary>
|
|
public double TabHeldMaxLength { get; set; } = 6;
|
|
|
|
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; }
|
|
|
|
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; }
|
|
}
|