KiCad PCB EDA Suite
Loading...
Searching...
No Matches
layer_ids.h File Reference
#include <set>
#include <vector>
#include <bitset>
#include <stdexcept>
#include <wx/string.h>
#include <kicommon.h>

Go to the source code of this file.

Classes

class  GAL_SET
 Helper for storing and iterating over GAL_LAYER_IDs. More...
 

Macros

#define MAX_CU_LAYERS   32
 
#define NETNAMES_LAYER_INDEX(layer)   ( static_cast<int>( NETNAMES_LAYER_ID_START ) + layer )
 Macro for obtaining netname layer for a given PCB layer.
 
#define GAL_UI_LAYER_COUNT   10
 
#define GAL_LAYER_INDEX(x)   ( x - GAL_LAYER_ID_START )
 Use this macro to convert a GAL layer to a 0-indexed offset from LAYER_VIAS.
 
#define BITMAP_LAYER_FOR(boardLayer)   ( LAYER_BITMAP_START + boardLayer )
 Macros for getting the extra layers for a given board layer.
 
#define ZONE_LAYER_FOR(boardLayer)   ( LAYER_ZONE_START + boardLayer )
 
#define SCH_LAYER_ID_COUNT   ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
 
#define SCH_LAYER_INDEX(x)   ( x - SCH_LAYER_ID_START )
 
#define GERBER_DRAWLAYERS_COUNT   static_cast<int>( PCB_LAYER_ID_COUNT )
 
#define GERBER_DRAW_LAYER(x)   ( GERBVIEW_LAYER_ID_START + x )
 
#define GERBER_DCODE_LAYER(x)   ( GERBER_DRAWLAYERS_COUNT + x )
 
#define GERBER_DRAW_LAYER_INDEX(x)   ( x - GERBVIEW_LAYER_ID_START )
 
#define LAYER_ID_COUNT   LAYER_3D_END
 Must update this if you add any enums after GerbView!
 
#define MIN_VISIBILITY_MASK
 

Typedefs

typedef std::bitset< GAL_LAYER_ID_COUNTGAL_BASE_SET
 Wraps a std::bitset.
 

Enumerations

enum  PCB_LAYER_ID : int {
  UNDEFINED_LAYER = -1 , UNSELECTED_LAYER = -2 , F_Cu = 0 , B_Cu = 2 ,
  In1_Cu = 4 , In2_Cu = 6 , In3_Cu = 8 , In4_Cu = 10 ,
  In5_Cu = 12 , In6_Cu = 14 , In7_Cu = 16 , In8_Cu = 18 ,
  In9_Cu = 20 , In10_Cu = 22 , In11_Cu = 24 , In12_Cu = 26 ,
  In13_Cu = 28 , In14_Cu = 30 , In15_Cu = 32 , In16_Cu = 34 ,
  In17_Cu = 36 , In18_Cu = 38 , In19_Cu = 40 , In20_Cu = 42 ,
  In21_Cu = 44 , In22_Cu = 46 , In23_Cu = 48 , In24_Cu = 50 ,
  In25_Cu = 52 , In26_Cu = 54 , In27_Cu = 56 , In28_Cu = 58 ,
  In29_Cu = 60 , In30_Cu = 62 , F_Mask = 1 , B_Mask = 3 ,
  F_SilkS = 5 , B_SilkS = 7 , F_Adhes = 9 , B_Adhes = 11 ,
  F_Paste = 13 , B_Paste = 15 , Dwgs_User = 17 , Cmts_User = 19 ,
  Eco1_User = 21 , Eco2_User = 23 , Edge_Cuts = 25 , Margin = 27 ,
  B_CrtYd = 29 , F_CrtYd = 31 , B_Fab = 33 , F_Fab = 35 ,
  Rescue = 37 , User_1 = 39 , User_2 = 41 , User_3 = 43 ,
  User_4 = 45 , User_5 = 47 , User_6 = 49 , User_7 = 51 ,
  User_8 = 53 , User_9 = 55 , PCB_LAYER_ID_COUNT = 64
}
 A quick note on layer IDs: More...
 
enum class  FLASHING { DEFAULT , ALWAYS_FLASHED , NEVER_FLASHED }
 Enum used during connectivity building to ensure we do not query connectivity while building the database. More...
 
enum  NETNAMES_LAYER_ID : int {
  NETNAMES_LAYER_ID_START = PCB_LAYER_ID_COUNT , NETNAMES_LAYER_ID_RESERVED = NETNAMES_LAYER_ID_START + PCB_LAYER_ID_COUNT , LAYER_PAD_FR_NETNAMES , LAYER_PAD_BK_NETNAMES ,
  LAYER_PAD_NETNAMES , LAYER_VIA_NETNAMES , NETNAMES_LAYER_ID_END
}
 Dedicated layers for net names used in Pcbnew. More...
 
enum  GAL_LAYER_ID : int {
  GAL_LAYER_ID_START = NETNAMES_LAYER_ID_END , LAYER_VIAS = GAL_LAYER_ID_START + 0 , LAYER_VIA_MICROVIA = GAL_LAYER_ID_START + 1 , LAYER_VIA_BBLIND = GAL_LAYER_ID_START + 2 ,
  LAYER_VIA_THROUGH = GAL_LAYER_ID_START + 3 , LAYER_NON_PLATEDHOLES = GAL_LAYER_ID_START + 4 , LAYER_FP_TEXT = GAL_LAYER_ID_START + 5 , LAYER_ANCHOR = GAL_LAYER_ID_START + 8 ,
  LAYER_PADS_SMD_FR = GAL_LAYER_ID_START + 9 , LAYER_PADS_SMD_BK = GAL_LAYER_ID_START + 10 , LAYER_RATSNEST = GAL_LAYER_ID_START + 11 , LAYER_GRID = GAL_LAYER_ID_START + 12 ,
  LAYER_GRID_AXES = GAL_LAYER_ID_START + 13 , LAYER_FOOTPRINTS_FR = GAL_LAYER_ID_START + 15 , LAYER_FOOTPRINTS_BK = GAL_LAYER_ID_START + 16 , LAYER_FP_VALUES = GAL_LAYER_ID_START + 17 ,
  LAYER_FP_REFERENCES = GAL_LAYER_ID_START + 18 , LAYER_TRACKS = GAL_LAYER_ID_START + 19 , LAYER_PADS_TH = GAL_LAYER_ID_START + 20 , LAYER_PAD_PLATEDHOLES = GAL_LAYER_ID_START + 21 ,
  LAYER_VIA_HOLES = GAL_LAYER_ID_START + 22 , LAYER_DRC_ERROR = GAL_LAYER_ID_START + 23 , LAYER_DRAWINGSHEET = GAL_LAYER_ID_START + 24 , LAYER_GP_OVERLAY = GAL_LAYER_ID_START + 25 ,
  LAYER_SELECT_OVERLAY = GAL_LAYER_ID_START + 26 , LAYER_PCB_BACKGROUND = GAL_LAYER_ID_START + 27 , LAYER_CURSOR = GAL_LAYER_ID_START + 28 , LAYER_AUX_ITEMS = GAL_LAYER_ID_START + 29 ,
  LAYER_DRAW_BITMAPS = GAL_LAYER_ID_START + 30 , GAL_LAYER_ID_BITMASK_END = GAL_LAYER_ID_START + 31 , LAYER_PADS = GAL_LAYER_ID_START + 32 , LAYER_ZONES = GAL_LAYER_ID_START + 33 ,
  LAYER_PAD_HOLEWALLS = GAL_LAYER_ID_START + 34 , LAYER_VIA_HOLEWALLS = GAL_LAYER_ID_START + 35 , LAYER_DRC_WARNING = GAL_LAYER_ID_START + 36 , LAYER_DRC_EXCLUSION = GAL_LAYER_ID_START + 37 ,
  LAYER_MARKER_SHADOWS = GAL_LAYER_ID_START + 38 , LAYER_LOCKED_ITEM_SHADOW = GAL_LAYER_ID_START + 39 , LAYER_CONFLICTS_SHADOW = GAL_LAYER_ID_START + 40 , LAYER_SHAPES = GAL_LAYER_ID_START + 41 ,
  LAYER_DRC_SHAPE1 = GAL_LAYER_ID_START + 42 , LAYER_DRC_SHAPE2 = GAL_LAYER_ID_START + 43 , LAYER_DRAWINGSHEET_PAGE1 , LAYER_DRAWINGSHEET_PAGEn ,
  LAYER_PAGE_LIMITS , LAYER_ZONE_START , LAYER_ZONE_END = LAYER_ZONE_START + PCB_LAYER_ID_COUNT , LAYER_BITMAP_START ,
  LAYER_BITMAP_END = LAYER_BITMAP_START + PCB_LAYER_ID_COUNT , LAYER_UI_START , LAYER_UI_END = LAYER_UI_START + GAL_UI_LAYER_COUNT , GAL_LAYER_ID_END
}
 GAL layers are "virtual" layers, i.e. More...
 
enum  SCH_LAYER_ID : int {
  SCH_LAYER_ID_START = GAL_LAYER_ID_END , LAYER_WIRE = SCH_LAYER_ID_START , LAYER_BUS , LAYER_JUNCTION ,
  LAYER_LOCLABEL , LAYER_GLOBLABEL , LAYER_HIERLABEL , LAYER_PINNUM ,
  LAYER_PINNAM , LAYER_REFERENCEPART , LAYER_VALUEPART , LAYER_FIELDS ,
  LAYER_INTERSHEET_REFS , LAYER_NETCLASS_REFS , LAYER_RULE_AREAS , LAYER_DEVICE ,
  LAYER_NOTES , LAYER_PRIVATE_NOTES , LAYER_NOTES_BACKGROUND , LAYER_PIN ,
  LAYER_SHEET , LAYER_SHEETNAME , LAYER_SHEETFILENAME , LAYER_SHEETFIELDS ,
  LAYER_SHEETLABEL , LAYER_NOCONNECT , LAYER_DANGLING , LAYER_DNP_MARKER ,
  LAYER_ERC_WARN , LAYER_ERC_ERR , LAYER_ERC_EXCLUSION , LAYER_EXCLUDED_FROM_SIM ,
  LAYER_DEVICE_BACKGROUND , LAYER_SHEET_BACKGROUND , LAYER_SCHEMATIC_GRID , LAYER_SCHEMATIC_GRID_AXES ,
  LAYER_SCHEMATIC_BACKGROUND , LAYER_SCHEMATIC_CURSOR , LAYER_HOVERED , LAYER_BRIGHTENED ,
  LAYER_HIDDEN , LAYER_NET_COLOR_HIGHLIGHT , LAYER_SELECTION_SHADOWS , LAYER_SCHEMATIC_DRAWINGSHEET ,
  LAYER_SCHEMATIC_PAGE_LIMITS , LAYER_BUS_JUNCTION , LAYER_SCHEMATIC_AUX_ITEMS , LAYER_SCHEMATIC_ANCHOR ,
  LAYER_OP_VOLTAGES , LAYER_OP_CURRENTS , SCH_LAYER_ID_END
}
 Eeschema drawing layers. More...
 
enum  GERBVIEW_LAYER_ID : int {
  GERBVIEW_LAYER_ID_START = SCH_LAYER_ID_END , GERBVIEW_LAYER_ID_RESERVED = GERBVIEW_LAYER_ID_START + ( 2 * GERBER_DRAWLAYERS_COUNT ) , LAYER_DCODES , LAYER_NEGATIVE_OBJECTS ,
  LAYER_GERBVIEW_GRID , LAYER_GERBVIEW_AXES , LAYER_GERBVIEW_BACKGROUND , LAYER_GERBVIEW_DRAWINGSHEET ,
  LAYER_GERBVIEW_PAGE_LIMITS , GERBVIEW_LAYER_ID_END
}
 GerbView draw layers. More...
 
enum  LAYER_3D_ID : int {
  LAYER_3D_START = GERBVIEW_LAYER_ID_END , LAYER_3D_BACKGROUND_BOTTOM , LAYER_3D_BACKGROUND_TOP , LAYER_3D_BOARD ,
  LAYER_3D_COPPER_TOP , LAYER_3D_COPPER_BOTTOM , LAYER_3D_SILKSCREEN_BOTTOM , LAYER_3D_SILKSCREEN_TOP ,
  LAYER_3D_SOLDERMASK_BOTTOM , LAYER_3D_SOLDERMASK_TOP , LAYER_3D_SOLDERPASTE , LAYER_3D_ADHESIVE ,
  LAYER_3D_USER_COMMENTS , LAYER_3D_USER_DRAWINGS , LAYER_3D_USER_ECO1 , LAYER_3D_USER_ECO2 ,
  LAYER_3D_TH_MODELS , LAYER_3D_SMD_MODELS , LAYER_3D_VIRTUAL_MODELS , LAYER_3D_MODELS_NOT_IN_POS ,
  LAYER_3D_MODELS_MARKED_DNP , LAYER_3D_AXES , LAYER_3D_BOUNDING_BOXES , LAYER_3D_OFF_BOARD_SILK ,
  LAYER_3D_END
}
 3D Viewer virtual layers for color settings More...
 

Functions

GAL_LAYER_ID operator++ (GAL_LAYER_ID &a)
 
GAL_LAYER_ID ToGalLayer (int aInteger)
 
GAL_LAYER_ID operator+ (const GAL_LAYER_ID &a, int b)
 Used for via types.
 
SCH_LAYER_ID operator++ (SCH_LAYER_ID &a)
 
KICOMMON_API wxString LayerName (int aLayer)
 Returns the string equivalent of a given layer.
 
bool IsValidLayer (int aLayerId)
 Test whether a given integer is a valid layer index, i.e.
 
bool IsPcbLayer (int aLayer)
 Test whether a layer is a valid layer for Pcbnew.
 
bool IsCopperLayer (int aLayerId)
 Tests whether a layer is a copper layer.
 
bool IsExternalCopperLayer (int aLayerId)
 Tests whether a layer is an external (F_Cu or B_Cu) copper layer.
 
bool IsNonCopperLayer (int aLayerId)
 Test whether a layer is a non copper layer.
 
bool IsCopperLayer (int aLayerId, bool aIncludeSyntheticCopperLayers)
 Tests whether a layer is a copper layer, optionally including synthetic copper layers such as LAYER_VIA_THROUGH, LAYER_PADS_SMD_FR, etc.
 
bool IsViaPadLayer (int aLayer)
 
bool IsHoleLayer (int aLayer)
 
bool IsSolderMaskLayer (int aLayer)
 
bool IsUserLayer (PCB_LAYER_ID aLayerId)
 Test whether a layer is a non copper and a non tech layer.
 
bool IsFrontLayer (PCB_LAYER_ID aLayerId)
 Layer classification: check if it's a front layer.
 
bool IsBackLayer (PCB_LAYER_ID aLayerId)
 Layer classification: check if it's a back layer.
 
bool IsCopperLayerLowerThan (PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB)
 Returns true if copper aLayerA is placed lower than aLayerB, false otherwise.
 
KICOMMON_API PCB_LAYER_ID FlipLayer (PCB_LAYER_ID aLayerId, int aCopperLayersCount=0)
 
int GetNetnameLayer (int aLayer)
 Returns a netname layer corresponding to the given layer.
 
bool IsNetnameLayer (int aLayer)
 Test whether a layer is a netname layer.
 
bool IsZoneFillLayer (int aLayer)
 
bool IsDCodeLayer (int aLayer)
 
size_t CopperLayerToOrdinal (PCB_LAYER_ID aLayer)
 ! Converts KiCad copper layer enum to an ordinal between the front and back layers
 
KICOMMON_API PCB_LAYER_ID ToLAYER_ID (int aLayer)
 

Variables

constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START = F_Cu
 
constexpr int GAL_LAYER_ID_COUNT = GAL_LAYER_ID_END - GAL_LAYER_ID_START
 

Macro Definition Documentation

◆ BITMAP_LAYER_FOR

#define BITMAP_LAYER_FOR (   boardLayer)    ( LAYER_BITMAP_START + boardLayer )

Macros for getting the extra layers for a given board layer.

Definition at line 276 of file layer_ids.h.

◆ GAL_LAYER_INDEX

#define GAL_LAYER_INDEX (   x)    ( x - GAL_LAYER_ID_START )

Use this macro to convert a GAL layer to a 0-indexed offset from LAYER_VIAS.

Definition at line 273 of file layer_ids.h.

◆ GAL_UI_LAYER_COUNT

#define GAL_UI_LAYER_COUNT   10

Definition at line 176 of file layer_ids.h.

◆ GERBER_DCODE_LAYER

#define GERBER_DCODE_LAYER (   x)    ( GERBER_DRAWLAYERS_COUNT + x )

Definition at line 444 of file layer_ids.h.

◆ GERBER_DRAW_LAYER

#define GERBER_DRAW_LAYER (   x)    ( GERBVIEW_LAYER_ID_START + x )

Definition at line 442 of file layer_ids.h.

◆ GERBER_DRAW_LAYER_INDEX

#define GERBER_DRAW_LAYER_INDEX (   x)    ( x - GERBVIEW_LAYER_ID_START )

Definition at line 446 of file layer_ids.h.

◆ GERBER_DRAWLAYERS_COUNT

#define GERBER_DRAWLAYERS_COUNT   static_cast<int>( PCB_LAYER_ID_COUNT )

Definition at line 421 of file layer_ids.h.

◆ LAYER_ID_COUNT

#define LAYER_ID_COUNT   LAYER_3D_END

Must update this if you add any enums after GerbView!

Definition at line 482 of file layer_ids.h.

◆ MAX_CU_LAYERS

#define MAX_CU_LAYERS   32

Definition at line 140 of file layer_ids.h.

◆ MIN_VISIBILITY_MASK

#define MIN_VISIBILITY_MASK
Value:
@ LAYER_PAD_PLATEDHOLES
to draw pad holes (plated)
Definition: layer_ids.h:216
@ LAYER_GP_OVERLAY
general purpose overlay
Definition: layer_ids.h:220
@ LAYER_RATSNEST
Definition: layer_ids.h:206
@ LAYER_VIA_HOLES
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:217
@ LAYER_SELECT_OVERLAY
currently selected items overlay
Definition: layer_ids.h:221
#define GAL_LAYER_INDEX(x)
Use this macro to convert a GAL layer to a 0-indexed offset from LAYER_VIAS.
Definition: layer_ids.h:273

Definition at line 496 of file layer_ids.h.

◆ NETNAMES_LAYER_INDEX

#define NETNAMES_LAYER_INDEX (   layer)    ( static_cast<int>( NETNAMES_LAYER_ID_START ) + layer )

Macro for obtaining netname layer for a given PCB layer.

Definition at line 174 of file layer_ids.h.

◆ SCH_LAYER_ID_COUNT

#define SCH_LAYER_ID_COUNT   ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )

Definition at line 410 of file layer_ids.h.

◆ SCH_LAYER_INDEX

#define SCH_LAYER_INDEX (   x)    ( x - SCH_LAYER_ID_START )

Definition at line 412 of file layer_ids.h.

◆ ZONE_LAYER_FOR

#define ZONE_LAYER_FOR (   boardLayer)    ( LAYER_ZONE_START + boardLayer )

Definition at line 277 of file layer_ids.h.

Typedef Documentation

◆ GAL_BASE_SET

typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET

Wraps a std::bitset.

Definition at line 303 of file layer_ids.h.

Enumeration Type Documentation

◆ FLASHING

enum class FLASHING
strong

Enum used during connectivity building to ensure we do not query connectivity while building the database.

Enumerator
DEFAULT 
ALWAYS_FLASHED 
NEVER_FLASHED 

Definition at line 146 of file layer_ids.h.

◆ GAL_LAYER_ID

enum GAL_LAYER_ID : int

GAL layers are "virtual" layers, i.e.

not tied into design data. Some layers here are shared between applications.

NOTE: Be very careful where you add new layers here. Layers up to GAL_LAYER_ID_BITMASK_END must never be re-ordered and new layers must always be added after this value, because the layers before this value are mapped to bit locations in legacy board files.

The values in this enum that are used to store visibility state are explicitly encoded with an offset from GAL_LAYER_ID_START, which is explicitly encoded itself. The exact value of GAL_LAYER_ID_START is not that sensitive, but the offsets should never be changed or else any existing visibility settings will be disrupted.

Enumerator
GAL_LAYER_ID_START 
LAYER_VIAS 

Meta control for all vias opacity/visibility.

LAYER_VIA_MICROVIA 

to draw micro vias

LAYER_VIA_BBLIND 

to draw blind/buried vias

LAYER_VIA_THROUGH 

to draw usual through hole vias

LAYER_NON_PLATEDHOLES 

handle color for not plated holes (holes, not pads)

LAYER_FP_TEXT 
LAYER_ANCHOR 

anchor of items having an anchor point (texts, footprints)

LAYER_PADS_SMD_FR 

smd pads, front layer

LAYER_PADS_SMD_BK 

smd pads, back layer

LAYER_RATSNEST 
LAYER_GRID 
LAYER_GRID_AXES 
LAYER_FOOTPRINTS_FR 

show footprints on front

LAYER_FOOTPRINTS_BK 

show footprints on back

LAYER_FP_VALUES 

show footprints values (when texts are visible)

LAYER_FP_REFERENCES 

show footprints references (when texts are visible)

LAYER_TRACKS 
LAYER_PADS_TH 

multilayer pads, usually with holes

LAYER_PAD_PLATEDHOLES 

to draw pad holes (plated)

LAYER_VIA_HOLES 

to draw via holes (pad holes do not use this layer)

LAYER_DRC_ERROR 

layer for drc markers with SEVERITY_ERROR

LAYER_DRAWINGSHEET 

drawingsheet frame and titleblock

LAYER_GP_OVERLAY 

general purpose overlay

LAYER_SELECT_OVERLAY 

currently selected items overlay

LAYER_PCB_BACKGROUND 

PCB background color.

LAYER_CURSOR 

PCB cursor.

LAYER_AUX_ITEMS 

Auxiliary items (guides, rule, etc)

LAYER_DRAW_BITMAPS 

to handle and draw images bitmaps

GAL_LAYER_ID_BITMASK_END 

This is the end of the layers used for visibility bit masks in legacy board files.

LAYER_PADS 

Meta control for all pads opacity/visibility (color ignored)

LAYER_ZONES 

Control for copper zone opacity/visibility (color ignored)

LAYER_PAD_HOLEWALLS 
LAYER_VIA_HOLEWALLS 
LAYER_DRC_WARNING 

layer for drc markers with SEVERITY_WARNING

LAYER_DRC_EXCLUSION 

layer for drc markers which have been individually excluded

LAYER_MARKER_SHADOWS 

shadows for drc markers

LAYER_LOCKED_ITEM_SHADOW 

shadow layer for locked items

LAYER_CONFLICTS_SHADOW 

shadow layer for items flagged conficting

LAYER_SHAPES 

Copper graphic shape opacity/visibility (color ignored)

LAYER_DRC_SHAPE1 

Custom shape for DRC marker.

LAYER_DRC_SHAPE2 

Custom shape for DRC marker.

LAYER_DRAWINGSHEET_PAGE1 

for drawingsheetEditor previewing

LAYER_DRAWINGSHEET_PAGEn 

for drawingsheetEditor previewing

LAYER_PAGE_LIMITS 

color for drawing the page extents (visibility stored in PCBNEW_SETTINGS::m_ShowPageLimits)

LAYER_ZONE_START 

Virtual layers for stacking zones and tracks on a given copper layer.

LAYER_ZONE_END 
LAYER_BITMAP_START 

Virtual layers for background images per board layer.

LAYER_BITMAP_END 
LAYER_UI_START 
LAYER_UI_END 
GAL_LAYER_ID_END 

Definition at line 191 of file layer_ids.h.

◆ GERBVIEW_LAYER_ID

enum GERBVIEW_LAYER_ID : int

GerbView draw layers.

Enumerator
GERBVIEW_LAYER_ID_START 
GERBVIEW_LAYER_ID_RESERVED 

GerbView draw layers and d-code layers.

LAYER_DCODES 
LAYER_NEGATIVE_OBJECTS 
LAYER_GERBVIEW_GRID 
LAYER_GERBVIEW_AXES 
LAYER_GERBVIEW_BACKGROUND 
LAYER_GERBVIEW_DRAWINGSHEET 
LAYER_GERBVIEW_PAGE_LIMITS 
GERBVIEW_LAYER_ID_END 

Definition at line 424 of file layer_ids.h.

◆ LAYER_3D_ID

enum LAYER_3D_ID : int

3D Viewer virtual layers for color settings

Enumerator
LAYER_3D_START 
LAYER_3D_BACKGROUND_BOTTOM 
LAYER_3D_BACKGROUND_TOP 
LAYER_3D_BOARD 
LAYER_3D_COPPER_TOP 
LAYER_3D_COPPER_BOTTOM 
LAYER_3D_SILKSCREEN_BOTTOM 
LAYER_3D_SILKSCREEN_TOP 
LAYER_3D_SOLDERMASK_BOTTOM 
LAYER_3D_SOLDERMASK_TOP 
LAYER_3D_SOLDERPASTE 
LAYER_3D_ADHESIVE 
LAYER_3D_USER_COMMENTS 
LAYER_3D_USER_DRAWINGS 
LAYER_3D_USER_ECO1 
LAYER_3D_USER_ECO2 
LAYER_3D_TH_MODELS 
LAYER_3D_SMD_MODELS 
LAYER_3D_VIRTUAL_MODELS 
LAYER_3D_MODELS_NOT_IN_POS 
LAYER_3D_MODELS_MARKED_DNP 
LAYER_3D_AXES 
LAYER_3D_BOUNDING_BOXES 
LAYER_3D_OFF_BOARD_SILK 
LAYER_3D_END 

Definition at line 450 of file layer_ids.h.

◆ NETNAMES_LAYER_ID

enum NETNAMES_LAYER_ID : int

Dedicated layers for net names used in Pcbnew.

Enumerator
NETNAMES_LAYER_ID_START 
NETNAMES_LAYER_ID_RESERVED 

Reserved space for board layer netnames.

LAYER_PAD_FR_NETNAMES 

Additional netnames layers (not associated with a PCB layer)

LAYER_PAD_BK_NETNAMES 
LAYER_PAD_NETNAMES 
LAYER_VIA_NETNAMES 
NETNAMES_LAYER_ID_END 

Definition at line 154 of file layer_ids.h.

◆ PCB_LAYER_ID

enum PCB_LAYER_ID : int

A quick note on layer IDs:

The layers are stored in separate enums so that certain functions can take in the enums as data types and don't have to know about layers from other applications.

Layers that are shared between applications should be in the GAL_LAYER_ID enum.

The PCB_LAYER_ID struct must start at zero for compatibility with legacy board files.

Some functions accept any layer ID, so they start at zero (i.e. F_Cu) and go up to the LAYER_ID_COUNT, which needs to be kept up-to-date if new enums are added. This is the definition of all layers used in Pcbnew.

The PCB layer types are fixed at value 0 through LAYER_ID_COUNT to ensure compatibility with legacy board files.

Enumerator
UNDEFINED_LAYER 
UNSELECTED_LAYER 
F_Cu 
B_Cu 
In1_Cu 
In2_Cu 
In3_Cu 
In4_Cu 
In5_Cu 
In6_Cu 
In7_Cu 
In8_Cu 
In9_Cu 
In10_Cu 
In11_Cu 
In12_Cu 
In13_Cu 
In14_Cu 
In15_Cu 
In16_Cu 
In17_Cu 
In18_Cu 
In19_Cu 
In20_Cu 
In21_Cu 
In22_Cu 
In23_Cu 
In24_Cu 
In25_Cu 
In26_Cu 
In27_Cu 
In28_Cu 
In29_Cu 
In30_Cu 
F_Mask 
B_Mask 
F_SilkS 
B_SilkS 
F_Adhes 
B_Adhes 
F_Paste 
B_Paste 
Dwgs_User 
Cmts_User 
Eco1_User 
Eco2_User 
Edge_Cuts 
Margin 
B_CrtYd 
F_CrtYd 
B_Fab 
F_Fab 
Rescue 
User_1 
User_2 
User_3 
User_4 
User_5 
User_6 
User_7 
User_8 
User_9 
PCB_LAYER_ID_COUNT 

Definition at line 59 of file layer_ids.h.

◆ SCH_LAYER_ID

enum SCH_LAYER_ID : int

Eeschema drawing layers.

Enumerator
SCH_LAYER_ID_START 
LAYER_WIRE 
LAYER_BUS 
LAYER_JUNCTION 
LAYER_LOCLABEL 
LAYER_GLOBLABEL 
LAYER_HIERLABEL 
LAYER_PINNUM 
LAYER_PINNAM 
LAYER_REFERENCEPART 
LAYER_VALUEPART 
LAYER_FIELDS 
LAYER_INTERSHEET_REFS 
LAYER_NETCLASS_REFS 
LAYER_RULE_AREAS 
LAYER_DEVICE 
LAYER_NOTES 
LAYER_PRIVATE_NOTES 
LAYER_NOTES_BACKGROUND 
LAYER_PIN 
LAYER_SHEET 
LAYER_SHEETNAME 
LAYER_SHEETFILENAME 
LAYER_SHEETFIELDS 
LAYER_SHEETLABEL 
LAYER_NOCONNECT 
LAYER_DANGLING 
LAYER_DNP_MARKER 
LAYER_ERC_WARN 
LAYER_ERC_ERR 
LAYER_ERC_EXCLUSION 
LAYER_EXCLUDED_FROM_SIM 
LAYER_DEVICE_BACKGROUND 
LAYER_SHEET_BACKGROUND 
LAYER_SCHEMATIC_GRID 
LAYER_SCHEMATIC_GRID_AXES 
LAYER_SCHEMATIC_BACKGROUND 
LAYER_SCHEMATIC_CURSOR 
LAYER_HOVERED 
LAYER_BRIGHTENED 
LAYER_HIDDEN 
LAYER_NET_COLOR_HIGHLIGHT 
LAYER_SELECTION_SHADOWS 
LAYER_SCHEMATIC_DRAWINGSHEET 
LAYER_SCHEMATIC_PAGE_LIMITS 
LAYER_BUS_JUNCTION 
LAYER_SCHEMATIC_AUX_ITEMS 
LAYER_SCHEMATIC_ANCHOR 
LAYER_OP_VOLTAGES 
LAYER_OP_CURRENTS 
SCH_LAYER_ID_END 

Definition at line 353 of file layer_ids.h.

Function Documentation

◆ CopperLayerToOrdinal()

size_t CopperLayerToOrdinal ( PCB_LAYER_ID  aLayer)
inline

! Converts KiCad copper layer enum to an ordinal between the front and back layers

Definition at line 739 of file layer_ids.h.

References B_Cu, F_Cu, IsCopperLayer(), and MAX_CU_LAYERS.

Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper().

◆ FlipLayer()

KICOMMON_API PCB_LAYER_ID FlipLayer ( PCB_LAYER_ID  aLayerId,
int  aCopperLayersCount = 0 
)
Returns
the layer number after flipping an item some (not all) layers: external copper, and paired layers( Mask, Paste, solder ... ) are swapped between front and back sides internal layers are flipped only if the copper layers count is known
Parameters
aLayerId= the PCB_LAYER_ID to flip
aCopperLayersCount= the number of copper layers. if 0 (in fact if < 4 ) internal layers will be not flipped because the layer count is not known

Definition at line 211 of file layer_id.cpp.

References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In1_Cu, and IsCopperLayer().

Referenced by FOOTPRINT::Flip(), PCB_DIMENSION_BASE::Flip(), PCB_GENERATOR::Flip(), PCB_SHAPE::Flip(), PCB_TABLE::Flip(), PCB_TARGET::Flip(), PCB_TEXT::Flip(), PCB_TRACK::Flip(), PCB_ARC::Flip(), and PCB_IO_IPC2581::generateLayerSetNet().

◆ GetNetnameLayer()

◆ IsBackLayer()

◆ IsCopperLayer() [1/2]

bool IsCopperLayer ( int  aLayerId)
inline

Tests whether a layer is a copper layer.

Parameters
aLayerId= Layer to test
Returns
true if aLayer is a valid copper layer

Definition at line 532 of file layer_ids.h.

References PCB_LAYER_ID_COUNT.

Referenced by CN_CONNECTIVITY_ALGO::Add(), BOARD::Add(), GERBER_JOBFILE_WRITER::addJSONFilesAttributes(), PCB_IO_IPC2581::addLayerAttributes(), ODB_MATRIX_ENTITY::AddMatrixLayerField(), BOARD_ADAPTER::addPads(), STEP_PCB_MODEL::AddPolygonShapes(), PCAD2KICAD::PCAD_LINE::AddToBoard(), PCAD2KICAD::PCAD_PAD::AddToBoard(), BOARD::BOARD(), PCB_NET_INSPECTOR_PANEL::buildColumns(), EXPORTER_STEP::buildFootprint3DShapes(), EXPORTER_STEP::buildGraphic3DShape(), PCB_ONE_LAYER_SELECTOR::buildList(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToFootprintItem(), ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToFootprintItem(), COPPER_LAYERS_PAIR_SELECTION_UI::COPPER_LAYERS_PAIR_SELECTION_UI(), CopperLayerToOrdinal(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawVia(), PCB_EDIT_FRAME::Edit_Zone_Params(), PADSTACK::EffectiveLayerFor(), PCB_VIA::FlashLayer(), PAD::FlashLayer(), FlipLayer(), GenCADLayerName(), PCB_IO_IPC2581::generateLayerSetNet(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), GetGerberFileFunctionAttribute(), GetGerberFilePolarityAttribute(), GetGerberProtelExtension(), BOARD_DESIGN_SETTINGS::GetLayerClass(), BOARD_STACKUP::GetLayerDistance(), BOARD::GetLayerType(), STEP_PCB_MODEL::getLayerZPlacement(), PCB_IO_EAGLE::getMinimumCopperLayerCount(), GetNetnameLayer(), PANEL_SETUP_LAYERS::getNonRemovableLayers(), DIALOG_EXPORT_SVG::initDialog(), BOARD_ADAPTER::InitSettings(), BOARD_INSPECTION_TOOL::InspectClearance(), IsCopperLayer(), BOARD_ITEM::IsOnCopperLayer(), PCB_VIA::IsOnLayer(), PCB_CONTROL::LayerAlphaDec(), PCB_CONTROL::LayerAlphaInc(), LSET::LayerCount(), PCB_CONTROL::LayerNext(), PCB_CONTROL::LayerPrev(), FABMASTER::loadEtch(), PCB_IO_EAGLE::loadSignals(), FABMASTER::loadZones(), APPEARANCE_CONTROLS::OnColorSwatchChanged(), DIALOG_PRINT_PCBNEW::onPopUpLayers(), DIALOG_PLOT::OnRightClickLayers(), PCB_IO_EAGLE::packageSMD(), PCB_IO_KICAD_SEXPR_PARSER::parsePAD(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_VIA(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), ALTIUM_PCB::ParseVias6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseViastack(), PlotBoardLayers(), PlotOneBoardLayer(), BRDITEMS_PLOTTER::PlotText(), ROUTER_TOOL::prepareInteractive(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_BASE::Reload(), DRC_CACHE_GENERATOR::Run(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), RENDER_3D_OPENGL::setLayerMaterial(), PCB_SHAPE::SetLayerSet(), PCB_TRACK::SetLayerSet(), PCB_VIA::SetLayerSet(), PCB_DRAW_PANEL_GAL::SetTopLayer(), DIALOG_SHAPE_PROPERTIES::showHideNetInfo(), PCB_BASE_FRAME::SwitchLayer(), PCB_EDIT_FRAME::SwitchLayer(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), PCB_CONTROL::UpdateMessagePanel(), PCB_VIA::ViewGetLOD(), and ZONE_DESC::ZONE_DESC().

◆ IsCopperLayer() [2/2]

bool IsCopperLayer ( int  aLayerId,
bool  aIncludeSyntheticCopperLayers 
)
inline

Tests whether a layer is a copper layer, optionally including synthetic copper layers such as LAYER_VIA_THROUGH, LAYER_PADS_SMD_FR, etc.

Parameters
aLayerId
aIncludeSyntheticCopperLayers
Returns

Definition at line 567 of file layer_ids.h.

References IsCopperLayer(), and IsNonCopperLayer().

◆ IsCopperLayerLowerThan()

bool IsCopperLayerLowerThan ( PCB_LAYER_ID  aLayerA,
PCB_LAYER_ID  aLayerB 
)
inline

Returns true if copper aLayerA is placed lower than aLayerB, false otherwise.

Definition at line 666 of file layer_ids.h.

References B_Cu.

Referenced by PCB_VIA::LayerPair(), PCB_VIA::SanitizeLayers(), and PCB_VIA::ViewGetLOD().

◆ IsDCodeLayer()

bool IsDCodeLayer ( int  aLayer)
inline

◆ IsExternalCopperLayer()

bool IsExternalCopperLayer ( int  aLayerId)
inline

Tests whether a layer is an external (F_Cu or B_Cu) copper layer.

Parameters
aLayerId= Layer to test
Returns
true if aLayer is a valid external copper layer

Definition at line 543 of file layer_ids.h.

References B_Cu, and F_Cu.

Referenced by BOARD_ADAPTER::addShape(), KIGFX::PCB_PAINTER::draw(), PCB_IO_KICAD_SEXPR::format(), PCB_SHAPE_DESC::PCB_SHAPE_DESC(), BRDITEMS_PLOTTER::PlotShape(), and DIALOG_SHAPE_PROPERTIES::showHideTechLayers().

◆ IsFrontLayer()

◆ IsHoleLayer()

◆ IsNetnameLayer()

bool IsNetnameLayer ( int  aLayer)
inline

Test whether a layer is a netname layer.

Parameters
aLayer= Layer to test
Returns
true if aLayer is a valid netname layer

Definition at line 719 of file layer_ids.h.

References F_Cu, NETNAMES_LAYER_ID_END, and NETNAMES_LAYER_INDEX.

Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), KIGFX::RENDER_SETTINGS::update(), PAD::ViewGetLOD(), PCB_TRACK::ViewGetLOD(), and PCB_VIA::ViewGetLOD().

◆ IsNonCopperLayer()

bool IsNonCopperLayer ( int  aLayerId)
inline

Test whether a layer is a non copper layer.

Parameters
aLayerId= Layer to test
Returns
true if aLayer is a non copper layer

Definition at line 554 of file layer_ids.h.

References PCB_LAYER_ID_COUNT.

Referenced by CONVERT_TOOL::CreatePolys(), IsCopperLayer(), and PCB_DRAW_PANEL_GAL::setDefaultLayerDeps().

◆ IsPcbLayer()

bool IsPcbLayer ( int  aLayer)
inline

Test whether a layer is a valid layer for Pcbnew.

Parameters
aLayer= Layer to test
Returns
true if aLayer is a layer valid in Pcbnew

Definition at line 521 of file layer_ids.h.

References F_Cu, and PCB_LAYER_ID_COUNT.

Referenced by KIGFX::PCB_PAINTER::Draw(), GBR_TO_PCB_EXPORTER::ExportPcb(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadPolygon(), FABMASTER::loadZone(), and PCB_GRID_HELPER::queryVisible().

◆ IsSolderMaskLayer()

◆ IsUserLayer()

bool IsUserLayer ( PCB_LAYER_ID  aLayerId)
inline

Test whether a layer is a non copper and a non tech layer.

Parameters
aLayerId= Layer to test
Returns
true if aLayer is a user layer

Definition at line 602 of file layer_ids.h.

References Dwgs_User, and Eco2_User.

◆ IsValidLayer()

bool IsValidLayer ( int  aLayerId)
inline

Test whether a given integer is a valid layer index, i.e.

can be safely put in a PCB_LAYER_ID

Parameters
aLayerId= Layer index to test. It can be an int, so its useful during I/O
Returns
true if aLayerIndex is a valid layer index

Definition at line 510 of file layer_ids.h.

References PCB_LAYER_ID_COUNT.

Referenced by DRAWING_TOOL::DrawSpecificationStackup(), PCB_IO_IPC2581::generateCadLayers(), ODB_MATRIX_ENTITY::InitMatrixLayerData(), and LAYERS_MAP_DIALOG::OnSelectLayer().

◆ IsViaPadLayer()

bool IsViaPadLayer ( int  aLayer)
inline

Definition at line 575 of file layer_ids.h.

References LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, and LAYER_VIA_THROUGH.

Referenced by GetNetnameLayer().

◆ IsZoneFillLayer()

bool IsZoneFillLayer ( int  aLayer)
inline

◆ LayerName()

KICOMMON_API wxString LayerName ( int  aLayer)

Returns the string equivalent of a given layer.

Parameters
aLayeris a valid layer ID

Returns the string equivalent of a given layer.

These are not the same as the canonical name in LSET::Name(), which is used in board files and cannot be translated or changed. WARNING: do not translate board physical layers names (F.Cu to User.9): because canonical names are used in files (boards and fab files), using translated names in UI create mistakes for users. Board physical layers names must be seen as proper nouns.

Definition at line 30 of file layer_id.cpp.

References _, B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, LAYER_ANCHOR, LAYER_AUX_ITEMS, LAYER_BRIGHTENED, LAYER_BUS, LAYER_BUS_JUNCTION, LAYER_CONFLICTS_SHADOW, LAYER_CURSOR, LAYER_DEVICE, LAYER_DEVICE_BACKGROUND, LAYER_DNP_MARKER, LAYER_DRAWINGSHEET, LAYER_DRC_ERROR, LAYER_DRC_EXCLUSION, LAYER_DRC_SHAPE1, LAYER_DRC_SHAPE2, LAYER_DRC_WARNING, LAYER_ERC_ERR, LAYER_ERC_EXCLUSION, LAYER_ERC_WARN, LAYER_EXCLUDED_FROM_SIM, LAYER_FIELDS, LAYER_FOOTPRINTS_BK, LAYER_FOOTPRINTS_FR, LAYER_FP_REFERENCES, LAYER_FP_TEXT, LAYER_FP_VALUES, LAYER_GLOBLABEL, LAYER_GRID, LAYER_GRID_AXES, LAYER_HIDDEN, LAYER_HIERLABEL, LAYER_HOVERED, LAYER_INTERSHEET_REFS, LAYER_JUNCTION, LAYER_LOCKED_ITEM_SHADOW, LAYER_LOCLABEL, LAYER_MARKER_SHADOWS, LAYER_NET_COLOR_HIGHLIGHT, LAYER_NETCLASS_REFS, LAYER_NOCONNECT, LAYER_NON_PLATEDHOLES, LAYER_NOTES, LAYER_NOTES_BACKGROUND, LAYER_OP_CURRENTS, LAYER_OP_VOLTAGES, LAYER_PAD_HOLEWALLS, LAYER_PAD_NETNAMES, LAYER_PAD_PLATEDHOLES, LAYER_PADS_SMD_BK, LAYER_PADS_SMD_FR, LAYER_PADS_TH, LAYER_PAGE_LIMITS, LAYER_PCB_BACKGROUND, LAYER_PIN, LAYER_PINNAM, LAYER_PINNUM, LAYER_PRIVATE_NOTES, LAYER_RATSNEST, LAYER_REFERENCEPART, LAYER_RULE_AREAS, LAYER_SCHEMATIC_ANCHOR, LAYER_SCHEMATIC_AUX_ITEMS, LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_CURSOR, LAYER_SCHEMATIC_DRAWINGSHEET, LAYER_SCHEMATIC_GRID, LAYER_SCHEMATIC_GRID_AXES, LAYER_SCHEMATIC_PAGE_LIMITS, LAYER_SELECT_OVERLAY, LAYER_SELECTION_SHADOWS, LAYER_SHEET, LAYER_SHEET_BACKGROUND, LAYER_SHEETFIELDS, LAYER_SHEETFILENAME, LAYER_SHEETLABEL, LAYER_SHEETNAME, LAYER_TRACKS, LAYER_VALUEPART, LAYER_VIA_BBLIND, LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS, LAYER_VIA_MICROVIA, LAYER_VIA_NETNAMES, LAYER_VIA_THROUGH, LAYER_WIRE, Margin, NETNAMES_LAYER_ID_START, Rescue, UNDEFINED_LAYER, User_1, User_2, User_3, User_4, User_5, User_6, User_7, User_8, and User_9.

Referenced by DIALOG_MAP_LAYERS::AddMappings(), STEP_PCB_MODEL::AddPolygonShapes(), PANEL_SETUP_LAYERS::addUserDefinedLayer(), AUTOPLACE_TOOL::autoplace(), BOOST_FIXTURE_TEST_CASE(), PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), PCB_MARKER::DeserializeFromString(), DIALOG_MAP_LAYERS::DIALOG_MAP_LAYERS(), PCB_REFERENCE_IMAGE::GetMsgPanelInfo(), DIALOG_MAP_LAYERS::GetSelectedLayerID(), BOARD::GetStandardLayerName(), API_HANDLER_PCB::handleCreateUpdateItemsInternal(), DIALOG_MAP_LAYERS::OnAutoMatchLayersClicked(), CLI::PCB_EXPORT_BASE_COMMAND::PCB_EXPORT_BASE_COMMAND(), SCH_IO_KICAD_SEXPR::saveLine(), PCB_MARKER::SerializeToString(), and DRC_TEST_PROVIDER_MISC::testDisabledLayers().

◆ operator+()

GAL_LAYER_ID operator+ ( const GAL_LAYER_ID a,
int  b 
)
inline

Used for via types.

Definition at line 294 of file layer_ids.h.

References GAL_LAYER_ID_END.

◆ operator++() [1/2]

GAL_LAYER_ID operator++ ( GAL_LAYER_ID a)
inline

Definition at line 281 of file layer_ids.h.

◆ operator++() [2/2]

SCH_LAYER_ID operator++ ( SCH_LAYER_ID a)
inline

Definition at line 414 of file layer_ids.h.

◆ ToGalLayer()

GAL_LAYER_ID ToGalLayer ( int  aInteger)
inline

◆ ToLAYER_ID()

KICOMMON_API PCB_LAYER_ID ToLAYER_ID ( int  aLayer)

Definition at line 810 of file lset.cpp.

References B_Cu, and GAL_LAYER_ID_END.

Referenced by GRID_CELL_LAYER_SELECTOR::BeginEdit(), BOARD::BOARD(), DSN::SPECCTRA_DB::buildLayerMaps(), PCB_PROPERTIES_PANEL::createPGProperty(), PCB_MARKER::DeserializeFromString(), KIGFX::PCB_PAINTER::draw(), GRID_CELL_LAYER_RENDERER::Draw(), PCBEXPR_LAYER_VALUE::EqualTo(), existsOnLayerFunc(), BOARD::FlipLayer(), GENDRILL_WRITER_BASE::GenDrillReportFile(), CN_ITEM::GetBoardLayer(), PNS_VIEWER_IFACE::GetBoardLayerFromPNSLayer(), GetGerberFileFunctionAttribute(), DIALOG_TRACK_VIA_PROPERTIES::getLayerDepth(), BOARD::GetLayerID(), PCB_LAYER_PRESENTATION::getLayerName(), PCB_VIA::GetOutermostConnectedLayers(), DIALOG_MAP_LAYERS::GetSelectedLayerID(), GRID_CELL_LAYER_SELECTOR::GetValue(), CONNECTIVITY_DATA::IsConnectedOnLayer(), BOARD::LayerDepth(), PCAD2KICAD::PCAD_PCB::MapLayer(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddLayer(), DIALOG_OUTSET_ITEMS::OnLayerDefaultClick(), APPEARANCE_CONTROLS::onLayerLeftClick(), DIALOG_COPPER_ZONE::OnLayerSelection(), DIALOG_NON_COPPER_ZONES_EDITOR::OnLayerSelection(), DIALOG_RULE_AREA_PROPERTIES::OnLayerSelection(), PLOT_CONTROLLER::OpenPlotfile(), DRC_RULES_PARSER::parseLayer(), PCB_MARKER::PCB_MARKER(), PLOT_CONTROLLER::PlotLayer(), PCB_EDIT_FRAME::Process_Special_Functions(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), BOARD::recalcOpposites(), PCB_SELECTION_TOOL::Selectable(), FOOTPRINT_EDIT_FRAME::SelectLayer(), PCB_BASE_FRAME::SelectOneLayer(), DIALOG_GLOBAL_DELETION::SetCurrentLayer(), APPEARANCE_CONTROLS::SetLayerVisible(), PRIVATE_LAYERS_GRID_TABLE::SetValueAsLong(), PCB_FIELDS_GRID_TABLE::SetValueAsLong(), LAYER_GRID_TABLE::SetValueAsLong(), PANEL_SETUP_LAYERS::showLayerTypes(), DIALOG_OUTSET_ITEMS::TransferDataFromWindow(), DIALOG_REFERENCE_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_SWAP_LAYERS::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), and PCB_VIA::ViewGetLOD().

Variable Documentation

◆ GAL_LAYER_ID_COUNT

constexpr int GAL_LAYER_ID_COUNT = GAL_LAYER_ID_END - GAL_LAYER_ID_START
constexpr

Definition at line 279 of file layer_ids.h.

◆ PCBNEW_LAYER_ID_START