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-2022 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
96 B_Cu, // 31
97
100
103
106
108 F_Mask, // 39
109
115 Margin, // 45
116
119
121 F_Fab, // 49
122
123 // User definable layers.
133
134 Rescue, // 59
135
136 // Four reserved layers (60 - 63) for future expansion within the 64 bit integer limit.
137
140
141#define MAX_CU_LAYERS (B_Cu - F_Cu + 1)
142
147enum class FLASHING
148{
149 DEFAULT, // Flashing follows connectivity
150 ALWAYS_FLASHED, // Always flashed for connectivity
151 NEVER_FLASHED, // Never flashed for connectivity
152};
153
156{
157
159
161
163
165
170
173
175#define NETNAMES_LAYER_INDEX( layer ) ( NETNAMES_LAYER_ID_START + layer )
176
191{
193
200// LAYER_MOD_TEXT_BK deprecated + 6,
208// LAYER_NO_CONNECTS deprecated + 14, ///< show a marker on pads with no nets
225
228
229 // Layers in this section have visibility controls but were not present in legacy board files.
230
233
239
241
243
244 // Add layers below this point that do not have visibility controls, so don't need explicit
245 // enum values
246
249
252
256
260
263
265#define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
266
268#define BITMAP_LAYER_FOR( boardLayer ) ( LAYER_BITMAP_START + boardLayer )
269#define ZONE_LAYER_FOR( boardLayer ) ( LAYER_ZONE_START + boardLayer )
270
272
274{
275 a = GAL_LAYER_ID( int( a ) + 1 );
276 return a;
277}
278
279inline GAL_LAYER_ID ToGalLayer( int aInteger )
280{
281 wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
282 return static_cast<GAL_LAYER_ID>( aInteger );
283}
284
286inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
287{
288 GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
289 wxASSERT( t <= GAL_LAYER_ID_END );
290 return t;
291}
292
293
295typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
296
297
300{
301
302private:
303 static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
304
305public:
307 {
308 }
309
310 GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
311 {
312 }
313
314 GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
315
317 {
318 GAL_BASE_SET::set();
319 return *this;
320 }
321
322 GAL_SET& set( int aPos, bool aVal = true )
323 {
324 GAL_BASE_SET::set( aPos, aVal );
325 return *this;
326 }
327
328 GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
329 {
330 GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
331 return *this;
332 }
333
335 {
336 return test( static_cast<std::size_t>( aPos ) - start );
337 }
338
339 std::vector<GAL_LAYER_ID> Seq() const;
340
341 static GAL_SET DefaultVisible();
342};
343
346{
348
395
398
399#define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
400
401#define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
402
404{
405 a = SCH_LAYER_ID( int( a ) + 1 );
406 return a;
407}
408
409// number of draw layers in Gerbview
410#define GERBER_DRAWLAYERS_COUNT PCB_LAYER_ID_COUNT
411
414{
416
419
427
430
431#define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
432
433#define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
434
435#define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
436
437
439enum LAYER_3D_ID : int
440{
442
466
469
471#define LAYER_ID_COUNT LAYER_3D_END
472
473
478KICOMMON_API wxString LayerName( int aLayer );
479
480
481// Some elements do not have yet a visibility control
482// from a dialog, but have a visibility control flag.
483// Here is a mask to set them visible, to be sure they are displayed
484// after loading a board for instance
485#define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
486 ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
487 ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
488 ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
489 ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
490
491
493typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
494
495
513{
514 unsigned m_index;
515
516public:
517
519 m_index( 0 )
520 {}
521
522 template <class InputIterator>
523 LSEQ( InputIterator aStart, InputIterator aEnd ) :
524 BASE_SEQ( aStart, aEnd ), m_index( 0 )
525 {}
526
527 LSEQ( std::initializer_list<PCB_LAYER_ID> aLayers ) :
528 BASE_SEQ( aLayers ), m_index( 0 )
529 {}
530
531 void Rewind() { m_index = 0; }
532
533 void operator ++ () { ++m_index; } // returns nothing, used in simple statements only.
534
535 void operator ++ (int) { ++m_index; }
536
537 operator bool () { return m_index < size(); }
538
540 {
541 return at( m_index ); // throws std::out_of_range
542 }
543};
544
545
546typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
547
548
556{
557public:
558
559 // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling.
560 // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
561 // LSET s = 0; needs to be removed from the code, this accomplishes that.
562 // Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
563 // to prevent that surprise. Therefore LSET's constructor suite is significantly
564 // different than the base class from which it is derived.
565
566 // Other member functions (non-constructor functions) are identical to the base
567 // class's and therefore are re-used from the base class.
568
573 BASE_SET() // all bits are set to zero in BASE_SET()
574 {
575 }
576
577 LSET( const BASE_SET& aOther ) :
578 BASE_SET( aOther )
579 {
580 }
581
596 LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
597 BASE_SET()
598 {
599 set( aLayer );
600 }
601
605 LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
606
618 LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
619
620 LSET( const LSEQ& aSeq );
621
628 bool Contains( PCB_LAYER_ID aLayer )
629 {
630 try
631 {
632 return test( aLayer );
633 }
634 catch( std::out_of_range& )
635 {
636 return false;
637 }
638 }
639
643 static const wxChar* Name( PCB_LAYER_ID aLayerId );
644
649 static LSET InternalCuMask();
650
654 static LSET FrontAssembly();
655
659 static LSET BackAssembly();
660
664 static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
665
669 static LSET ExternalCuMask();
670
674 static LSET AllNonCuMask();
675
676 static LSET AllLayersMask();
677
681 static LSET FrontTechMask();
682
687 static LSET FrontBoardTechMask();
688
692 static LSET BackTechMask();
693
698 static LSET BackBoardTechMask();
699
703 static LSET AllTechMask();
704
708 static LSET AllBoardTechMask();
709
713 static LSET FrontMask();
714
718 static LSET BackMask();
719
720 static LSET SideSpecificMask();
721
722 static LSET UserMask();
723
728 static LSET PhysicalLayersMask();
729
733 static LSET UserDefinedLayers();
734
740 static LSET ForbiddenFootprintLayers();
741
747 LSEQ CuStack() const;
748
754 LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
755
757 LSEQ Users() const;
758
760 LSEQ TechAndUserUIOrder() const;
761
762 LSEQ UIOrder() const;
763
771 LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
772
773 LSEQ Seq( const LSEQ& aSequence ) const;
774
781 LSEQ Seq() const;
782
787 LSEQ SeqStackupBottom2Top() const;
788
792 std::string FmtHex() const;
793
801 int ParseHex( const char* aStart, int aCount );
802
806 std::string FmtBin() const;
807
812 PCB_LAYER_ID ExtractLayer() const;
813
814private:
815
817 LSET( unsigned long __val )
818 {
819 // not usable, it's private.
820 }
821};
822
823
831inline bool IsValidLayer( int aLayerId )
832{
833 return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
834}
835
842inline bool IsPcbLayer( int aLayer )
843{
844 return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
845}
846
853inline bool IsCopperLayer( int aLayerId )
854{
855 return aLayerId >= F_Cu && aLayerId <= B_Cu;
856}
857
864inline bool IsNonCopperLayer( int aLayerId )
865{
866 return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
867}
868
877inline bool IsCopperLayer( int aLayerId, bool aIncludeSyntheticCopperLayers )
878{
879 if( aIncludeSyntheticCopperLayers )
880 return !IsNonCopperLayer( aLayerId );
881 else
882 return IsCopperLayer( aLayerId );
883}
884
885inline bool IsViaPadLayer( int aLayer )
886{
887 return aLayer == LAYER_VIA_THROUGH
888 || aLayer == LAYER_VIA_MICROVIA
889 || aLayer == LAYER_VIA_BBLIND;
890}
891
892inline bool IsHoleLayer( int aLayer )
893{
894 return aLayer == LAYER_VIA_HOLES
895 || aLayer == LAYER_VIA_HOLEWALLS
896 || aLayer == LAYER_PAD_PLATEDHOLES
897 || aLayer == LAYER_PAD_HOLEWALLS
898 || aLayer == LAYER_NON_PLATEDHOLES;
899}
900
907inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
908{
909 return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
910}
911
912
913/*
914 * IMPORTANT: If a layer is not a front layer that doesn't necessarily mean it's a back layer.
915 *
916 * So a layer can be:
917 * - Front
918 * - Back
919 * - Neither (internal or auxiliary)
920 *
921 * The check most frequent is for back layers, since it involves flips.
922 */
923
927inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
928{
929 switch( aLayerId )
930 {
931 case F_Cu:
932 case F_Adhes:
933 case F_Paste:
934 case F_SilkS:
935 case F_Mask:
936 case F_CrtYd:
937 case F_Fab:
938 return true;
939 default:
940 ;
941 }
942
943 return false;
944}
945
946
950inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
951{
952 switch( aLayerId )
953 {
954 case B_Cu:
955 case B_Adhes:
956 case B_Paste:
957 case B_SilkS:
958 case B_Mask:
959 case B_CrtYd:
960 case B_Fab:
961 return true;
962 default:
963 return false;
964 }
965}
966
967
977KICOMMON_API PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
978
988KICOMMON_API LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
989
990
994inline int GetNetnameLayer( int aLayer )
995{
996 if( IsCopperLayer( aLayer ) )
997 return NETNAMES_LAYER_INDEX( aLayer );
998 else if( aLayer == LAYER_PADS_TH )
999 return LAYER_PAD_NETNAMES;
1000 else if( aLayer == LAYER_PADS_SMD_FR )
1001 return LAYER_PAD_FR_NETNAMES;
1002 else if( aLayer == LAYER_PADS_SMD_BK )
1003 return LAYER_PAD_BK_NETNAMES;
1004 else if( IsViaPadLayer( aLayer ) )
1005 return LAYER_VIA_NETNAMES;
1006
1007 // Fallback
1008 return Cmts_User;
1009}
1010
1017inline bool IsNetnameLayer( int aLayer )
1018{
1019 return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) && aLayer < NETNAMES_LAYER_ID_END;
1020}
1021
1022
1023inline bool IsZoneFillLayer( int aLayer )
1024{
1025 return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
1026}
1027
1028
1029inline bool IsDCodeLayer( int aLayer )
1030{
1032 && aLayer < ( GERBVIEW_LAYER_ID_START + ( 2 * GERBER_DRAWLAYERS_COUNT ) );
1033}
1034
1035
1042inline bool IsNetCopperLayer( int aLayer )
1043{
1044 static std::set<int> netCopperLayers =
1045 {
1054 };
1055
1056 return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
1057}
1058
1059
1061
1062#endif // LAYER_IDS_H
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:300
bool Contains(GAL_LAYER_ID aPos)
Definition: layer_ids.h:334
GAL_SET()
Definition: layer_ids.h:306
GAL_SET & set()
Definition: layer_ids.h:316
GAL_SET(const GAL_SET &aOther)
Definition: layer_ids.h:310
GAL_SET & set(int aPos, bool aVal=true)
Definition: layer_ids.h:322
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
Definition: layer_ids.h:328
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:513
LSEQ()
Definition: layer_ids.h:518
LSEQ(std::initializer_list< PCB_LAYER_ID > aLayers)
Definition: layer_ids.h:527
void Rewind()
Definition: layer_ids.h:531
unsigned m_index
Definition: layer_ids.h:514
LSEQ(InputIterator aStart, InputIterator aEnd)
Definition: layer_ids.h:523
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:556
LSET(PCB_LAYER_ID aLayer)
Take a PCB_LAYER_ID and sets that bit.
Definition: layer_ids.h:596
LSET(const BASE_SET &aOther)
Definition: layer_ids.h:577
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
Definition: layer_ids.h:628
LSET()
Create an empty (cleared) set.
Definition: layer_ids.h:572
LSET(unsigned long __val)
Take this off the market, it may not be used because of LSET( PCB_LAYER_ID ).
Definition: layer_ids.h:817
EDA_ANGLE operator*(const EDA_ANGLE &aAngleA, double aOperator)
Definition: eda_angle.h:364
#define KICOMMON_API
Definition: kicommon.h:28
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
Definition: layer_ids.h:156
@ LAYER_PAD_FR_NETNAMES
Additional netnames layers (not associated with a PCB layer)
Definition: layer_ids.h:166
@ LAYER_PAD_BK_NETNAMES
Definition: layer_ids.h:167
@ LAYER_PAD_NETNAMES
Definition: layer_ids.h:168
@ NETNAMES_LAYER_ID_START
Definition: layer_ids.h:158
@ NETNAMES_LAYER_ID_END
Definition: layer_ids.h:171
@ LAYER_VIA_NETNAMES
Definition: layer_ids.h:169
@ NETNAMES_LAYER_ID_RESERVED
Reserved space for board layer netnames.
Definition: layer_ids.h:162
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Wraps a std::bitset.
Definition: layer_ids.h:295
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
Definition: layer_ids.h:273
std::vector< PCB_LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.
Definition: layer_ids.h:493
GERBVIEW_LAYER_ID
GerbView draw layers.
Definition: layer_ids.h:414
@ GERBVIEW_LAYER_ID_RESERVED
GerbView draw layers and d-code layers.
Definition: layer_ids.h:418
@ LAYER_GERBVIEW_DRAWINGSHEET
Definition: layer_ids.h:425
@ GERBVIEW_LAYER_ID_START
Definition: layer_ids.h:415
@ LAYER_GERBVIEW_BACKGROUND
Definition: layer_ids.h:424
@ LAYER_DCODES
Definition: layer_ids.h:420
@ LAYER_NEGATIVE_OBJECTS
Definition: layer_ids.h:421
@ LAYER_GERBVIEW_PAGE_LIMITS
Definition: layer_ids.h:426
@ GERBVIEW_LAYER_ID_END
Definition: layer_ids.h:428
@ LAYER_GERBVIEW_AXES
Definition: layer_ids.h:423
@ LAYER_GERBVIEW_GRID
Definition: layer_ids.h:422
std::bitset< PCB_LAYER_ID_COUNT > BASE_SET
Definition: layer_ids.h:546
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
Definition: layer_ids.h:286
KICOMMON_API LSET FlipLayerMask(LSET aMask, int aCopperLayersCount=0)
Calculate the mask layer when flipping a footprint.
Definition: lset.cpp:599
bool IsPcbLayer(int aLayer)
Test whether a layer is a valid layer for Pcbnew.
Definition: layer_ids.h:842
LAYER_3D_ID
3D Viewer virtual layers for color settings
Definition: layer_ids.h:440
@ LAYER_3D_SOLDERMASK_TOP
Definition: layer_ids.h:451
@ LAYER_3D_BOUNDING_BOXES
Definition: layer_ids.h:464
@ LAYER_3D_START
Definition: layer_ids.h:441
@ LAYER_3D_ADHESIVE
Definition: layer_ids.h:453
@ LAYER_3D_SMD_MODELS
Definition: layer_ids.h:459
@ LAYER_3D_BACKGROUND_TOP
Definition: layer_ids.h:444
@ LAYER_3D_USER_COMMENTS
Definition: layer_ids.h:454
@ LAYER_3D_SOLDERMASK_BOTTOM
Definition: layer_ids.h:450
@ LAYER_3D_BOARD
Definition: layer_ids.h:445
@ LAYER_3D_USER_ECO1
Definition: layer_ids.h:456
@ LAYER_3D_USER_ECO2
Definition: layer_ids.h:457
@ LAYER_3D_TH_MODELS
Definition: layer_ids.h:458
@ LAYER_3D_AXES
Definition: layer_ids.h:463
@ LAYER_3D_SILKSCREEN_TOP
Definition: layer_ids.h:449
@ LAYER_3D_VIRTUAL_MODELS
Definition: layer_ids.h:460
@ LAYER_3D_MODELS_MARKED_DNP
Definition: layer_ids.h:462
@ LAYER_3D_COPPER_TOP
Definition: layer_ids.h:446
@ LAYER_3D_SOLDERPASTE
Definition: layer_ids.h:452
@ LAYER_3D_OFF_BOARD_SILK
Definition: layer_ids.h:465
@ LAYER_3D_MODELS_NOT_IN_POS
Definition: layer_ids.h:461
@ LAYER_3D_USER_DRAWINGS
Definition: layer_ids.h:455
@ LAYER_3D_COPPER_BOTTOM
Definition: layer_ids.h:447
@ LAYER_3D_BACKGROUND_BOTTOM
Definition: layer_ids.h:443
@ LAYER_3D_SILKSCREEN_BOTTOM
Definition: layer_ids.h:448
@ LAYER_3D_END
Definition: layer_ids.h:467
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
Definition: layer_ids.h:907
#define NETNAMES_LAYER_INDEX(layer)
Macro for obtaining netname layer for a given PCB layer.
Definition: layer_ids.h:175
GAL_LAYER_ID ToGalLayer(int aInteger)
Definition: layer_ids.h:279
bool IsNetCopperLayer(int aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
Definition: layer_ids.h:1042
constexpr int GAL_LAYER_ID_COUNT
Definition: layer_ids.h:271
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
Definition: layer_ids.h:927
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:148
@ ALWAYS_FLASHED
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:1029
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:950
#define MAX_CU_LAYERS
Definition: layer_ids.h:141
KICOMMON_API PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount=0)
Definition: lset.cpp:553
bool IsNonCopperLayer(int aLayerId)
Test whether a layer is a non copper layer.
Definition: layer_ids.h:864
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:994
KICOMMON_API wxString LayerName(int aLayer)
Returns the string equivalent of a given layer.
Definition: layer_id.cpp:30
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:853
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:250
@ 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:248
@ 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_ZONE_END
Definition: layer_ids.h:255
@ 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_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_PAD_PLATEDHOLES
to draw pad holes (plated)
Definition: layer_ids.h:215
@ GAL_LAYER_ID_END
Definition: layer_ids.h:261
@ 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_HIDDEN_TEXT
text marked as invisible
Definition: layer_ids.h:201
@ 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_ZONE_START
Virtual layers for stacking zones and tracks on a given copper layer.
Definition: layer_ids.h:254
@ LAYER_FP_TEXT
Definition: layer_ids.h:199
@ LAYER_FOOTPRINTS_BK
show footprints on back
Definition: layer_ids.h:210
@ 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:247
@ LAYER_PADS_SMD_BK
smd pads, back layer
Definition: layer_ids.h:204
@ LAYER_PADS_TH
multilayer pads, usually with holes
Definition: layer_ids.h:214
@ LAYER_PADS_SMD_FR
smd pads, front layer
Definition: layer_ids.h:203
@ 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:259
@ LAYER_BITMAP_START
Virtual layers for background images per board layer.
Definition: layer_ids.h:258
@ 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:346
@ LAYER_DANGLING
Definition: layer_ids.h:373
@ LAYER_SHEETNAME
Definition: layer_ids.h:368
@ LAYER_ERC_WARN
Definition: layer_ids.h:375
@ LAYER_SCHEMATIC_ANCHOR
Definition: layer_ids.h:392
@ LAYER_SHEETLABEL
Definition: layer_ids.h:371
@ LAYER_PINNUM
Definition: layer_ids.h:355
@ LAYER_DEVICE
Definition: layer_ids.h:362
@ LAYER_SHEET_BACKGROUND
Definition: layer_ids.h:379
@ LAYER_BRIGHTENED
Definition: layer_ids.h:385
@ LAYER_ERC_EXCLUSION
Definition: layer_ids.h:377
@ LAYER_HIDDEN
Definition: layer_ids.h:386
@ LAYER_HIERLABEL
Definition: layer_ids.h:354
@ LAYER_PINNAM
Definition: layer_ids.h:356
@ LAYER_PRIVATE_NOTES
Definition: layer_ids.h:364
@ LAYER_HOVERED
Definition: layer_ids.h:384
@ LAYER_GLOBLABEL
Definition: layer_ids.h:353
@ LAYER_WIRE
Definition: layer_ids.h:349
@ LAYER_NOTES
Definition: layer_ids.h:363
@ LAYER_ERC_ERR
Definition: layer_ids.h:376
@ LAYER_PIN
Definition: layer_ids.h:366
@ LAYER_VALUEPART
Definition: layer_ids.h:358
@ LAYER_BUS
Definition: layer_ids.h:350
@ LAYER_SCHEMATIC_CURSOR
Definition: layer_ids.h:383
@ SCH_LAYER_ID_END
Definition: layer_ids.h:396
@ LAYER_FIELDS
Definition: layer_ids.h:359
@ LAYER_DEVICE_BACKGROUND
Definition: layer_ids.h:378
@ SCH_LAYER_ID_START
Definition: layer_ids.h:347
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition: layer_ids.h:388
@ LAYER_LOCLABEL
Definition: layer_ids.h:352
@ LAYER_JUNCTION
Definition: layer_ids.h:351
@ LAYER_SHEETFIELDS
Definition: layer_ids.h:370
@ LAYER_SCHEMATIC_GRID_AXES
Definition: layer_ids.h:381
@ LAYER_REFERENCEPART
Definition: layer_ids.h:357
@ LAYER_NETCLASS_REFS
Definition: layer_ids.h:361
@ LAYER_NOTES_BACKGROUND
Definition: layer_ids.h:365
@ LAYER_OP_CURRENTS
Definition: layer_ids.h:394
@ LAYER_SCHEMATIC_PAGE_LIMITS
Definition: layer_ids.h:389
@ LAYER_SHEET
Definition: layer_ids.h:367
@ LAYER_SELECTION_SHADOWS
Definition: layer_ids.h:387
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:382
@ LAYER_SCHEMATIC_AUX_ITEMS
Definition: layer_ids.h:391
@ LAYER_INTERSHEET_REFS
Definition: layer_ids.h:360
@ LAYER_OP_VOLTAGES
Definition: layer_ids.h:393
@ LAYER_SHEETFILENAME
Definition: layer_ids.h:369
@ LAYER_BUS_JUNCTION
Definition: layer_ids.h:390
@ LAYER_DNP_MARKER
Definition: layer_ids.h:374
@ LAYER_NOCONNECT
Definition: layer_ids.h:372
@ LAYER_SCHEMATIC_GRID
Definition: layer_ids.h:380
bool IsNetnameLayer(int aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:1017
KICOMMON_API PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:941
bool IsHoleLayer(int aLayer)
Definition: layer_ids.h:892
bool IsViaPadLayer(int aLayer)
Definition: layer_ids.h:885
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ In22_Cu
Definition: layer_ids.h:87
@ PCBNEW_LAYER_ID_START
Definition: layer_ids.h:64
@ 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:118
@ In17_Cu
Definition: layer_ids.h:82
@ B_Adhes
Definition: layer_ids.h:98
@ Edge_Cuts
Definition: layer_ids.h:114
@ Dwgs_User
Definition: layer_ids.h:110
@ F_Paste
Definition: layer_ids.h:102
@ In9_Cu
Definition: layer_ids.h:74
@ Cmts_User
Definition: layer_ids.h:111
@ 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:99
@ B_Mask
Definition: layer_ids.h:107
@ B_Cu
Definition: layer_ids.h:96
@ User_5
Definition: layer_ids.h:128
@ Eco1_User
Definition: layer_ids.h:112
@ F_Mask
Definition: layer_ids.h:108
@ In21_Cu
Definition: layer_ids.h:86
@ In23_Cu
Definition: layer_ids.h:88
@ B_Paste
Definition: layer_ids.h:101
@ 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:121
@ In10_Cu
Definition: layer_ids.h:75
@ Margin
Definition: layer_ids.h:115
@ F_SilkS
Definition: layer_ids.h:105
@ In4_Cu
Definition: layer_ids.h:69
@ B_CrtYd
Definition: layer_ids.h:117
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
@ Eco2_User
Definition: layer_ids.h:113
@ 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:134
@ User_3
Definition: layer_ids.h:126
@ User_1
Definition: layer_ids.h:124
@ B_SilkS
Definition: layer_ids.h:104
@ 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:138
@ 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:65
@ In18_Cu
Definition: layer_ids.h:83
@ In25_Cu
Definition: layer_ids.h:90
@ B_Fab
Definition: layer_ids.h:120
bool IsValidLayer(int aLayerId)
Test whether a given integer is a valid layer index, i.e.
Definition: layer_ids.h:831
#define GERBER_DRAWLAYERS_COUNT
Definition: layer_ids.h:410
bool IsZoneFillLayer(int aLayer)
Definition: layer_ids.h:1023
STL namespace.
SIM_PLOT_COLORS::COLOR_SET & operator++(SIM_PLOT_COLORS::COLOR_SET &x)