176#define MAX_CU_LAYERS           32 
  177#define MAX_USER_DEFINED_LAYERS 45 
  209#define NETNAMES_LAYER_INDEX( layer )   ( static_cast<int>( NETNAMES_LAYER_ID_START ) + layer ) 
  211#define GAL_UI_LAYER_COUNT 10 
  364#define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START ) 
  367#define BITMAP_LAYER_FOR( boardLayer ) ( LAYER_BITMAP_START + boardLayer ) 
  368#define ZONE_LAYER_FOR( boardLayer ) ( LAYER_ZONE_START + boardLayer ) 
  369#define PAD_COPPER_LAYER_FOR( boardLayer ) ( LAYER_PAD_COPPER_START + boardLayer ) 
  370#define VIA_COPPER_LAYER_FOR( boardLayer ) ( LAYER_VIA_COPPER_START + boardLayer ) 
  371#define CLEARANCE_LAYER_FOR( boardLayer ) ( LAYER_CLEARANCE_START + boardLayer ) 
  372#define POINT_LAYER_FOR( boardLayer ) ( LAYER_POINT_START + boardLayer ) 
  427        GAL_BASE_SET::set( aPos, aVal );
 
 
  433        GAL_BASE_SET::set( 
static_cast<std::size_t
>( aPos ) - 
start, aVal );
 
 
  439        return test( 
static_cast<std::size_t
>( aPos ) - 
start );
 
 
  442    std::vector<GAL_LAYER_ID> Seq() 
const;
 
  444    static GAL_SET DefaultVisible();
 
 
  508#define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START ) 
  510#define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START ) 
  519#define GERBER_DRAWLAYERS_COUNT static_cast<int>( PCB_LAYER_ID_COUNT ) 
  540#define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x ) 
  542#define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x ) 
  544#define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START ) 
  626#define LAYER_ID_COUNT LAYER_3D_END 
  641#define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\ 
  642                                 ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\ 
  643                                 ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\ 
  644                                 ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\ 
  645                                 ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) ) 
 
  679    return !( aLayerId & 1 ) && aLayerId < PCB_LAYER_ID_COUNT && aLayerId >= 0;
 
 
  690    return aLayerId == 
F_Cu || aLayerId == 
B_Cu;
 
 
  723inline bool IsCopperLayer( 
int aLayerId, 
bool aIncludeSyntheticCopperLayers )
 
  725    if( aIncludeSyntheticCopperLayers )
 
 
  826    if( aLayerA == aLayerB )
 
  829    if( aLayerA == 
B_Cu )
 
  832    if( aLayerB == 
B_Cu )
 
  835    return aLayerA > aLayerB;
 
 
  921    default:    
return ( aLayer - 
B_Cu ) / 2;
 
 
Helper for storing and iterating over GAL_LAYER_IDs.
 
bool Contains(GAL_LAYER_ID aPos)
 
static constexpr int start
 
GAL_SET(const GAL_SET &aOther)
 
GAL_SET & set(int aPos, bool aVal=true)
 
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
 
bool IsSolderMaskLayer(int aLayer)
 
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
 
@ LAYER_PAD_FR_NETNAMES
Additional netnames layers (not associated with a PCB layer).
 
@ NETNAMES_LAYER_ID_START
 
@ NETNAMES_LAYER_ID_RESERVED
Reserved space for board layer netnames.
 
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Wraps a std::bitset.
 
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
 
GERBVIEW_LAYER_ID
Gerbview draw layers.
 
@ GERBVIEW_LAYER_ID_RESERVED
Gerbview draw layers and d-code layers.
 
@ LAYER_GERBVIEW_DRAWINGSHEET
 
@ GERBVIEW_LAYER_ID_START
 
@ LAYER_GERBVIEW_BACKGROUND
 
@ LAYER_GERBVIEW_PAGE_LIMITS
 
KICOMMON_API PCB_LAYER_ID Map3DLayerToPCBLayer(int aLayer)
 
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
 
bool IsPcbLayer(int aLayer)
Test whether a layer is a valid layer for Pcbnew.
 
bool IsPadCopperLayer(int aLayer)
 
LAYER_3D_ID
3D Viewer virtual layers for color settings
 
@ LAYER_3D_SOLDERMASK_TOP
 
@ LAYER_3D_BOUNDING_BOXES
 
@ LAYER_3D_BACKGROUND_TOP
 
@ LAYER_3D_SOLDERMASK_BOTTOM
 
@ LAYER_3D_PLATED_BARRELS
 
@ LAYER_3D_SILKSCREEN_TOP
 
@ LAYER_3D_VIRTUAL_MODELS
 
@ LAYER_3D_MODELS_MARKED_DNP
 
@ LAYER_3D_OFF_BOARD_SILK
 
@ LAYER_3D_MODELS_NOT_IN_POS
 
@ LAYER_3D_BACKGROUND_BOTTOM
 
@ LAYER_3D_SILKSCREEN_BOTTOM
 
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
 
bool IsCopperLayerLowerThan(PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB)
Return true if copper aLayerA is placed lower than aLayerB, false otherwise.
 
constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START
 
KICOMMON_API PCB_LAYER_ID BoardLayerFromLegacyId(int aLegacyId)
Retrieve a layer ID from an integer converted from a legacy (pre-V9) enum value.
 
#define NETNAMES_LAYER_INDEX(layer)
Macro for obtaining netname layer for a given PCB layer.
 
GAL_LAYER_ID ToGalLayer(int aInteger)
 
constexpr int GAL_LAYER_ID_COUNT
 
bool IsPointsLayer(int aLayer)
 
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
 
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
 
@ NEVER_FLASHED
Never flashed for connectivity.
 
@ ALWAYS_FLASHED
Always flashed for connectivity.
 
bool IsDCodeLayer(int aLayer)
 
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
 
KICOMMON_API PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount=0)
 
bool IsNonCopperLayer(int aLayerId)
Test whether a layer is a non copper layer.
 
int GetNetnameLayer(int aLayer)
Return a netname layer corresponding to the given layer.
 
KICOMMON_API wxString LayerName(int aLayer)
Return the string equivalent of a given layer.
 
bool IsClearanceLayer(int aLayer)
 
#define GAL_UI_LAYER_COUNT
 
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
 
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
 
@ LAYER_POINTS
PCB reference/manual snap points visibility.
 
@ LAYER_PAGE_LIMITS
Color for drawing the page extents (visibility stored in PCBNEW_SETTINGS::m_ShowPageLimits)
 
@ LAYER_LOCKED_ITEM_SHADOW
Shadow layer for locked items.
 
@ LAYER_PAD_COPPER_START
Virtual layers for pad copper on a given copper layer.
 
@ LAYER_DRAWINGSHEET_PAGEn
Sheet Editor previewing pages after first page.
 
@ LAYER_FILLED_SHAPES
Copper graphic shape opacity/visibility (color ignored).
 
@ LAYER_CONFLICTS_SHADOW
Shadow layer for items flagged conflicting.
 
@ LAYER_FOOTPRINTS_FR
Show footprints on front.
 
@ LAYER_NON_PLATEDHOLES
Draw usual through hole vias.
 
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
 
@ LAYER_DRAW_BITMAPS
Draw images.
 
@ LAYER_FP_REFERENCES
Show footprints references (when texts are visible).
 
@ LAYER_BOARD_OUTLINE_AREA
PCB board outline.
 
@ LAYER_DRC_EXCLUSION
Layer for DRC markers which have been individually excluded.
 
@ LAYER_PCB_BACKGROUND
PCB background color.
 
@ LAYER_ZONES
Control for copper zone opacity/visibility (color ignored).
 
@ LAYER_DRC_SHAPES
Custom shapes for DRC markers.
 
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored).
 
@ LAYER_DRC_WARNING
Layer for DRC markers with #SEVERITY_WARNING.
 
@ LAYER_PAD_PLATEDHOLES
to draw pad holes (plated)
 
@ LAYER_GP_OVERLAY
General purpose overlay.
 
@ GAL_LAYER_ID_BITMASK_END
This is the end of the layers used for visibility bit masks in legacy board files.
 
@ LAYER_VIA_COPPER_START
Virtual layers for via copper on a given copper layer.
 
@ LAYER_CURSOR
PCB cursor.
 
@ LAYER_AUX_ITEMS
Auxiliary items (guides, rule, etc).
 
@ LAYER_CLEARANCE_START
Virtual layers for pad/via/track clearance outlines for a given copper layer.
 
@ LAYER_ZONE_START
Virtual layers for stacking zones and tracks on a given copper layer.
 
@ LAYER_FOOTPRINTS_BK
Show footprints on back.
 
@ LAYER_ANCHOR
Anchor of items having an anchor point (texts, footprints).
 
@ LAYER_DRAWINGSHEET_PAGE1
Sheet Editor previewing first page.
 
@ LAYER_VIA_BURIED
Draw blind vias.
 
@ LAYER_MARKER_SHADOWS
Shadows for DRC markers.
 
@ LAYER_VIA_HOLES
Draw via holes (pad holes do not use this layer).
 
@ LAYER_VIA_BLIND
Draw micro vias.
 
@ LAYER_FP_VALUES
Show footprints values (when texts are visible).
 
@ LAYER_POINT_START
Virtual layers for points per board layer.
 
@ LAYER_SELECT_OVERLAY
Selected items overlay.
 
@ LAYER_VIA_THROUGH
Draw buried vias.
 
@ LAYER_BITMAP_START
Virtual layers for background images per board layer.
 
@ LAYER_DRC_ERROR
Layer for DRC markers with #SEVERITY_ERROR.
 
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
 
SCH_LAYER_ID
Eeschema drawing layers.
 
@ LAYER_SHAPES_BACKGROUND
 
@ LAYER_EXCLUDED_FROM_SIM
 
@ LAYER_NET_COLOR_HIGHLIGHT
 
@ LAYER_DEVICE_BACKGROUND
 
@ LAYER_SCHEMATIC_DRAWINGSHEET
 
@ LAYER_SCHEMATIC_GRID_AXES
 
@ LAYER_SCHEMATIC_PAGE_LIMITS
 
@ LAYER_DRAG_NET_COLLISION
 
@ LAYER_SELECTION_SHADOWS
 
@ LAYER_SCHEMATIC_BACKGROUND
 
@ LAYER_SCHEMATIC_AUX_ITEMS
 
size_t CopperLayerToOrdinal(PCB_LAYER_ID aLayer)
Converts KiCad copper layer enum to an ordinal between the front and back layers.
 
bool IsViaCopperLayer(int aLayer)
 
bool IsNetnameLayer(int aLayer)
Test whether a layer is a netname layer.
 
KICOMMON_API PCB_LAYER_ID ToLAYER_ID(int aLayer)
 
bool IsHoleLayer(int aLayer)
 
bool IsViaPadLayer(int aLayer)
 
bool IsInnerCopperLayer(int aLayerId)
Test whether a layer is an inner (In1_Cu to In30_Cu) copper layer.
 
bool IsExternalCopperLayer(int aLayerId)
Test whether a layer is an external (F_Cu or B_Cu) copper layer.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
bool IsValidLayer(int aLayerId)
Test whether a given integer is a valid layer index, i.e.
 
KICOMMON_API int MapPCBLayerTo3DLayer(PCB_LAYER_ID aLayer)
 
#define GERBER_DRAWLAYERS_COUNT
Number of draw layers in Gerbview.
 
bool IsZoneFillLayer(int aLayer)