![]() |
KiCad PCB EDA Suite
|
Board layer functions and definitions. More...
#include <set>
#include <vector>
#include <bitset>
#include <wx/string.h>
Go to the source code of this file.
Classes | |
class | GAL_SET |
Helper for storing and iterating over GAL_LAYER_IDs. More... | |
class | LSEQ |
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs. More... | |
class | LSET |
LSET is a set of PCB_LAYER_IDs. More... | |
Macros | |
#define | MAX_CU_LAYERS (B_Cu - F_Cu + 1) |
#define | NETNAMES_LAYER_INDEX(layer) ( NETNAMES_LAYER_ID_START + layer ) |
Macro for obtaining netname layer for a given PCB layer. More... | |
#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. More... | |
#define | ZONE_LAYER_FOR(copperLayer) ( LAYER_ZONE_START + copperLayer ) |
Macro for getting the zone layer for a given copper layer. More... | |
#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 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! More... | |
#define | MIN_VISIBILITY_MASK |
Typedefs | |
typedef int | LAYER_NUM |
This can be replaced with int and removed. More... | |
typedef std::bitset< GAL_LAYER_ID_COUNT > | GAL_BASE_SET |
typedef std::vector< PCB_LAYER_ID > | BASE_SEQ |
A sequence of layers, a sequence provides a certain order. More... | |
typedef std::bitset< PCB_LAYER_ID_COUNT > | BASE_SET |
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. More... | |
SCH_LAYER_ID | operator++ (SCH_LAYER_ID &a) |
wxString | LayerName (int aLayer) |
Returns the string equivalent of a given layer. More... | |
bool | IsValidLayer (LAYER_NUM aLayerId) |
Test whether a given integer is a valid layer index, i.e. More... | |
bool | IsPcbLayer (LAYER_NUM aLayer) |
Test whether a layer is a valid layer for Pcbnew. More... | |
bool | IsCopperLayer (LAYER_NUM aLayerId) |
Tests whether a layer is a copper layer. More... | |
bool | IsNonCopperLayer (LAYER_NUM aLayerId) |
Test whether a layer is a non copper layer. More... | |
bool | IsCopperLayer (LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers) |
Tests whether a layer is a copper layer, optionally including synthetic copper layers such as LAYER_VIA_THROUGH, LAYER_PAD_FR, etc. More... | |
bool | IsViaPadLayer (LAYER_NUM aLayer) |
bool | IsHoleLayer (LAYER_NUM aLayer) |
bool | IsUserLayer (PCB_LAYER_ID aLayerId) |
Test whether a layer is a non copper and a non tech layer. More... | |
bool | IsFrontLayer (PCB_LAYER_ID aLayerId) |
Layer classification: check if it's a front layer. More... | |
bool | IsBackLayer (PCB_LAYER_ID aLayerId) |
Layer classification: check if it's a back layer. More... | |
PCB_LAYER_ID | FlipLayer (PCB_LAYER_ID aLayerId, int aCopperLayersCount=0) |
LSET | FlipLayerMask (LSET aMask, int aCopperLayersCount=0) |
Calculate the mask layer when flipping a footprint. More... | |
int | GetNetnameLayer (int aLayer) |
Returns a netname layer corresponding to the given layer. More... | |
bool | IsNetnameLayer (LAYER_NUM aLayer) |
Test whether a layer is a netname layer. More... | |
bool | IsZoneLayer (LAYER_NUM aLayer) |
bool | IsDCodeLayer (int aLayer) |
bool | IsNetCopperLayer (LAYER_NUM aLayer) |
Checks if the given layer is "net copper", meaning it is eligible for net coloring. More... | |
PCB_LAYER_ID | ToLAYER_ID (int aLayer) |
Variables | |
constexpr int | GAL_LAYER_ID_COUNT = GAL_LAYER_ID_END - GAL_LAYER_ID_START |
Board layer functions and definitions.
Definition in file layers_id_colors_and_visibility.h.
#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 253 of file layers_id_colors_and_visibility.h.
#define GERBER_DCODE_LAYER | ( | x | ) | ( GERBER_DRAWLAYERS_COUNT + x ) |
Definition at line 403 of file layers_id_colors_and_visibility.h.
#define GERBER_DRAW_LAYER | ( | x | ) | ( GERBVIEW_LAYER_ID_START + x ) |
Definition at line 401 of file layers_id_colors_and_visibility.h.
#define GERBER_DRAW_LAYER_INDEX | ( | x | ) | ( x - GERBVIEW_LAYER_ID_START ) |
Definition at line 405 of file layers_id_colors_and_visibility.h.
#define GERBER_DRAWLAYERS_COUNT PCB_LAYER_ID_COUNT |
Definition at line 381 of file layers_id_colors_and_visibility.h.
#define LAYER_ID_COUNT LAYER_3D_END |
Must update this if you add any enums after GerbView!
Definition at line 426 of file layers_id_colors_and_visibility.h.
Definition at line 151 of file layers_id_colors_and_visibility.h.
#define MIN_VISIBILITY_MASK |
Definition at line 440 of file layers_id_colors_and_visibility.h.
#define NETNAMES_LAYER_INDEX | ( | layer | ) | ( NETNAMES_LAYER_ID_START + layer ) |
Macro for obtaining netname layer for a given PCB layer.
Definition at line 174 of file layers_id_colors_and_visibility.h.
#define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START ) |
Definition at line 370 of file layers_id_colors_and_visibility.h.
#define SCH_LAYER_INDEX | ( | x | ) | ( x - SCH_LAYER_ID_START ) |
Definition at line 372 of file layers_id_colors_and_visibility.h.
#define ZONE_LAYER_FOR | ( | copperLayer | ) | ( LAYER_ZONE_START + copperLayer ) |
Macro for getting the zone layer for a given copper layer.
Definition at line 256 of file layers_id_colors_and_visibility.h.
typedef std::vector<PCB_LAYER_ID> BASE_SEQ |
A sequence of layers, a sequence provides a certain order.
Definition at line 448 of file layers_id_colors_and_visibility.h.
typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET |
Definition at line 497 of file layers_id_colors_and_visibility.h.
typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET |
Definition at line 280 of file layers_id_colors_and_visibility.h.
typedef int LAYER_NUM |
This can be replaced with int and removed.
Until then, it is something you can increment, and its meaning is only advisory but can extend beyond PCB layers into view layers and gerber layers.
Definition at line 45 of file layers_id_colors_and_visibility.h.
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 below 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_MOD_TEXT_FR | |
LAYER_MOD_TEXT_BK | |
LAYER_MOD_TEXT_INVISIBLE | text marked as invisible |
LAYER_ANCHOR | anchor of items having an anchor point (texts, footprints) |
LAYER_PAD_FR | smd pads, front layer |
LAYER_PAD_BK | smd pads, back layer |
LAYER_RATSNEST | |
LAYER_GRID | |
LAYER_GRID_AXES | |
LAYER_NO_CONNECTS | show a marker on pads with no nets |
LAYER_MOD_FR | show footprints on front |
LAYER_MOD_BK | show footprints on back |
LAYER_MOD_VALUES | show footprints values (when texts are visibles) |
LAYER_MOD_REFERENCES | show footprints references (when texts are visibles) |
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 Pcbnew. |
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_DRAWINGSHEET_PAGE1 | for drawingsheetEditor previewing |
LAYER_DRAWINGSHEET_PAGEn | for drawingsheetEditor previewing |
LAYER_ZONE_START | Virtual layers for stacking zones and tracks on a given copper layer. |
LAYER_ZONE_END | |
GAL_LAYER_ID_END |
Definition at line 189 of file layers_id_colors_and_visibility.h.
enum GERBVIEW_LAYER_ID : int |
GerbView draw layers.
Definition at line 384 of file layers_id_colors_and_visibility.h.
enum LAYER_3D_ID : int |
3D Viewer virtual layers for color settings
Definition at line 409 of file layers_id_colors_and_visibility.h.
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 layers_id_colors_and_visibility.h.
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.
Definition at line 69 of file layers_id_colors_and_visibility.h.
enum SCH_LAYER_ID : int |
Eeschema drawing layers.
Definition at line 328 of file layers_id_colors_and_visibility.h.
PCB_LAYER_ID FlipLayer | ( | PCB_LAYER_ID | aLayerId, |
int | aCopperLayersCount = 0 |
||
) |
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 521 of file lset.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 PCAD2KICAD::PCB_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCB_PAD::Flip(), PCAD2KICAD::PCB_LINE::Flip(), PCAD2KICAD::PCB_ARC::Flip(), PCAD2KICAD::PCB_POLYGON::Flip(), PCB_TARGET::Flip(), PCB_TEXT::Flip(), TRACK::Flip(), FP_SHAPE::Flip(), FP_TEXT::Flip(), DIMENSION_BASE::Flip(), FOOTPRINT::Flip(), ARC::Flip(), PCB_SHAPE::Flip(), VIA::Flip(), ZONE::Flip(), and FABMASTER::loadFootprints().
Calculate the mask layer when flipping a footprint.
BACK and FRONT copper layers, mask, paste, solder layers are swapped internal layers are flipped only if the copper layers count is known
aMask | = the LSET 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 567 of file lset.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 LSET::InternalCuMask().
Referenced by PAD::Flip(), ZONE::Flip(), FABMASTER::loadFootprints(), and ALTIUM_PCB::ParsePads6Data().
|
inline |
Returns a netname layer corresponding to the given layer.
Definition at line 936 of file layers_id_colors_and_visibility.h.
References Cmts_User, IsCopperLayer(), IsViaPadLayer(), LAYER_PAD_BK, LAYER_PAD_BK_NETNAMES, LAYER_PAD_FR, LAYER_PAD_FR_NETNAMES, LAYER_PAD_NETNAMES, LAYER_PADS_TH, LAYER_VIA_NETNAMES, and NETNAMES_LAYER_INDEX.
Referenced by PCB_CONTROL::LayerAlphaDec(), PCB_CONTROL::LayerAlphaInc(), KIGFX::PCB_RENDER_SETTINGS::LoadColors(), APPEARANCE_CONTROLS::OnColorSwatchChanged(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), and TRACK::ViewGetLayers().
|
inline |
Layer classification: check if it's a back layer.
Definition at line 890 of file layers_id_colors_and_visibility.h.
References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, and B_SilkS.
Referenced by FP_TEXT::Flip(), FP_TEXT::FP_TEXT(), BOARD::GetFootprint(), GENERAL_COLLECTOR::Inspect(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), DRAWING_TOOL::PlaceText(), PCB_DRAW_PANEL_GAL::SetTopLayer(), FP_TEXT_GRID_TABLE::SetValueAsLong(), FP_TEXT::ViewGetLOD(), and PAD::ViewGetLOD().
|
inline |
Tests whether a layer is a copper layer.
aLayerId | = Layer to test |
Definition at line 791 of file layers_id_colors_and_visibility.h.
Referenced by BOARD::Add(), BOARD_ADAPTER::addPadsWithClearance(), PCAD2KICAD::PCB_LINE::AddToBoard(), PCAD2KICAD::PCB_PAD::AddToBoard(), BOARD::BOARD(), PCB_ONE_LAYER_SELECTOR::buildList(), SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList(), BOARD_ADAPTER::createLayers(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawVia(), PCB_EDIT_FRAME::Edit_Zone_Params(), FlipLayer(), DSN::SPECCTRA_DB::FromBOARD(), GenCADLayerName(), GetGerberFileFunctionAttribute(), GetGerberFilePolarityAttribute(), GetGerberProtelExtension(), BOARD_DESIGN_SETTINGS::GetLayerClass(), BOARD_STACKUP::GetLayerDistance(), BOARD::GetLayerType(), GetNetnameLayer(), PANEL_SETUP_LAYERS::getNonRemovableLayers(), DIALOG_EXPORT_SVG::initDialog(), IsCopperLayer(), IsNetCopperLayer(), BOARD_ITEM::IsOnCopperLayer(), PCB_CONTROL::LayerAlphaDec(), PCB_CONTROL::LayerAlphaInc(), PCB_CONTROL::LayerNext(), PCB_CONTROL::LayerPrev(), FABMASTER::loadEtch(), EAGLE_PLUGIN::loadPlain(), EAGLE_PLUGIN::loadPolygon(), EAGLE_PLUGIN::loadSignals(), FABMASTER::loadZones(), APPEARANCE_CONTROLS::OnColorSwatchChanged(), DIALOG_PLOT::OnPopUpLayers(), EAGLE_PLUGIN::packageSMD(), ALTIUM_PCB::ParseVias6Data(), PNS::TOOL_BASE::pickSingleItem(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), PlotOneBoardLayer(), BRDITEMS_PLOTTER::PlotPcbShape(), BRDITEMS_PLOTTER::PlotPcbText(), CONVERT_TOOL::PolyToLines(), ROUTER_TOOL::prepareInteractive(), RENDER_3D_RAYTRACE::Reload(), DRC_ENGINE::RunTests(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), BOARD::SetLayerType(), PCB_DRAW_PANEL_GAL::SetTopLayer(), PCBNEW_PRINTOUT::setupViewLayers(), PCB_BASE_FRAME::SwitchLayer(), PCB_EDIT_FRAME::SwitchLayer(), PNS_KICAD_IFACE_BASE::syncGraphicalItem(), PNS_KICAD_IFACE_BASE::syncTextItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), DIALOG_PRINT_PCBNEW::TransferDataToWindow(), and FOOTPRINT::TransformPadsWithClearanceToPolygon().
|
inline |
Tests whether a layer is a copper layer, optionally including synthetic copper layers such as LAYER_VIA_THROUGH, LAYER_PAD_FR, etc.
aLayerId | |
aIncludeSyntheticCopperLayers |
Definition at line 815 of file layers_id_colors_and_visibility.h.
References IsCopperLayer(), and IsNonCopperLayer().
|
inline |
Definition at line 972 of file layers_id_colors_and_visibility.h.
References GERBER_DRAWLAYERS_COUNT, and GERBVIEW_LAYER_ID_START.
Referenced by KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), and GERBER_DRAW_ITEM::ViewGetLOD().
|
inline |
Layer classification: check if it's a front layer.
Definition at line 867 of file layers_id_colors_and_visibility.h.
References F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, and F_SilkS.
Referenced by GENERAL_COLLECTOR::Inspect(), PCB_DRAW_PANEL_GAL::SetTopLayer(), FP_TEXT::ViewGetLOD(), and PAD::ViewGetLOD().
|
inline |
Definition at line 830 of file layers_id_colors_and_visibility.h.
References LAYER_NON_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_VIA_HOLES, and LAYER_VIA_HOLEWALLS.
Referenced by KIGFX::PCB_RENDER_SETTINGS::GetColor(), VIA::ViewGetLOD(), and PAD::ViewGetLOD().
|
inline |
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
aLayer | is the layer to test |
Definition at line 985 of file layers_id_colors_and_visibility.h.
References IsCopperLayer(), LAYER_PAD_BK, LAYER_PAD_FR, LAYER_PAD_HOLEWALLS, LAYER_PADS_TH, LAYER_VIA_BBLIND, LAYER_VIA_HOLEWALLS, LAYER_VIA_MICROVIA, and LAYER_VIA_THROUGH.
Referenced by KIGFX::PCB_RENDER_SETTINGS::GetColor().
|
inline |
Test whether a layer is a netname layer.
aLayer | = Layer to test |
Definition at line 959 of file layers_id_colors_and_visibility.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(), TRACK::ViewGetLOD(), VIA::ViewGetLOD(), and PAD::ViewGetLOD().
|
inline |
Test whether a layer is a non copper layer.
aLayerId | = Layer to test |
Definition at line 802 of file layers_id_colors_and_visibility.h.
References B_Cu, and PCB_LAYER_ID_COUNT.
Referenced by PCAD2KICAD::PCB_ARC::AddToFootprint(), PCAD2KICAD::PCB_LINE::AddToFootprint(), PCAD2KICAD::PCB_POLYGON::AddToFootprint(), IsCopperLayer(), and PCB_DRAW_PANEL_GAL::setDefaultLayerDeps().
|
inline |
Test whether a layer is a valid layer for Pcbnew.
aLayer | = Layer to test |
Definition at line 780 of file layers_id_colors_and_visibility.h.
References F_Cu, and PCB_LAYER_ID_COUNT.
Referenced by GBR_TO_PCB_EXPORTER::ExportPcb(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), FABMASTER::loadPolygon(), and FABMASTER::loadZone().
|
inline |
Test whether a layer is a non copper and a non tech layer.
aLayerId | = Layer to test |
Definition at line 845 of file layers_id_colors_and_visibility.h.
|
inline |
Test whether a given integer is a valid layer index, i.e.
can be safely put in a PCB_LAYER_ID
aLayerId | = Layer index to test. It can be an int, so its useful during I/O |
Definition at line 769 of file layers_id_colors_and_visibility.h.
References PCB_LAYER_ID_COUNT.
Referenced by LAYERS_MAP_DIALOG::OnSelectLayer().
|
inline |
Definition at line 823 of file layers_id_colors_and_visibility.h.
References LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, and LAYER_VIA_THROUGH.
Referenced by GetNetnameLayer(), and VIA::ViewGetLOD().
|
inline |
Definition at line 966 of file layers_id_colors_and_visibility.h.
References LAYER_ZONE_END, and LAYER_ZONE_START.
Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_RENDER_SETTINGS::GetColor().
wxString LayerName | ( | int | aLayer | ) |
Returns the string equivalent of a given layer.
aLayer | is 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.
Definition at line 27 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, Format(), 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_CURSOR, LAYER_DEVICE, LAYER_DEVICE_BACKGROUND, LAYER_DRAWINGSHEET, LAYER_DRC_ERROR, LAYER_DRC_EXCLUSION, LAYER_DRC_WARNING, LAYER_ERC_ERR, LAYER_ERC_WARN, LAYER_FIELDS, LAYER_GLOBLABEL, LAYER_GRID, LAYER_GRID_AXES, LAYER_HIDDEN, LAYER_HIERLABEL, LAYER_JUNCTION, LAYER_LOCLABEL, LAYER_MARKER_SHADOWS, LAYER_MOD_BK, LAYER_MOD_FR, LAYER_MOD_REFERENCES, LAYER_MOD_TEXT_BK, LAYER_MOD_TEXT_FR, LAYER_MOD_TEXT_INVISIBLE, LAYER_MOD_VALUES, LAYER_NO_CONNECTS, LAYER_NOCONNECT, LAYER_NON_PLATEDHOLES, LAYER_NOTES, LAYER_PAD_BK, LAYER_PAD_FR, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_PADS_TH, LAYER_PCB_BACKGROUND, LAYER_PIN, LAYER_PINNAM, LAYER_PINNUM, LAYER_RATSNEST, LAYER_REFERENCEPART, LAYER_SCHEMATIC_AUX_ITEMS, LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_CURSOR, LAYER_SCHEMATIC_DRAWINGSHEET, LAYER_SCHEMATIC_GRID, LAYER_SCHEMATIC_GRID_AXES, 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_THROUGH, LAYER_WIRE, Margin, Rescue, User_1, User_2, User_3, User_4, User_5, User_6, User_7, User_8, and User_9.
Referenced by DIALOG_IMPORTED_LAYERS::AddMappings(), PANEL_SETUP_LAYERS::addUserDefinedLayer(), AUTOPLACE_TOOL::autoplace(), PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), PANEL_SETUP_LAYERS::getAvailableUserDefinedLayers(), DIALOG_IMPORTED_LAYERS::GetSelectedLayerID(), BOARD::GetStandardLayerName(), and DIALOG_IMPORTED_LAYERS::OnAutoMatchLayersClicked().
|
inline |
Used for via types.
Definition at line 273 of file layers_id_colors_and_visibility.h.
References GAL_LAYER_ID_END.
|
inline |
Definition at line 260 of file layers_id_colors_and_visibility.h.
|
inline |
Definition at line 374 of file layers_id_colors_and_visibility.h.
|
inline |
Definition at line 266 of file layers_id_colors_and_visibility.h.
References GAL_LAYER_ID_END, and GAL_LAYER_ID_START.
Referenced by APPEARANCE_CONTROLS::rebuildObjects(), and APPEARANCE_CONTROLS::syncObjectSettings().
PCB_LAYER_ID ToLAYER_ID | ( | int | aLayer | ) |
Definition at line 905 of file lset.cpp.
References GAL_LAYER_ID_END.
Referenced by PNS_KICAD_IFACE::AddItem(), GRID_CELL_LAYER_SELECTOR::BeginEdit(), BOARD::BOARD(), DSN::SPECCTRA_DB::buildLayerMaps(), BOARD_ADAPTER::createLayers(), DIALOG_GLOBAL_DELETION::doGlobalDeletions(), GRID_CELL_LAYER_RENDERER::Draw(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawVia(), PCB_LAYER_VALUE::EqualTo(), existsOnLayer(), GENDRILL_WRITER_BASE::GenDrillReportFile(), GetGerberFileFunctionAttribute(), BOARD::GetLayerID(), PCB_LAYER_SELECTOR::getLayerName(), PCB_LAYER_BOX_SELECTOR::getLayerName(), DIALOG_IMPORTED_LAYERS::GetSelectedLayerID(), GRID_CELL_LAYER_SELECTOR::GetValue(), PCB_LAYER_BOX_SELECTOR::isLayerEnabled(), PCB_CONTROL::LayerNext(), PCB_CONTROL::LayerPrev(), PCAD2KICAD::PCB::MapLayer(), APPEARANCE_CONTROLS::onLayerClick(), DIALOG_RULE_AREA_PROPERTIES::OnLayerSelection(), DIALOG_NON_COPPER_ZONES_EDITOR::OnLayerSelection(), DIALOG_COPPER_ZONE::OnLayerSelection(), PLOT_CONTROLLER::OpenPlotfile(), DRC_RULES_PARSER::parseLayer(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), PLOT_CONTROLLER::PlotLayer(), ROUTER_TOOL::prepareInteractive(), PCB_EDIT_FRAME::Process_Special_Functions(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), PCB_SELECTION_TOOL::Selectable(), FOOTPRINT_EDIT_FRAME::SelectLayer(), PCB_BASE_FRAME::SelectOneLayer(), DIALOG_GLOBAL_DELETION::SetCurrentLayer(), APPEARANCE_CONTROLS::SetLayerVisible(), FP_TEXT_GRID_TABLE::SetValueAsLong(), PNS_KICAD_IFACE_BASE::StackupHeight(), ROUTER_TOOL::switchLayerOnViaPlacement(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), and PNS_KICAD_IFACE::UpdateItem().
constexpr int GAL_LAYER_ID_COUNT = GAL_LAYER_ID_END - GAL_LAYER_ID_START |
Definition at line 258 of file layers_id_colors_and_visibility.h.