KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include <memory>
24#include <optional>
25#include <vector>
26
28#include <eda_units.h>
29#include <lset.h>
31#include <widgets/ui_common.h>
32#include <zone_settings.h>
34#include <router/pns_meander.h>
35
36
37#define DEFAULT_SILK_LINE_WIDTH 0.1
38#define DEFAULT_COPPER_LINE_WIDTH 0.2
39#define DEFAULT_EDGE_WIDTH 0.05
40#define DEFAULT_COURTYARD_WIDTH 0.05
41#define DEFAULT_LINE_WIDTH 0.10
42
43#define DEFAULT_SILK_TEXT_SIZE 1.0
44#define DEFAULT_COPPER_TEXT_SIZE 1.5
45#define DEFAULT_TEXT_SIZE 1.0
46
47#define DEFAULT_SILK_TEXT_WIDTH 0.1
48#define DEFAULT_COPPER_TEXT_WIDTH 0.30
49#define DEFAULT_TEXT_WIDTH 0.15
50
51#define DEFAULT_DIMENSION_ARROW_LENGTH 50 // mils, for legacy purposes
52#define DEFAULT_DIMENSION_EXTENSION_OFFSET 0.5
53
54// Board thickness, mainly for 3D view:
55#define DEFAULT_BOARD_THICKNESS_MM 1.6
56
57#define DEFAULT_PCB_EDGE_THICKNESS 0.15
58
59// soldermask to pad clearance. The default is 0 because usually board houses
60// create a clearance depending on their fab process: mask material, color, price, etc.
61#define DEFAULT_SOLDERMASK_EXPANSION 0.0
62
63#define DEFAULT_SOLDERMASK_TO_COPPER_CLEARANCE 0.0
64
65#define DEFAULT_SOLDERMASK_MIN_WIDTH 0.0
66
67#define DEFAULT_SOLDERPASTE_CLEARANCE 0.0
68#define DEFAULT_SOLDERPASTE_RATIO 0.0
69
70#define DEFAULT_CUSTOMTRACKWIDTH 0.2
71#define DEFAULT_CUSTOMDPAIRWIDTH 0.125
72#define DEFAULT_CUSTOMDPAIRGAP 0.18
73#define DEFAULT_CUSTOMDPAIRVIAGAP 0.18
74
75#define DEFAULT_MEANDER_SPACING 0.6
76#define DEFAULT_DP_MEANDER_SPACING 1.0
77
78#define DEFAULT_MINCLEARANCE 0.0 // overall min clearance
79#define DEFAULT_MINCONNECTION 0.0 // overall min connection width
80#define DEFAULT_TRACKMINWIDTH 0.2 // track width min value (mm)
81#define DEFAULT_VIASMINSIZE 0.5 // vias (not micro vias) min diameter
82#define DEFAULT_MINTHROUGHDRILL 0.3 // through holes (not micro vias) min drill diameter
83#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
84#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
85#define DEFAULT_HOLETOHOLEMIN 0.25 // minimum web thickness between two drilled holes
86#define DEFAULT_HOLECLEARANCE 0.25 // copper-to-hole clearance (from IPC level A)
87
88#define DEFAULT_COPPEREDGECLEARANCE 0.5 // 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#define DEFAULT_MINGROOVEWIDTH 0.0
93
94#define DEFAULT_MINRESOLVEDSPOKES 2 // Fewer resolved spokes indicates a starved thermal
95
96#define MINIMUM_ERROR_SIZE_MM 0.001 // For arc approximation
97#define MAXIMUM_ERROR_SIZE_MM 0.1 // For arc approximation
98
99class DRC_ENGINE;
100class NET_SETTINGS;
101class NETCLASS;
102
103#define MAXIMUM_CLEARANCE pcbIUScale.mmToIU( 500 ) // to prevent int-overflows
104
105// Min/max values used in dialogs to validate settings
106#define MINIMUM_LINE_WIDTH_MM 0.005 // minimal line width entered in a dialog
107#define MAXIMUM_LINE_WIDTH_MM 100.0 // max line width entered in a dialog
108
109// Default pad properties
110#define DEFAULT_PAD_WIDTH_MM 2.54
111#define DEFAULT_PAD_HEIGTH_MM 1.27
112#define DEFAULT_PAD_DRILL_DIAMETER_MM 0.8
113#define DEFAULT_PAD_RR_RADIUS_RATIO 0.15
114
120{
121 int m_Diameter; // <= 0 means use Netclass via diameter
122 int m_Drill; // <= 0 means use Netclass via drill
123
125 {
126 m_Diameter = 0;
127 m_Drill = 0;
128 }
129
130 VIA_DIMENSION( int aDiameter, int aDrill )
131 {
132 m_Diameter = aDiameter;
133 m_Drill = aDrill;
134 }
135
136 bool operator==( const VIA_DIMENSION& aOther ) const
137 {
138 return ( m_Diameter == aOther.m_Diameter ) && ( m_Drill == aOther.m_Drill );
139 }
140
141 bool operator!=( const VIA_DIMENSION& aOther ) const { return !operator==( aOther ); }
142
143 bool operator<( const VIA_DIMENSION& aOther ) const
144 {
145 if( m_Diameter != aOther.m_Diameter )
146 return m_Diameter < aOther.m_Diameter;
147
148 return m_Drill < aOther.m_Drill;
149 }
150};
151
152
158{
159 int m_Width; // <= 0 means use Netclass differential pair width
160 int m_Gap; // <= 0 means use Netclass differential pair gap
161 int m_ViaGap; // <= 0 means use Netclass differential pair via gap
162
164 {
165 m_Width = 0;
166 m_Gap = 0;
167 m_ViaGap = 0;
168 }
169
170 DIFF_PAIR_DIMENSION( int aWidth, int aGap, int aViaGap )
171 {
172 m_Width = aWidth;
173 m_Gap = aGap;
174 m_ViaGap = aViaGap;
175 }
176
177 bool operator==( const DIFF_PAIR_DIMENSION& aOther ) const
178 {
179 return ( m_Width == aOther.m_Width )
180 && ( m_Gap == aOther.m_Gap )
181 && ( m_ViaGap == aOther.m_ViaGap );
182 }
183
184 bool operator!=( const DIFF_PAIR_DIMENSION& aOther ) const { return !operator==( aOther ); }
185
186 bool operator<( const DIFF_PAIR_DIMENSION& aOther ) const
187 {
188 if( m_Width != aOther.m_Width )
189 return m_Width < aOther.m_Width;
190
191 if( m_Gap != aOther.m_Gap )
192 return m_Gap < aOther.m_Gap;
193
194 return m_ViaGap < aOther.m_ViaGap;
195 }
196};
197
198
199enum
200{
207
209};
210
211
213{
214 wxString m_Text;
217
218 TEXT_ITEM_INFO( const wxString& aText, bool aVisible, PCB_LAYER_ID aLayer )
219 {
220 m_Text = aText;
221 m_Visible = aVisible;
222 m_Layer = aLayer;
223 }
224
225 bool operator==( const TEXT_ITEM_INFO& aOther ) const
226 {
227 return m_Text.IsSameAs( aOther.m_Text )
228 && ( m_Visible == aOther.m_Visible )
229 && ( m_Layer == aOther.m_Layer );
230 }
231};
232
233
234// forward declaration from class_track.h
235enum class VIATYPE : int;
236
237// forward declarations from dimension.h
238enum class DIM_UNITS_FORMAT : int;
239enum class DIM_TEXT_POSITION : int;
240enum class DIM_UNITS_MODE : int;
241enum class DIM_PRECISION : int;
242
243class PAD;
244
249{
250public:
251 BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
252
253 virtual ~BOARD_DESIGN_SETTINGS();
254
256 {
257 wxString setting_name;
259 };
260
261 bool operator==( const BOARD_DESIGN_SETTINGS& aOther ) const;
262 bool operator!=( const BOARD_DESIGN_SETTINGS& aOther ) const
263 {
264 return !operator==( aOther );
265 }
266
268
270
271 bool LoadFromFile( const wxString& aDirectory = "" ) override;
272
275
280
281 SEVERITY GetSeverity( int aDRCErrorCode );
282
286 bool Ignore( int aDRCErrorCode );
287
293 std::vector<VALIDATION_ERROR> ValidateDesignRules( std::optional<EDA_UNITS> aUnits = std::nullopt ) const;
294
299
300 void SetDefaultZoneSettings( const ZONE_SETTINGS& aSettings )
301 {
302 m_defaultZoneSettings = aSettings;
303 }
304
308 const wxString& GetCurrentNetClassName() const
309 {
311 }
312
316 bool UseNetClassTrack() const { return ( m_trackWidthIndex <= 0 && !m_useCustomTrackVia ); }
317
321 bool UseNetClassVia() const { return ( m_viaSizeIndex <= 0 && !m_useCustomTrackVia ); }
322
327 {
328 return ( m_diffPairIndex == 0 && !m_useCustomDiffPair );
329 }
330
334 int GetBiggestClearanceValue() const;
335
339 int GetSmallestClearanceValue() const;
340
344 int GetTrackWidthIndex() const { return m_trackWidthIndex; }
345
351 void SetTrackWidthIndex( int aIndex );
352
359 int GetNextTrackWidthIndex( int aIndex, bool aForward ) const;
360
366 int GetCurrentTrackWidth() const;
367
376 void SetCustomTrackWidth( int aWidth ) { m_customTrackWidth = aWidth; }
378
382 int GetViaSizeIndex() const { return m_viaSizeIndex; }
383
389 void SetViaSizeIndex( int aIndex );
390
397 int GetNextViaSizeIndex( int aIndex, bool aForward ) const;
398
404 int GetCurrentViaSize() const;
405
414 void SetCustomViaSize( int aSize ) { m_customViaSize.m_Diameter = aSize; }
415
419 int GetCustomViaSize() const { return m_customViaSize.m_Diameter; }
420
426 int GetCurrentViaDrill() const;
427
436 void SetCustomViaDrill( int aDrill ) { m_customViaSize.m_Drill = aDrill; }
437
441 int GetCustomViaDrill() const { return m_customViaSize.m_Drill; }
442
451 void UseCustomTrackViaSize( bool aEnabled ) { m_useCustomTrackVia = aEnabled; }
452
457
461 int GetDiffPairIndex() const { return m_diffPairIndex; }
462
466 void SetDiffPairIndex( int aIndex );
467
474 int GetNextDiffPairIndex( int aIndex, bool aForward ) const;
475
482 void SetCustomDiffPairWidth( int aWidth ) { m_customDiffPair.m_Width = aWidth; }
483
487 int GetCustomDiffPairWidth() { return m_customDiffPair.m_Width; }
488
494 void SetCustomDiffPairGap( int aGap ) { m_customDiffPair.m_Gap = aGap; }
495
500
507 void SetCustomDiffPairViaGap( int aGap ) { m_customDiffPair.m_ViaGap = aGap; }
508
513 {
514 return m_customDiffPair.m_ViaGap > 0 ? m_customDiffPair.m_ViaGap : m_customDiffPair.m_Gap;
515 }
516
522 void UseCustomDiffPairDimensions( bool aEnabled ) { m_useCustomDiffPair = aEnabled; }
523
528
533 int GetCurrentDiffPairWidth() const;
534
539 int GetCurrentDiffPairGap() const;
540
546 int GetCurrentDiffPairViaGap() const;
547
553 const LSET& GetEnabledLayers() const { return m_enabledLayers; }
554
560 void SetEnabledLayers( const LSET& aMask );
561
568 bool IsLayerEnabled( PCB_LAYER_ID aLayerId ) const
569 {
570 if( aLayerId >= 0 && aLayerId < PCB_LAYER_ID_COUNT )
571 return m_enabledLayers[aLayerId];
572
573 return false;
574 }
575
580
586 void SetCopperLayerCount( int aNewLayerCount );
587
592
598 void SetUserDefinedLayerCount( int aNewLayerCount );
599
604 int GetBoardThickness() const { return m_boardThickness; }
605 void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; }
606
613 int GetDRCEpsilon() const;
614
620 int GetHolePlatingThickness() const;
621
625 int GetLineThickness( PCB_LAYER_ID aLayer ) const;
626
630 VECTOR2I GetTextSize( PCB_LAYER_ID aLayer ) const;
631
635 int GetTextThickness( PCB_LAYER_ID aLayer ) const;
636
637 bool GetTextItalic( PCB_LAYER_ID aLayer ) const;
638 bool GetTextUpright( PCB_LAYER_ID aLayer ) const;
639
640 int GetLayerClass( PCB_LAYER_ID aLayer ) const;
641
642 void SetAuxOrigin( const VECTOR2I& aOrigin ) { m_auxOrigin = aOrigin; }
643 const VECTOR2I& GetAuxOrigin() const { return m_auxOrigin; }
644
645 void SetGridOrigin( const VECTOR2I& aOrigin ) { m_gridOrigin = aOrigin; }
646 const VECTOR2I& GetGridOrigin() const { return m_gridOrigin; }
647
648 void SetDefaultMasterPad();
649
650private:
651 void initFromOther( const BOARD_DESIGN_SETTINGS& aOther );
652
653 bool migrateSchema0to1();
654
655public:
656 // Note: the first value in each dimensions list is the current netclass value
657 std::vector<int> m_TrackWidthList;
658 std::vector<VIA_DIMENSION> m_ViasDimensionsList;
659 std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList;
660
667
671
673
674 bool m_UseConnectedTrackWidth; // use width of existing track when creating a new,
675 // connected track
676 bool m_TempOverrideTrackWidth; // use selected track width temporarily even when
677 // using connected track width
678 int m_MinClearance; // overall min
679 int m_MinGrooveWidth; // Minimum groove width for creepage checks
680 int m_MinConn; // overall min connection width
681 int m_TrackMinWidth; // overall min track width
682 int m_ViasMinAnnularWidth; // overall minimum width of the via copper ring
683 int m_ViasMinSize; // overall vias (not micro vias) min diameter
684 int m_MinThroughDrill; // through hole (not micro vias) min drill diameter
685 int m_MicroViasMinSize; // micro vias min diameter
686 int m_MicroViasMinDrill; // micro vias min drill diameter
688 int m_HoleClearance; // Hole to copper clearance
689 int m_HoleToHoleMin; // Min width of web between two drilled holes
690 int m_SilkClearance; // Min dist between two silk items
691 int m_MinResolvedSpokes; // Min spoke count to not be a starved thermal
692 int m_MinSilkTextHeight; // Min text height for silkscreen layers
693 int m_MinSilkTextThickness; // Min text thickness for silkscreen layers
694
695 std::shared_ptr<DRC_ENGINE> m_DRCEngine;
696 std::map<int, SEVERITY> m_DRCSeverities; // Map from DRCErrorCode to SEVERITY
697 std::set<wxString> m_DrcExclusions; // Serialized excluded DRC markers
698 std::map<wxString, wxString> m_DrcExclusionComments; // Map from serialization to comment
699
700 // When smoothing the zone's outline there's the question of external fillets (that is, those
701 // applied to concave corners). While it seems safer to never have copper extend outside the
702 // zone outline, 5.1.x and prior did indeed fill them so we leave the mode available.
704
705 // Maximum error allowed when approximating circles and arcs to segments
707
708 // Global mask margins:
709 int m_SolderMaskExpansion; // Solder mask inflation around the pad or via
710 int m_SolderMaskMinWidth; // Solder mask min width (2 areas closer than this
711 // width are merged)
712 int m_SolderMaskToCopperClearance; // Min distance allowed from copper to a mask
713 // aperture of another net
714
715 int m_SolderPasteMargin; // Solder paste margin absolute value
716 double m_SolderPasteMarginRatio; // Solder mask margin ratio value of pad size
717 // The final margin is the sum of these 2 values
719
720 bool m_TentViasFront; // The default tenting option if not overridden on an
721 bool m_TentViasBack; // individual via
722
723 bool m_CoverViasFront; // The default covering option if not overridden on an
724 bool m_CoverViasBack; // individual via
725
726 bool m_PlugViasFront; // The default plugging option if not overridden on an
727 bool m_PlugViasBack; // individual via
728
729 bool m_CapVias; // The default capping option if not overridden on an
730 // individual via
731
732 bool m_FillVias; // The default filling option if not overridden on ana
733 // individual via
734
735 std::shared_ptr<NET_SETTINGS> m_NetSettings;
736
737 // Variables used in footprint editing (default value in item/footprint creation)
738 std::vector<TEXT_ITEM_INFO> m_DefaultFPTextItems;
739
740 // Map between user layer default names and custom names
741 std::map<std::string, wxString> m_UserLayerNames;
742
743 // Default zone hatching offsets
744 std::map<PCB_LAYER_ID, ZONE_LAYER_PROPERTIES> m_ZoneLayerProperties;
745
746 // Arrays of default values for the various layer classes.
752
753 // Default values for dimension objects
762
768
769 // Miscellaneous
770 std::unique_ptr<PAD> m_Pad_Master; // A dummy pad to store all default parameters
771 // when importing values or creating a new pad
772
773 // Set to true if the board has a stackup management.
774 // If not set a default basic stackup will be used to generate the gbrjob file.
775 // Could be removed later, or at least always set to true
777
780
781private:
784
785 // Indices into the trackWidth, viaSizes and diffPairDimensions lists.
786 // The 0 index is always the current netclass value(s)
790
791 // Custom values for track/via sizes (specified via dialog instead of netclass or lists)
795
796 // Custom values for differential pairs (specified via dialog instead of netclass/lists)
799
803
805
809
817
820};
@ LAYER_CLASS_OTHERS
@ LAYER_CLASS_COUNT
@ LAYER_CLASS_FAB
@ LAYER_CLASS_COURTYARD
@ LAYER_CLASS_SILK
@ LAYER_CLASS_COPPER
@ LAYER_CLASS_EDGES
Container for design settings for a BOARD object.
DIM_PRECISION m_DimensionPrecision
Number of digits after the decimal.
TEARDROP_PARAMETERS_LIST * GetTeadropParamsList()
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
std::vector< TEXT_ITEM_INFO > m_DefaultFPTextItems
int GetHolePlatingThickness() const
Pad & via drills are finish size.
void SetCustomDiffPairWidth(int aWidth)
Sets custom track width for differential pairs (i.e.
VIATYPE m_CurrentViaType
(VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)
void SetEnabledLayers(const LSET &aMask)
Change the bit-mask of enabled layers to aMask.
std::shared_ptr< NET_SETTINGS > m_NetSettings
bool operator==(const BOARD_DESIGN_SETTINGS &aOther) const
void SetCustomTrackWidth(int aWidth)
Sets custom width for track (i.e.
std::map< wxString, wxString > m_DrcExclusionComments
DIM_UNITS_FORMAT m_DimensionUnitsFormat
void initFromOther(const BOARD_DESIGN_SETTINGS &aOther)
bool GetTextUpright(PCB_LAYER_ID aLayer) const
std::map< int, SEVERITY > m_DRCSeverities
VECTOR2I m_gridOrigin
origin for grid offsets
int GetTextThickness(PCB_LAYER_ID aLayer) const
Return the default text thickness from the layer class for the given layer.
std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > m_ZoneLayerProperties
void SetGridOrigin(const VECTOR2I &aOrigin)
VECTOR2I m_auxOrigin
origin for plot exports
bool m_TextUpright[LAYER_CLASS_COUNT]
BOARD_DESIGN_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
bool GetTextItalic(PCB_LAYER_ID aLayer) const
int GetNextDiffPairIndex(int aIndex, bool aForward) const
Compute the next diff pair dimensions list index when cycling predefined sizes, skipping the index-0 ...
const wxString & GetCurrentNetClassName() const
wxString m_currentNetClassName
Current net class name used to display netclass info.
void SetViaSizeIndex(int aIndex)
Set the current via size list index to aIndex.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
std::set< wxString > m_DrcExclusions
bool Ignore(int aDRCErrorCode)
Return true if the DRC error code's severity is SEVERITY_IGNORE.
void SetCustomViaSize(int aSize)
Set custom size for via diameter (i.e.
const LSET & GetEnabledLayers() const
Return a bit-mask of all the layers that are enabled.
std::map< std::string, wxString > m_UserLayerNames
const VECTOR2I & GetGridOrigin() const
int GetBoardThickness() const
The full thickness of the board including copper and masks.
std::unique_ptr< PAD > m_Pad_Master
void SetCustomDiffPairGap(int aGap)
Sets custom gap for differential pairs (i.e.
int GetNextTrackWidthIndex(int aIndex, bool aForward) const
Compute the next track width list index when cycling predefined sizes, skipping the index-0 netclass ...
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Test whether a given layer aLayerId is enabled.
TEARDROP_PARAMETERS_LIST m_TeardropParamsList
The parameters of teardrops for the different teardrop targets (via/pad, track end).
void SetUserDefinedLayerCount(int aNewLayerCount)
Set the number of user defined layers to aNewLayerCount.
void SetAuxOrigin(const VECTOR2I &aOrigin)
const VECTOR2I & GetAuxOrigin() const
bool operator!=(const BOARD_DESIGN_SETTINGS &aOther) const
int GetDRCEpsilon() const
Return an epsilon which accounts for rounding errors, etc.
int GetLayerClass(PCB_LAYER_ID aLayer) const
PNS::MEANDER_SETTINGS m_DiffPairMeanderSettings
bool UseNetClassVia() const
Return true if netclass values should be used to obtain appropriate via size.
BOARD_STACKUP & GetStackupDescriptor()
int m_boardThickness
Board thickness for 3D viewer.
int m_copperLayerCount
Number of copper layers for this design.
bool UseNetClassTrack() const
Return true if netclass values should be used to obtain appropriate track width.
int m_userDefinedLayerCount
Number of user defined layers for this design.
bool UseNetClassDiffPair() const
Return true if netclass values should be used to obtain appropriate diff pair dimensions.
void SetCustomViaDrill(int aDrill)
Sets custom size for via drill (i.e.
bool LoadFromFile(const wxString &aDirectory="") override
Loads the backing file from disk and then calls Load()
void SetDefaultZoneSettings(const ZONE_SETTINGS &aSettings)
PNS::MEANDER_SETTINGS m_SingleTrackMeanderSettings
void SetTrackWidthIndex(int aIndex)
Set the current track width list index to aIndex.
int m_TextThickness[LAYER_CLASS_COUNT]
ZONE_SETTINGS m_defaultZoneSettings
The default settings that will be used for new zones.
const BOARD_STACKUP & GetStackupDescriptor() const
void UseCustomDiffPairDimensions(bool aEnabled)
Enables/disables custom differential pair dimensions.
int GetNextViaSizeIndex(int aIndex, bool aForward) const
Compute the next via size list index when cycling predefined sizes, skipping the index-0 netclass pla...
SEVERITY GetSeverity(int aDRCErrorCode)
std::vector< int > m_TrackWidthList
DIFF_PAIR_DIMENSION m_customDiffPair
std::vector< VALIDATION_ERROR > ValidateDesignRules(std::optional< EDA_UNITS > aUnits=std::nullopt) const
Validate design settings values and return per-field errors.
int m_LineThickness[LAYER_CLASS_COUNT]
VECTOR2I GetTextSize(PCB_LAYER_ID aLayer) const
Return the default text size from the layer class for the given layer.
void SetBoardThickness(int aThickness)
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
ZONE_SETTINGS & GetDefaultZoneSettings()
bool m_UseHeightForLengthCalcs
Enable inclusion of stackup height in track length measurements and length tuning.
VECTOR2I m_TextSize[LAYER_CLASS_COUNT]
PNS::MEANDER_SETTINGS m_SkewMeanderSettings
LSET m_enabledLayers
Bit-mask for layer enabling.
bool m_TextItalic[LAYER_CLASS_COUNT]
void SetCopperLayerCount(int aNewLayerCount)
Set the copper layer count to aNewLayerCount.
DIM_TEXT_POSITION m_DimensionTextPosition
BOARD_STACKUP m_stackup
The description of layers stackup, for board fabrication only physical layers are in layers stackup.
std::vector< VIA_DIMENSION > m_ViasDimensionsList
BOARD_DESIGN_SETTINGS & operator=(const BOARD_DESIGN_SETTINGS &aOther)
void SetCustomDiffPairViaGap(int aGap)
Sets custom via gap for differential pairs (i.e.
Manage layers needed to make a physical board.
Design Rule Checker object that performs all the DRC tests.
Definition drc_engine.h:129
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
NESTED_SETTINGS(const std::string &aName, int aSchemaVersion, JSON_SETTINGS *aParent, const std::string &aPath, bool aLoadFromFile=true)
A collection of nets and the parameters used to route or test these nets.
Definition netclass.h:38
NET_SETTINGS stores various net-related settings in a project context.
Definition pad.h:61
Dimensions for the meandering algorithm.
Definition pns_meander.h:70
TEARDROP_PARAMETERS_LIST is a helper class to handle the list of TEARDROP_PARAMETERS needed to build ...
ZONE_SETTINGS handles zones parameters.
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ PCB_LAYER_ID_COUNT
Definition layer_ids.h:167
DIM_TEXT_POSITION
Where to place the text on a dimension.
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
DIM_UNITS_MODE
Used for storing the units selection in the file because EDA_UNITS alone doesn't cut it.
DIM_PRECISION
VIATYPE
SEVERITY
Container to handle a stock of specific differential pairs each with unique track width,...
DIFF_PAIR_DIMENSION(int aWidth, int aGap, int aViaGap)
bool operator<(const DIFF_PAIR_DIMENSION &aOther) const
bool operator==(const DIFF_PAIR_DIMENSION &aOther) const
bool operator!=(const DIFF_PAIR_DIMENSION &aOther) const
TEXT_ITEM_INFO(const wxString &aText, bool aVisible, PCB_LAYER_ID aLayer)
bool operator==(const TEXT_ITEM_INFO &aOther) const
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...
bool operator==(const VIA_DIMENSION &aOther) const
VIA_DIMENSION(int aDiameter, int aDrill)
bool operator!=(const VIA_DIMENSION &aOther) const
bool operator<(const VIA_DIMENSION &aOther) const
Functions to provide common constants and other functions to assist in making a consistent UI.
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
Class ZONE_SETTINGS used to handle zones parameters in dialogs.