KiCad PCB EDA Suite
Loading...
Searching...
No Matches
layer_ids.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
5 * Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
6 * Copyright (C) 2007-2023 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef LAYER_IDS_H
27#define LAYER_IDS_H
28
29#include <set>
30#include <vector>
31#include <bitset>
32#include <stdexcept>
33#include <wx/string.h>
34#include <kicommon.h>
35
36
59enum PCB_LAYER_ID: int
60{
63
64 F_Cu = 0,
65 B_Cu = 2,
66 In1_Cu = 4,
67 In2_Cu = 6,
68 In3_Cu = 8,
69 In4_Cu = 10,
70 In5_Cu = 12,
71 In6_Cu = 14,
72 In7_Cu = 16,
73 In8_Cu = 18,
74 In9_Cu = 20,
75 In10_Cu = 22,
76 In11_Cu = 24,
77 In12_Cu = 26,
78 In13_Cu = 28,
79 In14_Cu = 30,
80 In15_Cu = 32,
81 In16_Cu = 34,
82 In17_Cu = 36,
83 In18_Cu = 38,
84 In19_Cu = 40,
85 In20_Cu = 42,
86 In21_Cu = 44,
87 In22_Cu = 46,
88 In23_Cu = 48,
89 In24_Cu = 50,
90 In25_Cu = 52,
91 In26_Cu = 54,
92 In27_Cu = 56,
93 In28_Cu = 58,
94 In29_Cu = 60,
95 In30_Cu = 62,
96
97 F_Mask = 1,
98 B_Mask = 3,
99
106
111
113 Margin = 27,
114
117
118 B_Fab = 33,
119 F_Fab = 35,
120
121 Rescue = 37,
122
123 // User definable layers.
124 User_1 = 39,
125 User_2 = 41,
126 User_3 = 43,
127 User_4 = 45,
128 User_5 = 47,
129 User_6 = 49,
130 User_7 = 51,
131 User_8 = 53,
132 User_9 = 55,
133
134
137
139
140#define MAX_CU_LAYERS 32
141
146enum class FLASHING
147{
148 DEFAULT, // Flashing follows connectivity
149 ALWAYS_FLASHED, // Always flashed for connectivity
150 NEVER_FLASHED, // Never flashed for connectivity
151};
152
155{
156
158
160
162
164
168
171
173#define NETNAMES_LAYER_INDEX( layer ) ( static_cast<int>( NETNAMES_LAYER_ID_START ) + layer )
174
175#define GAL_UI_LAYER_COUNT 10
176
191{
193
200// LAYER_MOD_TEXT_BK deprecated + 6,
201// LAYER_HIDDEN_TEXT = GAL_LAYER_ID_START + 7, ///< DEPRECATED, UNUSED SINCE 9.0. text marked as invisible
203// LAYER_PADS_SMD_FR = GAL_LAYER_ID_START + 9, ///< Deprecated since 9.0
204// LAYER_PADS_SMD_BK = GAL_LAYER_ID_START + 10, ///< Deprecated since 9.0
208// LAYER_NO_CONNECTS deprecated + 14, ///< show a marker on pads with no nets
214// LAYER_PADS_TH = GAL_LAYER_ID_START + 20, ///< Deprecated since 9.0
225
228
229 // Layers in this section have visibility controls but were not present in legacy board files.
230
233
239
241
244
247 // Add layers below this point that do not have visibility controls, so don't need explicit
248 // enum values
249
252
255
259
263
264 // Layers for drawing on-canvas UI
267
270
272#define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
273
275#define BITMAP_LAYER_FOR( boardLayer ) ( LAYER_BITMAP_START + boardLayer )
276#define ZONE_LAYER_FOR( boardLayer ) ( LAYER_ZONE_START + boardLayer )
277
279
281{
282 a = GAL_LAYER_ID( int( a ) + 1 );
283 return a;
284}
285
286inline GAL_LAYER_ID ToGalLayer( int aInteger )
287{
288 wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
289 return static_cast<GAL_LAYER_ID>( aInteger );
290}
291
293inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
294{
295 GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
296 wxASSERT( t <= GAL_LAYER_ID_END );
297 return t;
298}
299
300
302typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
303
304
307{
308
309private:
310 static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
311
312public:
314 {
315 }
316
317 GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
318 {
319 }
320
321 GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
322
324 {
325 GAL_BASE_SET::set();
326 return *this;
327 }
328
329 GAL_SET& set( int aPos, bool aVal = true )
330 {
331 GAL_BASE_SET::set( aPos, aVal );
332 return *this;
333 }
334
335 GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
336 {
337 GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
338 return *this;
339 }
340
342 {
343 return test( static_cast<std::size_t>( aPos ) - start );
344 }
345
346 std::vector<GAL_LAYER_ID> Seq() const;
347
348 static GAL_SET DefaultVisible();
349};
350
352enum SCH_LAYER_ID : int
353{
355
405
408
409#define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
410
411#define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
412
414{
415 a = SCH_LAYER_ID( int( a ) + 1 );
416 return a;
417}
418
419// number of draw layers in Gerbview
420#define GERBER_DRAWLAYERS_COUNT static_cast<int>( PCB_LAYER_ID_COUNT )
421
424{
426
429
437
440
441#define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
442
443#define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
444
445#define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
446
447
449enum LAYER_3D_ID : int
450{
452
476
479
481#define LAYER_ID_COUNT LAYER_3D_END
482
483
488KICOMMON_API wxString LayerName( int aLayer );
489
490
491// Some elements do not have yet a visibility control
492// from a dialog, but have a visibility control flag.
493// Here is a mask to set them visible, to be sure they are displayed
494// after loading a board for instance
495#define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
496 ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
497 ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
498 ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
499 ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
500
501
509inline bool IsValidLayer( int aLayerId )
510{
511 return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
512}
513
520inline bool IsPcbLayer( int aLayer )
521{
522 return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
523}
524
531inline bool IsCopperLayer( int aLayerId )
532{
533 return !( aLayerId & 1 ) && aLayerId <= PCB_LAYER_ID_COUNT;
534}
535
542inline bool IsExternalCopperLayer( int aLayerId )
543{
544 return aLayerId == F_Cu || aLayerId == B_Cu;
545}
546
553inline bool IsNonCopperLayer( int aLayerId )
554{
555 return ( aLayerId & 1 ) && aLayerId <= PCB_LAYER_ID_COUNT;
556}
557
566inline bool IsCopperLayer( int aLayerId, bool aIncludeSyntheticCopperLayers )
567{
568 if( aIncludeSyntheticCopperLayers )
569 return !IsNonCopperLayer( aLayerId );
570 else
571 return IsCopperLayer( aLayerId );
572}
573
574inline bool IsViaPadLayer( int aLayer )
575{
576 return aLayer == LAYER_VIA_THROUGH
577 || aLayer == LAYER_VIA_MICROVIA
578 || aLayer == LAYER_VIA_BBLIND;
579}
580
581inline bool IsHoleLayer( int aLayer )
582{
583 return aLayer == LAYER_VIA_HOLES
584 || aLayer == LAYER_VIA_HOLEWALLS
585 || aLayer == LAYER_PAD_PLATEDHOLES
586 || aLayer == LAYER_PAD_HOLEWALLS
587 || aLayer == LAYER_NON_PLATEDHOLES;
588}
589
590inline bool IsSolderMaskLayer( int aLayer )
591{
592 return aLayer == F_Mask || aLayer == B_Mask;
593}
594
601inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
602{
603 return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
604}
605
606
607/*
608 * IMPORTANT: If a layer is not a front layer that doesn't necessarily mean it's a back layer.
609 *
610 * So a layer can be:
611 * - Front
612 * - Back
613 * - Neither (internal or auxiliary)
614 *
615 * The check most frequent is for back layers, since it involves flips.
616 */
617
621inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
622{
623 switch( aLayerId )
624 {
625 case F_Cu:
626 case F_Adhes:
627 case F_Paste:
628 case F_SilkS:
629 case F_Mask:
630 case F_CrtYd:
631 case F_Fab:
632 return true;
633 default:
634 ;
635 }
636
637 return false;
638}
639
640
644inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
645{
646 switch( aLayerId )
647 {
648 case B_Cu:
649 case B_Adhes:
650 case B_Paste:
651 case B_SilkS:
652 case B_Mask:
653 case B_CrtYd:
654 case B_Fab:
655 return true;
656 default:
657 return false;
658 }
659}
660
661
665inline bool IsCopperLayerLowerThan( PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB )
666{
667 if( aLayerA == aLayerB )
668 return false;
669
670 if( aLayerA == B_Cu )
671 return true;
672
673 if( aLayerB == B_Cu )
674 return false;
675
676 return aLayerA > aLayerB;
677}
678
679
689KICOMMON_API PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
690
691
695inline int GetNetnameLayer( int aLayer )
696{
697 if( IsCopperLayer( aLayer ) || IsViaPadLayer( aLayer ) )
698 return NETNAMES_LAYER_INDEX( aLayer );
699
700 // Fallback
701 return Cmts_User;
702}
703
710inline bool IsNetnameLayer( int aLayer )
711{
712 return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) && aLayer < NETNAMES_LAYER_ID_END;
713}
714
715
716inline bool IsZoneFillLayer( int aLayer )
717{
718 return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
719}
720
721
722inline bool IsDCodeLayer( int aLayer )
723{
725 && aLayer < ( GERBVIEW_LAYER_ID_START + ( 2 * GERBER_DRAWLAYERS_COUNT ) );
726}
727
728
730inline size_t CopperLayerToOrdinal( PCB_LAYER_ID aLayer )
731{
732 wxCHECK( IsCopperLayer( aLayer ), 0 );
733
734 switch( aLayer )
735 {
736 case F_Cu: return 0;
737 case B_Cu: return MAX_CU_LAYERS - 1;
738 default: return ( aLayer - B_Cu ) / 2;
739 }
740}
741
742
747
748
750
751#endif // LAYER_IDS_H
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:307
bool Contains(GAL_LAYER_ID aPos)
Definition: layer_ids.h:341
GAL_SET()
Definition: layer_ids.h:313
GAL_SET & set()
Definition: layer_ids.h:323
GAL_SET(const GAL_SET &aOther)
Definition: layer_ids.h:317
GAL_SET & set(int aPos, bool aVal=true)
Definition: layer_ids.h:329
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
Definition: layer_ids.h:335
#define KICOMMON_API
Definition: kicommon.h:28
bool IsSolderMaskLayer(int aLayer)
Definition: layer_ids.h:590
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
Definition: layer_ids.h:155
@ LAYER_PAD_FR_NETNAMES
Additional netnames layers (not associated with a PCB layer)
Definition: layer_ids.h:165
@ LAYER_PAD_BK_NETNAMES
Definition: layer_ids.h:166
@ LAYER_PAD_NETNAMES
Definition: layer_ids.h:167
@ NETNAMES_LAYER_ID_START
Definition: layer_ids.h:157
@ NETNAMES_LAYER_ID_END
Definition: layer_ids.h:169
@ NETNAMES_LAYER_ID_RESERVED
Reserved space for board layer netnames.
Definition: layer_ids.h:161
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Wraps a std::bitset.
Definition: layer_ids.h:302
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
Definition: layer_ids.h:280
GERBVIEW_LAYER_ID
GerbView draw layers.
Definition: layer_ids.h:424
@ GERBVIEW_LAYER_ID_RESERVED
GerbView draw layers and d-code layers.
Definition: layer_ids.h:428
@ LAYER_GERBVIEW_DRAWINGSHEET
Definition: layer_ids.h:435
@ GERBVIEW_LAYER_ID_START
Definition: layer_ids.h:425
@ LAYER_GERBVIEW_BACKGROUND
Definition: layer_ids.h:434
@ LAYER_DCODES
Definition: layer_ids.h:430
@ LAYER_NEGATIVE_OBJECTS
Definition: layer_ids.h:431
@ LAYER_GERBVIEW_PAGE_LIMITS
Definition: layer_ids.h:436
@ GERBVIEW_LAYER_ID_END
Definition: layer_ids.h:438
@ LAYER_GERBVIEW_AXES
Definition: layer_ids.h:433
@ LAYER_GERBVIEW_GRID
Definition: layer_ids.h:432
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
Definition: layer_ids.h:293
bool IsPcbLayer(int aLayer)
Test whether a layer is a valid layer for Pcbnew.
Definition: layer_ids.h:520
LAYER_3D_ID
3D Viewer virtual layers for color settings
Definition: layer_ids.h:450
@ LAYER_3D_SOLDERMASK_TOP
Definition: layer_ids.h:461
@ LAYER_3D_BOUNDING_BOXES
Definition: layer_ids.h:474
@ LAYER_3D_START
Definition: layer_ids.h:451
@ LAYER_3D_ADHESIVE
Definition: layer_ids.h:463
@ LAYER_3D_SMD_MODELS
Definition: layer_ids.h:469
@ LAYER_3D_BACKGROUND_TOP
Definition: layer_ids.h:454
@ LAYER_3D_USER_COMMENTS
Definition: layer_ids.h:464
@ LAYER_3D_SOLDERMASK_BOTTOM
Definition: layer_ids.h:460
@ LAYER_3D_BOARD
Definition: layer_ids.h:455
@ LAYER_3D_USER_ECO1
Definition: layer_ids.h:466
@ LAYER_3D_USER_ECO2
Definition: layer_ids.h:467
@ LAYER_3D_TH_MODELS
Definition: layer_ids.h:468
@ LAYER_3D_AXES
Definition: layer_ids.h:473
@ LAYER_3D_SILKSCREEN_TOP
Definition: layer_ids.h:459
@ LAYER_3D_VIRTUAL_MODELS
Definition: layer_ids.h:470
@ LAYER_3D_MODELS_MARKED_DNP
Definition: layer_ids.h:472
@ LAYER_3D_COPPER_TOP
Definition: layer_ids.h:456
@ LAYER_3D_SOLDERPASTE
Definition: layer_ids.h:462
@ LAYER_3D_OFF_BOARD_SILK
Definition: layer_ids.h:475
@ LAYER_3D_MODELS_NOT_IN_POS
Definition: layer_ids.h:471
@ LAYER_3D_USER_DRAWINGS
Definition: layer_ids.h:465
@ LAYER_3D_COPPER_BOTTOM
Definition: layer_ids.h:457
@ LAYER_3D_BACKGROUND_BOTTOM
Definition: layer_ids.h:453
@ LAYER_3D_SILKSCREEN_BOTTOM
Definition: layer_ids.h:458
@ LAYER_3D_END
Definition: layer_ids.h:477
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
Definition: layer_ids.h:601
bool IsCopperLayerLowerThan(PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB)
Returns true if copper aLayerA is placed lower than aLayerB, false otherwise.
Definition: layer_ids.h:665
constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START
Definition: layer_ids.h:138
KICOMMON_API PCB_LAYER_ID BoardLayerFromLegacyId(int aLegacyId)
Retrieves a layer ID from an integer converted from a legacy (pre-V9) enum value.
Definition: layer_id.cpp:254
#define NETNAMES_LAYER_INDEX(layer)
Macro for obtaining netname layer for a given PCB layer.
Definition: layer_ids.h:173
GAL_LAYER_ID ToGalLayer(int aInteger)
Definition: layer_ids.h:286
constexpr int GAL_LAYER_ID_COUNT
Definition: layer_ids.h:278
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
Definition: layer_ids.h:621
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:147
@ ALWAYS_FLASHED
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:722
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:644
#define MAX_CU_LAYERS
Definition: layer_ids.h:140
KICOMMON_API PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount=0)
Definition: layer_id.cpp:208
bool IsNonCopperLayer(int aLayerId)
Test whether a layer is a non copper layer.
Definition: layer_ids.h:553
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:695
KICOMMON_API wxString LayerName(int aLayer)
Returns the string equivalent of a given layer.
Definition: layer_id.cpp:31
#define GAL_UI_LAYER_COUNT
Definition: layer_ids.h:175
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:531
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:191
@ LAYER_GRID
Definition: layer_ids.h:206
@ GAL_LAYER_ID_START
Definition: layer_ids.h:192
@ LAYER_PAGE_LIMITS
color for drawing the page extents (visibility stored in PCBNEW_SETTINGS::m_ShowPageLimits)
Definition: layer_ids.h:253
@ LAYER_LOCKED_ITEM_SHADOW
shadow layer for locked items
Definition: layer_ids.h:240
@ LAYER_VIA_HOLEWALLS
Definition: layer_ids.h:235
@ LAYER_GRID_AXES
Definition: layer_ids.h:207
@ LAYER_DRAWINGSHEET_PAGEn
for drawingsheetEditor previewing
Definition: layer_ids.h:251
@ LAYER_CONFLICTS_SHADOW
shadow layer for items flagged conficting
Definition: layer_ids.h:242
@ LAYER_FOOTPRINTS_FR
show footprints on front
Definition: layer_ids.h:209
@ LAYER_DRC_SHAPE1
Custom shape for DRC marker.
Definition: layer_ids.h:245
@ LAYER_ZONE_END
Definition: layer_ids.h:258
@ LAYER_NON_PLATEDHOLES
handle color for not plated holes (holes, not pads)
Definition: layer_ids.h:198
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
Definition: layer_ids.h:218
@ LAYER_DRAW_BITMAPS
to handle and draw images bitmaps
Definition: layer_ids.h:224
@ LAYER_FP_REFERENCES
show footprints references (when texts are visible)
Definition: layer_ids.h:212
@ LAYER_DRC_EXCLUSION
layer for drc markers which have been individually excluded
Definition: layer_ids.h:237
@ LAYER_PCB_BACKGROUND
PCB background color.
Definition: layer_ids.h:221
@ LAYER_ZONES
Control for copper zone opacity/visibility (color ignored)
Definition: layer_ids.h:232
@ LAYER_SHAPES
Copper graphic shape opacity/visibility (color ignored)
Definition: layer_ids.h:243
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored)
Definition: layer_ids.h:231
@ LAYER_DRC_WARNING
layer for drc markers with SEVERITY_WARNING
Definition: layer_ids.h:236
@ LAYER_UI_START
Definition: layer_ids.h:265
@ LAYER_PAD_PLATEDHOLES
to draw pad holes (plated)
Definition: layer_ids.h:215
@ GAL_LAYER_ID_END
Definition: layer_ids.h:268
@ LAYER_GP_OVERLAY
general purpose overlay
Definition: layer_ids.h:219
@ GAL_LAYER_ID_BITMASK_END
This is the end of the layers used for visibility bit masks in legacy board files.
Definition: layer_ids.h:227
@ LAYER_TRACKS
Definition: layer_ids.h:213
@ LAYER_CURSOR
PCB cursor.
Definition: layer_ids.h:222
@ LAYER_AUX_ITEMS
Auxiliary items (guides, rule, etc)
Definition: layer_ids.h:223
@ LAYER_RATSNEST
Definition: layer_ids.h:205
@ LAYER_DRC_SHAPE2
Custom shape for DRC marker.
Definition: layer_ids.h:246
@ LAYER_ZONE_START
Virtual layers for stacking zones and tracks on a given copper layer.
Definition: layer_ids.h:257
@ LAYER_FP_TEXT
Definition: layer_ids.h:199
@ LAYER_FOOTPRINTS_BK
show footprints on back
Definition: layer_ids.h:210
@ LAYER_UI_END
Definition: layer_ids.h:266
@ LAYER_ANCHOR
anchor of items having an anchor point (texts, footprints)
Definition: layer_ids.h:202
@ LAYER_DRAWINGSHEET_PAGE1
for drawingsheetEditor previewing
Definition: layer_ids.h:250
@ LAYER_MARKER_SHADOWS
shadows for drc markers
Definition: layer_ids.h:238
@ LAYER_VIA_HOLES
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:216
@ LAYER_FP_VALUES
show footprints values (when texts are visible)
Definition: layer_ids.h:211
@ LAYER_VIA_MICROVIA
to draw micro vias
Definition: layer_ids.h:195
@ LAYER_SELECT_OVERLAY
currently selected items overlay
Definition: layer_ids.h:220
@ LAYER_VIA_THROUGH
to draw usual through hole vias
Definition: layer_ids.h:197
@ LAYER_BITMAP_END
Definition: layer_ids.h:262
@ LAYER_BITMAP_START
Virtual layers for background images per board layer.
Definition: layer_ids.h:261
@ LAYER_DRC_ERROR
layer for drc markers with SEVERITY_ERROR
Definition: layer_ids.h:217
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:194
@ LAYER_VIA_BBLIND
to draw blind/buried vias
Definition: layer_ids.h:196
@ LAYER_PAD_HOLEWALLS
Definition: layer_ids.h:234
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:353
@ LAYER_DANGLING
Definition: layer_ids.h:381
@ LAYER_SHEETNAME
Definition: layer_ids.h:376
@ LAYER_ERC_WARN
Definition: layer_ids.h:383
@ LAYER_SCHEMATIC_ANCHOR
Definition: layer_ids.h:402
@ LAYER_SHEETLABEL
Definition: layer_ids.h:379
@ LAYER_PINNUM
Definition: layer_ids.h:362
@ LAYER_RULE_AREAS
Definition: layer_ids.h:369
@ LAYER_DEVICE
Definition: layer_ids.h:370
@ LAYER_SHEET_BACKGROUND
Definition: layer_ids.h:388
@ LAYER_EXCLUDED_FROM_SIM
Definition: layer_ids.h:386
@ LAYER_BRIGHTENED
Definition: layer_ids.h:394
@ LAYER_ERC_EXCLUSION
Definition: layer_ids.h:385
@ LAYER_HIDDEN
Definition: layer_ids.h:395
@ LAYER_HIERLABEL
Definition: layer_ids.h:361
@ LAYER_PINNAM
Definition: layer_ids.h:363
@ LAYER_PRIVATE_NOTES
Definition: layer_ids.h:372
@ LAYER_HOVERED
Definition: layer_ids.h:393
@ LAYER_GLOBLABEL
Definition: layer_ids.h:360
@ LAYER_WIRE
Definition: layer_ids.h:356
@ LAYER_NOTES
Definition: layer_ids.h:371
@ LAYER_NET_COLOR_HIGHLIGHT
Definition: layer_ids.h:396
@ LAYER_ERC_ERR
Definition: layer_ids.h:384
@ LAYER_PIN
Definition: layer_ids.h:374
@ LAYER_VALUEPART
Definition: layer_ids.h:365
@ LAYER_BUS
Definition: layer_ids.h:357
@ LAYER_SCHEMATIC_CURSOR
Definition: layer_ids.h:392
@ SCH_LAYER_ID_END
Definition: layer_ids.h:406
@ LAYER_FIELDS
Definition: layer_ids.h:366
@ LAYER_DEVICE_BACKGROUND
Definition: layer_ids.h:387
@ SCH_LAYER_ID_START
Definition: layer_ids.h:354
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition: layer_ids.h:398
@ LAYER_LOCLABEL
Definition: layer_ids.h:359
@ LAYER_JUNCTION
Definition: layer_ids.h:358
@ LAYER_SHEETFIELDS
Definition: layer_ids.h:378
@ LAYER_SCHEMATIC_GRID_AXES
Definition: layer_ids.h:390
@ LAYER_REFERENCEPART
Definition: layer_ids.h:364
@ LAYER_NETCLASS_REFS
Definition: layer_ids.h:368
@ LAYER_NOTES_BACKGROUND
Definition: layer_ids.h:373
@ LAYER_OP_CURRENTS
Definition: layer_ids.h:404
@ LAYER_SCHEMATIC_PAGE_LIMITS
Definition: layer_ids.h:399
@ LAYER_SHEET
Definition: layer_ids.h:375
@ LAYER_SELECTION_SHADOWS
Definition: layer_ids.h:397
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:391
@ LAYER_SCHEMATIC_AUX_ITEMS
Definition: layer_ids.h:401
@ LAYER_INTERSHEET_REFS
Definition: layer_ids.h:367
@ LAYER_OP_VOLTAGES
Definition: layer_ids.h:403
@ LAYER_SHEETFILENAME
Definition: layer_ids.h:377
@ LAYER_BUS_JUNCTION
Definition: layer_ids.h:400
@ LAYER_DNP_MARKER
Definition: layer_ids.h:382
@ LAYER_NOCONNECT
Definition: layer_ids.h:380
@ LAYER_SCHEMATIC_GRID
Definition: layer_ids.h:389
size_t CopperLayerToOrdinal(PCB_LAYER_ID aLayer)
! Converts KiCad copper layer enum to an ordinal between the front and back layers
Definition: layer_ids.h:730
bool IsNetnameLayer(int aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:710
KICOMMON_API PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:810
bool IsHoleLayer(int aLayer)
Definition: layer_ids.h:581
bool IsViaPadLayer(int aLayer)
Definition: layer_ids.h:574
bool IsExternalCopperLayer(int aLayerId)
Tests whether a layer is an external (F_Cu or B_Cu) copper layer.
Definition: layer_ids.h:542
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ In22_Cu
Definition: layer_ids.h:87
@ In11_Cu
Definition: layer_ids.h:76
@ In29_Cu
Definition: layer_ids.h:94
@ In30_Cu
Definition: layer_ids.h:95
@ User_8
Definition: layer_ids.h:131
@ F_CrtYd
Definition: layer_ids.h:116
@ In17_Cu
Definition: layer_ids.h:82
@ B_Adhes
Definition: layer_ids.h:103
@ Edge_Cuts
Definition: layer_ids.h:112
@ Dwgs_User
Definition: layer_ids.h:107
@ F_Paste
Definition: layer_ids.h:104
@ In9_Cu
Definition: layer_ids.h:74
@ Cmts_User
Definition: layer_ids.h:108
@ User_6
Definition: layer_ids.h:129
@ User_7
Definition: layer_ids.h:130
@ In19_Cu
Definition: layer_ids.h:84
@ In7_Cu
Definition: layer_ids.h:72
@ In28_Cu
Definition: layer_ids.h:93
@ In26_Cu
Definition: layer_ids.h:91
@ F_Adhes
Definition: layer_ids.h:102
@ B_Mask
Definition: layer_ids.h:98
@ B_Cu
Definition: layer_ids.h:65
@ User_5
Definition: layer_ids.h:128
@ Eco1_User
Definition: layer_ids.h:109
@ F_Mask
Definition: layer_ids.h:97
@ In21_Cu
Definition: layer_ids.h:86
@ In23_Cu
Definition: layer_ids.h:88
@ B_Paste
Definition: layer_ids.h:105
@ In15_Cu
Definition: layer_ids.h:80
@ In2_Cu
Definition: layer_ids.h:67
@ User_9
Definition: layer_ids.h:132
@ UNSELECTED_LAYER
Definition: layer_ids.h:62
@ F_Fab
Definition: layer_ids.h:119
@ In10_Cu
Definition: layer_ids.h:75
@ Margin
Definition: layer_ids.h:113
@ F_SilkS
Definition: layer_ids.h:100
@ In4_Cu
Definition: layer_ids.h:69
@ B_CrtYd
Definition: layer_ids.h:115
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
@ Eco2_User
Definition: layer_ids.h:110
@ In16_Cu
Definition: layer_ids.h:81
@ In24_Cu
Definition: layer_ids.h:89
@ In1_Cu
Definition: layer_ids.h:66
@ Rescue
Definition: layer_ids.h:121
@ User_3
Definition: layer_ids.h:126
@ User_1
Definition: layer_ids.h:124
@ B_SilkS
Definition: layer_ids.h:101
@ In13_Cu
Definition: layer_ids.h:78
@ User_4
Definition: layer_ids.h:127
@ In8_Cu
Definition: layer_ids.h:73
@ In14_Cu
Definition: layer_ids.h:79
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:135
@ User_2
Definition: layer_ids.h:125
@ In12_Cu
Definition: layer_ids.h:77
@ In27_Cu
Definition: layer_ids.h:92
@ In6_Cu
Definition: layer_ids.h:71
@ In5_Cu
Definition: layer_ids.h:70
@ In3_Cu
Definition: layer_ids.h:68
@ In20_Cu
Definition: layer_ids.h:85
@ F_Cu
Definition: layer_ids.h:64
@ In18_Cu
Definition: layer_ids.h:83
@ In25_Cu
Definition: layer_ids.h:90
@ B_Fab
Definition: layer_ids.h:118
bool IsValidLayer(int aLayerId)
Test whether a given integer is a valid layer index, i.e.
Definition: layer_ids.h:509
#define GERBER_DRAWLAYERS_COUNT
Definition: layer_ids.h:420
bool IsZoneFillLayer(int aLayer)
Definition: layer_ids.h:716
STL namespace.