25#ifndef BOARD_DESIGN_SETTINGS_H_
26#define BOARD_DESIGN_SETTINGS_H_
42#define DEFAULT_SILK_LINE_WIDTH 0.1
43#define DEFAULT_COPPER_LINE_WIDTH 0.2
44#define DEFAULT_EDGE_WIDTH 0.05
45#define DEFAULT_COURTYARD_WIDTH 0.05
46#define DEFAULT_LINE_WIDTH 0.10
48#define DEFAULT_SILK_TEXT_SIZE 1.0
49#define DEFAULT_COPPER_TEXT_SIZE 1.5
50#define DEFAULT_TEXT_SIZE 1.0
52#define DEFAULT_SILK_TEXT_WIDTH 0.1
53#define DEFAULT_COPPER_TEXT_WIDTH 0.30
54#define DEFAULT_TEXT_WIDTH 0.15
56#define DEFAULT_DIMENSION_ARROW_LENGTH 50
57#define DEFAULT_DIMENSION_EXTENSION_OFFSET 0.5
60#define DEFAULT_BOARD_THICKNESS_MM 1.6
62#define DEFAULT_PCB_EDGE_THICKNESS 0.15
66#define DEFAULT_SOLDERMASK_EXPANSION 0.0
68#define DEFAULT_SOLDERMASK_TO_COPPER_CLEARANCE 0.0
70#define DEFAULT_SOLDERMASK_MIN_WIDTH 0.0
72#define DEFAULT_SOLDERPASTE_CLEARANCE 0.0
73#define DEFAULT_SOLDERPASTE_RATIO 0.0
75#define DEFAULT_CUSTOMTRACKWIDTH 0.2
76#define DEFAULT_CUSTOMDPAIRWIDTH 0.125
77#define DEFAULT_CUSTOMDPAIRGAP 0.18
78#define DEFAULT_CUSTOMDPAIRVIAGAP 0.18
80#define DEFAULT_MEANDER_SPACING 0.6
81#define DEFAULT_DP_MEANDER_SPACING 1.0
83#define DEFAULT_MINCLEARANCE 0.0
84#define DEFAULT_MINCONNECTION 0.0
85#define DEFAULT_TRACKMINWIDTH 0.0
86#define DEFAULT_VIASMINSIZE 0.5
87#define DEFAULT_MINTHROUGHDRILL 0.3
88#define DEFAULT_MICROVIASMINSIZE 0.2
89#define DEFAULT_MICROVIASMINDRILL 0.1
90#define DEFAULT_HOLETOHOLEMIN 0.25
91#define DEFAULT_HOLECLEARANCE 0.25
93#define DEFAULT_COPPEREDGECLEARANCE 0.5
94#define LEGACY_COPPEREDGECLEARANCE -0.01
96#define DEFAULT_SILKCLEARANCE 0.0
97#define DEFAULT_MINGROOVEWIDTH 0.0
99#define DEFAULT_MINRESOLVEDSPOKES 2
101#define MINIMUM_ERROR_SIZE_MM 0.001
102#define MAXIMUM_ERROR_SIZE_MM 0.1
105#define MINIMUM_LINE_WIDTH_MM 0.005
106#define MAXIMUM_LINE_WIDTH_MM 100.0
109#define DEFAULT_PAD_WIDTH_MM 2.54
110#define DEFAULT_PAD_HEIGTH_MM 1.27
111#define DEFAULT_PAD_DRILL_DIAMETER_MM 0.8
112#define DEFAULT_PAD_REACT_RADIUS 15
264 bool LoadFromFile(
const wxString& aDirectory =
"" )
override;
279 bool Ignore(
int aDRCErrorCode );
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 SetDiffPairIndex(unsigned aIndex)
int GetCustomDiffPairGap()
Function GetCustomDiffPairGap.
std::shared_ptr< NET_SETTINGS > m_NetSettings
bool operator==(const BOARD_DESIGN_SETTINGS &aOther) const
int GetCustomTrackWidth() const
void SetCustomTrackWidth(int aWidth)
Sets custom width for track (i.e.
std::map< wxString, wxString > m_DrcExclusionComments
DIM_UNITS_FORMAT m_DimensionUnitsFormat
bool UseCustomTrackViaSize() const
void initFromOther(const BOARD_DESIGN_SETTINGS &aOther)
int m_CopperEdgeClearance
bool GetTextUpright(PCB_LAYER_ID aLayer) const
int GetCustomViaDrill() 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.
void SetGridOrigin(const VECTOR2I &aOrigin)
VECTOR2I m_auxOrigin
origin for plot exports
bool m_TextUpright[LAYER_CLASS_COUNT]
bool GetTextItalic(PCB_LAYER_ID aLayer) const
int m_MinSilkTextThickness
int GetCurrentViaSize() const
const wxString & GetCurrentNetClassName() const
wxString m_currentNetClassName
Current net class name used to display netclass info.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
int GetCustomDiffPairWidth()
bool m_UseConnectedTrackWidth
virtual ~BOARD_DESIGN_SETTINGS()
void SetEnabledLayers(LSET aMask)
Change the bit-mask of enabled layers to aMask.
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
VIA_DIMENSION m_customViaSize
LSET GetEnabledLayers() const
Return a bit-mask of all the layers that are enabled.
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.
int m_SolderMaskToCopperClearance
unsigned m_trackWidthIndex
bool m_TempOverrideTrackWidth
int GetBoardThickness() const
The full thickness of the board including copper and masks.
const VECTOR2I & GetGridOrigin()
const VECTOR2I & GetAuxOrigin()
int GetSmallestClearanceValue() const
bool m_AllowSoldermaskBridgesInFPs
std::unique_ptr< PAD > m_Pad_Master
bool m_DimensionSuppressZeroes
void SetCustomDiffPairGap(int aGap)
Sets custom gap for differential pairs (i.e.
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Test whether a given layer aLayerId is enabled.
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
TEARDROP_PARAMETERS_LIST m_TeardropParamsList
The parameters of teardrops for the different teardrop targets (via/pad, track end) 3 set of paramete...
void SetDefaultMasterPad()
int GetCurrentDiffPairWidth() const
void SetAuxOrigin(const VECTOR2I &aOrigin)
void SetViaSizeIndex(unsigned aIndex)
Set the current via size list index to aIndex.
bool operator!=(const BOARD_DESIGN_SETTINGS &aOther) const
int GetCurrentDiffPairViaGap() const
int GetCurrentDiffPairGap() const
int m_SolderMaskExpansion
int GetDRCEpsilon() const
int GetBiggestClearanceValue() const
unsigned GetTrackWidthIndex() const
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.
int GetCurrentTrackWidth() const
BOARD_STACKUP & GetStackupDescriptor()
int m_boardThickness
Board thickness for 3D viewer.
int m_copperLayerCount
Number of copper layers for this design.
unsigned GetViaSizeIndex() const
bool UseNetClassTrack() const
Return true if netclass values should be used to obtain appropriate track width.
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
int m_TextThickness[LAYER_CLASS_COUNT]
ZONE_SETTINGS m_defaultZoneSettings
The default settings that will be used for new zones.
int GetCopperLayerCount() const
const BOARD_STACKUP & GetStackupDescriptor() const
void UseCustomDiffPairDimensions(bool aEnabled)
Enables/disables custom differential pair dimensions.
bool UseCustomDiffPairDimensions() const
SEVERITY GetSeverity(int aDRCErrorCode)
std::vector< int > m_TrackWidthList
unsigned GetDiffPairIndex() const
DIFF_PAIR_DIMENSION m_customDiffPair
int GetCustomDiffPairViaGap()
int m_LineThickness[LAYER_CLASS_COUNT]
bool m_DimensionKeepTextAligned
VECTOR2I GetTextSize(PCB_LAYER_ID aLayer) const
Return the default text size from the layer class for the given layer.
void SetBoardThickness(int aThickness)
double m_SolderPasteMarginRatio
int GetCustomViaSize() const
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.
int GetCurrentViaDrill() const
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.
bool m_ZoneKeepExternalFillets
DIM_UNITS_MODE m_DimensionUnitsMode
std::vector< VIA_DIMENSION > m_ViasDimensionsList
int m_ViasMinAnnularWidth
BOARD_DESIGN_SETTINGS & operator=(const BOARD_DESIGN_SETTINGS &aOther)
int m_DimensionExtensionOffset
void SetCustomDiffPairViaGap(int aGap)
Sets custom via gap for differential pairs (i.e.
int m_DimensionArrowLength
Manage layers needed to make a physical board.
LSET is a set of PCB_LAYER_IDs.
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
Dimensions for the meandering algorithm.
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:
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.
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, int 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.
Class ZONE_SETTINGS used to handle zones parameters in dialogs.