router: cluster extraction should only consider objects that are touching (instead of checking clearance)

This commit is contained in:
Tomasz Wlostowski 2022-06-03 23:03:24 +02:00
parent 297c60923e
commit cab08f859a
1 changed files with 6 additions and 1 deletions

View File

@ -531,10 +531,15 @@ const std::set<ITEM*> TOPOLOGY::AssembleCluster( ITEM* aStart, int aLayer )
visited.insert( top );
m_world->QueryColliding( top, obstacles, ITEM::ANY_T, -1, false );
m_world->QueryColliding( top, obstacles, ITEM::ANY_T, -1, false, 0 ); // only query touching objects
for( OBSTACLE& obs : obstacles )
{
bool trackOnTrack = ( obs.m_item->Net() != top->Net() ) && obs.m_item->OfKind( ITEM::SEGMENT_T ) && top->OfKind( ITEM::SEGMENT_T );
if( trackOnTrack )
continue;
if( visited.find( obs.m_item ) == visited.end() &&
obs.m_item->Layers().Overlaps( aLayer ) && !( obs.m_item->Marker() & MK_HEAD ) )
{