diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 554c97ab14..8751b501c8 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -596,6 +596,7 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM* if( aStartItem && m_startLayer < 0 ) m_startLayer = aStartItem->Layer(); + aSizes.SetClearance( bds.m_MinClearance ); aSizes.SetMinClearance( bds.m_MinClearance ); aSizes.SetClearanceSource( _( "board minimum clearance" ) ); @@ -604,7 +605,7 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM* { if( constraint.m_Value.Min() > bds.m_MinClearance ) { - aSizes.SetMinClearance( constraint.m_Value.Min() ); + aSizes.SetClearance( constraint.m_Value.Min() ); aSizes.SetClearanceSource( constraint.m_RuleName ); } } diff --git a/pcbnew/router/pns_sizes_settings.h b/pcbnew/router/pns_sizes_settings.h index 0fcc270544..f625008c17 100644 --- a/pcbnew/router/pns_sizes_settings.h +++ b/pcbnew/router/pns_sizes_settings.h @@ -38,6 +38,7 @@ class SIZES_SETTINGS { public: SIZES_SETTINGS() : + m_clearance( 0 ), m_minClearance( 0 ), m_trackWidth( 155000 ), m_trackWidthIsExplicit( true ), @@ -56,6 +57,12 @@ public: void ClearLayerPairs(); void AddLayerPair( int aL1, int aL2 ); + // The working clearance, from the current net to anything else (without knowing the net of the + // other object). Specific clearance to another object may be resolved differently. + int Clearance() const { return m_clearance; } + void SetClearance( int aClearance ) { m_clearance = aClearance; } + + // The absolute minimum clearance from the board int MinClearance() const { return m_minClearance; } void SetMinClearance( int aClearance ) { m_minClearance = aClearance; } @@ -116,6 +123,7 @@ public: void SetDiffPairGapSource( const wxString& aSource ) { m_diffPairGapSource = aSource; } private: + int m_clearance; int m_minClearance; int m_trackWidth; bool m_trackWidthIsExplicit; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 4e0bdb52ac..223ada6c8e 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -2546,7 +2546,7 @@ void ROUTER_TOOL::UpdateMessagePanel() sizes.GetDiffPairWidthSource() ) ); items.emplace_back( wxString::Format( _( "Min Clearance: %s" ), - FORMAT_VALUE( sizes.MinClearance() ) ), + FORMAT_VALUE( sizes.Clearance() ) ), wxString::Format( _( "(from %s)" ), sizes.GetClearanceSource() ) ); @@ -2563,7 +2563,7 @@ void ROUTER_TOOL::UpdateMessagePanel() sizes.GetWidthSource() ) ); items.emplace_back( wxString::Format( _( "Min Clearance: %s" ), - FORMAT_VALUE( sizes.MinClearance() ) ), + FORMAT_VALUE( sizes.Clearance() ) ), wxString::Format( _( "(from %s)" ), sizes.GetClearanceSource() ) ); }