KiCad PCB EDA Suite
board_design_settings.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) 2009-2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef BOARD_DESIGN_SETTINGS_H_
26 #define BOARD_DESIGN_SETTINGS_H_
27 
28 #include <class_pad.h>
29 #include <netclass.h>
30 #include <config_params.h>
32 #include <drc/drc_engine.h>
34 #include <widgets/ui_common.h>
35 #include <zone_settings.h>
36 
37 
38 #define DEFAULT_SILK_LINE_WIDTH 0.12
39 #define DEFAULT_COPPER_LINE_WIDTH 0.20
40 #define DEFAULT_EDGE_WIDTH 0.05
41 #define DEFAULT_COURTYARD_WIDTH 0.05
42 #define DEFAULT_LINE_WIDTH 0.10
43 
44 #define DEFAULT_SILK_TEXT_SIZE 1.0
45 #define DEFAULT_COPPER_TEXT_SIZE 1.5
46 #define DEFAULT_TEXT_SIZE 1.0
47 
48 #define DEFAULT_SILK_TEXT_WIDTH 0.15
49 #define DEFAULT_COPPER_TEXT_WIDTH 0.30
50 #define DEFAULT_TEXT_WIDTH 0.15
51 
52 #define DEFAULT_DIMENSION_ARROW_LENGTH 50 // mils, for legacy purposes
53 #define DEFAULT_DIMENSION_EXTENSION_OFFSET 0.5
54 
55 // Board thickness, mainly for 3D view:
56 #define DEFAULT_BOARD_THICKNESS_MM 1.6
57 
58 #define DEFAULT_PCB_EDGE_THICKNESS 0.15
59 
60 // soldermask to pad clearance. The default is 0 because usually board houses
61 // create a clearance depending on their fab process:
62 // mask material, color, price ...
63 #define DEFAULT_SOLDERMASK_CLEARANCE 0.0
64 
65 // DEFAULT_SOLDERMASK_MIN_WIDTH is only used in Gerber files: soldermask minimum size.
66 // Set to 0, because using non 0 value creates an annoying issue in Gerber files:
67 // pads are no longer identified as pads (Flashed items or regions)
68 // Therefore solder mask min width must be used only in specific cases
69 // for instance for home made boards
70 #define DEFAULT_SOLDERMASK_MIN_WIDTH 0.0
71 
72 #define DEFAULT_SOLDERPASTE_CLEARANCE 0.0
73 #define DEFAULT_SOLDERPASTE_RATIO 0.0
74 
75 #define DEFAULT_CUSTOMTRACKWIDTH 0.2
76 #define DEFAULT_CUSTOMDPAIRWIDTH 0.125
77 #define DEFAULT_CUSTOMDPAIRGAP 0.18
78 #define DEFAULT_CUSTOMDPAIRVIAGAP 0.18
79 
80 #define DEFAULT_MINCLEARANCE 0.0 // overall min clearance
81 #define DEFAULT_TRACKMINWIDTH 0.2 // track width min value
82 #define DEFAULT_VIASMINSIZE 0.4 // vias (not micro vias) min diameter
83 #define DEFAULT_MINTHROUGHDRILL 0.3 // through holes (not micro vias) min drill diameter
84 #define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
85 #define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
86 #define DEFAULT_HOLETOHOLEMIN 0.25 // separation between drilled hole edges
87 
88 #define DEFAULT_COPPEREDGECLEARANCE 0.01 // clearance between copper items and edge cuts
89 #define LEGACY_COPPEREDGECLEARANCE -0.01 // A flag to indicate the legacy method (based
90  // on edge cut line thicknesses) should be used.
91 
92 #define MINIMUM_ERROR_SIZE_MM 0.001
93 #define MAXIMUM_ERROR_SIZE_MM 0.1
94 
95 
102 {
103  int m_Diameter; // <= 0 means use Netclass via diameter
104  int m_Drill; // <= 0 means use Netclass via drill
105 
107  {
108  m_Diameter = 0;
109  m_Drill = 0;
110  }
111 
112  VIA_DIMENSION( int aDiameter, int aDrill )
113  {
114  m_Diameter = aDiameter;
115  m_Drill = aDrill;
116  }
117 
118  bool operator==( const VIA_DIMENSION& aOther ) const
119  {
120  return ( m_Diameter == aOther.m_Diameter ) && ( m_Drill == aOther.m_Drill );
121  }
122 
123  bool operator<( const VIA_DIMENSION& aOther ) const
124  {
125  if( m_Diameter != aOther.m_Diameter )
126  return m_Diameter < aOther.m_Diameter;
127 
128  return m_Drill < aOther.m_Drill;
129  }
130 };
131 
132 
139 {
140  int m_Width; // <= 0 means use Netclass differential pair width
141  int m_Gap; // <= 0 means use Netclass differential pair gap
142  int m_ViaGap; // <= 0 means use Netclass differential pair via gap
143 
145  {
146  m_Width = 0;
147  m_Gap = 0;
148  m_ViaGap = 0;
149  }
150 
151  DIFF_PAIR_DIMENSION( int aWidth, int aGap, int aViaGap )
152  {
153  m_Width = aWidth;
154  m_Gap = aGap;
155  m_ViaGap = aViaGap;
156  }
157 
158  bool operator==( const DIFF_PAIR_DIMENSION& aOther ) const
159  {
160  return ( m_Width == aOther.m_Width )
161  && ( m_Gap == aOther.m_Gap )
162  && ( m_ViaGap == aOther.m_ViaGap );
163  }
164 
165  bool operator<( const DIFF_PAIR_DIMENSION& aOther ) const
166  {
167  if( m_Width != aOther.m_Width )
168  return m_Width < aOther.m_Width;
169 
170  if( m_Gap != aOther.m_Gap )
171  return m_Gap < aOther.m_Gap;
172 
173  return m_ViaGap < aOther.m_ViaGap;
174  }
175 };
176 
177 
178 enum
179 {
186 
188 };
189 
190 
192 {
193  wxString m_Text;
194  bool m_Visible;
195  int m_Layer;
196 
197  TEXT_ITEM_INFO( const wxString& aText, bool aVisible, int aLayer )
198  {
199  m_Text = aText;
200  m_Visible = aVisible;
201  m_Layer = aLayer;
202  }
203 };
204 
205 
206 // forward declaration from class_track.h
207 enum class VIATYPE : int;
208 
209 // forward declarations from class_dimension.h
210 enum class DIM_UNITS_FORMAT : int;
211 enum class DIM_TEXT_POSITION : int;
212 enum class DIM_UNITS_MODE : int;
213 
214 
220 {
221 public:
222  // Note: the first value in each dimensions list is the current netclass value
223  std::vector<int> m_TrackWidthList;
224  std::vector<VIA_DIMENSION> m_ViasDimensionsList;
225  std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList;
226 
230 
231  bool m_UseConnectedTrackWidth; // use width of existing track when creating a new,
232  // connected track
233  int m_MinClearance; // overall min clearance
234  int m_TrackMinWidth; // overall min track width
235  int m_ViasMinAnnulus; // overall minimum width of the via copper ring
236  int m_ViasMinSize; // overall vias (not micro vias) min diameter
237  int m_MinThroughDrill; // through hole (not micro vias) min drill diameter
238  int m_MicroViasMinSize; // micro vias min diameter
239  int m_MicroViasMinDrill; // micro vias min drill diameter
241  int m_HoleToHoleMin; // Min width of peninsula between two drilled holes
242 
243  std::shared_ptr<DRC_ENGINE> m_DRCEngine;
244  std::map<int, int> m_DRCSeverities; // Map from DRCErrorCode to SEVERITY
245  std::set<wxString> m_DrcExclusions;
246 
247  /*
248  * Option to select different fill algorithms.
249  * There are currenly two supported values:
250  * 5:
251  * - Use thick outlines around filled polygons (gives smoothest shape but at the expense
252  * of processing time and slight infidelity when exporting)
253  * - Use zone outline when knocking out higher-priority zones (just wrong, but mimics
254  * legacy behaviour.
255  * 6:
256  * - No thick outline.
257  * - Use filled areas when knocking out higher-priority zones.
258  */
260 
261  // When smoothing the zone's outline there's the question of external fillets (that is, those
262  // applied to concave corners). While it seems safer to never have copper extend outside the
263  // zone outline, 5.1.x and prior did indeed fill them so we leave the mode available.
265 
266  // Maximum error allowed when approximating circles and arcs to segments
268 
269  // Global mask margins:
270  int m_SolderMaskMargin; // Solder mask margin
271  int m_SolderMaskMinWidth; // Solder mask min width (2 areas closer than this
272  // width are merged)
273  int m_SolderPasteMargin; // Solder paste margin absolute value
274  double m_SolderPasteMarginRatio; // Solder pask margin ratio value of pad size
275  // The final margin is the sum of these 2 values
276 
277  // Variables used in footprint editing (default value in item/footprint creation)
278  std::vector<TEXT_ITEM_INFO> m_DefaultFPTextItems;
279 
280  // Arrays of default values for the various layer classes.
281  int m_LineThickness[ LAYER_CLASS_COUNT ];
282  wxSize m_TextSize[ LAYER_CLASS_COUNT ];
283  int m_TextThickness[ LAYER_CLASS_COUNT ];
284  bool m_TextItalic[ LAYER_CLASS_COUNT ];
285  bool m_TextUpright[ LAYER_CLASS_COUNT ];
286 
287  // Default values for dimension objects
296 
297  // Miscellaneous
300 
301  D_PAD m_Pad_Master; // A dummy pad to store all default parameters
302  // when importing values or creating a new pad
303 
304  // Set to true if the board has a stackup management.
305  // If not set a default basic stackup witll be used to generate the ;gbrjob file.
306  // Could be removed later, or at least always set to true
308 
309 private:
310  // Indicies into the trackWidth, viaSizes and diffPairDimensions lists.
311  // The 0 index is always the current netclass value(s)
313  unsigned m_viaSizeIndex;
314  unsigned m_diffPairIndex;
315 
316  // Custom values for track/via sizes (specified via dialog instead of netclass or lists)
320 
321  // Custom values for differential pairs (specified via dialog instead of netclass/lists)
324 
326 
328 
330 
334 
340 
343 
346 
349 
350  void initFromOther( const BOARD_DESIGN_SETTINGS& aOther );
351 
352  bool migrateSchema0to1();
353 
354 public:
355  BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
356 
357  virtual ~BOARD_DESIGN_SETTINGS();
358 
360 
362 
363  bool LoadFromFile( const wxString& aDirectory = "" ) override;
364 
365  bool Migrate() override;
366 
368 
369  int GetSeverity( int aDRCErrorCode );
370 
374  bool Ignore( int aDRCErrorCode );
375 
377  {
378  return *m_netClasses;
379  }
380 
381  void SetNetClasses( NETCLASSES* aNetClasses )
382  {
383  if( aNetClasses )
384  m_netClasses = aNetClasses;
385  else
386  m_netClasses = &m_internalNetClasses;
387  }
388 
390  {
391  return m_defaultZoneSettings;
392  }
393 
394  void SetDefaultZoneSettings( const ZONE_SETTINGS& aSettings )
395  {
396  m_defaultZoneSettings = aSettings;
397  }
398 
403  inline NETCLASS* GetDefault() const
404  {
405  return GetNetClasses().GetDefaultPtr();
406  }
407 
412  inline const wxString& GetCurrentNetClassName() const
413  {
414  return m_currentNetClassName;
415  }
416 
421  inline bool UseNetClassTrack() const
422  {
423  return ( m_trackWidthIndex == 0 && !m_useCustomTrackVia );
424  }
425 
430  inline bool UseNetClassVia() const
431  {
432  return ( m_viaSizeIndex == 0 && !m_useCustomTrackVia );
433  }
434 
439  inline bool UseNetClassDiffPair() const
440  {
441  return ( m_diffPairIndex == 0 && !m_useCustomDiffPair );
442  }
443 
452  bool SetCurrentNetClass( const wxString& aNetClassName );
453 
459 
465 
472 
479 
484  inline unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; }
485 
492  void SetTrackWidthIndex( unsigned aIndex );
493 
500  inline int GetCurrentTrackWidth() const
501  {
502  return m_useCustomTrackVia ? m_customTrackWidth : m_TrackWidthList[m_trackWidthIndex];
503  }
504 
512  inline void SetCustomTrackWidth( int aWidth )
513  {
514  m_customTrackWidth = aWidth;
515  }
516 
521  inline int GetCustomTrackWidth() const
522  {
523  return m_customTrackWidth;
524  }
525 
530  inline unsigned GetViaSizeIndex() const
531  {
532  return m_viaSizeIndex;
533  }
534 
541  void SetViaSizeIndex( unsigned aIndex );
542 
549  inline int GetCurrentViaSize() const
550  {
551  if( m_useCustomTrackVia )
552  return m_customViaSize.m_Diameter;
553  else
554  return m_ViasDimensionsList[m_viaSizeIndex].m_Diameter;
555  }
556 
564  inline void SetCustomViaSize( int aSize )
565  {
566  m_customViaSize.m_Diameter = aSize;
567  }
568 
573  inline int GetCustomViaSize() const
574  {
575  return m_customViaSize.m_Diameter;
576  }
577 
584  int GetCurrentViaDrill() const;
585 
593  inline void SetCustomViaDrill( int aDrill )
594  {
595  m_customViaSize.m_Drill = aDrill;
596  }
597 
602  inline int GetCustomViaDrill() const
603  {
604  return m_customViaSize.m_Drill;
605  }
606 
614  inline void UseCustomTrackViaSize( bool aEnabled )
615  {
616  m_useCustomTrackVia = aEnabled;
617  }
618 
623  inline bool UseCustomTrackViaSize() const
624  {
625  return m_useCustomTrackVia;
626  }
627 
632  inline unsigned GetDiffPairIndex() const { return m_diffPairIndex; }
633 
638  void SetDiffPairIndex( unsigned aIndex );
639 
646  inline void SetCustomDiffPairWidth( int aWidth )
647  {
648  m_customDiffPair.m_Width = aWidth;
649  }
650 
656  {
657  return m_customDiffPair.m_Width;
658  }
659 
666  inline void SetCustomDiffPairGap( int aGap )
667  {
668  m_customDiffPair.m_Gap = aGap;
669  }
670 
675  inline int GetCustomDiffPairGap()
676  {
677  return m_customDiffPair.m_Gap;
678  }
679 
686  inline void SetCustomDiffPairViaGap( int aGap )
687  {
688  m_customDiffPair.m_ViaGap = aGap;
689  }
690 
696  {
697  return m_customDiffPair.m_ViaGap > 0 ? m_customDiffPair.m_ViaGap : m_customDiffPair.m_Gap;
698  }
699 
705  inline void UseCustomDiffPairDimensions( bool aEnabled )
706  {
707  m_useCustomDiffPair = aEnabled;
708  }
709 
714  inline bool UseCustomDiffPairDimensions() const
715  {
716  return m_useCustomDiffPair;
717  }
718 
725  inline int GetCurrentDiffPairWidth() const
726  {
727  if( m_useCustomDiffPair )
728  return m_customDiffPair.m_Width;
729  else
730  return m_DiffPairDimensionsList[m_diffPairIndex].m_Width;
731  }
732 
739  inline int GetCurrentDiffPairGap() const
740  {
741  if( m_useCustomDiffPair )
742  return m_customDiffPair.m_Gap;
743  else
744  return m_DiffPairDimensionsList[m_diffPairIndex].m_Gap;
745  }
746 
753  inline int GetCurrentDiffPairViaGap() const
754  {
755  if( m_useCustomDiffPair )
756  return m_customDiffPair.m_ViaGap;
757  else
758  return m_DiffPairDimensionsList[m_diffPairIndex].m_ViaGap;
759  }
760 
766  void SetMinHoleSeparation( int aDistance );
767 
772  void SetCopperEdgeClearance( int aDistance );
773 
779  inline LSET GetEnabledLayers() const
780  {
781  return m_enabledLayers;
782  }
783 
789  void SetEnabledLayers( LSET aMask );
790 
797  inline bool IsLayerEnabled( PCB_LAYER_ID aLayerId ) const
798  {
799  return m_enabledLayers[aLayerId];
800  }
801 
806  inline int GetCopperLayerCount() const
807  {
808  return m_copperLayerCount;
809  }
810 
816  void SetCopperLayerCount( int aNewLayerCount );
817 
818  inline int GetBoardThickness() const { return m_boardThickness; }
819  inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; }
820 
821  /*
822  * Function GetDRCEpsilon
823  * an epsilon which accounts for rounding errors, etc. While currently an advanced cfg,
824  * going through this API allows us to easily change it to board-specific if so desired.
825  */
826  int GetDRCEpsilon() const;
827 
832  int GetHolePlatingThickness() const;
833 
838  int GetLineThickness( PCB_LAYER_ID aLayer ) const;
839 
844  wxSize GetTextSize( PCB_LAYER_ID aLayer ) const;
845 
850  int GetTextThickness( PCB_LAYER_ID aLayer ) const;
851 
852  bool GetTextItalic( PCB_LAYER_ID aLayer ) const;
853  bool GetTextUpright( PCB_LAYER_ID aLayer ) const;
854 
855  int GetLayerClass( PCB_LAYER_ID aLayer ) const;
856 };
857 
858 #endif // BOARD_DESIGN_SETTINGS_H_
int GetCurrentMicroViaSize()
Function GetCurrentMicroViaSize.
bool UseNetClassTrack() const
Function UseNetClassTrack returns true if netclass values should be used to obtain appropriate track ...
void SetNetClasses(NETCLASSES *aNetClasses)
void SetCopperLayerCount(int aNewLayerCount)
Function SetCopperLayerCount do what its name says...
Struct VIA_DIMENSION is a small helper container to handle a stock of specific vias each with unique ...
void SetEnabledLayers(LSET aMask)
Function SetEnabledLayers changes the bit-mask of enabled layers.
void SetCopperEdgeClearance(int aDistance)
Function SetCopperEdgeClearance.
bool UseCustomDiffPairDimensions() const
Function UseCustomDiffPairDimensions.
DIM_UNITS_MODE
Used for storing the units selection in the file because EDA_UNITS alone doesn't cut it.
void SetTrackWidthIndex(unsigned aIndex)
Function SetTrackWidthIndex sets the current track width list index to aIndex.
int GetCustomViaSize() const
Function GetCustomViaSize.
wxString m_currentNetClassName
Current net class name used to display netclass info.
std::vector< TEXT_ITEM_INFO > m_DefaultFPTextItems
wxPoint m_GridOrigin
origin for grid offsets
int GetCurrentViaDrill() const
Function GetCurrentViaDrill.
int GetCurrentTrackWidth() const
Function GetCurrentTrackWidth.
this class manage the layers needed to make a physical board they are solder mask,...
void SetCustomDiffPairViaGap(int aGap)
Function SetCustomDiffPairViaGap Sets custom via gap for differential pairs (i.e.
BOARD_DESIGN_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
std::vector< int > m_TrackWidthList
void SetDefaultZoneSettings(const ZONE_SETTINGS &aSettings)
int GetSmallestClearanceValue()
Function GetSmallestClearanceValue.
int GetBiggestClearanceValue()
Function GetBiggestClearanceValue.
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Function IsLayerEnabled tests whether a given layer is enabled.
BOARD_STACKUP m_stackup
the description of layers stackup, for board fabrication only physical layers are in layers stackup.
int GetCurrentDiffPairGap() const
Function GetCurrentDiffPairGap.
int GetCurrentMicroViaDrill()
Function GetCurrentMicroViaDrill.
bool UseNetClassDiffPair() const
Function UseNetClassDiffPair returns true if netclass values should be used to obtain appropriate dif...
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
void SetCustomViaDrill(int aDrill)
Function SetCustomViaDrill Sets custom size for via drill (i.e.
int GetHolePlatingThickness() const
Pad & via drills are finish size.
NETCLASSES m_internalNetClasses
Net classes that are loaded from the board file before these were stored in the project.
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
bool Ignore(int aDRCErrorCode)
returns true if the DRC error code's severity is SEVERITY_IGNORE
void UseCustomDiffPairDimensions(bool aEnabled)
Function UseCustomDiffPairDimensions Enables/disables custom differential pair dimensions.
bool operator<(const VIA_DIMENSION &aOther) const
int m_DimensionPrecision
Number of digits after the decimal.
ZONE_SETTINGS m_defaultZoneSettings
The defualt settings that will be used for new zones.
bool operator<(const DIFF_PAIR_DIMENSION &aOther) const
DIFF_PAIR_DIMENSION m_customDiffPair
int GetTextThickness(PCB_LAYER_ID aLayer) const
Function GetTextThickness Returns the default text thickness from the layer class for the given layer...
TEXT_ITEM_INFO(const wxString &aText, bool aVisible, int aLayer)
void SetBoardThickness(int aThickness)
VIATYPE m_CurrentViaType
(VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)
Struct DIFF_PAIR_DIMENSION is a small helper container to handle a stock of specific differential pai...
void SetCustomViaSize(int aSize)
Function SetCustomViaSize Sets custom size for via diameter (i.e.
int GetCustomDiffPairWidth()
Function GetCustomDiffPairWidth.
DIM_TEXT_POSITION m_DimensionTextPosition
DIM_UNITS_MODE m_DimensionUnitsMode
int GetLayerClass(PCB_LAYER_ID aLayer) const
bool GetTextUpright(PCB_LAYER_ID aLayer) const
bool GetTextItalic(PCB_LAYER_ID aLayer) const
int GetLineThickness(PCB_LAYER_ID aLayer) const
Function GetLineThickness Returns the default graphic segment thickness from the layer class for the ...
bool UseCustomTrackViaSize() const
Function UseCustomTrackViaSize.
int GetCustomViaDrill() const
Function GetCustomViaDrill.
void SetViaSizeIndex(unsigned aIndex)
Function SetViaSizeIndex sets the current via size list index to aIndex.
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
BOARD_STACKUP & GetStackupDescriptor()
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
NETCLASSES is a container for NETCLASS instances.
Definition: netclass.h:222
const wxString & GetCurrentNetClassName() const
Function GetCurrentNetClassName.
unsigned GetViaSizeIndex() const
Function GetViaSizeIndex.
void SetMinHoleSeparation(int aDistance)
Function SetMinHoleSeparation.
bool UseNetClassVia() const
Function UseNetClassVia returns true if netclass values should be used to obtain appropriate via size...
void SetCustomDiffPairWidth(int aWidth)
Function SetCustomDiffPairWidth Sets custom track width for differential pairs (i....
bool LoadFromFile(const wxString &aDirectory="") override
Loads the backing file from disk and then calls Load()
int GetCustomTrackWidth() const
Function GetCustomTrackWidth.
NETCLASS handles a collection of nets and the parameters used to route or test these nets.
Definition: netclass.h:49
VIATYPE
Definition: class_track.h:68
int GetCurrentDiffPairWidth() const
Function GetCurrentDiffPairWidth.
unsigned GetTrackWidthIndex() const
Function GetTrackWidthIndex.
Functions to provide common constants and other functions to assist in making a consistent UI.
BOARD_DESIGN_SETTINGS & operator=(const BOARD_DESIGN_SETTINGS &aOther)
NETCLASSES & GetNetClasses() const
bool m_BlindBuriedViaAllowed
true to allow blind/buried vias
void SetDiffPairIndex(unsigned aIndex)
Function SetDiffPairIndex.
void SetCustomDiffPairGap(int aGap)
Function SetCustomDiffPairGap Sets custom gap for differential pairs (i.e.
NETCLASS * GetDefaultPtr() const
Definition: netclass.h:269
std::map< int, int > m_DRCSeverities
void SetCustomTrackWidth(int aWidth)
Function SetCustomTrackWidth Sets custom width for track (i.e.
Pad object description.
ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:67
bool Migrate() override
Migrates the schema of this settings from the version in the file to the latest version.
DIM_TEXT_POSITION
Where to place the text on a dimension.
bool operator==(const VIA_DIMENSION &aOther) const
int GetCurrentViaSize() const
Function GetCurrentViaSize.
bool SetCurrentNetClass(const wxString &aNetClassName)
Function SetCurrentNetClass Must be called after a netclass selection (or after a netclass parameter ...
LSET GetEnabledLayers() const
Function GetEnabledLayers returns a bit-mask of all the layers that are enabled.
int GetCustomDiffPairViaGap()
Function GetCustomDiffPairViaGap.
NETCLASS * GetDefault() const
Function GetDefault.
int GetCurrentDiffPairViaGap() const
Function GetCurrentDiffPairViaGap.
void initFromOther(const BOARD_DESIGN_SETTINGS &aOther)
std::vector< VIA_DIMENSION > m_ViasDimensionsList
DIFF_PAIR_DIMENSION(int aWidth, int aGap, int aViaGap)
DIM_UNITS_FORMAT m_DimensionUnitsFormat
bool operator==(const DIFF_PAIR_DIMENSION &aOther) const
VIA_DIMENSION(int aDiameter, int aDrill)
unsigned GetDiffPairIndex() const
Function GetDiffPairIndex.
NETCLASSES * m_netClasses
This will point to m_internalNetClasses until it is repointed to the project after load.
ZONE_SETTINGS & GetDefaultZoneSettings()
int m_copperLayerCount
Number of copper layers for this design.
bool m_MicroViasAllowed
true to allow micro vias
int GetSeverity(int aDRCErrorCode)
std::set< wxString > m_DrcExclusions
int GetCopperLayerCount() const
Function GetCopperLayerCount.
LSET m_enabledLayers
Bit-mask for layer enabling.
wxPoint m_AuxOrigin
origin for plot exports
wxSize GetTextSize(PCB_LAYER_ID aLayer) const
Function GetTextSize Returns the default text size from the layer class for the given layer.
int m_boardThickness
Board thickness for 3D viewer.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
int GetCustomDiffPairGap()
Function GetCustomDiffPairGap.
void UseCustomTrackViaSize(bool aEnabled)
Function UseCustomTrackViaSize Enables/disables custom track/via size settings.
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.