|
|
@ -96,9 +96,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Struct VIA_DIMENSION |
|
|
|
* is a small helper container to handle a stock of specific vias each with |
|
|
|
* unique diameter and drill sizes in the BOARD class. |
|
|
|
* Container to handle a stock of specific vias each with unique diameter and drill sizes |
|
|
|
* in the #BOARD class. |
|
|
|
*/ |
|
|
|
struct VIA_DIMENSION |
|
|
|
{ |
|
|
@ -133,9 +132,8 @@ struct VIA_DIMENSION |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Struct DIFF_PAIR_DIMENSION |
|
|
|
* is a small helper container to handle a stock of specific differential pairs each with |
|
|
|
* unique track width, gap and via gap. |
|
|
|
* Container to handle a stock of specific differential pairs each with unique track width, |
|
|
|
* gap and via gap. |
|
|
|
*/ |
|
|
|
struct DIFF_PAIR_DIMENSION |
|
|
|
{ |
|
|
@ -215,146 +213,10 @@ enum class DIM_UNITS_MODE : int; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* BOARD_DESIGN_SETTINGS |
|
|
|
* contains design settings for a BOARD object. |
|
|
|
* Container for design settings for a #BOARD object. |
|
|
|
*/ |
|
|
|
class BOARD_DESIGN_SETTINGS : public NESTED_SETTINGS |
|
|
|
{ |
|
|
|
public: |
|
|
|
// Note: the first value in each dimensions list is the current netclass value |
|
|
|
std::vector<int> m_TrackWidthList; |
|
|
|
std::vector<VIA_DIMENSION> m_ViasDimensionsList; |
|
|
|
std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList; |
|
|
|
|
|
|
|
bool m_MicroViasAllowed; ///< true to allow micro vias |
|
|
|
bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias |
|
|
|
VIATYPE m_CurrentViaType; ///< (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA) |
|
|
|
|
|
|
|
bool m_UseConnectedTrackWidth; // use width of existing track when creating a new, |
|
|
|
// connected track |
|
|
|
int m_MinClearance; // overall min clearance |
|
|
|
int m_TrackMinWidth; // overall min track width |
|
|
|
int m_ViasMinAnnulus; // overall minimum width of the via copper ring |
|
|
|
int m_ViasMinSize; // overall vias (not micro vias) min diameter |
|
|
|
int m_MinThroughDrill; // through hole (not micro vias) min drill diameter |
|
|
|
int m_MicroViasMinSize; // micro vias min diameter |
|
|
|
int m_MicroViasMinDrill; // micro vias min drill diameter |
|
|
|
int m_CopperEdgeClearance; |
|
|
|
int m_HoleClearance; // Hole to copper clearance |
|
|
|
int m_HoleToHoleMin; // Min width of web between two drilled holes |
|
|
|
int m_SilkClearance; |
|
|
|
|
|
|
|
std::shared_ptr<DRC_ENGINE> m_DRCEngine; |
|
|
|
std::map<int, SEVERITY> m_DRCSeverities; // Map from DRCErrorCode to SEVERITY |
|
|
|
std::set<wxString> m_DrcExclusions; |
|
|
|
|
|
|
|
/* |
|
|
|
* Option to select different fill algorithms. |
|
|
|
* There are currenly two supported values: |
|
|
|
* 5: |
|
|
|
* - Use thick outlines around filled polygons (gives smoothest shape but at the expense |
|
|
|
* of processing time and slight infidelity when exporting) |
|
|
|
* - Use zone outline when knocking out higher-priority zones (just wrong, but mimics |
|
|
|
* legacy behaviour. |
|
|
|
* 6: |
|
|
|
* - No thick outline. |
|
|
|
* - Use filled areas when knocking out higher-priority zones. |
|
|
|
*/ |
|
|
|
int m_ZoneFillVersion; |
|
|
|
|
|
|
|
// When smoothing the zone's outline there's the question of external fillets (that is, those |
|
|
|
// applied to concave corners). While it seems safer to never have copper extend outside the |
|
|
|
// zone outline, 5.1.x and prior did indeed fill them so we leave the mode available. |
|
|
|
bool m_ZoneKeepExternalFillets; |
|
|
|
|
|
|
|
// Maximum error allowed when approximating circles and arcs to segments |
|
|
|
int m_MaxError; |
|
|
|
|
|
|
|
// Global mask margins: |
|
|
|
int m_SolderMaskMargin; // Solder mask margin |
|
|
|
int m_SolderMaskMinWidth; // Solder mask min width (2 areas closer than this |
|
|
|
// width are merged) |
|
|
|
int m_SolderPasteMargin; // Solder paste margin absolute value |
|
|
|
double m_SolderPasteMarginRatio; // Solder pask margin ratio value of pad size |
|
|
|
// The final margin is the sum of these 2 values |
|
|
|
|
|
|
|
// Variables used in footprint editing (default value in item/footprint creation) |
|
|
|
std::vector<TEXT_ITEM_INFO> m_DefaultFPTextItems; |
|
|
|
|
|
|
|
// Arrays of default values for the various layer classes. |
|
|
|
int m_LineThickness[ LAYER_CLASS_COUNT ]; |
|
|
|
wxSize m_TextSize[ LAYER_CLASS_COUNT ]; |
|
|
|
int m_TextThickness[ LAYER_CLASS_COUNT ]; |
|
|
|
bool m_TextItalic[ LAYER_CLASS_COUNT ]; |
|
|
|
bool m_TextUpright[ LAYER_CLASS_COUNT ]; |
|
|
|
|
|
|
|
// Default values for dimension objects |
|
|
|
DIM_UNITS_MODE m_DimensionUnitsMode; |
|
|
|
int m_DimensionPrecision; ///< Number of digits after the decimal |
|
|
|
DIM_UNITS_FORMAT m_DimensionUnitsFormat; |
|
|
|
bool m_DimensionSuppressZeroes; |
|
|
|
DIM_TEXT_POSITION m_DimensionTextPosition; |
|
|
|
bool m_DimensionKeepTextAligned; |
|
|
|
int m_DimensionArrowLength; |
|
|
|
int m_DimensionExtensionOffset; |
|
|
|
|
|
|
|
// Miscellaneous |
|
|
|
wxPoint m_AuxOrigin; ///< origin for plot exports |
|
|
|
wxPoint m_GridOrigin; ///< origin for grid offsets |
|
|
|
|
|
|
|
PAD m_Pad_Master; // A dummy pad to store all default parameters |
|
|
|
// when importing values or creating a new pad |
|
|
|
|
|
|
|
// Set to true if the board has a stackup management. |
|
|
|
// If not set a default basic stackup will be used to generate the gbrjob file. |
|
|
|
// Could be removed later, or at least always set to true |
|
|
|
bool m_HasStackup; |
|
|
|
|
|
|
|
private: |
|
|
|
// Indicies into the trackWidth, viaSizes and diffPairDimensions lists. |
|
|
|
// The 0 index is always the current netclass value(s) |
|
|
|
unsigned m_trackWidthIndex; |
|
|
|
unsigned m_viaSizeIndex; |
|
|
|
unsigned m_diffPairIndex; |
|
|
|
|
|
|
|
// Custom values for track/via sizes (specified via dialog instead of netclass or lists) |
|
|
|
bool m_useCustomTrackVia; |
|
|
|
int m_customTrackWidth; |
|
|
|
VIA_DIMENSION m_customViaSize; |
|
|
|
|
|
|
|
// Custom values for differential pairs (specified via dialog instead of netclass/lists) |
|
|
|
bool m_useCustomDiffPair; |
|
|
|
DIFF_PAIR_DIMENSION m_customDiffPair; |
|
|
|
|
|
|
|
int m_copperLayerCount; ///< Number of copper layers for this design |
|
|
|
|
|
|
|
LSET m_enabledLayers; ///< Bit-mask for layer enabling |
|
|
|
|
|
|
|
int m_boardThickness; ///< Board thickness for 3D viewer |
|
|
|
|
|
|
|
/// Current net class name used to display netclass info. |
|
|
|
/// This is also the last used netclass after starting a track. |
|
|
|
wxString m_currentNetClassName; |
|
|
|
|
|
|
|
/** the description of layers stackup, for board fabrication |
|
|
|
* only physical layers are in layers stackup. |
|
|
|
* It includes not only layers enabled for the board edition, but also dielectic layers |
|
|
|
*/ |
|
|
|
BOARD_STACKUP m_stackup; |
|
|
|
|
|
|
|
/// Net classes that are loaded from the board file before these were stored in the project |
|
|
|
NETCLASSES m_internalNetClasses; |
|
|
|
|
|
|
|
/// This will point to m_internalNetClasses until it is repointed to the project after load |
|
|
|
NETCLASSES* m_netClasses; |
|
|
|
|
|
|
|
/// The defualt settings that will be used for new zones |
|
|
|
ZONE_SETTINGS m_defaultZoneSettings; |
|
|
|
|
|
|
|
void initFromOther( const BOARD_DESIGN_SETTINGS& aOther ); |
|
|
|
|
|
|
|
bool migrateSchema0to1(); |
|
|
|
|
|
|
|
public: |
|
|
|
BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ); |
|
|
|
|
|
|
@ -371,7 +233,7 @@ public: |
|
|
|
SEVERITY GetSeverity( int aDRCErrorCode ); |
|
|
|
|
|
|
|
/** |
|
|
|
* returns true if the DRC error code's severity is SEVERITY_IGNORE |
|
|
|
* Return true if the DRC error code's severity is SEVERITY_IGNORE. |
|
|
|
*/ |
|
|
|
bool Ignore( int aDRCErrorCode ); |
|
|
|
|
|
|
@ -399,7 +261,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetDefault |
|
|
|
* @return the default netclass. |
|
|
|
*/ |
|
|
|
inline NETCLASS* GetDefault() const |
|
|
@ -408,7 +269,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentNetClassName |
|
|
|
* @return the current net class name. |
|
|
|
*/ |
|
|
|
inline const wxString& GetCurrentNetClassName() const |
|
|
@ -417,8 +277,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseNetClassTrack |
|
|
|
* returns true if netclass values should be used to obtain appropriate track width. |
|
|
|
* Return true if netclass values should be used to obtain appropriate track width. |
|
|
|
*/ |
|
|
|
inline bool UseNetClassTrack() const |
|
|
|
{ |
|
|
@ -426,8 +285,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseNetClassVia |
|
|
|
* returns true if netclass values should be used to obtain appropriate via size. |
|
|
|
* Return true if netclass values should be used to obtain appropriate via size. |
|
|
|
*/ |
|
|
|
inline bool UseNetClassVia() const |
|
|
|
{ |
|
|
@ -435,8 +293,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseNetClassDiffPair |
|
|
|
* returns true if netclass values should be used to obtain appropriate diff pair dimensions. |
|
|
|
* Return true if netclass values should be used to obtain appropriate diff pair dimensions. |
|
|
|
*/ |
|
|
|
inline bool UseNetClassDiffPair() const |
|
|
|
{ |
|
|
@ -444,58 +301,50 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetBiggestClearanceValue |
|
|
|
* @return the biggest clearance value found in NetClasses list |
|
|
|
* @return the biggest clearance value found in NetClasses list. |
|
|
|
*/ |
|
|
|
int GetBiggestClearanceValue(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetSmallestClearanceValue |
|
|
|
* @return the smallest clearance value found in NetClasses list |
|
|
|
* @return the smallest clearance value found in NetClasses list. |
|
|
|
*/ |
|
|
|
int GetSmallestClearanceValue(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentMicroViaSize |
|
|
|
* @return the current micro via size, |
|
|
|
* that is the current netclass value |
|
|
|
* @return the current micro via size that is the current netclass value. |
|
|
|
*/ |
|
|
|
int GetCurrentMicroViaSize(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentMicroViaDrill |
|
|
|
* @return the current micro via drill, |
|
|
|
* that is the current netclass value |
|
|
|
* @return the current micro via drill that is the current netclass value. |
|
|
|
*/ |
|
|
|
int GetCurrentMicroViaDrill(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetTrackWidthIndex |
|
|
|
* @return the current track width list index. |
|
|
|
*/ |
|
|
|
inline unsigned GetTrackWidthIndex() const { return m_trackWidthIndex; } |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetTrackWidthIndex |
|
|
|
* sets the current track width list index to \a aIndex. |
|
|
|
* Set the current track width list index to \a aIndex. |
|
|
|
* |
|
|
|
* @param aIndex is the track width list index. |
|
|
|
*/ |
|
|
|
void SetTrackWidthIndex( unsigned aIndex ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentTrackWidth |
|
|
|
* @return the current track width, according to the selected options |
|
|
|
* @return the current track width according to the selected options |
|
|
|
* ( using the default netclass value or a preset/custom value ) |
|
|
|
* the default netclass is always in m_TrackWidthList[0] |
|
|
|
*/ |
|
|
|
int GetCurrentTrackWidth() const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCustomTrackWidth |
|
|
|
* Sets custom width for track (i.e. not available in netclasses or preset list). To have |
|
|
|
* it returned with GetCurrentTrackWidth() you need to enable custom track & via sizes |
|
|
|
* (UseCustomTrackViaSize()). |
|
|
|
* Sets custom width for track (i.e. not available in netclasses or preset list). |
|
|
|
* |
|
|
|
* To have it returned with GetCurrentTrackWidth() you need to enable custom track & |
|
|
|
* via sizes with #UseCustomTrackViaSize(). |
|
|
|
* |
|
|
|
* @param aWidth is the new track width. |
|
|
|
*/ |
|
|
|
inline void SetCustomTrackWidth( int aWidth ) |
|
|
@ -504,7 +353,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCustomTrackWidth |
|
|
|
* @return Current custom width for a track. |
|
|
|
*/ |
|
|
|
inline int GetCustomTrackWidth() const |
|
|
@ -513,7 +361,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetViaSizeIndex |
|
|
|
* @return the current via size list index. |
|
|
|
*/ |
|
|
|
inline unsigned GetViaSizeIndex() const |
|
|
@ -522,15 +369,13 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetViaSizeIndex |
|
|
|
* sets the current via size list index to \a aIndex. |
|
|
|
* Set the current via size list index to \a aIndex. |
|
|
|
* |
|
|
|
* @param aIndex is the via size list index. |
|
|
|
*/ |
|
|
|
void SetViaSizeIndex( unsigned aIndex ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentViaSize |
|
|
|
* @return the current via size, according to the selected options |
|
|
|
* ( using the default netclass value or a preset/custom value ) |
|
|
|
* the default netclass is always in m_TrackWidthList[0] |
|
|
@ -538,10 +383,11 @@ public: |
|
|
|
int GetCurrentViaSize() const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCustomViaSize |
|
|
|
* Sets custom size for via diameter (i.e. not available in netclasses or preset list). To have |
|
|
|
* it returned with GetCurrentViaSize() you need to enable custom track & via sizes |
|
|
|
* (UseCustomTrackViaSize()). |
|
|
|
* Set custom size for via diameter (i.e. not available in netclasses or preset list). |
|
|
|
* |
|
|
|
* To have it returned with GetCurrentViaSize() you need to enable custom track & via sizes |
|
|
|
* with #UseCustomTrackViaSize(). |
|
|
|
* |
|
|
|
* @param aSize is the new drill diameter. |
|
|
|
*/ |
|
|
|
inline void SetCustomViaSize( int aSize ) |
|
|
@ -550,7 +396,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCustomViaSize |
|
|
|
* @return Current custom size for the via diameter. |
|
|
|
*/ |
|
|
|
inline int GetCustomViaSize() const |
|
|
@ -559,18 +404,18 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentViaDrill |
|
|
|
* @return the current via size, according to the selected options |
|
|
|
* ( using the default netclass value or a preset/custom value ) |
|
|
|
* the default netclass is always in m_TrackWidthList[0] |
|
|
|
* the default netclass is always in m_TrackWidthList[0]. |
|
|
|
*/ |
|
|
|
int GetCurrentViaDrill() const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCustomViaDrill |
|
|
|
* Sets custom size for via drill (i.e. not available in netclasses or preset list). To have |
|
|
|
* it returned with GetCurrentViaDrill() you need to enable custom track & via sizes |
|
|
|
* (UseCustomTrackViaSize()). |
|
|
|
* Sets custom size for via drill (i.e. not available in netclasses or preset list). |
|
|
|
* |
|
|
|
* To have it returned with GetCurrentViaDrill() you need to enable custom track & via |
|
|
|
* sizes with #UseCustomTrackViaSize(). |
|
|
|
* |
|
|
|
* @param aDrill is the new drill size. |
|
|
|
*/ |
|
|
|
inline void SetCustomViaDrill( int aDrill ) |
|
|
@ -579,7 +424,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCustomViaDrill |
|
|
|
* @return Current custom size for the via drill. |
|
|
|
*/ |
|
|
|
inline int GetCustomViaDrill() const |
|
|
@ -588,10 +432,11 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseCustomTrackViaSize |
|
|
|
* Enables/disables custom track/via size settings. If enabled, values set with |
|
|
|
* SetCustomTrackWidth()/SetCustomViaSize()/SetCustomViaDrill() are used for newly created |
|
|
|
* tracks and vias. |
|
|
|
* Enables/disables custom track/via size settings. |
|
|
|
* |
|
|
|
* If enabled, values set with #SetCustomTrackWidth(), #SetCustomViaSize(), |
|
|
|
* and #SetCustomViaDrill() are used for newly created tracks and vias. |
|
|
|
* |
|
|
|
* @param aEnabled decides if custom settings should be used for new tracks/vias. |
|
|
|
*/ |
|
|
|
inline void UseCustomTrackViaSize( bool aEnabled ) |
|
|
@ -600,7 +445,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseCustomTrackViaSize |
|
|
|
* @return True if custom sizes of tracks & vias are enabled, false otherwise. |
|
|
|
*/ |
|
|
|
inline bool UseCustomTrackViaSize() const |
|
|
@ -609,21 +453,19 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetDiffPairIndex |
|
|
|
* @return the current diff pair dimension list index. |
|
|
|
*/ |
|
|
|
inline unsigned GetDiffPairIndex() const { return m_diffPairIndex; } |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetDiffPairIndex |
|
|
|
* @param aIndex is the diff pair dimensions list index to set. |
|
|
|
*/ |
|
|
|
void SetDiffPairIndex( unsigned aIndex ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCustomDiffPairWidth |
|
|
|
* Sets custom track width for differential pairs (i.e. not available in netclasses or |
|
|
|
* preset list). |
|
|
|
* |
|
|
|
* @param aDrill is the new track wdith. |
|
|
|
*/ |
|
|
|
inline void SetCustomDiffPairWidth( int aWidth ) |
|
|
@ -632,7 +474,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCustomDiffPairWidth |
|
|
|
* @return Current custom track width for differential pairs. |
|
|
|
*/ |
|
|
|
inline int GetCustomDiffPairWidth() |
|
|
@ -641,7 +482,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCustomDiffPairGap |
|
|
|
* Sets custom gap for differential pairs (i.e. not available in netclasses or preset |
|
|
|
* list). |
|
|
|
* @param aGap is the new gap. |
|
|
@ -661,9 +501,9 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCustomDiffPairViaGap |
|
|
|
* Sets custom via gap for differential pairs (i.e. not available in netclasses or |
|
|
|
* preset list). |
|
|
|
* |
|
|
|
* @param aGap is the new gap. Specify 0 to use the DiffPairGap for vias as well. |
|
|
|
*/ |
|
|
|
inline void SetCustomDiffPairViaGap( int aGap ) |
|
|
@ -672,7 +512,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCustomDiffPairViaGap |
|
|
|
* @return Current custom via gap width for differential pairs. |
|
|
|
*/ |
|
|
|
inline int GetCustomDiffPairViaGap() |
|
|
@ -681,8 +520,8 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseCustomDiffPairDimensions |
|
|
|
* Enables/disables custom differential pair dimensions. |
|
|
|
* |
|
|
|
* @param aEnabled decides if custom settings should be used for new differential pairs. |
|
|
|
*/ |
|
|
|
inline void UseCustomDiffPairDimensions( bool aEnabled ) |
|
|
@ -691,7 +530,6 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UseCustomDiffPairDimensions |
|
|
|
* @return True if custom sizes of diff pairs are enabled, false otherwise. |
|
|
|
*/ |
|
|
|
inline bool UseCustomDiffPairDimensions() const |
|
|
@ -700,10 +538,9 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentDiffPairWidth |
|
|
|
* @return the current diff pair track width, according to the selected options |
|
|
|
* ( using the default netclass value or a preset/custom value ) |
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0] |
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0]. |
|
|
|
*/ |
|
|
|
inline int GetCurrentDiffPairWidth() const |
|
|
|
{ |
|
|
@ -714,10 +551,9 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentDiffPairGap |
|
|
|
* @return the current diff pair gap, according to the selected options |
|
|
|
* ( using the default netclass value or a preset/custom value ) |
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0] |
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0]. |
|
|
|
*/ |
|
|
|
inline int GetCurrentDiffPairGap() const |
|
|
|
{ |
|
|
@ -728,10 +564,9 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCurrentDiffPairViaGap |
|
|
|
* @return the current diff pair via gap, according to the selected options |
|
|
|
* ( using the default netclass value or a preset/custom value ) |
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0] |
|
|
|
* the default netclass is always in m_DiffPairDimensionsList[0]. |
|
|
|
*/ |
|
|
|
inline int GetCurrentDiffPairViaGap() const |
|
|
|
{ |
|
|
@ -742,30 +577,30 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetMinHoleSeparation |
|
|
|
* @param aValue The minimum distance between the edges of two holes or 0 to disable |
|
|
|
* hole-to-hole separation checking. |
|
|
|
*/ |
|
|
|
void SetMinHoleSeparation( int aDistance ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCopperEdgeClearance |
|
|
|
* @param aValue The minimum distance between copper items and board edges. |
|
|
|
*/ |
|
|
|
void SetCopperEdgeClearance( int aDistance ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetSilkEdgeClearance |
|
|
|
* @param aValue The minimum distance between silk items. Note that compound graphics |
|
|
|
* within a single footprint or on the board are not checked, but distances between text |
|
|
|
* and between graphics from different footprints are. |
|
|
|
* Set the minimum distance between silk items to \a aValue. |
|
|
|
* |
|
|
|
* @note Compound graphics within a single footprint or on the board are not checked, |
|
|
|
* but distances between text and between graphics from different footprints are. |
|
|
|
* |
|
|
|
* @param aValue The minimum distance between silk items. |
|
|
|
*/ |
|
|
|
void SetSilkClearance( int aDistance ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetEnabledLayers |
|
|
|
* returns a bit-mask of all the layers that are enabled |
|
|
|
* @return int - the enabled layers in bit-mapped form. |
|
|
|
* Return a bit-mask of all the layers that are enabled. |
|
|
|
* |
|
|
|
* @return the enabled layers in bit-mapped form. |
|
|
|
*/ |
|
|
|
inline LSET GetEnabledLayers() const |
|
|
|
{ |
|
|
@ -773,17 +608,17 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetEnabledLayers |
|
|
|
* changes the bit-mask of enabled layers |
|
|
|
* @param aMask = The new bit-mask of enabled layers |
|
|
|
* Change the bit-mask of enabled layers to \a aMask. |
|
|
|
* |
|
|
|
* @param aMask = The new bit-mask of enabled layers. |
|
|
|
*/ |
|
|
|
void SetEnabledLayers( LSET aMask ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function IsLayerEnabled |
|
|
|
* tests whether a given layer is enabled |
|
|
|
* @param aLayerId = The layer to be tested |
|
|
|
* @return bool - true if the layer is enabled |
|
|
|
* Test whether a given layer \a aLayerId is enabled. |
|
|
|
* |
|
|
|
* @param aLayerId The layer to be tested. |
|
|
|
* @return true if the layer is enabled. |
|
|
|
*/ |
|
|
|
inline bool IsLayerEnabled( PCB_LAYER_ID aLayerId ) const |
|
|
|
{ |
|
|
@ -794,8 +629,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCopperLayerCount |
|
|
|
* @return int - the number of neabled copper layers |
|
|
|
* @return the number of enabled copper layers. |
|
|
|
*/ |
|
|
|
inline int GetCopperLayerCount() const |
|
|
|
{ |
|
|
@ -803,9 +637,9 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Function SetCopperLayerCount |
|
|
|
* do what its name says... |
|
|
|
* @param aNewLayerCount = The new number of enabled copper layers |
|
|
|
* Set the copper layer count to \a aNewLayerCount. |
|
|
|
* |
|
|
|
* @param aNewLayerCount The new number of enabled copper layers. |
|
|
|
*/ |
|
|
|
void SetCopperLayerCount( int aNewLayerCount ); |
|
|
|
|
|
|
@ -813,33 +647,32 @@ public: |
|
|
|
inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; } |
|
|
|
|
|
|
|
/* |
|
|
|
* Function GetDRCEpsilon |
|
|
|
* an epsilon which accounts for rounding errors, etc. While currently an advanced cfg, |
|
|
|
* going through this API allows us to easily change it to board-specific if so desired. |
|
|
|
* Return an epsilon which accounts for rounding errors, etc. |
|
|
|
* |
|
|
|
* While currently an advanced cfg, going through this API allows us to easily change |
|
|
|
* it to board-specific if so desired. |
|
|
|
*/ |
|
|
|
int GetDRCEpsilon() const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Pad & via drills are finish size. Adding the hole plating thickness gives you the |
|
|
|
* acutal hole size. |
|
|
|
* Pad & via drills are finish size. |
|
|
|
* |
|
|
|
* Adding the hole plating thickness gives you the actual hole size. |
|
|
|
*/ |
|
|
|
int GetHolePlatingThickness() const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetLineThickness |
|
|
|
* Returns the default graphic segment thickness from the layer class for the given layer. |
|
|
|
* Return the default graphic segment thickness from the layer class for the given layer. |
|
|
|
*/ |
|
|
|
int GetLineThickness( PCB_LAYER_ID aLayer ) const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetTextSize |
|
|
|
* Returns the default text size from the layer class for the given layer. |
|
|
|
* Return the default text size from the layer class for the given layer. |
|
|
|
*/ |
|
|
|
wxSize GetTextSize( PCB_LAYER_ID aLayer ) const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetTextThickness |
|
|
|
* Returns the default text thickness from the layer class for the given layer. |
|
|
|
* Return the default text thickness from the layer class for the given layer. |
|
|
|
*/ |
|
|
|
int GetTextThickness( PCB_LAYER_ID aLayer ) const; |
|
|
|
|
|
|
@ -847,6 +680,143 @@ public: |
|
|
|
bool GetTextUpright( PCB_LAYER_ID aLayer ) const; |
|
|
|
|
|
|
|
int GetLayerClass( PCB_LAYER_ID aLayer ) const; |
|
|
|
|
|
|
|
private: |
|
|
|
void initFromOther( const BOARD_DESIGN_SETTINGS& aOther ); |
|
|
|
|
|
|
|
bool migrateSchema0to1(); |
|
|
|
|
|
|
|
public: |
|
|
|
// Note: the first value in each dimensions list is the current netclass value |
|
|
|
std::vector<int> m_TrackWidthList; |
|
|
|
std::vector<VIA_DIMENSION> m_ViasDimensionsList; |
|
|
|
std::vector<DIFF_PAIR_DIMENSION> m_DiffPairDimensionsList; |
|
|
|
|
|
|
|
bool m_MicroViasAllowed; ///< true to allow micro vias |
|
|
|
bool m_BlindBuriedViaAllowed; ///< true to allow blind/buried vias |
|
|
|
VIATYPE m_CurrentViaType; ///< (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA) |
|
|
|
|
|
|
|
bool m_UseConnectedTrackWidth; // use width of existing track when creating a new, |
|
|
|
// connected track |
|
|
|
int m_MinClearance; // overall min clearance |
|
|
|
int m_TrackMinWidth; // overall min track width |
|
|
|
int m_ViasMinAnnulus; // overall minimum width of the via copper ring |
|
|
|
int m_ViasMinSize; // overall vias (not micro vias) min diameter |
|
|
|
int m_MinThroughDrill; // through hole (not micro vias) min drill diameter |
|
|
|
int m_MicroViasMinSize; // micro vias min diameter |
|
|
|
int m_MicroViasMinDrill; // micro vias min drill diameter |
|
|
|
int m_CopperEdgeClearance; |
|
|
|
int m_HoleClearance; // Hole to copper clearance |
|
|
|
int m_HoleToHoleMin; // Min width of web between two drilled holes |
|
|
|
int m_SilkClearance; |
|
|
|
|
|
|
|
std::shared_ptr<DRC_ENGINE> m_DRCEngine; |
|
|
|
std::map<int, SEVERITY> m_DRCSeverities; // Map from DRCErrorCode to SEVERITY |
|
|
|
std::set<wxString> m_DrcExclusions; |
|
|
|
|
|
|
|
/** |
|
|
|
* Option to select different fill algorithms. |
|
|
|
* |
|
|
|
* There are currently two supported values: |
|
|
|
* 5: |
|
|
|
* - Use thick outlines around filled polygons (gives smoothest shape but at the expense |
|
|
|
* of processing time and slight infidelity when exporting) |
|
|
|
* - Use zone outline when knocking out higher-priority zones (just wrong, but mimics |
|
|
|
* legacy behavior. |
|
|
|
* 6: |
|
|
|
* - No thick outline. |
|
|
|
* - Use filled areas when knocking out higher-priority zones. |
|
|
|
*/ |
|
|
|
int m_ZoneFillVersion; |
|
|
|
|
|
|
|
// When smoothing the zone's outline there's the question of external fillets (that is, those |
|
|
|
// applied to concave corners). While it seems safer to never have copper extend outside the |
|
|
|
// zone outline, 5.1.x and prior did indeed fill them so we leave the mode available. |
|
|
|
bool m_ZoneKeepExternalFillets; |
|
|
|
|
|
|
|
// Maximum error allowed when approximating circles and arcs to segments |
|
|
|
int m_MaxError; |
|
|
|
|
|
|
|
// Global mask margins: |
|
|
|
int m_SolderMaskMargin; // Solder mask margin |
|
|
|
int m_SolderMaskMinWidth; // Solder mask min width (2 areas closer than this |
|
|
|
// width are merged) |
|
|
|
int m_SolderPasteMargin; // Solder paste margin absolute value |
|
|
|
double m_SolderPasteMarginRatio; // Solder mask margin ratio value of pad size |
|
|
|
// The final margin is the sum of these 2 values |
|
|
|
|
|
|
|
// Variables used in footprint editing (default value in item/footprint creation) |
|
|
|
std::vector<TEXT_ITEM_INFO> m_DefaultFPTextItems; |
|
|
|
|
|
|
|
// Arrays of default values for the various layer classes. |
|
|
|
int m_LineThickness[ LAYER_CLASS_COUNT ]; |
|
|
|
wxSize m_TextSize[ LAYER_CLASS_COUNT ]; |
|
|
|
int m_TextThickness[ LAYER_CLASS_COUNT ]; |
|
|
|
bool m_TextItalic[ LAYER_CLASS_COUNT ]; |
|
|
|
bool m_TextUpright[ LAYER_CLASS_COUNT ]; |
|
|
|
|
|
|
|
// Default values for dimension objects |
|
|
|
DIM_UNITS_MODE m_DimensionUnitsMode; |
|
|
|
int m_DimensionPrecision; ///< Number of digits after the decimal |
|
|
|
DIM_UNITS_FORMAT m_DimensionUnitsFormat; |
|
|
|
bool m_DimensionSuppressZeroes; |
|
|
|
DIM_TEXT_POSITION m_DimensionTextPosition; |
|
|
|
bool m_DimensionKeepTextAligned; |
|
|
|
int m_DimensionArrowLength; |
|
|
|
int m_DimensionExtensionOffset; |
|
|
|
|
|
|
|
// Miscellaneous |
|
|
|
wxPoint m_AuxOrigin; ///< origin for plot exports |
|
|
|
wxPoint m_GridOrigin; ///< origin for grid offsets |
|
|
|
|
|
|
|
PAD m_Pad_Master; // A dummy pad to store all default parameters |
|
|
|
// when importing values or creating a new pad |
|
|
|
|
|
|
|
// Set to true if the board has a stackup management. |
|
|
|
// If not set a default basic stackup will be used to generate the gbrjob file. |
|
|
|
// Could be removed later, or at least always set to true |
|
|
|
bool m_HasStackup; |
|
|
|
|
|
|
|
private: |
|
|
|
// Indices into the trackWidth, viaSizes and diffPairDimensions lists. |
|
|
|
// The 0 index is always the current netclass value(s) |
|
|
|
unsigned m_trackWidthIndex; |
|
|
|
unsigned m_viaSizeIndex; |
|
|
|
unsigned m_diffPairIndex; |
|
|
|
|
|
|
|
// Custom values for track/via sizes (specified via dialog instead of netclass or lists) |
|
|
|
bool m_useCustomTrackVia; |
|
|
|
int m_customTrackWidth; |
|
|
|
VIA_DIMENSION m_customViaSize; |
|
|
|
|
|
|
|
// Custom values for differential pairs (specified via dialog instead of netclass/lists) |
|
|
|
bool m_useCustomDiffPair; |
|
|
|
DIFF_PAIR_DIMENSION m_customDiffPair; |
|
|
|
|
|
|
|
int m_copperLayerCount; ///< Number of copper layers for this design |
|
|
|
|
|
|
|
LSET m_enabledLayers; ///< Bit-mask for layer enabling |
|
|
|
|
|
|
|
int m_boardThickness; ///< Board thickness for 3D viewer |
|
|
|
|
|
|
|
/// Current net class name used to display netclass info. |
|
|
|
/// This is also the last used netclass after starting a track. |
|
|
|
wxString m_currentNetClassName; |
|
|
|
|
|
|
|
/** the description of layers stackup, for board fabrication |
|
|
|
* only physical layers are in layers stackup. |
|
|
|
* It includes not only layers enabled for the board edition, but also dielectric layers |
|
|
|
*/ |
|
|
|
BOARD_STACKUP m_stackup; |
|
|
|
|
|
|
|
/// Net classes that are loaded from the board file before these were stored in the project |
|
|
|
NETCLASSES m_internalNetClasses; |
|
|
|
|
|
|
|
/// This will point to m_internalNetClasses until it is repointed to the project after load |
|
|
|
NETCLASSES* m_netClasses; |
|
|
|
|
|
|
|
/// The default settings that will be used for new zones |
|
|
|
ZONE_SETTINGS m_defaultZoneSettings; |
|
|
|
}; |
|
|
|
|
|
|
|
#endif // BOARD_DESIGN_SETTINGS_H_ |