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 
421 
423 };
424 
426 #define LAYER_ID_COUNT LAYER_3D_END
427 
428 
433 wxString LayerName( int aLayer );
434 
435 
436 // Some elements do not have yet a visibility control
437 // from a dialog, but have a visibility control flag.
438 // Here is a mask to set them visible, to be sure they are displayed
439 // after loading a board for instance
440 #define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
441  ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
442  ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
443  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
444  ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
445 
446 
448 typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
449 
450 
467 class LSEQ : public BASE_SEQ
468 {
469  unsigned m_index;
470 
471 public:
472 
473  LSEQ() :
474  m_index( 0 )
475  {}
476 
477  template <class InputIterator>
478  LSEQ( InputIterator aStart, InputIterator aEnd ) :
479  BASE_SEQ( aStart, aEnd ), m_index( 0 )
480  {}
481 
482  void Rewind() { m_index = 0; }
483 
484  void operator ++ () { ++m_index; } // returns nothing, used in simple statements only.
485 
486  void operator ++ (int) { ++m_index; }
487 
488  operator bool () { return m_index < size(); }
489 
491  {
492  return at( m_index ); // throws std::out_of_range
493  }
494 };
495 
496 
497 typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
498 
499 
506 class LSET : public BASE_SET
507 {
508 public:
509 
510  // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling.
511  // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
512  // LSET s = 0; needs to be removed from the code, this accomplishes that.
513  // Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
514  // to prevent that surprise. Therefore LSET's constructor suite is significantly
515  // different than the base class from which it is derived.
516 
517  // Other member functions (non-constructor functions) are identical to the base
518  // class's and therefore are re-used from the base class.
519 
523  LSET() :
524  BASE_SET() // all bits are set to zero in BASE_SET()
525  {
526  }
527 
528  LSET( const BASE_SET& aOther ) :
529  BASE_SET( aOther )
530  {
531  }
532 
547  LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
548  BASE_SET()
549  {
550  set( aLayer );
551  }
552 
556  LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
557 
569  LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
570 
577  bool Contains( PCB_LAYER_ID aLayer )
578  {
579  return test( aLayer );
580  }
581 
585  static const wxChar* Name( PCB_LAYER_ID aLayerId );
586 
591  static LSET InternalCuMask();
592 
596  static LSET FrontAssembly();
597 
601  static LSET BackAssembly();
602 
606  static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
607 
611  static LSET ExternalCuMask();
612 
616  static LSET AllNonCuMask();
617 
618  static LSET AllLayersMask();
619 
623  static LSET FrontTechMask();
624 
629  static LSET FrontBoardTechMask();
630 
634  static LSET BackTechMask();
635 
640  static LSET BackBoardTechMask();
641 
645  static LSET AllTechMask();
646 
650  static LSET AllBoardTechMask();
651 
655  static LSET FrontMask();
656 
660  static LSET BackMask();
661 
662  static LSET UserMask();
663 
668  static LSET PhysicalLayersMask();
669 
673  static LSET UserDefinedLayers();
674 
681 
687  LSEQ CuStack() const;
688 
694  LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
695 
697  LSEQ Users() const;
698 
700  LSEQ TechAndUserUIOrder() const;
701 
702  LSEQ UIOrder() const;
703 
711  LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
712 
719  LSEQ Seq() const;
720 
725  LSEQ SeqStackupBottom2Top() const;
726 
730  std::string FmtHex() const;
731 
739  int ParseHex( const char* aStart, int aCount );
740 
744  std::string FmtBin() const;
745 
750  PCB_LAYER_ID ExtractLayer() const;
751 
752 private:
753 
755  LSET( unsigned long __val )
756  {
757  // not usable, it's private.
758  }
759 };
760 
761 
769 inline bool IsValidLayer( LAYER_NUM aLayerId )
770 {
771  return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
772 }
773 
780 inline bool IsPcbLayer( LAYER_NUM aLayer )
781 {
782  return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
783 }
784 
791 inline bool IsCopperLayer( LAYER_NUM aLayerId )
792 {
793  return aLayerId >= F_Cu && aLayerId <= B_Cu;
794 }
795 
802 inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
803 {
804  return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
805 }
806 
815 inline bool IsCopperLayer( LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers )
816 {
817  if( aIncludeSyntheticCopperLayers )
818  return !IsNonCopperLayer( aLayerId );
819  else
820  return IsCopperLayer( aLayerId );
821 }
822 
823 inline bool IsViaPadLayer( LAYER_NUM aLayer )
824 {
825  return aLayer == LAYER_VIA_THROUGH
826  || aLayer == LAYER_VIA_MICROVIA
827  || aLayer == LAYER_VIA_BBLIND;
828 }
829 
830 inline bool IsHoleLayer( LAYER_NUM aLayer )
831 {
832  return aLayer == LAYER_VIA_HOLES
833  || aLayer == LAYER_VIA_HOLEWALLS
834  || aLayer == LAYER_PAD_PLATEDHOLES
835  || aLayer == LAYER_PAD_HOLEWALLS
836  || aLayer == LAYER_NON_PLATEDHOLES;
837 }
838 
845 inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
846 {
847  return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
848 }
849 
850 /*
851  @todo Where does this comment actually belong?
852 
853  IMPORTANT: If a layer is not a front layer not necessarily is true
854  the converse. The same hold for a back layer.
855  So a layer can be:
856  - Front
857  - Back
858  - Neither (internal or auxiliary)
859 
860  The check most frequent is for back layers, since it involves flips
861 */
862 
863 
867 inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
868 {
869  switch( aLayerId )
870  {
871  case F_Cu:
872  case F_Adhes:
873  case F_Paste:
874  case F_SilkS:
875  case F_Mask:
876  case F_CrtYd:
877  case F_Fab:
878  return true;
879  default:
880  ;
881  }
882 
883  return false;
884 }
885 
886 
890 inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
891 {
892  switch( aLayerId )
893  {
894  case B_Cu:
895  case B_Adhes:
896  case B_Paste:
897  case B_SilkS:
898  case B_Mask:
899  case B_CrtYd:
900  case B_Fab:
901  return true;
902  default:
903  ;
904  }
905 
906  return false;
907 }
908 
909 
919 PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
920 
930 LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
931 
932 
936 inline int GetNetnameLayer( int aLayer )
937 {
938  if( IsCopperLayer( aLayer ) )
939  return NETNAMES_LAYER_INDEX( aLayer );
940  else if( aLayer == LAYER_PADS_TH )
941  return LAYER_PAD_NETNAMES;
942  else if( aLayer == LAYER_PAD_FR )
943  return LAYER_PAD_FR_NETNAMES;
944  else if( aLayer == LAYER_PAD_BK )
945  return LAYER_PAD_BK_NETNAMES;
946  else if( IsViaPadLayer( aLayer ) )
947  return LAYER_VIA_NETNAMES;
948 
949  // Fallback
950  return Cmts_User;
951 }
952 
959 inline bool IsNetnameLayer( LAYER_NUM aLayer )
960 {
961  return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) &&
962  aLayer < NETNAMES_LAYER_ID_END;
963 }
964 
965 
966 inline bool IsZoneLayer( LAYER_NUM aLayer )
967 {
968  return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
969 }
970 
971 
972 inline bool IsDCodeLayer( int aLayer )
973 {
974  return aLayer >= (GERBVIEW_LAYER_ID_START + GERBER_DRAWLAYERS_COUNT) &&
976 }
977 
978 
985 inline bool IsNetCopperLayer( LAYER_NUM aLayer )
986 {
987  static std::set<LAYER_NUM> netCopperLayers =
988  {
989  LAYER_PAD_FR,
990  LAYER_PAD_BK,
997  };
998 
999  return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
1000 }
1001 
1002 
1003 PCB_LAYER_ID ToLAYER_ID( int aLayer );
1004 
1005 #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 visibles)
Definition: bitmap.cpp:63
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 visibles)
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)