Horizon
Loading...
Searching...
No Matches
layer_ids.h
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 <stdexcept>
33#include "wx_compat.h"
34
35
41typedef int LAYER_NUM;
42
65enum PCB_LAYER_ID: int
66{
67 UNDEFINED_LAYER = -1,
68 UNSELECTED_LAYER = -2,
69
70 PCBNEW_LAYER_ID_START = 0,
71 F_Cu = PCBNEW_LAYER_ID_START,
72 In1_Cu,
73 In2_Cu,
74 In3_Cu,
75 In4_Cu,
76 In5_Cu,
77 In6_Cu,
78 In7_Cu,
79 In8_Cu,
80 In9_Cu,
81 In10_Cu,
82 In11_Cu,
83 In12_Cu,
84 In13_Cu,
85 In14_Cu,
86 In15_Cu,
87 In16_Cu,
88 In17_Cu,
89 In18_Cu,
90 In19_Cu,
91 In20_Cu,
92 In21_Cu,
93 In22_Cu,
94 In23_Cu,
95 In24_Cu,
96 In25_Cu,
97 In26_Cu,
98 In27_Cu,
99 In28_Cu,
100 In29_Cu,
101 In30_Cu,
102 B_Cu, // 31
103
104 B_Adhes,
105 F_Adhes,
106
107 B_Paste,
108 F_Paste,
109
110 B_SilkS,
111 F_SilkS,
112
113 B_Mask,
114 F_Mask, // 39
115
116 Dwgs_User,
117 Cmts_User,
118 Eco1_User,
119 Eco2_User,
120 Edge_Cuts,
121 Margin, // 45
122
123 B_CrtYd,
124 F_CrtYd,
125
126 B_Fab,
127 F_Fab, // 49
128
129 // User definable layers.
130 User_1,
131 User_2,
132 User_3,
133 User_4,
134 User_5,
135 User_6,
136 User_7,
137 User_8,
138 User_9,
139
140 Rescue, // 59
141
142 // Four reserved layers (60 - 63) for future expansion within the 64 bit integer limit.
143
144 PCB_LAYER_ID_COUNT
145};
146
147#define MAX_CU_LAYERS (B_Cu - F_Cu + 1)
148
150enum NETNAMES_LAYER_ID: int
151{
152
153 NETNAMES_LAYER_ID_START = PCB_LAYER_ID_COUNT,
154
156
157 NETNAMES_LAYER_ID_RESERVED = NETNAMES_LAYER_ID_START + PCB_LAYER_ID_COUNT,
158
160
161 LAYER_PAD_FR_NETNAMES,
162 LAYER_PAD_BK_NETNAMES,
163 LAYER_PAD_NETNAMES,
164 LAYER_VIA_NETNAMES,
165
166 NETNAMES_LAYER_ID_END
167};
168
170#define NETNAMES_LAYER_INDEX( layer ) ( NETNAMES_LAYER_ID_START + layer )
171
185enum GAL_LAYER_ID: int
186{
187 GAL_LAYER_ID_START = NETNAMES_LAYER_ID_END,
188
189 LAYER_VIAS = GAL_LAYER_ID_START + 0,
190 LAYER_VIA_MICROVIA = GAL_LAYER_ID_START + 1,
191 LAYER_VIA_BBLIND = GAL_LAYER_ID_START + 2,
192 LAYER_VIA_THROUGH = GAL_LAYER_ID_START + 3,
193 LAYER_NON_PLATEDHOLES = GAL_LAYER_ID_START + 4,
194 LAYER_MOD_TEXT = GAL_LAYER_ID_START + 5,
195// LAYER_MOD_TEXT_BK deprecated + 6,
196 LAYER_MOD_TEXT_INVISIBLE = GAL_LAYER_ID_START + 7,
197 LAYER_ANCHOR = GAL_LAYER_ID_START + 8,
198 LAYER_PAD_FR = GAL_LAYER_ID_START + 9,
199 LAYER_PAD_BK = GAL_LAYER_ID_START + 10,
200 LAYER_RATSNEST = GAL_LAYER_ID_START + 11,
201 LAYER_GRID = GAL_LAYER_ID_START + 12,
202 LAYER_GRID_AXES = GAL_LAYER_ID_START + 13,
203 LAYER_NO_CONNECTS = GAL_LAYER_ID_START + 14,
204 LAYER_MOD_FR = GAL_LAYER_ID_START + 15,
205 LAYER_MOD_BK = GAL_LAYER_ID_START + 16,
206 LAYER_MOD_VALUES = GAL_LAYER_ID_START + 17,
207 LAYER_MOD_REFERENCES = GAL_LAYER_ID_START + 18,
208 LAYER_TRACKS = GAL_LAYER_ID_START + 19,
209 LAYER_PADS_TH = GAL_LAYER_ID_START + 20,
210 LAYER_PAD_PLATEDHOLES = GAL_LAYER_ID_START + 21,
211 LAYER_VIA_HOLES = GAL_LAYER_ID_START + 22,
212 LAYER_DRC_ERROR = GAL_LAYER_ID_START + 23,
213 LAYER_DRAWINGSHEET = GAL_LAYER_ID_START + 24,
214 LAYER_GP_OVERLAY = GAL_LAYER_ID_START + 25,
215 LAYER_SELECT_OVERLAY = GAL_LAYER_ID_START + 26,
216 LAYER_PCB_BACKGROUND = GAL_LAYER_ID_START + 27,
217 LAYER_CURSOR = GAL_LAYER_ID_START + 28,
218 LAYER_AUX_ITEMS = GAL_LAYER_ID_START + 29,
219 LAYER_DRAW_BITMAPS = GAL_LAYER_ID_START + 30,
220
222 GAL_LAYER_ID_BITMASK_END = GAL_LAYER_ID_START + 31,
223
224 // Layers in this section have visibility controls but were not present in legacy board files.
225
226 LAYER_PADS = GAL_LAYER_ID_START + 32,
227 LAYER_ZONES = GAL_LAYER_ID_START + 33,
228
229 LAYER_PAD_HOLEWALLS = GAL_LAYER_ID_START + 34,
230 LAYER_VIA_HOLEWALLS = GAL_LAYER_ID_START + 35,
231 LAYER_DRC_WARNING = GAL_LAYER_ID_START + 36,
232 LAYER_DRC_EXCLUSION = GAL_LAYER_ID_START + 37,
233 LAYER_MARKER_SHADOWS = GAL_LAYER_ID_START + 38,
234
235 // Add layers below this point that do not have visibility controls, so don't need explicit
236 // enum values
237
238 LAYER_DRAWINGSHEET_PAGE1,
239 LAYER_DRAWINGSHEET_PAGEn,
240
242 LAYER_ZONE_START,
243 LAYER_ZONE_END = LAYER_ZONE_START + PCB_LAYER_ID_COUNT,
244
245 GAL_LAYER_ID_END
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
254constexpr int GAL_LAYER_ID_COUNT = GAL_LAYER_ID_END - GAL_LAYER_ID_START;
255
256inline GAL_LAYER_ID operator++( GAL_LAYER_ID& a )
257{
258 a = GAL_LAYER_ID( int( a ) + 1 );
259 return a;
260}
261
262inline 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
269inline 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
276typedef std::bitset<GAL_LAYER_ID_COUNT> GAL_BASE_SET;
277
279class GAL_SET : public GAL_BASE_SET
280{
281private:
282 static constexpr int start = static_cast<int>( GAL_LAYER_ID_START );
283
284public:
285 GAL_SET() : std::bitset<GAL_LAYER_ID_COUNT>()
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
295 GAL_SET& set()
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
324enum SCH_LAYER_ID: int
325{
326 SCH_LAYER_ID_START = GAL_LAYER_ID_END,
327
328 LAYER_WIRE = SCH_LAYER_ID_START,
329 LAYER_BUS,
330 LAYER_JUNCTION,
331 LAYER_LOCLABEL,
332 LAYER_GLOBLABEL,
333 LAYER_HIERLABEL,
334 LAYER_PINNUM,
335 LAYER_PINNAM,
336 LAYER_REFERENCEPART,
337 LAYER_VALUEPART,
338 LAYER_FIELDS,
339 LAYER_DEVICE,
340 LAYER_NOTES,
341 LAYER_PIN,
342 LAYER_SHEET,
343 LAYER_SHEETNAME,
344 LAYER_SHEETFILENAME,
345 LAYER_SHEETFIELDS,
346 LAYER_SHEETLABEL,
347 LAYER_NOCONNECT,
348 LAYER_DANGLING,
349 LAYER_ERC_WARN,
350 LAYER_ERC_ERR,
351 LAYER_DEVICE_BACKGROUND,
352 LAYER_SHEET_BACKGROUND,
353 LAYER_SCHEMATIC_GRID,
354 LAYER_SCHEMATIC_GRID_AXES,
355 LAYER_SCHEMATIC_BACKGROUND,
356 LAYER_SCHEMATIC_CURSOR,
357 LAYER_BRIGHTENED,
358 LAYER_HIDDEN,
359 LAYER_SELECTION_SHADOWS,
360 LAYER_SCHEMATIC_DRAWINGSHEET,
361 LAYER_BUS_JUNCTION,
362 LAYER_SCHEMATIC_AUX_ITEMS,
363 LAYER_SCHEMATIC_ANCHOR,
364
365 SCH_LAYER_ID_END
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
372inline SCH_LAYER_ID operator++( SCH_LAYER_ID& a )
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
382enum GERBVIEW_LAYER_ID: int
383{
384 GERBVIEW_LAYER_ID_START = SCH_LAYER_ID_END,
385
387 GERBVIEW_LAYER_ID_RESERVED = GERBVIEW_LAYER_ID_START + ( 2 * GERBER_DRAWLAYERS_COUNT ),
388
389 LAYER_DCODES,
390 LAYER_NEGATIVE_OBJECTS,
391 LAYER_GERBVIEW_GRID,
392 LAYER_GERBVIEW_AXES,
393 LAYER_GERBVIEW_BACKGROUND,
394 LAYER_GERBVIEW_DRAWINGSHEET,
395
396 GERBVIEW_LAYER_ID_END
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
407enum LAYER_3D_ID : int
408{
409 LAYER_3D_START = GERBVIEW_LAYER_ID_END,
410
411 LAYER_3D_BACKGROUND_BOTTOM,
412 LAYER_3D_BACKGROUND_TOP,
413 LAYER_3D_BOARD,
414 LAYER_3D_COPPER,
415 LAYER_3D_SILKSCREEN_BOTTOM,
416 LAYER_3D_SILKSCREEN_TOP,
417 LAYER_3D_SOLDERMASK_BOTTOM,
418 LAYER_3D_SOLDERMASK_TOP,
419 LAYER_3D_SOLDERPASTE,
420
421 LAYER_3D_END = LAYER_3D_SOLDERPASTE
422};
423
425#define LAYER_ID_COUNT LAYER_3D_END
426
427
432wxString 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
447typedef std::vector<PCB_LAYER_ID> BASE_SEQ;
448
449
466class LSEQ : public BASE_SEQ
467{
468 unsigned m_index;
469
470public:
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
489 PCB_LAYER_ID operator * () const
490 {
491 return at( m_index ); // throws std::out_of_range
492 }
493};
494
495
496typedef std::bitset<PCB_LAYER_ID_COUNT> BASE_SET;
497
498
505class LSET : public BASE_SET
506{
507public:
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
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
598
603
608
612 static LSET AllCuMask( int aCuLayerCount = MAX_CU_LAYERS );
613
618
623
624 static LSET AllLayersMask();
625
630
636
641
647
652
657
661 static LSET FrontMask();
662
666 static LSET BackMask();
667
668 static LSET UserMask();
669
675
680
687
693 LSEQ CuStack() const;
694
700 LSEQ Technicals( LSET aSubToOmit = LSET() ) const;
701
703 LSEQ Users() const;
704
707
708 LSEQ UIOrder() const;
709
717 LSEQ Seq( const PCB_LAYER_ID* aWishListSequence, unsigned aCount ) const;
718
725 LSEQ Seq() const;
726
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
758private:
759
761 LSET( unsigned long __val )
762 {
763 // not usable, it's private.
764 }
765};
766
767
775inline bool IsValidLayer( LAYER_NUM aLayerId )
776{
777 return unsigned( aLayerId ) < PCB_LAYER_ID_COUNT;
778}
779
786inline bool IsPcbLayer( LAYER_NUM aLayer )
787{
788 return aLayer >= F_Cu && aLayer < PCB_LAYER_ID_COUNT;
789}
790
797inline bool IsCopperLayer( LAYER_NUM aLayerId )
798{
799 return aLayerId >= F_Cu && aLayerId <= B_Cu;
800}
801
808inline bool IsNonCopperLayer( LAYER_NUM aLayerId )
809{
810 return aLayerId > B_Cu && aLayerId <= PCB_LAYER_ID_COUNT;
811}
812
821inline bool IsCopperLayer( LAYER_NUM aLayerId, bool aIncludeSyntheticCopperLayers )
822{
823 if( aIncludeSyntheticCopperLayers )
824 return !IsNonCopperLayer( aLayerId );
825 else
826 return IsCopperLayer( aLayerId );
827}
828
829inline bool IsViaPadLayer( LAYER_NUM aLayer )
830{
831 return aLayer == LAYER_VIA_THROUGH
832 || aLayer == LAYER_VIA_MICROVIA
833 || aLayer == LAYER_VIA_BBLIND;
834}
835
836inline 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
851inline 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
873inline 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
896inline 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
925PCB_LAYER_ID FlipLayer( PCB_LAYER_ID aLayerId, int aCopperLayersCount = 0 );
926
936LSET FlipLayerMask( LSET aMask, int aCopperLayersCount = 0 );
937
938
942inline 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
965inline bool IsNetnameLayer( LAYER_NUM aLayer )
966{
967 return aLayer >= NETNAMES_LAYER_INDEX( F_Cu ) &&
968 aLayer < NETNAMES_LAYER_ID_END;
969}
970
971
972inline bool IsZoneLayer( LAYER_NUM aLayer )
973{
974 return aLayer >= LAYER_ZONE_START && aLayer <= LAYER_ZONE_END;
975}
976
977
978inline bool IsDCodeLayer( int aLayer )
979{
980 return aLayer >= (GERBVIEW_LAYER_ID_START + GERBER_DRAWLAYERS_COUNT) &&
981 aLayer < (GERBVIEW_LAYER_ID_START + (2 * GERBER_DRAWLAYERS_COUNT));
982}
983
984
991inline bool IsNetCopperLayer( LAYER_NUM aLayer )
992{
993 static std::set<LAYER_NUM> netCopperLayers =
994 {
995 LAYER_PAD_FR,
996 LAYER_PAD_BK,
997 LAYER_PADS_TH,
998 LAYER_PAD_HOLEWALLS,
999 LAYER_VIA_THROUGH,
1000 LAYER_VIA_BBLIND,
1001 LAYER_VIA_MICROVIA,
1002 LAYER_VIA_HOLEWALLS
1003 };
1004
1005 return IsCopperLayer( aLayer ) || netCopperLayers.count( aLayer );
1006}
1007
1008
1009PCB_LAYER_ID ToLAYER_ID( int aLayer );
1010
1011#endif // LAYER_IDS_H
Helper for storing and iterating over GAL_LAYER_IDs.
Definition layer_ids.h:280
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition layer_ids.h:467
LSET is a set of PCB_LAYER_IDs.
Definition layer_ids.h:506
static LSET BackBoardTechMask()
Return a mask holding technical layers used in a board fabrication (no CU layer) on Back side.
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
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.
static LSET FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
static LSET BackTechMask()
Return a mask holding all technical layers (no CU layer) on back side.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
LSET(PCB_LAYER_ID aLayer)
Take a PCB_LAYER_ID and sets that bit.
Definition layer_ids.h:546
static LSET ForbiddenFootprintLayers()
Layers which are not allowed within footprint definitions.
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
static LSET BackAssembly()
Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask.
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
Definition layer_ids.h:576
LSEQ CuStack() const
Return a sequence of copper layers in starting from the front/top and extending to the back/bottom.
PCB_LAYER_ID ExtractLayer() const
Find the first set PCB_LAYER_ID.
LSEQ SeqStackupBottom2Top() const
Return the sequence that is typical for a bottom-to-top stack-up.
LSEQ TechAndUserUIOrder() const
Returns the technical and user layers in the order shown in layer widget.
LSET(unsigned aIdCount, int aFirst,...)
Take one or more PCB_LAYER_IDs in the argument list to construct the set.
static LSET FrontBoardTechMask()
Return a mask holding technical layers used in a board fabrication (no CU layer) on front side.
LSEQ Seq() const
Return a LSEQ from this LSET in ascending PCB_LAYER_ID order.
std::string FmtHex() const
Return a hex string showing contents of this LSEQ.
static LSET UserDefinedLayers()
Return a mask with all of the allowable user defined layers.
static LSET ExternalCuMask()
Return a mask holding the Front and Bottom layers.
LSEQ Technicals(LSET aSubToOmit=LSET()) const
Return a sequence of technical layers.
static LSET InternalCuMask()
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
static LSET FrontAssembly()
Return a complete set of all top assembly layers which is all F_SilkS and F_Mask.
std::string FmtBin() const
Return a binary string showing contents of this LSEQ.
LSET(const PCB_LAYER_ID *aArray, unsigned aCount)
Create an array or LSEQ.
LSEQ Users() const
*_User layers.
static LSET FrontTechMask()
Return a mask holding all technical layers (no CU layer) on front side.
LSET()
Create an empty (cleared) set.
Definition layer_ids.h:522
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
static LSET BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
static LSET AllBoardTechMask()
Return a mask holding board technical layers (no CU layer) on both side.
Definition wx_compat.h:13