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 <dick@softplc.com>
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 <wx/string.h>
33 
34 
40 typedef int LAYER_NUM;
41 
64 enum PCB_LAYER_ID: int
65 {
68 
101  B_Cu, // 31
102 
105 
108 
111 
113  F_Mask, // 39
114 
120  Margin, // 45
121 
124 
126  F_Fab, // 49
127 
128  // User definable layers.
138 
139  Rescue, // 59
140 
141  // Four reserved layers (60 - 63) for future expansion within the 64 bit integer limit.
142 
144 };
145 
146 #define MAX_CU_LAYERS (B_Cu - F_Cu + 1)
147 
150 {
151 
153 
155 
157 
159 
164 
166 };
167 
169 #define NETNAMES_LAYER_INDEX( layer ) ( NETNAMES_LAYER_ID_START + layer )
170 
184 enum GAL_LAYER_ID: int
185 {
187 
219 
222 
223  // Layers in this section have visibility controls but were not present in legacy board files.
224 
227 
233 
234  // Add layers below this point that do not have visibility controls, so don't need explicit
235  // enum values
236 
239 
243 
245 };
246 
248 #define GAL_LAYER_INDEX( x ) ( x - GAL_LAYER_ID_START )
249 
251 #define ZONE_LAYER_FOR( copperLayer ) ( LAYER_ZONE_START + copperLayer )
252 
254 
256 {
257  a = GAL_LAYER_ID( int( a ) + 1 );
258  return a;
259 }
260 
261 inline GAL_LAYER_ID ToGalLayer( int aInteger )
262 {
263  wxASSERT( aInteger >= GAL_LAYER_ID_START && aInteger <= GAL_LAYER_ID_END );
264  return static_cast<GAL_LAYER_ID>( aInteger );
265 }
266 
268 inline GAL_LAYER_ID operator+( const GAL_LAYER_ID& a, int b )
269 {
270  GAL_LAYER_ID t = GAL_LAYER_ID( int( a ) + b );
271  wxASSERT( t <= GAL_LAYER_ID_END );
272  return t;
273 }
274 
275 typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
276 
278 class GAL_SET : public GAL_BASE_SET
279 {
280 private:
281  static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
282 
283 public:
285  {
286  }
287 
288  GAL_SET( const GAL_SET& aOther ) : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
289  {
290  }
291 
292  GAL_SET( const GAL_LAYER_ID* aArray, unsigned aCount );
293 
295  {
296  GAL_BASE_SET::set();
297  return *this;
298  }
299 
300  GAL_SET& set( int aPos, bool aVal = true )
301  {
302  GAL_BASE_SET::set( aPos, aVal );
303  return *this;
304  }
305 
306  GAL_SET& set( GAL_LAYER_ID aPos, bool aVal = true )
307  {
308  GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
309  return *this;
310  }
311 
312  bool Contains( GAL_LAYER_ID aPos )
313  {
314  return test( static_cast<std::size_t>( aPos ) - start );
315  }
316 
317  std::vector<GAL_LAYER_ID> Seq() const;
318 
319  static GAL_SET DefaultVisible();
320 };
321 
323 enum SCH_LAYER_ID: int
324 {
326 
361 
363 };
364 
365 #define SCH_LAYER_ID_COUNT ( SCH_LAYER_ID_END - SCH_LAYER_ID_START )
366 
367 #define SCH_LAYER_INDEX( x ) ( x - SCH_LAYER_ID_START )
368 
370 {
371  a = SCH_LAYER_ID( int( a ) + 1 );
372  return a;
373 }
374 
375 // number of draw layers in Gerbview
376 #define GERBER_DRAWLAYERS_COUNT PCB_LAYER_ID_COUNT
377 
380 {
382 
385 
392 
394 };
395 
396 #define GERBER_DRAW_LAYER( x ) ( GERBVIEW_LAYER_ID_START + x )
397 
398 #define GERBER_DCODE_LAYER( x ) ( GERBER_DRAWLAYERS_COUNT + x )
399 
400 #define GERBER_DRAW_LAYER_INDEX( x ) ( x - GERBVIEW_LAYER_ID_START )
401 
402 
404 enum LAYER_3D_ID : int
405 {
407 
417 
419 };
420 
422 #define LAYER_ID_COUNT LAYER_3D_END
423 
424 
429 wxString LayerName( int aLayer );
430 
431 
432 // Some elements do not have yet a visibility control
433 // from a dialog, but have a visibility control flag.
434 // Here is a mask to set them visible, to be sure they are displayed
435 // after loading a board for instance
436 #define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PAD_PLATEDHOLES ) ) +\
437  ( 1 << GAL_LAYER_INDEX( LAYER_VIA_HOLES ) ) +\
438  ( 1 << GAL_LAYER_INDEX( LAYER_SELECT_OVERLAY ) ) +\
439  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) +\
440  ( 1 << GAL_LAYER_INDEX( LAYER_RATSNEST ) ) )
441 
442 
444 typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
445 
446 
463 class LSEQ : public BASE_SEQ
464 {
465  unsigned m_index;
466 
467 public:
468 
469  LSEQ() :
470  m_index( 0 )
471  {}
472 
473  template <class InputIterator>
474  LSEQ( InputIterator aStart, InputIterator aEnd ) :
475  BASE_SEQ( aStart, aEnd ), m_index( 0 )
476  {}
477 
478  void Rewind() { m_index = 0; }
479 
480  void operator ++ () { ++m_index; } // returns nothing, used in simple statements only.
481 
482  void operator ++ (int) { ++m_index; }
483 
484  operator bool () { return m_index < size(); }
485 
487  {
488  return at( m_index ); // throws std::out_of_range
489  }
490 };
491 
492 
493 typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
494 
495 
502 class LSET : public BASE_SET
503 {
504 public:
505 
506  // The constructor flavors are carefully chosen to prevent LSET( int ) from compiling.
507  // That excludes "LSET s = 0;" and excludes "LSET s = -1;", etc.
508  // LSET s = 0; needs to be removed from the code, this accomplishes that.
509  // Remember LSET( PCB_LAYER_ID(0) ) sets bit 0, so "LSET s = 0;" is illegal
510  // to prevent that surprise. Therefore LSET's constructor suite is significantly
511  // different than the base class from which it is derived.
512 
513  // Other member functions (non-constructor functions) are identical to the base
514  // class's and therefore are re-used from the base class.
515 
519  LSET() :
520  BASE_SET() // all bits are set to zero in BASE_SET()
521  {
522  }
523 
524  LSET( const BASE_SET& aOther ) :
525  BASE_SET( aOther )
526  {
527  }
528 
543  LSET( PCB_LAYER_ID aLayer ) : // PCB_LAYER_ID deliberately excludes int and relatives
544  BASE_SET()
545  {
546  set( aLayer );
547  }
548 
552  LSET( const PCB_LAYER_ID* aArray, unsigned aCount );
553 
565  LSET( unsigned aIdCount, int aFirst, ... ); // args chosen to prevent LSET( int ) from compiling
566 
573  bool Contains( PCB_LAYER_ID aLayer )
574  {
575  return test( aLayer );
576  }
577 
581  static const wxChar* Name( PCB_LAYER_ID aLayerId );
582 
587  static LSET InternalCuMask();
588 
592  static LSET FrontAssembly();
593 
597  static LSET BackAssembly();
598 
602  static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
603 
607  static LSET ExternalCuMask();
608 
612  static LSET AllNonCuMask();
613 
614  static LSET AllLayersMask();
615 
619  static LSET FrontTechMask();
620 
625  static LSET FrontBoardTechMask();
626 
630  static LSET BackTechMask();
631 
636  static LSET BackBoardTechMask();
637 
641  static LSET AllTechMask();
642 
646  static LSET AllBoardTechMask();
647 
651  static LSET FrontMask();
652 
656  static LSET BackMask();
657 
658  static LSET UserMask();
659 
664  static LSET PhysicalLayersMask();
665 
669  static LSET UserDefinedLayers();
670 
677 
683  LSEQ CuStack() const;
684 
690  LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
691 
693  LSEQ Users() const;
694 
696  LSEQ TechAndUserUIOrder() const;
697 
698  LSEQ UIOrder() const;
699 
707  LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
708 
715  LSEQ Seq() const;
716 
721  LSEQ SeqStackupBottom2Top() const;
722 
726  std::string FmtHex() const;
727 
735  int ParseHex( const char* aStart, int aCount );
736 
740  std::string FmtBin() const;
741 
746  PCB_LAYER_ID ExtractLayer() const;
747 
748 private:
749 
751  LSET( unsigned long __val )
752  {
753  // not usable, it's private.
754  }
755 };
756 
757 
765 inline bool IsValidLayer( LAYER_NUM aLayerId )
766 {
767  return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
768 }
769 
776 inline bool IsPcbLayer( LAYER_NUM aLayer )
777 {
778  return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
779 }
780 
787 inline bool IsCopperLayer( LAYER_NUM aLayerId )
788 {
789  return aLayerId >= F_Cu && aLayerId <= B_Cu;
790 }
791 
798 inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
799 {
800  return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
801 }
802 
811 inline bool IsCopperLayer( LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers )
812 {
813  if( aIncludeSyntheticCopperLayers )
814  return !IsNonCopperLayer( aLayerId );
815  else
816  return IsCopperLayer( aLayerId );
817 }
818 
819 inline bool IsViaPadLayer( LAYER_NUM aLayer )
820 {
821  return aLayer == LAYER_VIA_THROUGH
822  || aLayer == LAYER_VIA_MICROVIA
823  || aLayer == LAYER_VIA_BBLIND;
824 }
825 
826 inline bool IsHoleLayer( LAYER_NUM aLayer )
827 {
828  return aLayer == LAYER_VIA_HOLES
829  || aLayer == LAYER_VIA_HOLEWALLS
830  || aLayer == LAYER_PAD_PLATEDHOLES
831  || aLayer == LAYER_PAD_HOLEWALLS
832  || aLayer == LAYER_NON_PLATEDHOLES;
833 }
834 
841 inline bool IsUserLayer( PCB_LAYER_ID aLayerId )
842 {
843  return aLayerId >= Dwgs_User && aLayerId <= Eco2_User;
844 }
845 
846 /*
847  @todo Where does this comment actually belong?
848 
849  IMPORTANT: If a layer is not a front layer not necessarily is true
850  the converse. The same hold for a back layer.
851  So a layer can be:
852  - Front
853  - Back
854  - Neither (internal or auxiliary)
855 
856  The check most frequent is for back layers, since it involves flips
857 */
858 
859 
863 inline bool IsFrontLayer( PCB_LAYER_ID aLayerId )
864 {
865  switch( aLayerId )
866  {
867  case F_Cu:
868  case F_Adhes:
869  case F_Paste:
870  case F_SilkS:
871  case F_Mask:
872  case F_CrtYd:
873  case F_Fab:
874  return true;
875  default:
876  ;
877  }
878 
879  return false;
880 }
881 
882 
886 inline bool IsBackLayer( PCB_LAYER_ID aLayerId )
887 {
888  switch( aLayerId )
889  {
890  case B_Cu:
891  case B_Adhes:
892  case B_Paste:
893  case B_SilkS:
894  case B_Mask:
895  case B_CrtYd:
896  case B_Fab:
897  return true;
898  default:
899  ;
900  }
901 
902  return false;
903 }
904 
905 
915 PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
916 
926 LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
927 
928 
932 inline int GetNetnameLayer( int aLayer )
933 {
934  if( IsCopperLayer( aLayer ) )
935  return NETNAMES_LAYER_INDEX( aLayer );
936  else if( aLayer == LAYER_PADS_TH )
937  return LAYER_PAD_NETNAMES;
938  else if( aLayer == LAYER_PAD_FR )
939  return LAYER_PAD_FR_NETNAMES;
940  else if( aLayer == LAYER_PAD_BK )
941  return LAYER_PAD_BK_NETNAMES;
942  else if( IsViaPadLayer( aLayer ) )
943  return LAYER_VIA_NETNAMES;
944 
945  // Fallback
946  return Cmts_User;
947 }
948 
955 inline bool IsNetnameLayer( LAYER_NUM aLayer )
956 {
957  return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) &&
958  aLayer < NETNAMES_LAYER_ID_END;
959 }
960 
961 
962 inline bool IsZoneLayer( LAYER_NUM aLayer )
963 {
964  return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
965 }
966 
967 
968 inline bool IsDCodeLayer( int aLayer )
969 {
970  return aLayer >= (GERBVIEW_LAYER_ID_START + GERBER_DRAWLAYERS_COUNT) &&
972 }
973 
974 
981 inline bool IsNetCopperLayer( LAYER_NUM aLayer )
982 {
983  static std::set<LAYER_NUM> netCopperLayers =
984  {
985  LAYER_PAD_FR,
986  LAYER_PAD_BK,
993  };
994 
995  return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
996 }
997 
998 
999 PCB_LAYER_ID ToLAYER_ID( int aLayer );
1000 
1001 #endif // LAYER_IDS_H
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
LSET(const BASE_SET &aOther)
Definition: layer_ids.h:524
NETNAMES_LAYER_ID
Dedicated layers for net names used in Pcbnew.
Definition: layer_ids.h:149
currently selected items overlay
Definition: layer_ids.h:214
smd pads, front layer
Definition: layer_ids.h:197
to draw micro vias
Definition: layer_ids.h:189
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:465
Auxiliary items (guides, rule, etc)
Definition: layer_ids.h:217
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:968
layer for drc markers with SEVERITY_ERROR
Definition: layer_ids.h:211
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:905
static LSET ForbiddenFootprintLayers()
Layers which are not allowed within footprint definitions.
Definition: lset.cpp:888
for drawingsheetEditor previewing
Definition: layer_ids.h:237
Meta control for all pads opacity/visibility (color ignored)
Definition: layer_ids.h:225
static LSET BackTechMask()
Return a mask holding all technical layers (no CU layer) on back side.
Definition: lset.cpp:794
PCB cursor.
Definition: layer_ids.h:216
show footprints values (when texts are visible)
Definition: layer_ids.h:205
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:184
smd pads, back layer
Definition: layer_ids.h:198
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
Definition: layer_ids.h:573
std::bitset< PCB_LAYER_ID_COUNT > BASE_SET
Definition: layer_ids.h:493
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Definition: lset.cpp:773
Additional netnames layers (not associated with a PCB layer)
Definition: layer_ids.h:160
GAL_LAYER_ID ToGalLayer(int aInteger)
Definition: layer_ids.h:261
anchor of items having an anchor point (texts, footprints)
Definition: layer_ids.h:196
int LAYER_NUM
This can be replaced with int and removed.
Definition: layer_ids.h:40
Definition: bitmap.cpp:64
static LSET FrontTechMask()
Return a mask holding all technical layers (no CU layer) on front side.
Definition: lset.cpp:806
show footprints on back
Definition: layer_ids.h:204
LSEQ()
Definition: layer_ids.h:469
PCB_LAYER_ID operator *() const
Definition: layer_ids.h:486
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:284
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
Reserved space for board layer netnames.
Definition: layer_ids.h:156
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:210
bool IsPcbLayer(LAYER_NUM aLayer)
Test whether a layer is a valid layer for Pcbnew.
Definition: layer_ids.h:776
Control for copper zone opacity/visibility (color ignored)
Definition: layer_ids.h:226
LSET(PCB_LAYER_ID aLayer)
Take a PCB_LAYER_ID and sets that bit.
Definition: layer_ids.h:543
GAL_LAYER_ID operator+(const GAL_LAYER_ID &a, int b)
Used for via types.
Definition: layer_ids.h:268
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:932
This is the end of the layers used for visibility bit masks in Pcbnew.
Definition: layer_ids.h:221
to draw usual through hole vias
Definition: layer_ids.h:191
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:300
for drawingsheetEditor previewing
Definition: layer_ids.h:238
GerbView draw layers and d-code layers.
Definition: layer_ids.h:384
bool IsNetCopperLayer(LAYER_NUM aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
Definition: layer_ids.h:981
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:521
static LSET BackAssembly()
Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask.
Definition: lset.cpp:696
bool IsHoleLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:826
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:502
handle color for not plated holes (holes, not pads)
Definition: layer_ids.h:192
std::vector< PCB_LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.
Definition: layer_ids.h:444
#define MAX_CU_LAYERS
Definition: layer_ids.h:146
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:188
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
Definition: layer_ids.h:886
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:323
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:232
#define GERBER_DRAWLAYERS_COUNT
Definition: layer_ids.h:376
constexpr int GAL_LAYER_ID_COUNT
Definition: layer_ids.h:253
text marked as invisible
Definition: layer_ids.h:195
show footprints on front
Definition: layer_ids.h:203
bool IsNonCopperLayer(LAYER_NUM aLayerId)
Test whether a layer is a non copper layer.
Definition: layer_ids.h:798
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:278
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
Virtual layers for stacking zones and tracks on a given copper layer.
Definition: layer_ids.h:241
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
to handle and draw images bitmaps
Definition: layer_ids.h:218
drawingsheet frame and titleblock
Definition: layer_ids.h:212
GAL_SET & set(GAL_LAYER_ID aPos, bool aVal=true)
Definition: layer_ids.h:306
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:863
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:463
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:787
show a marker on pads with no nets
Definition: layer_ids.h:202
show footprints references (when texts are visible)
Definition: layer_ids.h:206
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
Definition: lset.cpp:849
GAL_LAYER_ID operator++(GAL_LAYER_ID &a)
Definition: layer_ids.h:255
std::bitset< GAL_LAYER_ID_COUNT > GAL_BASE_SET
Definition: layer_ids.h:275
LSET()
Create an empty (cleared) set.
Definition: layer_ids.h:519
multilayer pads, usually with holes
Definition: layer_ids.h:208
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:190
layer for drc markers which have been individually excluded
Definition: layer_ids.h:231
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
general purpose overlay
Definition: layer_ids.h:213
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:955
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:64
Definition: layer_ids.h:70
static constexpr int start
Definition: layer_ids.h:281
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:819
GERBVIEW_LAYER_ID
GerbView draw layers.
Definition: layer_ids.h:379
layer for drc markers with SEVERITY_WARNING
Definition: layer_ids.h:230
static LSET BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
Definition: lset.cpp:881
PCB background color.
Definition: layer_ids.h:215
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 & set()
Definition: layer_ids.h:294
to draw pad holes (plated)
Definition: layer_ids.h:209
bool IsValidLayer(LAYER_NUM aLayerId)
Test whether a given integer is a valid layer index, i.e.
Definition: layer_ids.h:765
bool IsZoneLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:962
GAL_SET(const GAL_SET &aOther)
Definition: layer_ids.h:288
bool IsUserLayer(PCB_LAYER_ID aLayerId)
Test whether a layer is a non copper and a non tech layer.
Definition: layer_ids.h:841
LSEQ(InputIterator aStart, InputIterator aEnd)
Definition: layer_ids.h:474
void Rewind()
Definition: layer_ids.h:478
wxString LayerName(int aLayer)
Returns the string equivalent of a given layer.
Definition: layer_id.cpp:27
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 ).
Definition: layer_ids.h:751
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.
Definition: layer_ids.h:169
LAYER_3D_ID
3D Viewer virtual layers for color settings
Definition: layer_ids.h:404
void operator++()
Definition: layer_ids.h:480
LSET FlipLayerMask(LSET aMask, int aCopperLayersCount=0)
Calculate the mask layer when flipping a footprint.
Definition: lset.cpp:567
bool Contains(GAL_LAYER_ID aPos)
Definition: layer_ids.h:312