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 
151 {
152 
154 
156 
158 
160 
165 
167 };
168 
170 #define NETNAMES_LAYER_INDEX( layer ) ( NETNAMES_LAYER_ID_START + layer )
171 
185 enum GAL_LAYER_ID: int
186 {
188 
195 // LAYER_MOD_TEXT_BK deprecated + 6,
220 
223 
224  // Layers in this section have visibility controls but were not present in legacy board files.
225 
228 
234 
235  // Add layers below this point that do not have visibility controls, so don't need explicit
236  // enum values
237 
240 
244 
246 };
247 
249 #define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
250 
252 #define ZONE_LAYER_FOR( copperLayer ) ( LAYER_ZONE_START + copperLayer )
253 
255 
257 {
258  a = GAL_LAYER_ID( int( a ) + 1 );
259  return a;
260 }
261 
262 inline GAL_LAYER_ID ToGalLayer( int aInteger )
263 {
264  wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
265  return static_cast<GAL_LAYER_ID>( aInteger );
266 }
267 
269 inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
270 {
271  GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
272  wxASSERT( t <= GAL_LAYER_ID_END );
273  return t;
274 }
275 
276 typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
277 
279 class GAL_SET : public GAL_BASE_SET
280 {
281 private:
282  static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
283 
284 public:
286  {
287  }
288 
289  GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
290  {
291  }
292 
293  GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
294 
296  {
297  GAL_BASE_SET::set();
298  return *this;
299  }
300 
301  GAL_SET& set( int aPos, bool aVal = true )
302  {
303  GAL_BASE_SET::set( aPos, aVal );
304  return *this;
305  }
306 
307  GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
308  {
309  GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
310  return *this;
311  }
312 
313  bool Contains( GAL_LAYER_ID aPos )
314  {
315  return test( static_cast<std::size_t>( aPos ) - start );
316  }
317 
318  std::vector<GAL_LAYER_ID> Seq() const;
319 
320  static GAL_SET DefaultVisible();
321 };
322 
324 enum SCH_LAYER_ID: int
325 {
327 
364 
366 };
367 
368 #define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
369 
370 #define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
371 
373 {
374  a = SCH_LAYER_ID( int( a ) + 1 );
375  return a;
376 }
377 
378 // number of draw layers in Gerbview
379 #define GERBER_DRAWLAYERS_COUNT PCB_LAYER_ID_COUNT
380 
383 {
385 
388 
395 
397 };
398 
399 #define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
400 
401 #define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
402 
403 #define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
404 
405 
407 enum LAYER_3D_ID : int
408 {
410 
420 
422 };
423 
425 #define LAYER_ID_COUNT LAYER_3D_END
426 
427 
432 wxString LayerName( int aLayer );
433 
434 
435 // Some elements do not have yet a visibility control
436 // from a dialog, but have a visibility control flag.
437 // Here is a mask to set them visible, to be sure they are displayed
438 // after loading a board for instance
439 #define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
440  ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
441  ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
442  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
443  ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
444 
445 
447 typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
448 
449 
466 class LSEQ : public BASE_SEQ
467 {
468  unsigned m_index;
469 
470 public:
471 
472  LSEQ() :
473  m_index( 0 )
474  {}
475 
476  template <class InputIterator>
477  LSEQ( InputIterator aStart, InputIterator aEnd ) :
478  BASE_SEQ( aStart, aEnd ), m_index( 0 )
479  {}
480 
481  void Rewind() { m_index = 0; }
482 
483  void operator ++ () { ++m_index; } // returns nothing, used in simple statements only.
484 
485  void operator ++ (int) { ++m_index; }
486 
487  operator bool () { return m_index < size(); }
488 
490  {
491  return at( m_index ); // throws std::out_of_range
492  }
493 };
494 
495 
496 typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
497 
498 
505 class LSET : public BASE_SET
506 {
507 public:
508 
509  // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling.
510  // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
511  // LSET s = 0; needs to be removed from the code, this accomplishes that.
512  // Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
513  // to prevent that surprise. Therefore LSET's constructor suite is significantly
514  // different than the base class from which it is derived.
515 
516  // Other member functions (non-constructor functions) are identical to the base
517  // class's and therefore are re-used from the base class.
518 
522  LSET() :
523  BASE_SET() // all bits are set to zero in BASE_SET()
524  {
525  }
526 
527  LSET( const BASE_SET& aOther ) :
528  BASE_SET( aOther )
529  {
530  }
531 
546  LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
547  BASE_SET()
548  {
549  set( aLayer );
550  }
551 
555  LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
556 
568  LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
569 
576  bool Contains( PCB_LAYER_ID aLayer )
577  {
578  try
579  {
580  return test( aLayer );
581  }
582  catch( std::out_of_range& )
583  {
584  return false;
585  }
586  }
587 
591  static const wxChar* Name( PCB_LAYER_ID aLayerId );
592 
597  static LSET InternalCuMask();
598 
602  static LSET FrontAssembly();
603 
607  static LSET BackAssembly();
608 
612  static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
613 
617  static LSET ExternalCuMask();
618 
622  static LSET AllNonCuMask();
623 
624  static LSET AllLayersMask();
625 
629  static LSET FrontTechMask();
630 
635  static LSET FrontBoardTechMask();
636 
640  static LSET BackTechMask();
641 
646  static LSET BackBoardTechMask();
647 
651  static LSET AllTechMask();
652 
656  static LSET AllBoardTechMask();
657 
661  static LSET FrontMask();
662 
666  static LSET BackMask();
667 
668  static LSET UserMask();
669 
674  static LSET PhysicalLayersMask();
675 
679  static LSET UserDefinedLayers();
680 
687 
693  LSEQ CuStack() const;
694 
700  LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
701 
703  LSEQ Users() const;
704 
706  LSEQ TechAndUserUIOrder() const;
707 
708  LSEQ UIOrder() const;
709 
717  LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
718 
725  LSEQ Seq() const;
726 
731  LSEQ SeqStackupBottom2Top() const;
732 
736  std::string FmtHex() const;
737 
745  int ParseHex( const char* aStart, int aCount );
746 
750  std::string FmtBin() const;
751 
756  PCB_LAYER_ID ExtractLayer() const;
757 
758 private:
759 
761  LSET( unsigned long __val )
762  {
763  // not usable, it's private.
764  }
765 };
766 
767 
775 inline bool IsValidLayer( LAYER_NUM aLayerId )
776 {
777  return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
778 }
779 
786 inline bool IsPcbLayer( LAYER_NUM aLayer )
787 {
788  return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
789 }
790 
797 inline bool IsCopperLayer( LAYER_NUM aLayerId )
798 {
799  return aLayerId >= F_Cu && aLayerId <= B_Cu;
800 }
801 
808 inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
809 {
810  return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
811 }
812 
821 inline bool IsCopperLayer( LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers )
822 {
823  if( aIncludeSyntheticCopperLayers )
824  return !IsNonCopperLayer( aLayerId );
825  else
826  return IsCopperLayer( aLayerId );
827 }
828 
829 inline bool IsViaPadLayer( LAYER_NUM aLayer )
830 {
831  return aLayer == LAYER_VIA_THROUGH
832  || aLayer == LAYER_VIA_MICROVIA
833  || aLayer == LAYER_VIA_BBLIND;
834 }
835 
836 inline bool IsHoleLayer( LAYER_NUM aLayer )
837 {
838  return aLayer == LAYER_VIA_HOLES
839  || aLayer == LAYER_VIA_HOLEWALLS
840  || aLayer == LAYER_PAD_PLATEDHOLES
841  || aLayer == LAYER_PAD_HOLEWALLS
842  || aLayer == LAYER_NON_PLATEDHOLES;
843 }
844 
851 inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
852 {
853  return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
854 }
855 
856 /*
857  @todo Where does this comment actually belong?
858 
859  IMPORTANT: If a layer is not a front layer not necessarily is true
860  the converse. The same hold for a back layer.
861  So a layer can be:
862  - Front
863  - Back
864  - Neither (internal or auxiliary)
865 
866  The check most frequent is for back layers, since it involves flips
867 */
868 
869 
873 inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
874 {
875  switch( aLayerId )
876  {
877  case F_Cu:
878  case F_Adhes:
879  case F_Paste:
880  case F_SilkS:
881  case F_Mask:
882  case F_CrtYd:
883  case F_Fab:
884  return true;
885  default:
886  ;
887  }
888 
889  return false;
890 }
891 
892 
896 inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
897 {
898  switch( aLayerId )
899  {
900  case B_Cu:
901  case B_Adhes:
902  case B_Paste:
903  case B_SilkS:
904  case B_Mask:
905  case B_CrtYd:
906  case B_Fab:
907  return true;
908  default:
909  ;
910  }
911 
912  return false;
913 }
914 
915 
925 PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
926 
936 LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
937 
938 
942 inline int GetNetnameLayer( int aLayer )
943 {
944  if( IsCopperLayer( aLayer ) )
945  return NETNAMES_LAYER_INDEX( aLayer );
946  else if( aLayer == LAYER_PADS_TH )
947  return LAYER_PAD_NETNAMES;
948  else if( aLayer == LAYER_PAD_FR )
949  return LAYER_PAD_FR_NETNAMES;
950  else if( aLayer == LAYER_PAD_BK )
951  return LAYER_PAD_BK_NETNAMES;
952  else if( IsViaPadLayer( aLayer ) )
953  return LAYER_VIA_NETNAMES;
954 
955  // Fallback
956  return Cmts_User;
957 }
958 
965 inline bool IsNetnameLayer( LAYER_NUM aLayer )
966 {
967  return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) &&
968  aLayer < NETNAMES_LAYER_ID_END;
969 }
970 
971 
972 inline bool IsZoneLayer( LAYER_NUM aLayer )
973 {
974  return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
975 }
976 
977 
978 inline bool IsDCodeLayer( int aLayer )
979 {
980  return aLayer >= (GERBVIEW_LAYER_ID_START + GERBER_DRAWLAYERS_COUNT) &&
982 }
983 
984 
991 inline bool IsNetCopperLayer( LAYER_NUM aLayer )
992 {
993  static std::set<LAYER_NUM> netCopperLayers =
994  {
995  LAYER_PAD_FR,
996  LAYER_PAD_BK,
1003  };
1004 
1005  return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
1006 }
1007 
1008 
1009 PCB_LAYER_ID ToLAYER_ID( int aLayer );
1010 
1011 #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:527
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
Definition: layer_ids.h:150
currently selected items overlay
Definition: layer_ids.h:215
smd pads, front layer
Definition: layer_ids.h:198
to draw micro vias
Definition: layer_ids.h:190
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:468
Auxiliary items (guides, rule, etc)
Definition: layer_ids.h:218
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:978
layer for drc markers with SEVERITY_ERROR
Definition: layer_ids.h:212
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:238
Meta control for all pads opacity/visibility (color ignored)
Definition: layer_ids.h:226
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:217
show footprints values (when texts are visible)
Definition: layer_ids.h:206
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:185
smd pads, back layer
Definition: layer_ids.h:199
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
Definition: layer_ids.h:576
std::bitset< PCB_LAYER_ID_COUNT > BASE_SET
Definition: layer_ids.h:496
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:161
GAL_LAYER_ID ToGalLayer(int aInteger)
Definition: layer_ids.h:262
anchor of items having an anchor point (texts, footprints)
Definition: layer_ids.h:197
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:205
LSEQ()
Definition: layer_ids.h:472
PCB_LAYER_ID operator *() const
Definition: layer_ids.h:489
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:285
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:157
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:211
bool IsPcbLayer(LAYER_NUM aLayer)
Test whether a layer is a valid layer for Pcbnew.
Definition: layer_ids.h:786
Control for copper zone opacity/visibility (color ignored)
Definition: layer_ids.h:227
LSET(PCB_LAYER_ID aLayer)
Take a PCB_LAYER_ID and sets that bit.
Definition: layer_ids.h:546
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
Definition: layer_ids.h:269
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:942
This is the end of the layers used for visibility bit masks in Pcbnew.
Definition: layer_ids.h:222
to draw usual through hole vias
Definition: layer_ids.h:192
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:301
for drawingsheetEditor previewing
Definition: layer_ids.h:239
GerbView draw layers and d-code layers.
Definition: layer_ids.h:387
bool IsNetCopperLayer(LAYER_NUM aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
Definition: layer_ids.h:991
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:836
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:505
handle color for not plated holes (holes, not pads)
Definition: layer_ids.h:193
std::vector< PCB_LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.
Definition: layer_ids.h:447
#define MAX_CU_LAYERS
Definition: layer_ids.h:147
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:189
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:896
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:324
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:233
#define GERBER_DRAWLAYERS_COUNT
Definition: layer_ids.h:379
constexpr int GAL_LAYER_ID_COUNT
Definition: layer_ids.h:254
text marked as invisible
Definition: layer_ids.h:196
show footprints on front
Definition: layer_ids.h:204
bool IsNonCopperLayer(LAYER_NUM aLayerId)
Test whether a layer is a non copper layer.
Definition: layer_ids.h:808
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:279
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:242
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:219
drawingsheet frame and titleblock
Definition: layer_ids.h:213
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
Definition: layer_ids.h:307
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:873
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:466
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:797
show a marker on pads with no nets
Definition: layer_ids.h:203
show footprints references (when texts are visible)
Definition: layer_ids.h:207
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:256
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Definition: layer_ids.h:276
LSET()
Create an empty (cleared) set.
Definition: layer_ids.h:522
multilayer pads, usually with holes
Definition: layer_ids.h:209
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:191
layer for drc markers which have been individually excluded
Definition: layer_ids.h:232
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:214
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:965
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:282
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:829
GERBVIEW_LAYER_ID
GerbView draw layers.
Definition: layer_ids.h:382
layer for drc markers with SEVERITY_WARNING
Definition: layer_ids.h:231
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:216
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:295
to draw pad holes (plated)
Definition: layer_ids.h:210
bool IsValidLayer(LAYER_NUM aLayerId)
Test whether a given integer is a valid layer index, i.e.
Definition: layer_ids.h:775
bool IsZoneLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:972
GAL_SET(const GAL_SET &aOther)
Definition: layer_ids.h:289
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
Definition: layer_ids.h:851
LSEQ(InputIterator aStart, InputIterator aEnd)
Definition: layer_ids.h:477
void Rewind()
Definition: layer_ids.h:481
wxString LayerName(int aLayer)
Returns the string equivalent of a given layer.
Definition: layer_id.cpp:27
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:761
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:170
LAYER_3D_ID
3D Viewer virtual layers for color settings
Definition: layer_ids.h:407
void operator++()
Definition: layer_ids.h:483
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:313