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 The 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,
151};
152
155{
156
158
161
167
170
172#define NETNAMES_LAYER_INDEX( layer ) ( static_cast<int>( NETNAMES_LAYER_ID_START ) + layer )
173
174#define GAL_UI_LAYER_COUNT 10
175
191{
193
199
203
204// LAYER_MOD_TEXT_BK deprecated + 6,
205
206// DEPRECATED, UNUSED SINCE 9.0. text marked as invisible.
207// LAYER_HIDDEN_TEXT = GAL_LAYER_ID_START + 7,
208
211
212// LAYER_PADS_SMD_FR = GAL_LAYER_ID_START + 9, // Deprecated since 9.0
213// LAYER_PADS_SMD_BK = GAL_LAYER_ID_START + 10, // Deprecated since 9.0
214
218
219// LAYER_NO_CONNECTS deprecated + 14, // show a marker on pads with no nets
220
223
226
230
231// LAYER_PADS_TH = GAL_LAYER_ID_START + 20, ///< Deprecated since 9.0
232
234
237
247
250
251 // Layers in this section have visibility controls but were not present in legacy board files.
252
255
258
261
264
268
270
273
276
279
280 // Add layers below this point that do not have visibility controls, so don't need explicit
281 // enum values
282
285
288
292
296
300
304
308
309 // Layers for drawing on-canvas UI
312
315
317#define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
318
320#define BITMAP_LAYER_FOR( boardLayer ) ( LAYER_BITMAP_START + boardLayer )
321#define ZONE_LAYER_FOR( boardLayer ) ( LAYER_ZONE_START + boardLayer )
322#define PAD_COPPER_LAYER_FOR( boardLayer ) ( LAYER_PAD_COPPER_START + boardLayer )
323#define VIA_COPPER_LAYER_FOR( boardLayer ) ( LAYER_VIA_COPPER_START + boardLayer )
324#define CLEARANCE_LAYER_FOR( boardLayer ) ( LAYER_CLEARANCE_START + boardLayer )
325
327
329{
330 a = GAL_LAYER_ID( int( a ) + 1 );
331 return a;
332}
333
334inline GAL_LAYER_ID ToGalLayer( int aInteger )
335{
336 wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
337 return static_cast<GAL_LAYER_ID>( aInteger );
338}
339
341inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
342{
343 GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
344 wxASSERT( t <= GAL_LAYER_ID_END );
345 return t;
346}
347
348
350typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
351
352
355{
356
357private:
358 static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
359
360public:
362 {
363 }
364
365 GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
366 {
367 }
368
369 GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
370
372 {
373 GAL_BASE_SET::set();
374 return *this;
375 }
376
377 GAL_SET& set( int aPos, bool aVal = true )
378 {
379 GAL_BASE_SET::set( aPos, aVal );
380 return *this;
381 }
382
383 GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
384 {
385 GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
386 return *this;
387 }
388
390 {
391 return test( static_cast<std::size_t>( aPos ) - start );
392 }
393
394 std::vector<GAL_LAYER_ID> Seq() const;
395
396 static GAL_SET DefaultVisible();
397};
398
400enum SCH_LAYER_ID : int
401{
403
454
457
458#define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
459
460#define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
461
463{
464 a = SCH_LAYER_ID( int( a ) + 1 );
465 return a;
466}
467
469#define GERBER_DRAWLAYERS_COUNT static_cast<int>( PCB_LAYER_ID_COUNT )
470
473{
475
478
486
489
490#define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
491
492#define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
493
494#define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
495
496
498enum LAYER_3D_ID : int
499{
501
525
528
530#define LAYER_ID_COUNT LAYER_3D_END
531
532
538KICOMMON_API wxString LayerName( int aLayer );
539
540
541// Some elements do not have yet a visibility control
542// from a dialog, but have a visibility control flag.
543// Here is a mask to set them visible, to be sure they are displayed
544// after loading a board for instance
545#define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
546 ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
547 ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
548 ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
549 ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
550
551
559inline bool IsValidLayer( int aLayerId )
560{
561 return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
562}
563
570inline bool IsPcbLayer( int aLayer )
571{
572 return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
573}
574
581inline bool IsCopperLayer( int aLayerId )
582{
583 return !( aLayerId & 1 ) && aLayerId < PCB_LAYER_ID_COUNT && aLayerId >= 0;
584}
585
592inline bool IsExternalCopperLayer( int aLayerId )
593{
594 return aLayerId == F_Cu || aLayerId == B_Cu;
595}
596
603inline bool IsInnerCopperLayer( int aLayerId )
604{
605 return IsCopperLayer( aLayerId ) && !IsExternalCopperLayer( aLayerId );
606}
607
614inline bool IsNonCopperLayer( int aLayerId )
615{
616 return ( aLayerId & 1 ) && aLayerId <= PCB_LAYER_ID_COUNT;
617}
618
627inline bool IsCopperLayer( int aLayerId, bool aIncludeSyntheticCopperLayers )
628{
629 if( aIncludeSyntheticCopperLayers )
630 return !IsNonCopperLayer( aLayerId );
631 else
632 return IsCopperLayer( aLayerId );
633}
634
635inline bool IsViaPadLayer( int aLayer )
636{
637 return aLayer == LAYER_VIA_THROUGH
638 || aLayer == LAYER_VIA_MICROVIA
639 || aLayer == LAYER_VIA_BBLIND;
640}
641
642inline bool IsHoleLayer( int aLayer )
643{
644 return aLayer == LAYER_VIA_HOLES
645 || aLayer == LAYER_VIA_HOLEWALLS
646 || aLayer == LAYER_PAD_PLATEDHOLES
647 || aLayer == LAYER_PAD_HOLEWALLS
648 || aLayer == LAYER_NON_PLATEDHOLES;
649}
650
651inline bool IsSolderMaskLayer( int aLayer )
652{
653 return aLayer == F_Mask || aLayer == B_Mask;
654}
655
662inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
663{
664 return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
665}
666
667
668/*
669 * IMPORTANT: If a layer is not a front layer that doesn't necessarily mean it's a back layer.
670 *
671 * So a layer can be:
672 * - Front
673 * - Back
674 * - Neither (internal or auxiliary)
675 *
676 * The check most frequent is for back layers, since it involves flips.
677 */
678
682inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
683{
684 switch( aLayerId )
685 {
686 case F_Cu:
687 case F_Adhes:
688 case F_Paste:
689 case F_SilkS:
690 case F_Mask:
691 case F_CrtYd:
692 case F_Fab:
693 return true;
694 default:
695 ;
696 }
697
698 return false;
699}
700
701
705inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
706{
707 switch( aLayerId )
708 {
709 case B_Cu:
710 case B_Adhes:
711 case B_Paste:
712 case B_SilkS:
713 case B_Mask:
714 case B_CrtYd:
715 case B_Fab:
716 return true;
717 default:
718 return false;
719 }
720}
721
722
726inline bool IsCopperLayerLowerThan( PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB )
727{
728 if( aLayerA == aLayerB )
729 return false;
730
731 if( aLayerA == B_Cu )
732 return true;
733
734 if( aLayerB == B_Cu )
735 return false;
736
737 return aLayerA > aLayerB;
738}
739
740
750KICOMMON_API PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
751
752
756inline int GetNetnameLayer( int aLayer )
757{
758 if( IsCopperLayer( aLayer ) || IsViaPadLayer( aLayer ) )
759 return NETNAMES_LAYER_INDEX( aLayer );
760
761 // Fallback
762 return Cmts_User;
763}
764
771inline bool IsNetnameLayer( int aLayer )
772{
773 return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) && aLayer < NETNAMES_LAYER_ID_END;
774}
775
776
777inline bool IsZoneFillLayer( int aLayer )
778{
779 return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
780}
781
782
783inline bool IsPadCopperLayer( int aLayer )
784{
785 return aLayer >= LAYER_PAD_COPPER_START && aLayer <= LAYER_PAD_COPPER_END;
786}
787
788
789inline bool IsViaCopperLayer( int aLayer )
790{
791 return aLayer >= LAYER_VIA_COPPER_START && aLayer <= LAYER_VIA_COPPER_END;
792}
793
794
795inline bool IsClearanceLayer( int aLayer )
796{
797 return aLayer >= LAYER_CLEARANCE_START && aLayer <= LAYER_CLEARANCE_END;
798}
799
800
801inline bool IsDCodeLayer( int aLayer )
802{
804 && aLayer < ( GERBVIEW_LAYER_ID_START + ( 2 * GERBER_DRAWLAYERS_COUNT ) );
805}
806
807
809inline size_t CopperLayerToOrdinal( PCB_LAYER_ID aLayer )
810{
811 wxCHECK( IsCopperLayer( aLayer ), 0 );
812
813 switch( aLayer )
814 {
815 case F_Cu: return 0;
816 case B_Cu: return MAX_CU_LAYERS - 1;
817 default: return ( aLayer - B_Cu ) / 2;
818 }
819}
820
821
826
827
829
830#endif // LAYER_IDS_H
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:355
bool Contains(GAL_LAYER_ID aPos)
Definition: layer_ids.h:389
GAL_SET()
Definition: layer_ids.h:361
GAL_SET & set()
Definition: layer_ids.h:371
GAL_SET(const GAL_SET &aOther)
Definition: layer_ids.h:365
GAL_SET & set(int aPos, bool aVal=true)
Definition: layer_ids.h:377
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
Definition: layer_ids.h:383
#define KICOMMON_API
Definition: kicommon.h:28
bool IsSolderMaskLayer(int aLayer)
Definition: layer_ids.h:651
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:163
@ LAYER_PAD_BK_NETNAMES
Definition: layer_ids.h:164
@ LAYER_PAD_NETNAMES
Definition: layer_ids.h:165
@ NETNAMES_LAYER_ID_START
Definition: layer_ids.h:157
@ NETNAMES_LAYER_ID_END
Definition: layer_ids.h:168
@ LAYER_VIA_NETNAMES
Definition: layer_ids.h:166
@ NETNAMES_LAYER_ID_RESERVED
Reserved space for board layer netnames.
Definition: layer_ids.h:160
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Wraps a std::bitset.
Definition: layer_ids.h:350
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
Definition: layer_ids.h:328
GERBVIEW_LAYER_ID
Gerbview draw layers.
Definition: layer_ids.h:473
@ GERBVIEW_LAYER_ID_RESERVED
Gerbview draw layers and d-code layers.
Definition: layer_ids.h:477
@ LAYER_GERBVIEW_DRAWINGSHEET
Definition: layer_ids.h:484
@ GERBVIEW_LAYER_ID_START
Definition: layer_ids.h:474
@ LAYER_GERBVIEW_BACKGROUND
Definition: layer_ids.h:483
@ LAYER_DCODES
Definition: layer_ids.h:479
@ LAYER_NEGATIVE_OBJECTS
Definition: layer_ids.h:480
@ LAYER_GERBVIEW_PAGE_LIMITS
Definition: layer_ids.h:485
@ GERBVIEW_LAYER_ID_END
Definition: layer_ids.h:487
@ LAYER_GERBVIEW_AXES
Definition: layer_ids.h:482
@ LAYER_GERBVIEW_GRID
Definition: layer_ids.h:481
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
Definition: layer_ids.h:341
bool IsPcbLayer(int aLayer)
Test whether a layer is a valid layer for Pcbnew.
Definition: layer_ids.h:570
bool IsPadCopperLayer(int aLayer)
Definition: layer_ids.h:783
LAYER_3D_ID
3D Viewer virtual layers for color settings
Definition: layer_ids.h:499
@ LAYER_3D_SOLDERMASK_TOP
Definition: layer_ids.h:510
@ LAYER_3D_BOUNDING_BOXES
Definition: layer_ids.h:523
@ LAYER_3D_START
Definition: layer_ids.h:500
@ LAYER_3D_ADHESIVE
Definition: layer_ids.h:512
@ LAYER_3D_SMD_MODELS
Definition: layer_ids.h:518
@ LAYER_3D_BACKGROUND_TOP
Definition: layer_ids.h:503
@ LAYER_3D_USER_COMMENTS
Definition: layer_ids.h:513
@ LAYER_3D_SOLDERMASK_BOTTOM
Definition: layer_ids.h:509
@ LAYER_3D_BOARD
Definition: layer_ids.h:504
@ LAYER_3D_USER_ECO1
Definition: layer_ids.h:515
@ LAYER_3D_USER_ECO2
Definition: layer_ids.h:516
@ LAYER_3D_TH_MODELS
Definition: layer_ids.h:517
@ LAYER_3D_AXES
Definition: layer_ids.h:522
@ LAYER_3D_SILKSCREEN_TOP
Definition: layer_ids.h:508
@ LAYER_3D_VIRTUAL_MODELS
Definition: layer_ids.h:519
@ LAYER_3D_MODELS_MARKED_DNP
Definition: layer_ids.h:521
@ LAYER_3D_COPPER_TOP
Definition: layer_ids.h:505
@ LAYER_3D_SOLDERPASTE
Definition: layer_ids.h:511
@ LAYER_3D_OFF_BOARD_SILK
Definition: layer_ids.h:524
@ LAYER_3D_MODELS_NOT_IN_POS
Definition: layer_ids.h:520
@ LAYER_3D_USER_DRAWINGS
Definition: layer_ids.h:514
@ LAYER_3D_COPPER_BOTTOM
Definition: layer_ids.h:506
@ LAYER_3D_BACKGROUND_BOTTOM
Definition: layer_ids.h:502
@ LAYER_3D_SILKSCREEN_BOTTOM
Definition: layer_ids.h:507
@ LAYER_3D_END
Definition: layer_ids.h:526
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
Definition: layer_ids.h:662
bool IsCopperLayerLowerThan(PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB)
Return true if copper aLayerA is placed lower than aLayerB, false otherwise.
Definition: layer_ids.h:726
constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START
Definition: layer_ids.h:138
KICOMMON_API PCB_LAYER_ID BoardLayerFromLegacyId(int aLegacyId)
Retrieve a layer ID from an integer converted from a legacy (pre-V9) enum value.
Definition: layer_id.cpp:256
#define NETNAMES_LAYER_INDEX(layer)
Macro for obtaining netname layer for a given PCB layer.
Definition: layer_ids.h:172
GAL_LAYER_ID ToGalLayer(int aInteger)
Definition: layer_ids.h:334
constexpr int GAL_LAYER_ID_COUNT
Definition: layer_ids.h:326
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
Definition: layer_ids.h:682
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:147
@ DEFAULT
Flashing follows connectivity.
@ NEVER_FLASHED
Never flashed for connectivity.
@ ALWAYS_FLASHED
Always flashed for connectivity.
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:801
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:705
#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:210
bool IsNonCopperLayer(int aLayerId)
Test whether a layer is a non copper layer.
Definition: layer_ids.h:614
int GetNetnameLayer(int aLayer)
Return a netname layer corresponding to the given layer.
Definition: layer_ids.h:756
KICOMMON_API wxString LayerName(int aLayer)
Return the string equivalent of a given layer.
Definition: layer_id.cpp:31
bool IsClearanceLayer(int aLayer)
Definition: layer_ids.h:795
#define GAL_UI_LAYER_COUNT
Definition: layer_ids.h:174
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
Definition: layer_ids.h:581
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:191
@ LAYER_GRID
Definition: layer_ids.h:216
@ 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:286
@ LAYER_LOCKED_ITEM_SHADOW
Shadow layer for locked items.
Definition: layer_ids.h:269
@ LAYER_PAD_COPPER_START
Virtual layers for pad copper on a given copper layer.
Definition: layer_ids.h:294
@ LAYER_VIA_HOLEWALLS
Definition: layer_ids.h:260
@ LAYER_CLEARANCE_END
Definition: layer_ids.h:303
@ LAYER_GRID_AXES
Definition: layer_ids.h:217
@ LAYER_DRAWINGSHEET_PAGEn
Sheet Editor previewing pages after first page.
Definition: layer_ids.h:284
@ LAYER_CONFLICTS_SHADOW
Shadow layer for items flagged conflicting.
Definition: layer_ids.h:272
@ LAYER_FOOTPRINTS_FR
Show footprints on front.
Definition: layer_ids.h:221
@ LAYER_DRC_SHAPE1
Custom shape for DRC marker.
Definition: layer_ids.h:277
@ LAYER_ZONE_END
Definition: layer_ids.h:291
@ LAYER_NON_PLATEDHOLES
Draw usual through hole vias.
Definition: layer_ids.h:201
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
Definition: layer_ids.h:240
@ LAYER_DRAW_BITMAPS
Draw images.
Definition: layer_ids.h:246
@ LAYER_FP_REFERENCES
Show footprints references (when texts are visible).
Definition: layer_ids.h:228
@ LAYER_DRC_EXCLUSION
Layer for DRC markers which have been individually excluded.
Definition: layer_ids.h:266
@ LAYER_PCB_BACKGROUND
PCB background color.
Definition: layer_ids.h:243
@ LAYER_ZONES
Control for copper zone opacity/visibility (color ignored).
Definition: layer_ids.h:257
@ LAYER_SHAPES
Copper graphic shape opacity/visibility (color ignored).
Definition: layer_ids.h:275
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored).
Definition: layer_ids.h:254
@ LAYER_DRC_WARNING
Layer for DRC markers with #SEVERITY_WARNING.
Definition: layer_ids.h:263
@ LAYER_UI_START
Definition: layer_ids.h:310
@ LAYER_PAD_PLATEDHOLES
to draw pad holes (plated)
Definition: layer_ids.h:233
@ GAL_LAYER_ID_END
Definition: layer_ids.h:313
@ LAYER_GP_OVERLAY
General purpose overlay.
Definition: layer_ids.h:241
@ 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:249
@ LAYER_VIA_COPPER_START
Virtual layers for via copper on a given copper layer.
Definition: layer_ids.h:298
@ LAYER_TRACKS
Definition: layer_ids.h:229
@ LAYER_CURSOR
PCB cursor.
Definition: layer_ids.h:244
@ LAYER_AUX_ITEMS
Auxiliary items (guides, rule, etc).
Definition: layer_ids.h:245
@ LAYER_RATSNEST
Definition: layer_ids.h:215
@ LAYER_CLEARANCE_START
Virtual layers for pad/via/track clearance outlines for a given copper layer.
Definition: layer_ids.h:302
@ LAYER_DRC_SHAPE2
Custom shape for DRC marker.
Definition: layer_ids.h:278
@ LAYER_PAD_COPPER_END
Definition: layer_ids.h:295
@ LAYER_ZONE_START
Virtual layers for stacking zones and tracks on a given copper layer.
Definition: layer_ids.h:290
@ LAYER_FP_TEXT
Definition: layer_ids.h:202
@ LAYER_FOOTPRINTS_BK
Show footprints on back.
Definition: layer_ids.h:222
@ LAYER_UI_END
Definition: layer_ids.h:311
@ LAYER_ANCHOR
Anchor of items having an anchor point (texts, footprints).
Definition: layer_ids.h:210
@ LAYER_DRAWINGSHEET_PAGE1
Sheet Editor previewing first page.
Definition: layer_ids.h:283
@ LAYER_VIA_COPPER_END
Definition: layer_ids.h:299
@ LAYER_MARKER_SHADOWS
Shadows for DRC markers.
Definition: layer_ids.h:267
@ LAYER_VIA_HOLES
Draw via holes (pad holes do not use this layer).
Definition: layer_ids.h:236
@ LAYER_FP_VALUES
Show footprints values (when texts are visible).
Definition: layer_ids.h:225
@ LAYER_VIA_MICROVIA
Definition: layer_ids.h:196
@ LAYER_SELECT_OVERLAY
Selected items overlay.
Definition: layer_ids.h:242
@ LAYER_VIA_THROUGH
Draw blind/buried vias.
Definition: layer_ids.h:198
@ LAYER_BITMAP_END
Definition: layer_ids.h:307
@ LAYER_BITMAP_START
Virtual layers for background images per board layer.
Definition: layer_ids.h:306
@ LAYER_DRC_ERROR
Layer for DRC markers with #SEVERITY_ERROR.
Definition: layer_ids.h:239
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:195
@ LAYER_VIA_BBLIND
Draw micro vias.
Definition: layer_ids.h:197
@ LAYER_PAD_HOLEWALLS
Definition: layer_ids.h:259
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:401
@ LAYER_DANGLING
Definition: layer_ids.h:429
@ LAYER_SHAPES_BACKGROUND
Definition: layer_ids.h:435
@ LAYER_SHEETNAME
Definition: layer_ids.h:424
@ LAYER_ERC_WARN
Definition: layer_ids.h:431
@ LAYER_SCHEMATIC_ANCHOR
Definition: layer_ids.h:451
@ LAYER_SHEETLABEL
Definition: layer_ids.h:427
@ LAYER_PINNUM
Definition: layer_ids.h:410
@ LAYER_RULE_AREAS
Definition: layer_ids.h:417
@ LAYER_DEVICE
Definition: layer_ids.h:418
@ LAYER_SHEET_BACKGROUND
Definition: layer_ids.h:437
@ LAYER_EXCLUDED_FROM_SIM
Definition: layer_ids.h:434
@ LAYER_BRIGHTENED
Definition: layer_ids.h:443
@ LAYER_ERC_EXCLUSION
Definition: layer_ids.h:433
@ LAYER_HIDDEN
Definition: layer_ids.h:444
@ LAYER_HIERLABEL
Definition: layer_ids.h:409
@ LAYER_PINNAM
Definition: layer_ids.h:411
@ LAYER_PRIVATE_NOTES
Definition: layer_ids.h:420
@ LAYER_HOVERED
Definition: layer_ids.h:442
@ LAYER_GLOBLABEL
Definition: layer_ids.h:408
@ LAYER_WIRE
Definition: layer_ids.h:404
@ LAYER_NOTES
Definition: layer_ids.h:419
@ LAYER_NET_COLOR_HIGHLIGHT
Definition: layer_ids.h:445
@ LAYER_ERC_ERR
Definition: layer_ids.h:432
@ LAYER_PIN
Definition: layer_ids.h:422
@ LAYER_VALUEPART
Definition: layer_ids.h:413
@ LAYER_BUS
Definition: layer_ids.h:405
@ LAYER_SCHEMATIC_CURSOR
Definition: layer_ids.h:441
@ SCH_LAYER_ID_END
Definition: layer_ids.h:455
@ LAYER_FIELDS
Definition: layer_ids.h:414
@ LAYER_DEVICE_BACKGROUND
Definition: layer_ids.h:436
@ SCH_LAYER_ID_START
Definition: layer_ids.h:402
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition: layer_ids.h:447
@ LAYER_LOCLABEL
Definition: layer_ids.h:407
@ LAYER_JUNCTION
Definition: layer_ids.h:406
@ LAYER_SHEETFIELDS
Definition: layer_ids.h:426
@ LAYER_SCHEMATIC_GRID_AXES
Definition: layer_ids.h:439
@ LAYER_REFERENCEPART
Definition: layer_ids.h:412
@ LAYER_NETCLASS_REFS
Definition: layer_ids.h:416
@ LAYER_NOTES_BACKGROUND
Definition: layer_ids.h:421
@ LAYER_OP_CURRENTS
Definition: layer_ids.h:453
@ LAYER_SCHEMATIC_PAGE_LIMITS
Definition: layer_ids.h:448
@ LAYER_SHEET
Definition: layer_ids.h:423
@ LAYER_SELECTION_SHADOWS
Definition: layer_ids.h:446
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:440
@ LAYER_SCHEMATIC_AUX_ITEMS
Definition: layer_ids.h:450
@ LAYER_INTERSHEET_REFS
Definition: layer_ids.h:415
@ LAYER_OP_VOLTAGES
Definition: layer_ids.h:452
@ LAYER_SHEETFILENAME
Definition: layer_ids.h:425
@ LAYER_BUS_JUNCTION
Definition: layer_ids.h:449
@ LAYER_DNP_MARKER
Definition: layer_ids.h:430
@ LAYER_NOCONNECT
Definition: layer_ids.h:428
@ LAYER_SCHEMATIC_GRID
Definition: layer_ids.h:438
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:809
bool IsViaCopperLayer(int aLayer)
Definition: layer_ids.h:789
bool IsNetnameLayer(int aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:771
KICOMMON_API PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:699
bool IsHoleLayer(int aLayer)
Definition: layer_ids.h:642
bool IsViaPadLayer(int aLayer)
Definition: layer_ids.h:635
bool IsInnerCopperLayer(int aLayerId)
Test whether a layer is an inner (In1_Cu to In30_Cu) copper layer.
Definition: layer_ids.h:603
bool IsExternalCopperLayer(int aLayerId)
Test whether a layer is an external (F_Cu or B_Cu) copper layer.
Definition: layer_ids.h:592
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:559
#define GERBER_DRAWLAYERS_COUNT
Number of draw layers in Gerbview.
Definition: layer_ids.h:469
bool IsZoneFillLayer(int aLayer)
Definition: layer_ids.h:777
STL namespace.