KiCad PCB EDA Suite
layers_id_colors_and_visibility.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 <dick@softplc.com>
5  * Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
6  * Copyright (C) 2007-2020 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 
31 #ifndef LAYERS_ID_AND_VISIBILITY_H_
32 #define LAYERS_ID_AND_VISIBILITY_H_
33 
34 #include <set>
35 #include <vector>
36 #include <bitset>
37 #include <wx/string.h>
38 
39 
45 typedef int LAYER_NUM;
46 
69 enum PCB_LAYER_ID: int
70 {
73 
106  B_Cu, // 31
107 
110 
113 
116 
118  F_Mask, // 39
119 
125  Margin, // 45
126 
129 
131  F_Fab, // 49
132 
133  // User definable layers.
143 
144  Rescue, // 59
145 
146  // Four reserved layers (60 - 63) for future expansion within the 64 bit integer limit.
147 
149 };
150 
151 #define MAX_CU_LAYERS (B_Cu - F_Cu + 1)
152 
155 {
156 
158 
160 
162 
164 
169 
171 };
172 
174 #define NETNAMES_LAYER_INDEX( layer ) ( NETNAMES_LAYER_ID_START + layer )
175 
189 enum GAL_LAYER_ID: int
190 {
192 
224 
227 
228  // Layers in this section have visibility controls but were not present in legacy board files.
229 
232 
238 
239  // Add layers below this point that do not have visibility controls, so don't need explicit
240  // enum values
241 
244 
248 
250 };
251 
253 #define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
254 
256 #define ZONE_LAYER_FOR( copperLayer ) ( LAYER_ZONE_START + copperLayer )
257 
259 
261 {
262  a = GAL_LAYER_ID( int( a ) + 1 );
263  return a;
264 }
265 
266 inline GAL_LAYER_ID ToGalLayer( int aInteger )
267 {
268  wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
269  return static_cast<GAL_LAYER_ID>( aInteger );
270 }
271 
273 inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
274 {
275  GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
276  wxASSERT( t <= GAL_LAYER_ID_END );
277  return t;
278 }
279 
280 typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
281 
283 class GAL_SET : public GAL_BASE_SET
284 {
285 private:
286  static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
287 
288 public:
290  {
291  }
292 
293  GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
294  {
295  }
296 
297  GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
298 
300  {
301  GAL_BASE_SET::set();
302  return *this;
303  }
304 
305  GAL_SET& set( int aPos, bool aVal = true )
306  {
307  GAL_BASE_SET::set( aPos, aVal );
308  return *this;
309  }
310 
311  GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
312  {
313  GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
314  return *this;
315  }
316 
317  bool Contains( GAL_LAYER_ID aPos )
318  {
319  return test( static_cast<std::size_t>( aPos ) - start );
320  }
321 
322  std::vector<GAL_LAYER_ID> Seq() const;
323 
324  static GAL_SET DefaultVisible();
325 };
326 
328 enum SCH_LAYER_ID: int
329 {
331 
366 
368 };
369 
370 #define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
371 
372 #define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
373 
375 {
376  a = SCH_LAYER_ID( int( a ) + 1 );
377  return a;
378 }
379 
380 // number of draw layers in Gerbview
381 #define GERBER_DRAWLAYERS_COUNT PCB_LAYER_ID_COUNT
382 
385 {
387 
390 
397 
399 };
400 
401 #define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
402 
403 #define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
404 
405 #define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
406 
407 
409 enum LAYER_3D_ID : int
410 {
412 
422 
424 };
425 
427 #define LAYER_ID_COUNT LAYER_3D_END
428 
429 
434 wxString LayerName( int aLayer );
435 
436 
437 // Some elements do not have yet a visibility control
438 // from a dialog, but have a visibility control flag.
439 // Here is a mask to set them visible, to be sure they are displayed
440 // after loading a board for instance
441 #define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
442  ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
443  ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
444  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
445  ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
446 
447 
449 typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
450 
451 
468 class LSEQ : public BASE_SEQ
469 {
470  unsigned m_index;
471 
472 public:
473 
474  LSEQ() :
475  m_index( 0 )
476  {}
477 
478  template <class InputIterator>
479  LSEQ( InputIterator aStart, InputIterator aEnd ) :
480  BASE_SEQ( aStart, aEnd ), m_index( 0 )
481  {}
482 
483  void Rewind() { m_index = 0; }
484 
485  void operator ++ () { ++m_index; } // returns nothing, used in simple statements only.
486 
487  void operator ++ (int) { ++m_index; }
488 
489  operator bool () { return m_index < size(); }
490 
492  {
493  return at( m_index ); // throws std::out_of_range
494  }
495 };
496 
497 
498 typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
499 
500 
507 class LSET : public BASE_SET
508 {
509 public:
510 
511  // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling.
512  // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
513  // LSET s = 0; needs to be removed from the code, this accomplishes that.
514  // Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
515  // to prevent that surprise. Therefore LSET's constructor suite is significantly
516  // different than the base class from which it is derived.
517 
518  // Other member functions (non-constructor functions) are identical to the base
519  // class's and therefore are re-used from the base class.
520 
524  LSET() :
525  BASE_SET() // all bits are set to zero in BASE_SET()
526  {
527  }
528 
529  LSET( const BASE_SET& aOther ) :
530  BASE_SET( aOther )
531  {
532  }
533 
548  LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
549  BASE_SET()
550  {
551  set( aLayer );
552  }
553 
557  LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
558 
570  LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
571 
578  bool Contains( PCB_LAYER_ID aLayer )
579  {
580  return test( aLayer );
581  }
582 
586  static const wxChar* Name( PCB_LAYER_ID aLayerId );
587 
592  static LSET InternalCuMask();
593 
597  static LSET FrontAssembly();
598 
602  static LSET BackAssembly();
603 
607  static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
608 
612  static LSET ExternalCuMask();
613 
617  static LSET AllNonCuMask();
618 
619  static LSET AllLayersMask();
620 
624  static LSET FrontTechMask();
625 
630  static LSET FrontBoardTechMask();
631 
635  static LSET BackTechMask();
636 
641  static LSET BackBoardTechMask();
642 
646  static LSET AllTechMask();
647 
651  static LSET AllBoardTechMask();
652 
656  static LSET FrontMask();
657 
661  static LSET BackMask();
662 
663  static LSET UserMask();
664 
669  static LSET PhysicalLayersMask();
670 
674  static LSET UserDefinedLayers();
675 
682 
688  LSEQ CuStack() const;
689 
695  LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
696 
698  LSEQ Users() const;
699 
701  LSEQ TechAndUserUIOrder() const;
702 
703  LSEQ UIOrder() const;
704 
712  LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
713 
720  LSEQ Seq() const;
721 
726  LSEQ SeqStackupBottom2Top() const;
727 
731  std::string FmtHex() const;
732 
740  int ParseHex( const char* aStart, int aCount );
741 
745  std::string FmtBin() const;
746 
751  PCB_LAYER_ID ExtractLayer() const;
752 
753 private:
754 
756  LSET( unsigned long __val )
757  {
758  // not usable, it's private.
759  }
760 };
761 
762 
770 inline bool IsValidLayer( LAYER_NUM aLayerId )
771 {
772  return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
773 }
774 
781 inline bool IsPcbLayer( LAYER_NUM aLayer )
782 {
783  return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
784 }
785 
792 inline bool IsCopperLayer( LAYER_NUM aLayerId )
793 {
794  return aLayerId >= F_Cu && aLayerId <= B_Cu;
795 }
796 
803 inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
804 {
805  return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
806 }
807 
816 inline bool IsCopperLayer( LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers )
817 {
818  if( aIncludeSyntheticCopperLayers )
819  return !IsNonCopperLayer( aLayerId );
820  else
821  return IsCopperLayer( aLayerId );
822 }
823 
824 inline bool IsViaPadLayer( LAYER_NUM aLayer )
825 {
826  return aLayer == LAYER_VIA_THROUGH
827  || aLayer == LAYER_VIA_MICROVIA
828  || aLayer == LAYER_VIA_BBLIND;
829 }
830 
831 inline bool IsHoleLayer( LAYER_NUM aLayer )
832 {
833  return aLayer == LAYER_VIA_HOLES
834  || aLayer == LAYER_VIA_HOLEWALLS
835  || aLayer == LAYER_PAD_PLATEDHOLES
836  || aLayer == LAYER_PAD_HOLEWALLS
837  || aLayer == LAYER_NON_PLATEDHOLES;
838 }
839 
846 inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
847 {
848  return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
849 }
850 
851 /*
852  @todo Where does this comment actually belong?
853 
854  IMPORTANT: If a layer is not a front layer not necessarily is true
855  the converse. The same hold for a back layer.
856  So a layer can be:
857  - Front
858  - Back
859  - Neither (internal or auxiliary)
860 
861  The check most frequent is for back layers, since it involves flips
862 */
863 
864 
868 inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
869 {
870  switch( aLayerId )
871  {
872  case F_Cu:
873  case F_Adhes:
874  case F_Paste:
875  case F_SilkS:
876  case F_Mask:
877  case F_CrtYd:
878  case F_Fab:
879  return true;
880  default:
881  ;
882  }
883 
884  return false;
885 }
886 
887 
891 inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
892 {
893  switch( aLayerId )
894  {
895  case B_Cu:
896  case B_Adhes:
897  case B_Paste:
898  case B_SilkS:
899  case B_Mask:
900  case B_CrtYd:
901  case B_Fab:
902  return true;
903  default:
904  ;
905  }
906 
907  return false;
908 }
909 
910 
920 PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
921 
931 LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
932 
933 
937 inline int GetNetnameLayer( int aLayer )
938 {
939  if( IsCopperLayer( aLayer ) )
940  return NETNAMES_LAYER_INDEX( aLayer );
941  else if( aLayer == LAYER_PADS_TH )
942  return LAYER_PAD_NETNAMES;
943  else if( aLayer == LAYER_PAD_FR )
944  return LAYER_PAD_FR_NETNAMES;
945  else if( aLayer == LAYER_PAD_BK )
946  return LAYER_PAD_BK_NETNAMES;
947  else if( IsViaPadLayer( aLayer ) )
948  return LAYER_VIA_NETNAMES;
949 
950  // Fallback
951  return Cmts_User;
952 }
953 
960 inline bool IsNetnameLayer( LAYER_NUM aLayer )
961 {
962  return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) &&
963  aLayer < NETNAMES_LAYER_ID_END;
964 }
965 
966 
967 inline bool IsZoneLayer( LAYER_NUM aLayer )
968 {
969  return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
970 }
971 
972 
973 inline bool IsDCodeLayer( int aLayer )
974 {
975  return aLayer >= (GERBVIEW_LAYER_ID_START + GERBER_DRAWLAYERS_COUNT) &&
977 }
978 
979 
986 inline bool IsNetCopperLayer( LAYER_NUM aLayer )
987 {
988  static std::set<LAYER_NUM> netCopperLayers =
989  {
990  LAYER_PAD_FR,
991  LAYER_PAD_BK,
998  };
999 
1000  return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
1001 }
1002 
1003 
1004 PCB_LAYER_ID ToLAYER_ID( int aLayer );
1005 
1006 #endif // LAYERS_ID_AND_VISIBILITY_H_
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
static LSET UserDefinedLayers()
Return a mask with all of the allowable user defined layers.
Definition: lset.cpp:856
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:750
static LSET FrontBoardTechMask()
Return a mask holding technical layers used in a board fabrication (no CU layer) on front side.
Definition: lset.cpp:813
bool IsViaPadLayer(LAYER_NUM aLayer)
LSET(const BASE_SET &aOther)
Virtual layers for stacking zones and tracks on a given copper layer.
for drawingsheetEditor previewing
to draw blind/buried vias
LSEQ CuStack() const
Return a sequence of copper layers in starting from the front/top and extending to the back/bottom.
Definition: lset.cpp:170
show a marker on pads with no nets
bool IsDCodeLayer(int aLayer)
multilayer pads, usually with holes
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount=0)
Definition: lset.cpp:521
static LSET ForbiddenFootprintLayers()
Layers which are not allowed within footprint definitions.
Definition: lset.cpp:888
to handle and draw images bitmaps
GAL_LAYER_ID ToGalLayer(int aInteger)
static LSET BackTechMask()
Return a mask holding all technical layers (no CU layer) on back side.
Definition: lset.cpp:794
to draw via holes (pad holes do not use this layer)
handle color for not plated holes (holes, not pads)
anchor of items having an anchor point (texts, footprints)
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Control for copper zone opacity/visibility (color ignored)
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Definition: lset.cpp:773
LAYER_3D_ID
3D Viewer virtual layers for color settings
show footprints on back
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
show footprints values (when texts are visible)
Definition: bitmap.cpp:64
static LSET FrontTechMask()
Return a mask holding all technical layers (no CU layer) on front side.
Definition: lset.cpp:806
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
bool IsNetCopperLayer(LAYER_NUM aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
This is the end of the layers used for visibility bit masks in Pcbnew.
PCB_LAYER_ID operator *() const
LSEQ SeqStackupBottom2Top() const
Return the sequence that is typical for a bottom-to-top stack-up.
Definition: lset.cpp:461
LSEQ Users() const
*_User layers.
Definition: lset.cpp:236
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
Definition: lset.cpp:820
static LSET FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
Definition: lset.cpp:874
GERBVIEW_LAYER_ID
GerbView draw layers.
bool IsNonCopperLayer(LAYER_NUM aLayerId)
Test whether a layer is a non copper layer.
LSET(PCB_LAYER_ID aLayer)
Take a PCB_LAYER_ID and sets that bit.
show footprints on front
LSEQ TechAndUserUIOrder() const
Returns the technical and user layers in the order shown in layer widget.
Definition: lset.cpp:261
GAL_SET & set(int aPos, bool aVal=true)
std::bitset< PCB_LAYER_ID_COUNT > BASE_SET
bool IsValidLayer(LAYER_NUM aLayerId)
Test whether a given integer is a valid layer index, i.e.
LSEQ Seq() const
Return a LSEQ from this LSET in ascending PCB_LAYER_ID order.
Definition: lset.cpp:445
LSET FlipLayerMask(LSET aMask, int aCopperLayersCount=0)
Calculate the mask layer when flipping a footprint.
Definition: lset.cpp:567
static LSET BackAssembly()
Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask.
Definition: lset.cpp:696
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
Auxiliary items (guides, rule, etc)
#define GERBER_DRAWLAYERS_COUNT
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
Definition: lset.cpp:82
bool IsZoneLayer(LAYER_NUM aLayer)
for drawingsheetEditor previewing
Meta control for all pads opacity/visibility (color ignored)
to draw usual through hole vias
wxString LayerName(int aLayer)
Returns the string equivalent of a given layer.
Definition: layer_id.cpp:27
Helper for storing and iterating over GAL_LAYER_IDs.
static LSET InternalCuMask()
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
Definition: lset.cpp:710
static LSET ExternalCuMask()
Return a mask holding the Front and Bottom layers.
Definition: lset.cpp:780
static GAL_SET DefaultVisible()
Definition: lset.cpp:933
constexpr int GAL_LAYER_ID_COUNT
static LSET FrontAssembly()
Return a complete set of all top assembly layers which is all F_SilkS and F_Mask.
Definition: lset.cpp:682
static LSET AllLayersMask()
Definition: lset.cpp:787
SCH_LAYER_ID
Eeschema drawing layers.
GerbView draw layers and d-code layers.
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
LSEQ Technicals(LSET aSubToOmit=LSET()) const
Return a sequence of technical layers.
Definition: lset.cpp:212
Reserved space for board layer netnames.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
int LAYER_NUM
This can be replaced with int and removed.
layer for drc markers which have been individually excluded
layer for drc markers with SEVERITY_WARNING
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:905
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
Definition: lset.cpp:849
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
smd pads, front layer
Meta control for all vias opacity/visibility.
LSET()
Create an empty (cleared) set.
std::string FmtBin() const
Return a binary string showing contents of this LSEQ.
Definition: lset.cpp:297
PCB_LAYER_ID ExtractLayer() const
Find the first set PCB_LAYER_ID.
Definition: lset.cpp:661
static LSET BackBoardTechMask()
Return a mask holding technical layers used in a board fabrication (no CU layer) on Back side.
Definition: lset.cpp:800
static constexpr int start
std::string FmtHex() const
Return a hex string showing contents of this LSEQ.
Definition: lset.cpp:321
bool IsHoleLayer(LAYER_NUM aLayer)
currently selected items overlay
static LSET BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
Definition: lset.cpp:881
std::vector< PCB_LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
static LSET AllBoardTechMask()
Return a mask holding board technical layers (no CU layer) on both side.
Definition: lset.cpp:827
std::vector< GAL_LAYER_ID > Seq() const
Definition: lset.cpp:919
GAL_SET(const GAL_SET &aOther)
LSEQ(InputIterator aStart, InputIterator aEnd)
drawingsheet frame and titleblock
bool IsPcbLayer(LAYER_NUM aLayer)
Test whether a layer is a valid layer for Pcbnew.
static LSET UserMask()
Definition: lset.cpp:834
LSET(unsigned long __val)
Take this off the market, it may not be used because of LSET( PCB_LAYER_ID ).
LSEQ UIOrder() const
Definition: lset.cpp:895
int ParseHex(const char *aStart, int aCount)
Convert the output of FmtHex() and replaces this set's values with those given in the input string.
Definition: lset.cpp:359
#define NETNAMES_LAYER_INDEX(layer)
Macro for obtaining netname layer for a given PCB layer.
show footprints references (when texts are visible)
layer for drc markers with SEVERITY_ERROR
Additional netnames layers (not associated with a PCB layer)
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
bool Contains(GAL_LAYER_ID aPos)