Every nesting-geometry consumer filtered only rapids, so scribe/etch moves counted as part material. An etch tick that ends a hair outside the outline (PEP bend ticks start on the notch edge) made the part "open geometry leaving the material region": the job validator threw and every built-in engine plus Gpt6Astra crashed on real PEP jobs (PT75, drawing 4980 A01 PT77). Marks are only on the surface, so they should never affect placement, collision, area, or validation. - SpecialLayers.IsMaterial excludes Rapid and Scribe; used by drawing area, canonical angle, part collision, PartGeometry, plate perimeter, best-fit/pair evaluation, rotation analysis, GPU evaluators, and both validators. Timing, display, splitting and posts still see marks. - ConvertGeometry also maps the saved SCRIBE layer name to Scribe, so programs rebuilt from stored entities keep their marks. - NestReader repairs older files (e.g. PepNestExport output) whose programs saved etch as cut moves while source entities kept SCRIBE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.1 KiB
C#
30 lines
1.1 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 };
|
|
|
|
/// <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.
|
|
/// </summary>
|
|
public static bool IsMaterial(Layer layer) => layer != Rapid && layer != Scribe;
|
|
}
|
|
}
|