25 #ifndef BOARD_DESIGN_SETTINGS_H_ 26 #define BOARD_DESIGN_SETTINGS_H_ 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 44 #define DEFAULT_SILK_TEXT_SIZE 1.0 45 #define DEFAULT_COPPER_TEXT_SIZE 1.5 46 #define DEFAULT_TEXT_SIZE 1.0 48 #define DEFAULT_SILK_TEXT_WIDTH 0.15 49 #define DEFAULT_COPPER_TEXT_WIDTH 0.30 50 #define DEFAULT_TEXT_WIDTH 0.15 52 #define DEFAULT_DIMENSION_ARROW_LENGTH 50 // mils, for legacy purposes 53 #define DEFAULT_DIMENSION_EXTENSION_OFFSET 0.5 56 #define DEFAULT_BOARD_THICKNESS_MM 1.6 58 #define DEFAULT_PCB_EDGE_THICKNESS 0.15 63 #define DEFAULT_SOLDERMASK_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_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 // minimum web thickness between two drilled holes 87 #define DEFAULT_HOLECLEARANCE 0.0 // copper-to-hole clearance 89 #define DEFAULT_COPPEREDGECLEARANCE 0.01 // clearance between copper items and edge cuts 90 #define LEGACY_COPPEREDGECLEARANCE -0.01 // A flag to indicate the legacy method (based 92 #define DEFAULT_SILKCLEARANCE 0.0 94 #define MINIMUM_ERROR_SIZE_MM 0.001 95 #define MAXIMUM_ERROR_SIZE_MM 0.1 229 bool LoadFromFile(
const wxString& aDirectory =
"" )
override;
239 bool Ignore(
int aDRCErrorCode );
249 m_netClasses = aNetClasses;
261 m_defaultZoneSettings = aSettings;
285 return ( m_trackWidthIndex == 0 && !m_useCustomTrackVia );
293 return ( m_viaSizeIndex == 0 && !m_useCustomTrackVia );
301 return ( m_diffPairIndex == 0 && !m_useCustomDiffPair );
353 m_customTrackWidth = aWidth;
396 m_customViaSize.m_Diameter = aSize;
404 return m_customViaSize.m_Diameter;
424 m_customViaSize.m_Drill = aDrill;
432 return m_customViaSize.m_Drill;
445 m_useCustomTrackVia = aEnabled;
474 m_customDiffPair.m_Width = aWidth;
482 return m_customDiffPair.m_Width;
492 m_customDiffPair.m_Gap = aGap;
501 return m_customDiffPair.m_Gap;
512 m_customDiffPair.m_ViaGap = aGap;
520 return m_customDiffPair.m_ViaGap > 0 ? m_customDiffPair.m_ViaGap : m_customDiffPair.m_Gap;
530 m_useCustomDiffPair = aEnabled;
548 if( m_useCustomDiffPair )
549 return m_customDiffPair.m_Width;
561 if( m_useCustomDiffPair )
562 return m_customDiffPair.m_Gap;
574 if( m_useCustomDiffPair )
575 return m_customDiffPair.m_ViaGap;
627 return m_enabledLayers[aLayerId];
823 #endif // BOARD_DESIGN_SETTINGS_H_ int GetCurrentMicroViaSize()
unsigned m_trackWidthIndex
VIA_DIMENSION m_customViaSize
bool UseNetClassTrack() const
Return true if netclass values should be used to obtain appropriate track width.
void SetNetClasses(NETCLASSES *aNetClasses)
void SetCopperLayerCount(int aNewLayerCount)
Set the copper layer count to aNewLayerCount.
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...
int m_ZoneFillVersion
Option to select different fill algorithms.
void SetEnabledLayers(LSET aMask)
Change the bit-mask of enabled layers to aMask.
void SetCopperEdgeClearance(int aDistance)
bool UseCustomDiffPairDimensions() const
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
int GetCustomViaSize() const
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
bool m_DimensionSuppressZeroes
int GetCurrentTrackWidth() const
this class manage the layers needed to make a physical board they are solder mask,...
void SetCustomDiffPairViaGap(int aGap)
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()
int GetBiggestClearanceValue()
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Test whether a given layer aLayerId is enabled.
BOARD_STACKUP m_stackup
the description of layers stackup, for board fabrication only physical layers are in layers stackup.
int GetCurrentDiffPairGap() const
int GetCurrentMicroViaDrill()
bool UseNetClassDiffPair() const
Return true if netclass values should be used to obtain appropriate diff pair dimensions.
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
void SetCustomViaDrill(int aDrill)
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)
Return true if the DRC error code's severity is SEVERITY_IGNORE.
void UseCustomDiffPairDimensions(bool aEnabled)
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 default settings that will be used for new zones.
int GetBoardThickness() const
bool operator<(const DIFF_PAIR_DIMENSION &aOther) const
const BOARD_STACKUP & GetStackupDescriptor() const
DIFF_PAIR_DIMENSION m_customDiffPair
int GetTextThickness(PCB_LAYER_ID aLayer) const
Return 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)
bool m_UseConnectedTrackWidth
Container to handle a stock of specific differential pairs each with unique track width,...
void SetCustomViaSize(int aSize)
Set custom size for via diameter (i.e.
int 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
Return the default graphic segment thickness from the layer class for the given layer.
bool UseCustomTrackViaSize() const
int GetCustomViaDrill() const
void SetViaSizeIndex(unsigned aIndex)
Set 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.
A container for NETCLASS instances.
const wxString & GetCurrentNetClassName() const
unsigned GetViaSizeIndex() const
void SetMinHoleSeparation(int aDistance)
bool UseNetClassVia() const
Return true if netclass values should be used to obtain appropriate via size.
void SetCustomDiffPairWidth(int aWidth)
Sets custom track width for differential pairs (i.e.
bool LoadFromFile(const wxString &aDirectory="") override
Loads the backing file from disk and then calls Load()
int GetCustomTrackWidth() const
A collection of nets and the parameters used to route or test these nets.
int GetCurrentDiffPairWidth() const
unsigned GetTrackWidthIndex() const
virtual ~BOARD_DESIGN_SETTINGS()
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
SEVERITY GetSeverity(int aDRCErrorCode)
void SetDiffPairIndex(unsigned aIndex)
int m_CopperEdgeClearance
void SetCustomDiffPairGap(int aGap)
Sets custom gap for differential pairs (i.e.
NETCLASS * GetDefaultPtr() const
void SetCustomTrackWidth(int aWidth)
Sets custom width for track (i.e.
ZONE_SETTINGS handles zones parameters.
int m_DimensionArrowLength
bool operator==(const VIA_DIMENSION &aOther) const
int GetCurrentViaSize() const
int GetDRCEpsilon() const
LSET GetEnabledLayers() const
Return a bit-mask of all the layers that are enabled.
int GetCustomDiffPairViaGap()
std::map< int, SEVERITY > m_DRCSeverities
DIM_UNITS_MODE
Used for storing the units selection in the file because EDA_UNITS alone doesn't cut it.
NETCLASS * GetDefault() const
void SetSilkClearance(int aDistance)
Set the minimum distance between silk items to aValue.
int GetCurrentDiffPairViaGap() const
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.
bool m_ZoneKeepExternalFillets
DIM_UNITS_FORMAT m_DimensionUnitsFormat
bool operator==(const DIFF_PAIR_DIMENSION &aOther) const
VIA_DIMENSION(int aDiameter, int aDrill)
unsigned GetDiffPairIndex() const
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
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
double m_SolderPasteMarginRatio
std::set< wxString > m_DrcExclusions
int m_DimensionExtensionOffset
int GetCopperLayerCount() const
LSET m_enabledLayers
Bit-mask for layer enabling.
bool m_DimensionKeepTextAligned
wxPoint m_AuxOrigin
origin for plot exports
wxSize GetTextSize(PCB_LAYER_ID aLayer) const
Return 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)
Enables/disables custom track/via size settings.
Container for design settings for a BOARD object.