mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 16:11:07 -04:00
A hole can now be declared a tabbed cutout in the CAD Converter: pick a circle or any edge of a closed hole, set the tab count and width, and drag the tabs around the hole. The definition persists on the drawing and in the nest file, and stays editable from the source entities. The builder replaces the hole with open cut pieces and uncut spans on a new Tab layer. Tabs are material, so area, nesting and overlap checks still see a closed hole, but they are never cut. Plan Cutting and Assign Lead-ins cut each piece from the slug with the internal lead-in and no lead-out. A lead that would reach back over a tab is mirrored, and an arc lead onto an arc pierces straight in. Planning accounts for each span between tabs and runs the open-cut proof, so its own tabbed cutouts certify; tabs followed by a lead-out are still refused. Pre-post review flags programs that still contain tab motions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.6 KiB
C#
37 lines
1.6 KiB
C#
using System.Drawing;
|
|
using OpenNest.Geometry;
|
|
|
|
namespace OpenNest
|
|
{
|
|
public static class SpecialLayers
|
|
{
|
|
public static readonly Layer Default = new Layer("0") { Color = Color.White };
|
|
|
|
public static readonly Layer Cut = new Layer("CUT") { Color = Color.White };
|
|
|
|
public static readonly Layer Rapid = new Layer("RAPID") { Color = Color.Gray };
|
|
|
|
public static readonly Layer Display = new Layer("DISPLAY") { Color = Color.Cyan };
|
|
|
|
public static readonly Layer Leadin = new Layer("LEADIN") { Color = Color.Brown };
|
|
|
|
public static readonly Layer Leadout = new Layer("LEADOUT") { Color = Color.Brown };
|
|
|
|
public static readonly Layer Scribe = new Layer("SCRIBE") { Color = Color.Magenta };
|
|
|
|
public static readonly Layer Break = new Layer("BREAK") { Color = Color.Orange };
|
|
|
|
/// <summary>A tabbed cutout's uncut tabs: material boundary that is never cut.</summary>
|
|
public static readonly Layer Tab = new Layer("TAB") { Color = Color.Orange };
|
|
|
|
/// <summary>
|
|
/// True when an entity converted from a part program describes part material. Rapids
|
|
/// and scribe/etch marks are excluded: marks are only on the surface, so they never
|
|
/// bound material and must not affect nesting, collision, area, or validation. Break
|
|
/// cuts are excluded too: they run through material that stays attached at tabs. Tabs are
|
|
/// material: they close a tabbed cutout's boundary.
|
|
/// </summary>
|
|
public static bool IsMaterial(Layer layer) => layer != Rapid && layer != Scribe && layer != Break;
|
|
}
|
|
}
|