mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
router: ignore items belonging to the net of the head trace when building walkaround clusters
This commit is contained in:
parent
5e77da4902
commit
c5aaaf1d65
pcbnew/router
@ -104,6 +104,8 @@ bool TOPOLOGY::NearestUnconnectedAnchorPoint( const LINE* aTrack, VECTOR2I& aPoi
|
||||
return false;
|
||||
|
||||
std::unique_ptr<NODE> tmpNode( m_world->Branch() );
|
||||
|
||||
track.ClearLinks();
|
||||
tmpNode->Add( track );
|
||||
|
||||
const JOINT* jt = tmpNode->FindJoint( track.CPoint( -1 ), &track );
|
||||
@ -620,7 +622,7 @@ bool TOPOLOGY::AssembleDiffPair( ITEM* aStart, DIFF_PAIR& aPair )
|
||||
return true;
|
||||
}
|
||||
|
||||
const TOPOLOGY::CLUSTER TOPOLOGY::AssembleCluster( ITEM* aStart, int aLayer, double aAreaExpansionLimit )
|
||||
const TOPOLOGY::CLUSTER TOPOLOGY::AssembleCluster( ITEM* aStart, int aLayer, double aAreaExpansionLimit, NET_HANDLE aExcludedNet )
|
||||
{
|
||||
CLUSTER cluster;
|
||||
std::deque<ITEM*> pending;
|
||||
@ -653,6 +655,9 @@ const TOPOLOGY::CLUSTER TOPOLOGY::AssembleCluster( ITEM* aStart, int aLayer, dou
|
||||
if( trackOnTrack )
|
||||
continue;
|
||||
|
||||
if( aExcludedNet && obs.m_item->Net() == aExcludedNet )
|
||||
continue;
|
||||
|
||||
if( obs.m_item->OfKind( ITEM::SEGMENT_T | ITEM::ARC_T ) && obs.m_item->Layers().Overlaps( aLayer ) )
|
||||
{
|
||||
auto line = m_world->AssembleLine( static_cast<LINKED_ITEM*>(obs.m_item) );
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
|
||||
bool AssembleDiffPair( ITEM* aStart, DIFF_PAIR& aPair );
|
||||
|
||||
const CLUSTER AssembleCluster( ITEM* aStart, int aLayer, double aAreaExpansionLimit = 0.0 );
|
||||
const CLUSTER AssembleCluster( ITEM* aStart, int aLayer, double aAreaExpansionLimit = 0.0, NET_HANDLE aExcludedNet = nullptr );
|
||||
|
||||
private:
|
||||
const int DP_PARALLELITY_THRESHOLD = 5;
|
||||
|
@ -128,9 +128,10 @@ bool WALKAROUND::singleStep()
|
||||
continue;
|
||||
}
|
||||
|
||||
PNS_DBG( Dbg(), AddItem, obstacle->m_item, BLUE, 10000, wxString::Format( "col-item owner-depth %d", static_cast<const NODE*>( obstacle->m_item->Owner() )->Depth() ) );
|
||||
|
||||
pendingClusters[ i ] = topo.AssembleCluster( obstacle->m_item, line.Layer() );
|
||||
pendingClusters[ i ] = topo.AssembleCluster( obstacle->m_item, line.Layer(), 0.0, line.Net() );
|
||||
PNS_DBG( Dbg(), AddItem, obstacle->m_item, BLUE, 10000, wxString::Format( "col-item owner-depth %d cl-items=%d", static_cast<const NODE*>( obstacle->m_item->Owner() )->Depth(), (int) pendingClusters[i].m_items.size() ) );
|
||||
|
||||
}
|
||||
|
||||
DIRECTION_45::CORNER_MODE cornerMode = Settings().GetCornerMode();
|
||||
@ -158,8 +159,9 @@ bool WALKAROUND::singleStep()
|
||||
|
||||
bool stat = aLine.Walkaround( hull, tmp.Line(), aCw );
|
||||
|
||||
|
||||
PNS_DBG( Dbg(), AddItem, &tmp, RED, 10000, wxT( "walk" ) );
|
||||
PNS_DBG( Dbg(), AddShape, &hull, YELLOW, 10000, wxString::Format( "hull stat %d", stat?1:0 ) );
|
||||
PNS_DBG( Dbg(), AddItem, &tmp, RED, 10000, wxString::Format( "walk stat %d", stat?1:0 ) );
|
||||
PNS_DBG( Dbg(), AddItem, clItem, WHITE, 10000, wxString::Format( "item stat %d", stat?1:0 ) );
|
||||
|
||||
if( !stat )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user