KiCad PCB EDA Suite
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-2021 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 
35 
41 typedef int LAYER_NUM;
42 
65 enum PCB_LAYER_ID: int
66 {
69 
102  B_Cu, // 31
103 
106 
109 
112 
114  F_Mask, // 39
115 
121  Margin, // 45
122 
125 
127  F_Fab, // 49
128 
129  // User definable layers.
139 
140  Rescue, // 59
141 
142  // Four reserved layers (60 - 63) for future expansion within the 64 bit integer limit.
143 
145 };
146 
147 #define MAX_CU_LAYERS (B_Cu - F_Cu + 1)
148 
153 enum class FLASHING
154 {
155  DEFAULT, // Flashing follows connectivity
156  ALWAYS_FLASHED, // Always flashed for connectivity
157  NEVER_FLASHED, // Never flashed for connectivity
158 };
159 
162 {
163 
165 
167 
169 
171 
176 
178 };
179 
181 #define NETNAMES_LAYER_INDEX( layer ) ( NETNAMES_LAYER_ID_START + layer )
182 
196 enum GAL_LAYER_ID: int
197 {
199 
206 // LAYER_MOD_TEXT_BK deprecated + 6,
231 
234 
235  // Layers in this section have visibility controls but were not present in legacy board files.
236 
239 
245 
246  // Add layers below this point that do not have visibility controls, so don't need explicit
247  // enum values
248 
251 
255 
257 };
258 
260 #define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
261 
263 #define ZONE_LAYER_FOR( copperLayer ) ( LAYER_ZONE_START + copperLayer )
264 
266 
268 {
269  a = GAL_LAYER_ID( int( a ) + 1 );
270  return a;
271 }
272 
273 inline GAL_LAYER_ID ToGalLayer( int aInteger )
274 {
275  wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
276  return static_cast<GAL_LAYER_ID>( aInteger );
277 }
278 
280 inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
281 {
282  GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
283  wxASSERT( t <= GAL_LAYER_ID_END );
284  return t;
285 }
286 
287 typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
288 
290 class GAL_SET : public GAL_BASE_SET
291 {
292 private:
293  static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
294 
295 public:
297  {
298  }
299 
300  GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
301  {
302  }
303 
304  GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
305 
307  {
308  GAL_BASE_SET::set();
309  return *this;
310  }
311 
312  GAL_SET& set( int aPos, bool aVal = true )
313  {
314  GAL_BASE_SET::set( aPos, aVal );
315  return *this;
316  }
317 
318  GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
319  {
320  GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
321  return *this;
322  }
323 
324  bool Contains( GAL_LAYER_ID aPos )
325  {
326  return test( static_cast<std::size_t>( aPos ) - start );
327  }
328 
329  std::vector<GAL_LAYER_ID> Seq() const;
330 
331  static GAL_SET DefaultVisible();
332 };
333 
335 enum SCH_LAYER_ID: int
336 {
338 
375 
377 };
378 
379 #define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
380 
381 #define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
382 
384 {
385  a = SCH_LAYER_ID( int( a ) + 1 );
386  return a;
387 }
388 
389 // number of draw layers in Gerbview
390 #define GERBER_DRAWLAYERS_COUNT PCB_LAYER_ID_COUNT
391 
394 {
396 
399 
406 
408 };
409 
410 #define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
411 
412 #define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
413 
414 #define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
415 
416 
418 enum LAYER_3D_ID : int
419 {
421 
431 
433 };
434 
436 #define LAYER_ID_COUNT LAYER_3D_END
437 
438 
443 wxString LayerName( int aLayer );
444 
445 
446 // Some elements do not have yet a visibility control
447 // from a dialog, but have a visibility control flag.
448 // Here is a mask to set them visible, to be sure they are displayed
449 // after loading a board for instance
450 #define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
451  ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
452  ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
453  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
454  ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
455 
456 
458 typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
459 
460 
477 class LSEQ : public BASE_SEQ
478 {
479  unsigned m_index;
480 
481 public:
482 
483  LSEQ() :
484  m_index( 0 )
485  {}
486 
487  template <class InputIterator>
488  LSEQ( InputIterator aStart, InputIterator aEnd ) :
489  BASE_SEQ( aStart, aEnd ), m_index( 0 )
490  {}
491 
492  void Rewind() { m_index = 0; }
493 
494  void operator ++ () { ++m_index; } // returns nothing, used in simple statements only.
495 
496  void operator ++ (int) { ++m_index; }
497 
498  operator bool () { return m_index < size(); }
499 
501  {
502  return at( m_index ); // throws std::out_of_range
503  }
504 };
505 
506 
507 typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
508 
509 
516 class LSET : public BASE_SET
517 {
518 public:
519 
520  // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling.
521  // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
522  // LSET s = 0; needs to be removed from the code, this accomplishes that.
523  // Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
524  // to prevent that surprise. Therefore LSET's constructor suite is significantly
525  // different than the base class from which it is derived.
526 
527  // Other member functions (non-constructor functions) are identical to the base
528  // class's and therefore are re-used from the base class.
529 
533  LSET() :
534  BASE_SET() // all bits are set to zero in BASE_SET()
535  {
536  }
537 
538  LSET( const BASE_SET& aOther ) :
539  BASE_SET( aOther )
540  {
541  }
542 
557  LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
558  BASE_SET()
559  {
560  set( aLayer );
561  }
562 
566  LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
567 
579  LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
580 
587  bool Contains( PCB_LAYER_ID aLayer )
588  {
589  try
590  {
591  return test( aLayer );
592  }
593  catch( std::out_of_range& )
594  {
595  return false;
596  }
597  }
598 
602  static const wxChar* Name( PCB_LAYER_ID aLayerId );
603 
608  static LSET InternalCuMask();
609 
613  static LSET FrontAssembly();
614 
618  static LSET BackAssembly();
619 
623  static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
624 
628  static LSET ExternalCuMask();
629 
633  static LSET AllNonCuMask();
634 
635  static LSET AllLayersMask();
636 
640  static LSET FrontTechMask();
641 
646  static LSET FrontBoardTechMask();
647 
651  static LSET BackTechMask();
652 
657  static LSET BackBoardTechMask();
658 
662  static LSET AllTechMask();
663 
667  static LSET AllBoardTechMask();
668 
672  static LSET FrontMask();
673 
677  static LSET BackMask();
678 
679  static LSET UserMask();
680 
685  static LSET PhysicalLayersMask();
686 
690  static LSET UserDefinedLayers();
691 
698 
704  LSEQ CuStack() const;
705 
711  LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
712 
714  LSEQ Users() const;
715 
717  LSEQ TechAndUserUIOrder() const;
718 
719  LSEQ UIOrder() const;
720 
728  LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
729 
736  LSEQ Seq() const;
737 
742  LSEQ SeqStackupBottom2Top() const;
743 
747  std::string FmtHex() const;
748 
756  int ParseHex( const char* aStart, int aCount );
757 
761  std::string FmtBin() const;
762 
767  PCB_LAYER_ID ExtractLayer() const;
768 
769 private:
770 
772  LSET( unsigned long __val )
773  {
774  // not usable, it's private.
775  }
776 };
777 
778 
786 inline bool IsValidLayer( LAYER_NUM aLayerId )
787 {
788  return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
789 }
790 
797 inline bool IsPcbLayer( LAYER_NUM aLayer )
798 {
799  return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
800 }
801 
808 inline bool IsCopperLayer( LAYER_NUM aLayerId )
809 {
810  return aLayerId >= F_Cu && aLayerId <= B_Cu;
811 }
812 
819 inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
820 {
821  return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
822 }
823 
832 inline bool IsCopperLayer( LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers )
833 {
834  if( aIncludeSyntheticCopperLayers )
835  return !IsNonCopperLayer( aLayerId );
836  else
837  return IsCopperLayer( aLayerId );
838 }
839 
840 inline bool IsViaPadLayer( LAYER_NUM aLayer )
841 {
842  return aLayer == LAYER_VIA_THROUGH
843  || aLayer == LAYER_VIA_MICROVIA
844  || aLayer == LAYER_VIA_BBLIND;
845 }
846 
847 inline bool IsHoleLayer( LAYER_NUM aLayer )
848 {
849  return aLayer == LAYER_VIA_HOLES
850  || aLayer == LAYER_VIA_HOLEWALLS
851  || aLayer == LAYER_PAD_PLATEDHOLES
852  || aLayer == LAYER_PAD_HOLEWALLS
853  || aLayer == LAYER_NON_PLATEDHOLES;
854 }
855 
862 inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
863 {
864  return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
865 }
866 
867 /*
868  @todo Where does this comment actually belong?
869 
870  IMPORTANT: If a layer is not a front layer not necessarily is true
871  the converse. The same hold for a back layer.
872  So a layer can be:
873  - Front
874  - Back
875  - Neither (internal or auxiliary)
876 
877  The check most frequent is for back layers, since it involves flips
878 */
879 
880 
884 inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
885 {
886  switch( aLayerId )
887  {
888  case F_Cu:
889  case F_Adhes:
890  case F_Paste:
891  case F_SilkS:
892  case F_Mask:
893  case F_CrtYd:
894  case F_Fab:
895  return true;
896  default:
897  ;
898  }
899 
900  return false;
901 }
902 
903 
907 inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
908 {
909  switch( aLayerId )
910  {
911  case B_Cu:
912  case B_Adhes:
913  case B_Paste:
914  case B_SilkS:
915  case B_Mask:
916  case B_CrtYd:
917  case B_Fab:
918  return true;
919  default:
920  ;
921  }
922 
923  return false;
924 }
925 
926 
936 PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
937 
947 LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
948 
949 
953 inline int GetNetnameLayer( int aLayer )
954 {
955  if( IsCopperLayer( aLayer ) )
956  return NETNAMES_LAYER_INDEX( aLayer );
957  else if( aLayer == LAYER_PADS_TH )
958  return LAYER_PAD_NETNAMES;
959  else if( aLayer == LAYER_PAD_FR )
960  return LAYER_PAD_FR_NETNAMES;
961  else if( aLayer == LAYER_PAD_BK )
962  return LAYER_PAD_BK_NETNAMES;
963  else if( IsViaPadLayer( aLayer ) )
964  return LAYER_VIA_NETNAMES;
965 
966  // Fallback
967  return Cmts_User;
968 }
969 
976 inline bool IsNetnameLayer( LAYER_NUM aLayer )
977 {
978  return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) &&
979  aLayer < NETNAMES_LAYER_ID_END;
980 }
981 
982 
983 inline bool IsZoneLayer( LAYER_NUM aLayer )
984 {
985  return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
986 }
987 
988 
989 inline bool IsDCodeLayer( int aLayer )
990 {
991  return aLayer >= (GERBVIEW_LAYER_ID_START + GERBER_DRAWLAYERS_COUNT) &&
993 }
994 
995 
1002 inline bool IsNetCopperLayer( LAYER_NUM aLayer )
1003 {
1004  static std::set<LAYER_NUM> netCopperLayers =
1005  {
1006  LAYER_PAD_FR,
1007  LAYER_PAD_BK,
1008  LAYER_PADS_TH,
1014  };
1015 
1016  return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
1017 }
1018 
1019 
1020 PCB_LAYER_ID ToLAYER_ID( int aLayer );
1021 
1022 #endif // LAYER_IDS_H
static LSET UserDefinedLayers()
Return a mask with all of the allowable user defined layers.
Definition: lset.cpp:865
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:759
static LSET FrontBoardTechMask()
Return a mask holding technical layers used in a board fabrication (no CU layer) on front side.
Definition: lset.cpp:822
LSET(const BASE_SET &aOther)
Definition: layer_ids.h:538
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
Definition: layer_ids.h:161
currently selected items overlay
Definition: layer_ids.h:226
smd pads, front layer
Definition: layer_ids.h:209
to draw micro vias
Definition: layer_ids.h:201
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
unsigned m_index
Definition: layer_ids.h:479
Auxiliary items (guides, rule, etc)
Definition: layer_ids.h:229
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:989
layer for drc markers with SEVERITY_ERROR
Definition: layer_ids.h:223
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:914
static LSET ForbiddenFootprintLayers()
Layers which are not allowed within footprint definitions.
Definition: lset.cpp:897
for drawingsheetEditor previewing
Definition: layer_ids.h:249
Meta control for all pads opacity/visibility (color ignored)
Definition: layer_ids.h:237
static LSET BackTechMask()
Return a mask holding all technical layers (no CU layer) on back side.
Definition: lset.cpp:803
PCB cursor.
Definition: layer_ids.h:228
show footprints values (when texts are visible)
Definition: layer_ids.h:217
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:196
smd pads, back layer
Definition: layer_ids.h:210
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
Definition: layer_ids.h:587
std::bitset< PCB_LAYER_ID_COUNT > BASE_SET
Definition: layer_ids.h:507
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Definition: lset.cpp:782
Additional netnames layers (not associated with a PCB layer)
Definition: layer_ids.h:172
GAL_LAYER_ID ToGalLayer(int aInteger)
Definition: layer_ids.h:273
anchor of items having an anchor point (texts, footprints)
Definition: layer_ids.h:208
int LAYER_NUM
This can be replaced with int and removed.
Definition: layer_ids.h:41
Definition: bitmap.cpp:64
static LSET FrontTechMask()
Return a mask holding all technical layers (no CU layer) on front side.
Definition: lset.cpp:815
show footprints on back
Definition: layer_ids.h:216
LSEQ()
Definition: layer_ids.h:483
PCB_LAYER_ID operator *() const
Definition: layer_ids.h:500
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
GAL_SET()
Definition: layer_ids.h:296
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
Definition: lset.cpp:829
static LSET FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
Definition: lset.cpp:883
Reserved space for board layer netnames.
Definition: layer_ids.h:168
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:222
bool IsPcbLayer(LAYER_NUM aLayer)
Test whether a layer is a valid layer for Pcbnew.
Definition: layer_ids.h:797
Control for copper zone opacity/visibility (color ignored)
Definition: layer_ids.h:238
LSET(PCB_LAYER_ID aLayer)
Take a PCB_LAYER_ID and sets that bit.
Definition: layer_ids.h:557
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
Definition: layer_ids.h:280
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:953
This is the end of the layers used for visibility bit masks in Pcbnew.
Definition: layer_ids.h:233
to draw usual through hole vias
Definition: layer_ids.h:203
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)
Definition: layer_ids.h:312
for drawingsheetEditor previewing
Definition: layer_ids.h:250
GerbView draw layers and d-code layers.
Definition: layer_ids.h:398
bool IsNetCopperLayer(LAYER_NUM aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
Definition: layer_ids.h:1002
LSEQ Seq() const
Return a LSEQ from this LSET in ascending PCB_LAYER_ID order.
Definition: lset.cpp:445
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount=0)
Definition: lset.cpp:530
static LSET BackAssembly()
Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask.
Definition: lset.cpp:705
bool IsHoleLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:847
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:516
handle color for not plated holes (holes, not pads)
Definition: layer_ids.h:204
std::vector< PCB_LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.
Definition: layer_ids.h:458
#define MAX_CU_LAYERS
Definition: layer_ids.h:147
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:200
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:907
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:335
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
Definition: lset.cpp:82
shadows for drc markers
Definition: layer_ids.h:244
#define GERBER_DRAWLAYERS_COUNT
Definition: layer_ids.h:390
constexpr int GAL_LAYER_ID_COUNT
Definition: layer_ids.h:265
text marked as invisible
Definition: layer_ids.h:207
show footprints on front
Definition: layer_ids.h:215
bool IsNonCopperLayer(LAYER_NUM aLayerId)
Test whether a layer is a non copper layer.
Definition: layer_ids.h:819
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:290
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:719
static LSET ExternalCuMask()
Return a mask holding the Front and Bottom layers.
Definition: lset.cpp:789
static GAL_SET DefaultVisible()
Definition: lset.cpp:942
Virtual layers for stacking zones and tracks on a given copper layer.
Definition: layer_ids.h:253
static LSET FrontAssembly()
Return a complete set of all top assembly layers which is all F_SilkS and F_Mask.
Definition: lset.cpp:691
static LSET AllLayersMask()
Definition: lset.cpp:796
to handle and draw images bitmaps
Definition: layer_ids.h:230
drawingsheet frame and titleblock
Definition: layer_ids.h:224
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
Definition: layer_ids.h:318
LSEQ Technicals(LSET aSubToOmit=LSET()) const
Return a sequence of technical layers.
Definition: lset.cpp:212
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
Definition: layer_ids.h:884
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:477
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:808
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:153
show a marker on pads with no nets
Definition: layer_ids.h:214
show footprints references (when texts are visible)
Definition: layer_ids.h:218
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
Definition: lset.cpp:858
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
Definition: layer_ids.h:267
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Definition: layer_ids.h:287
LSET()
Create an empty (cleared) set.
Definition: layer_ids.h:533
multilayer pads, usually with holes
Definition: layer_ids.h:220
std::string FmtBin() const
Return a binary string showing contents of this LSEQ.
Definition: lset.cpp:297
to draw blind/buried vias
Definition: layer_ids.h:202
layer for drc markers which have been individually excluded
Definition: layer_ids.h:243
PCB_LAYER_ID ExtractLayer() const
Find the first set PCB_LAYER_ID.
Definition: lset.cpp:670
static LSET BackBoardTechMask()
Return a mask holding technical layers used in a board fabrication (no CU layer) on Back side.
Definition: lset.cpp:809
general purpose overlay
Definition: layer_ids.h:225
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:976
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
Definition: layer_ids.h:71
static constexpr int start
Definition: layer_ids.h:293
std::string FmtHex() const
Return a hex string showing contents of this LSEQ.
Definition: lset.cpp:321
bool IsViaPadLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:840
GERBVIEW_LAYER_ID
GerbView draw layers.
Definition: layer_ids.h:393
layer for drc markers with SEVERITY_WARNING
Definition: layer_ids.h:242
static LSET BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
Definition: lset.cpp:890
PCB background color.
Definition: layer_ids.h:227
static LSET AllBoardTechMask()
Return a mask holding board technical layers (no CU layer) on both side.
Definition: lset.cpp:836
std::vector< GAL_LAYER_ID > Seq() const
Definition: lset.cpp:928
GAL_SET & set()
Definition: layer_ids.h:306
to draw pad holes (plated)
Definition: layer_ids.h:221
bool IsValidLayer(LAYER_NUM aLayerId)
Test whether a given integer is a valid layer index, i.e.
Definition: layer_ids.h:786
bool IsZoneLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:983
GAL_SET(const GAL_SET &aOther)
Definition: layer_ids.h:300
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
Definition: layer_ids.h:862
LSEQ(InputIterator aStart, InputIterator aEnd)
Definition: layer_ids.h:488
void Rewind()
Definition: layer_ids.h:492
wxString LayerName(int aLayer)
Returns the string equivalent of a given layer.
Definition: layer_id.cpp:30
static LSET UserMask()
Definition: lset.cpp:843
LSET(unsigned long __val)
Take this off the market, it may not be used because of LSET( PCB_LAYER_ID ).
Definition: layer_ids.h:772
LSEQ UIOrder() const
Definition: lset.cpp:904
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.
Definition: layer_ids.h:181
LAYER_3D_ID
3D Viewer virtual layers for color settings
Definition: layer_ids.h:418
void operator++()
Definition: layer_ids.h:494
LSET FlipLayerMask(LSET aMask, int aCopperLayersCount=0)
Calculate the mask layer when flipping a footprint.
Definition: lset.cpp:576
bool Contains(GAL_LAYER_ID aPos)
Definition: layer_ids.h:324