pcbnew: Ensure connectivity layers are respected

This prevents non-copper layers from being included in the connectivity
search.  It also limits the layer search in the connectivity RTree to
just the copper layer range.
This commit is contained in:
Seth Hillbrand 2018-07-10 12:22:36 -07:00
parent 2cf38f68fe
commit f87cb64d65
2 changed files with 6 additions and 2 deletions

View File

@ -233,6 +233,9 @@ void CN_CONNECTIVITY_ALGO::markItemNetAsDirty( const BOARD_ITEM* aItem )
bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
{
if( !IsCopperLayer( aItem->GetLayer() ) )
return false;
markItemNetAsDirty ( aItem );
switch( aItem->Type() )

View File

@ -555,7 +555,7 @@ public:
{
auto item = new CN_ITEM( pad, false, 1 );
item->AddAnchor( pad->ShapePos() );
item->SetLayers( LAYER_RANGE( 0, PCB_LAYER_ID_COUNT ) );
item->SetLayers( LAYER_RANGE( F_Cu, B_Cu ) );
switch( pad->GetAttribute() )
{
@ -573,6 +573,7 @@ public:
break;
}
}
break;
}
default:
break;
@ -602,7 +603,7 @@ public:
m_items.push_back( item );
item->AddAnchor( via->GetStart() );
item->SetLayers( LAYER_RANGE( 0, PCB_LAYER_ID_COUNT ) );
item->SetLayers( LAYER_RANGE( F_Cu, B_Cu ) );
addItemtoTree( item );
SetDirty();
return item;