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 };
/// A tabbed cutout's uncut tabs: material boundary that is never cut.
public static readonly Layer Tab = new Layer("TAB") { Color = Color.Orange };
/// A supplied blank's shown-only outside edge: material boundary that is never cut.
public static readonly Layer DisplayPerimeter = new Layer("DISPLAY PERIMETER") { Color = Color.DarkCyan };
/// A common-line group's shared cut: an open centerline cut between two parts, not material.
public static readonly Layer CommonLine = new Layer("COMMON LINE") { Color = Color.Teal };
///
/// 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. A display perimeter is material: it is the
/// supplied blank's edge. A common line's shared cut is excluded: it runs in the kerf between two
/// parts, and their material comes from their perimeters.
///
public static bool IsMaterial(Layer layer) =>
layer != Rapid && layer != Scribe && layer != Break && layer != CommonLine;
}
}