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-2024 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 && aLayerId >= 0;
534}
535
542inline bool IsExternalCopperLayer( int aLayerId )
543{
544 return aLayerId == F_Cu || aLayerId == B_Cu;
545}
546
553inline bool IsInnerCopperLayer( int aLayerId )
554{
555 return IsCopperLayer( aLayerId ) && !IsExternalCopperLayer( aLayerId );
556}
557
564inline bool IsNonCopperLayer( int aLayerId )
565{
566 return ( aLayerId & 1 ) && aLayerId <= PCB_LAYER_ID_COUNT;
567}
568
577inline bool IsCopperLayer( int aLayerId, bool aIncludeSyntheticCopperLayers )
578{
579 if( aIncludeSyntheticCopperLayers )
580 return !IsNonCopperLayer( aLayerId );
581 else
582 return IsCopperLayer( aLayerId );
583}
584
585inline bool IsViaPadLayer( int aLayer )
586{
587 return aLayer == LAYER_VIA_THROUGH
588 || aLayer == LAYER_VIA_MICROVIA
589 || aLayer == LAYER_VIA_BBLIND;
590}
591
592inline bool IsHoleLayer( int aLayer )
593{
594 return aLayer == LAYER_VIA_HOLES
595 || aLayer == LAYER_VIA_HOLEWALLS
596 || aLayer == LAYER_PAD_PLATEDHOLES
597 || aLayer == LAYER_PAD_HOLEWALLS
598 || aLayer == LAYER_NON_PLATEDHOLES;
599}
600
601inline bool IsSolderMaskLayer( int aLayer )
602{
603 return aLayer == F_Mask || aLayer == B_Mask;
604}
605
612inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
613{
614 return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
615}
616
617
618/*
619 * IMPORTANT: If a layer is not a front layer that doesn't necessarily mean it's a back layer.
620 *
621 * So a layer can be:
622 * - Front
623 * - Back
624 * - Neither (internal or auxiliary)
625 *
626 * The check most frequent is for back layers, since it involves flips.
627 */
628
632inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
633{
634 switch( aLayerId )
635 {
636 case F_Cu:
637 case F_Adhes:
638 case F_Paste:
639 case F_SilkS:
640 case F_Mask:
641 case F_CrtYd:
642 case F_Fab:
643 return true;
644 default:
645 ;
646 }
647
648 return false;
649}
650
651
655inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
656{
657 switch( aLayerId )
658 {
659 case B_Cu:
660 case B_Adhes:
661 case B_Paste:
662 case B_SilkS:
663 case B_Mask:
664 case B_CrtYd:
665 case B_Fab:
666 return true;
667 default:
668 return false;
669 }
670}
671
672
676inline bool IsCopperLayerLowerThan( PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB )
677{
678 if( aLayerA == aLayerB )
679 return false;
680
681 if( aLayerA == B_Cu )
682 return true;
683
684 if( aLayerB == B_Cu )
685 return false;
686
687 return aLayerA > aLayerB;
688}
689
690
700KICOMMON_API PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
701
702
706inline int GetNetnameLayer( int aLayer )
707{
708 if( IsCopperLayer( aLayer ) || IsViaPadLayer( aLayer ) )
709 return NETNAMES_LAYER_INDEX( aLayer );
710
711 // Fallback
712 return Cmts_User;
713}
714
721inline bool IsNetnameLayer( int aLayer )
722{
723 return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) && aLayer < NETNAMES_LAYER_ID_END;
724}
725
726
727inline bool IsZoneFillLayer( int aLayer )
728{
729 return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
730}
731
732
733inline bool IsDCodeLayer( int aLayer )
734{
736 && aLayer < ( GERBVIEW_LAYER_ID_START + ( 2 * GERBER_DRAWLAYERS_COUNT ) );
737}
738
739
741inline size_t CopperLayerToOrdinal( PCB_LAYER_ID aLayer )
742{
743 wxCHECK( IsCopperLayer( aLayer ), 0 );
744
745 switch( aLayer )
746 {
747 case F_Cu: return 0;
748 case B_Cu: return MAX_CU_LAYERS - 1;
749 default: return ( aLayer - B_Cu ) / 2;
750 }
751}
752
753
758
759
761
762#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:601
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:612
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:676
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:632
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:733
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:655
#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:564
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:706
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:741
bool IsNetnameLayer(int aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:721
KICOMMON_API PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:820
bool IsHoleLayer(int aLayer)
Definition: layer_ids.h:592
bool IsViaPadLayer(int aLayer)
Definition: layer_ids.h:585
bool IsInnerCopperLayer(int aLayerId)
Tests whether a layer is an inner (In1_Cu to In30_Cu) copper layer.
Definition: layer_ids.h:553
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:727
STL namespace.