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 <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 #define DEFAULT_SILKCLEARANCE 0.0
92 
93 #define MINIMUM_ERROR_SIZE_MM 0.001
94 #define MAXIMUM_ERROR_SIZE_MM 0.1
95 
96 
103 {
104  int m_Diameter; // <= 0 means use Netclass via diameter
105  int m_Drill; // <= 0 means use Netclass via drill
106 
108  {
109  m_Diameter = 0;
110  m_Drill = 0;
111  }
112 
113  VIA_DIMENSION( int aDiameter, int aDrill )
114  {
115  m_Diameter = aDiameter;
116  m_Drill = aDrill;
117  }
118 
119  bool operator==( const VIA_DIMENSION& aOther ) const
120  {
121  return ( m_Diameter == aOther.m_Diameter ) && ( m_Drill == aOther.m_Drill );
122  }
123 
124  bool operator<( const VIA_DIMENSION& aOther ) const
125  {
126  if( m_Diameter != aOther.m_Diameter )
127  return m_Diameter < aOther.m_Diameter;
128 
129  return m_Drill < aOther.m_Drill;
130  }
131 };
132 
133 
140 {
141  int m_Width; // <= 0 means use Netclass differential pair width
142  int m_Gap; // <= 0 means use Netclass differential pair gap
143  int m_ViaGap; // <= 0 means use Netclass differential pair via gap
144 
146  {
147  m_Width = 0;
148  m_Gap = 0;
149  m_ViaGap = 0;
150  }
151 
152  DIFF_PAIR_DIMENSION( int aWidth, int aGap, int aViaGap )
153  {
154  m_Width = aWidth;
155  m_Gap = aGap;
156  m_ViaGap = aViaGap;
157  }
158 
159  bool operator==( const DIFF_PAIR_DIMENSION& aOther ) const
160  {
161  return ( m_Width == aOther.m_Width )
162  && ( m_Gap == aOther.m_Gap )
163  && ( m_ViaGap == aOther.m_ViaGap );
164  }
165 
166  bool operator<( const DIFF_PAIR_DIMENSION& aOther ) const
167  {
168  if( m_Width != aOther.m_Width )
169  return m_Width < aOther.m_Width;
170 
171  if( m_Gap != aOther.m_Gap )
172  return m_Gap < aOther.m_Gap;
173 
174  return m_ViaGap < aOther.m_ViaGap;
175  }
176 };
177 
178 
179 enum
180 {
187 
189 };
190 
191 
193 {
194  wxString m_Text;
195  bool m_Visible;
196  int m_Layer;
197 
198  TEXT_ITEM_INFO( const wxString& aText, bool aVisible, int aLayer )
199  {
200  m_Text = aText;
201  m_Visible = aVisible;
202  m_Layer = aLayer;
203  }
204 };
205 
206 
207 // forward declaration from class_track.h
208 enum class VIATYPE : int;
209 
210 // forward declarations from dimension.h
211 enum class DIM_UNITS_FORMAT : int;
212 enum class DIM_TEXT_POSITION : int;
213 enum class DIM_UNITS_MODE : int;
214 
215 
221 {
222 public:
223  // Note: the first value in each dimensions list is the current netclass value
224  std::vector<int> m_TrackWidthList;
225  std::vector<VIA_DIMENSION> m_ViasDimensionsList;
226  std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList;
227 
231 
232  bool m_UseConnectedTrackWidth; // use width of existing track when creating a new,
233  // connected track
234  int m_MinClearance; // overall min clearance
235  int m_TrackMinWidth; // overall min track width
236  int m_ViasMinAnnulus; // overall minimum width of the via copper ring
237  int m_ViasMinSize; // overall vias (not micro vias) min diameter
238  int m_MinThroughDrill; // through hole (not micro vias) min drill diameter
239  int m_MicroViasMinSize; // micro vias min diameter
240  int m_MicroViasMinDrill; // micro vias min drill diameter
242  int m_HoleToHoleMin; // Min width of peninsula between two drilled holes
244 
245  std::shared_ptr<DRC_ENGINE> m_DRCEngine;
246  std::map<int, int> m_DRCSeverities; // Map from DRCErrorCode to SEVERITY
247  std::set<wxString> m_DrcExclusions;
248 
249  /*
250  * Option to select different fill algorithms.
251  * There are currenly two supported values:
252  * 5:
253  * - Use thick outlines around filled polygons (gives smoothest shape but at the expense
254  * of processing time and slight infidelity when exporting)
255  * - Use zone outline when knocking out higher-priority zones (just wrong, but mimics
256  * legacy behaviour.
257  * 6:
258  * - No thick outline.
259  * - Use filled areas when knocking out higher-priority zones.
260  */
262 
263  // When smoothing the zone's outline there's the question of external fillets (that is, those
264  // applied to concave corners). While it seems safer to never have copper extend outside the
265  // zone outline, 5.1.x and prior did indeed fill them so we leave the mode available.
267 
268  // Maximum error allowed when approximating circles and arcs to segments
270 
271  // Global mask margins:
272  int m_SolderMaskMargin; // Solder mask margin
273  int m_SolderMaskMinWidth; // Solder mask min width (2 areas closer than this
274  // width are merged)
275  int m_SolderPasteMargin; // Solder paste margin absolute value
276  double m_SolderPasteMarginRatio; // Solder pask margin ratio value of pad size
277  // The final margin is the sum of these 2 values
278 
279  // Variables used in footprint editing (default value in item/footprint creation)
280  std::vector<TEXT_ITEM_INFO> m_DefaultFPTextItems;
281 
282  // Arrays of default values for the various layer classes.
283  int m_LineThickness[ LAYER_CLASS_COUNT ];
284  wxSize m_TextSize[ LAYER_CLASS_COUNT ];
285  int m_TextThickness[ LAYER_CLASS_COUNT ];
286  bool m_TextItalic[ LAYER_CLASS_COUNT ];
287  bool m_TextUpright[ LAYER_CLASS_COUNT ];
288 
289  // Default values for dimension objects
298 
299  // Miscellaneous
300  wxPoint m_AuxOrigin;
301  wxPoint m_GridOrigin;
302 
303  PAD m_Pad_Master; // A dummy pad to store all default parameters
304  // when importing values or creating a new pad
305 
306  // Set to true if the board has a stackup management.
307  // If not set a default basic stackup will be used to generate the gbrjob file.
308  // Could be removed later, or at least always set to true
310 
311 private:
312  // Indicies into the trackWidth, viaSizes and diffPairDimensions lists.
313  // The 0 index is always the current netclass value(s)
315  unsigned m_viaSizeIndex;
316  unsigned m_diffPairIndex;
317 
318  // Custom values for track/via sizes (specified via dialog instead of netclass or lists)
322 
323  // Custom values for differential pairs (specified via dialog instead of netclass/lists)
326 
328 
330 
332 
336 
342 
345 
348 
351 
352  void initFromOther( const BOARD_DESIGN_SETTINGS& aOther );
353 
354  bool migrateSchema0to1();
355 
356 public:
357  BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
358 
359  virtual ~BOARD_DESIGN_SETTINGS();
360 
362 
364 
365  bool LoadFromFile( const wxString& aDirectory = "" ) 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 
449 
455 
462 
469 
474  inline unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; }
475 
482  void SetTrackWidthIndex( unsigned aIndex );
483 
490  int GetCurrentTrackWidth() const;
491 
499  inline void SetCustomTrackWidth( int aWidth )
500  {
501  m_customTrackWidth = aWidth;
502  }
503 
508  inline int GetCustomTrackWidth() const
509  {
510  return m_customTrackWidth;
511  }
512 
517  inline unsigned GetViaSizeIndex() const
518  {
519  return m_viaSizeIndex;
520  }
521 
528  void SetViaSizeIndex( unsigned aIndex );
529 
536  int GetCurrentViaSize() const;
537 
545  inline void SetCustomViaSize( int aSize )
546  {
547  m_customViaSize.m_Diameter = aSize;
548  }
549 
554  inline int GetCustomViaSize() const
555  {
556  return m_customViaSize.m_Diameter;
557  }
558 
565  int GetCurrentViaDrill() const;
566 
574  inline void SetCustomViaDrill( int aDrill )
575  {
576  m_customViaSize.m_Drill = aDrill;
577  }
578 
583  inline int GetCustomViaDrill() const
584  {
585  return m_customViaSize.m_Drill;
586  }
587 
595  inline void UseCustomTrackViaSize( bool aEnabled )
596  {
597  m_useCustomTrackVia = aEnabled;
598  }
599 
604  inline bool UseCustomTrackViaSize() const
605  {
606  return m_useCustomTrackVia;
607  }
608 
613  inline unsigned GetDiffPairIndex() const { return m_diffPairIndex; }
614 
619  void SetDiffPairIndex( unsigned aIndex );
620 
627  inline void SetCustomDiffPairWidth( int aWidth )
628  {
629  m_customDiffPair.m_Width = aWidth;
630  }
631 
637  {
638  return m_customDiffPair.m_Width;
639  }
640 
647  inline void SetCustomDiffPairGap( int aGap )
648  {
649  m_customDiffPair.m_Gap = aGap;
650  }
651 
656  inline int GetCustomDiffPairGap()
657  {
658  return m_customDiffPair.m_Gap;
659  }
660 
667  inline void SetCustomDiffPairViaGap( int aGap )
668  {
669  m_customDiffPair.m_ViaGap = aGap;
670  }
671 
677  {
678  return m_customDiffPair.m_ViaGap > 0 ? m_customDiffPair.m_ViaGap : m_customDiffPair.m_Gap;
679  }
680 
686  inline void UseCustomDiffPairDimensions( bool aEnabled )
687  {
688  m_useCustomDiffPair = aEnabled;
689  }
690 
695  inline bool UseCustomDiffPairDimensions() const
696  {
697  return m_useCustomDiffPair;
698  }
699 
706  inline int GetCurrentDiffPairWidth() const
707  {
708  if( m_useCustomDiffPair )
709  return m_customDiffPair.m_Width;
710  else
711  return m_DiffPairDimensionsList[m_diffPairIndex].m_Width;
712  }
713 
720  inline int GetCurrentDiffPairGap() const
721  {
722  if( m_useCustomDiffPair )
723  return m_customDiffPair.m_Gap;
724  else
725  return m_DiffPairDimensionsList[m_diffPairIndex].m_Gap;
726  }
727 
734  inline int GetCurrentDiffPairViaGap() const
735  {
736  if( m_useCustomDiffPair )
737  return m_customDiffPair.m_ViaGap;
738  else
739  return m_DiffPairDimensionsList[m_diffPairIndex].m_ViaGap;
740  }
741 
747  void SetMinHoleSeparation( int aDistance );
748 
753  void SetCopperEdgeClearance( int aDistance );
754 
761  void SetSilkClearance( int aDistance );
762 
768  inline LSET GetEnabledLayers() const
769  {
770  return m_enabledLayers;
771  }
772 
778  void SetEnabledLayers( LSET aMask );
779 
786  inline bool IsLayerEnabled( PCB_LAYER_ID aLayerId ) const
787  {
788  if( aLayerId >= 0 && aLayerId < PCB_LAYER_ID_COUNT )
789  return m_enabledLayers[aLayerId];
790 
791  return false;
792  }
793 
798  inline int GetCopperLayerCount() const
799  {
800  return m_copperLayerCount;
801  }
802 
808  void SetCopperLayerCount( int aNewLayerCount );
809 
810  inline int GetBoardThickness() const { return m_boardThickness; }
811  inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; }
812 
813  /*
814  * Function GetDRCEpsilon
815  * an epsilon which accounts for rounding errors, etc. While currently an advanced cfg,
816  * going through this API allows us to easily change it to board-specific if so desired.
817  */
818  int GetDRCEpsilon() const;
819 
824  int GetHolePlatingThickness() const;
825 
830  int GetLineThickness( PCB_LAYER_ID aLayer ) const;
831 
836  wxSize GetTextSize( PCB_LAYER_ID aLayer ) const;
837 
842  int GetTextThickness( PCB_LAYER_ID aLayer ) const;
843 
844  bool GetTextItalic( PCB_LAYER_ID aLayer ) const;
845  bool GetTextUpright( PCB_LAYER_ID aLayer ) const;
846 
847  int GetLayerClass( PCB_LAYER_ID aLayer ) const;
848 };
849 
850 #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.
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.
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:224
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
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:271
std::map< int, int > m_DRCSeverities
void SetCustomTrackWidth(int aWidth)
Function SetCustomTrackWidth Sets custom width for track (i.e.
ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:67
bool operator==(const VIA_DIMENSION &aOther) const
int GetCurrentViaSize() const
Function GetCurrentViaSize.
LSET GetEnabledLayers() const
Function GetEnabledLayers returns a bit-mask of all the layers that are enabled.
int GetCustomDiffPairViaGap()
Function GetCustomDiffPairViaGap.
DIM_UNITS_MODE
Used for storing the units selection in the file because EDA_UNITS alone doesn't cut it.
Definition: dimension.h:57
NETCLASS * GetDefault() const
Function GetDefault.
void SetSilkClearance(int aDistance)
Function SetSilkEdgeClearance.
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_TEXT_POSITION
Where to place the text on a dimension.
Definition: dimension.h:47
DIM_UNITS_FORMAT m_DimensionUnitsFormat
bool operator==(const DIFF_PAIR_DIMENSION &aOther) const
VIA_DIMENSION(int aDiameter, int aDrill)
unsigned GetDiffPairIndex() const
Function GetDiffPairIndex.
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
Definition: dimension.h:39
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
VIATYPE
Definition: track.h:68
Definition: pad.h:59
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.