Warn when diff pair router can't start due to too-small-gap.
Fixes https://gitlab.com/kicad/code/kicad/issues/7795
This commit is contained in:
parent
de1191f971
commit
8cb6f15687
|
@ -415,6 +415,8 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM*
|
|||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
PNS::CONSTRAINT constraint;
|
||||
|
||||
aSizes.SetMinClearance( bds.m_MinClearance );
|
||||
|
||||
int trackWidth = bds.m_TrackMinWidth;
|
||||
bool found = false;
|
||||
|
||||
|
|
|
@ -185,6 +185,15 @@ bool ROUTER::isStartingPointRoutable( const VECTOR2I& aWhere, ITEM* aStartItem,
|
|||
if( Settings().CanViolateDRC() && Settings().Mode() == RM_MarkObstacles )
|
||||
return true;
|
||||
|
||||
if( m_mode == PNS_MODE_ROUTE_DIFF_PAIR )
|
||||
{
|
||||
if( m_sizes.DiffPairGap() < m_sizes.MinClearance() )
|
||||
{
|
||||
SetFailureReason( _( "Diff pair gap is less than board minimum clearance." ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ITEM_SET candidates = QueryHoverItems( aWhere );
|
||||
|
||||
for( ITEM* item : candidates.Items() )
|
||||
|
|
|
@ -54,6 +54,9 @@ public:
|
|||
void ClearLayerPairs();
|
||||
void AddLayerPair( int aL1, int aL2 );
|
||||
|
||||
int MinClearance() const { return m_minClearance; }
|
||||
void SetMinClearance( int aClearance ) { m_minClearance = aClearance; }
|
||||
|
||||
int TrackWidth() const { return m_trackWidth; }
|
||||
void SetTrackWidth( int aWidth ) { m_trackWidth = aWidth; }
|
||||
|
||||
|
@ -96,6 +99,7 @@ public:
|
|||
VIATYPE ViaType() const { return m_viaType; }
|
||||
|
||||
private:
|
||||
int m_minClearance;
|
||||
int m_trackWidth;
|
||||
|
||||
VIATYPE m_viaType;
|
||||
|
|
Loading…
Reference in New Issue