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:
parent
2cf38f68fe
commit
f87cb64d65
|
@ -233,6 +233,9 @@ void CN_CONNECTIVITY_ALGO::markItemNetAsDirty( const BOARD_ITEM* aItem )
|
||||||
|
|
||||||
bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
||||||
{
|
{
|
||||||
|
if( !IsCopperLayer( aItem->GetLayer() ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
markItemNetAsDirty ( aItem );
|
markItemNetAsDirty ( aItem );
|
||||||
|
|
||||||
switch( aItem->Type() )
|
switch( aItem->Type() )
|
||||||
|
|
|
@ -555,7 +555,7 @@ public:
|
||||||
{
|
{
|
||||||
auto item = new CN_ITEM( pad, false, 1 );
|
auto item = new CN_ITEM( pad, false, 1 );
|
||||||
item->AddAnchor( pad->ShapePos() );
|
item->AddAnchor( pad->ShapePos() );
|
||||||
item->SetLayers( LAYER_RANGE( 0, PCB_LAYER_ID_COUNT ) );
|
item->SetLayers( LAYER_RANGE( F_Cu, B_Cu ) );
|
||||||
|
|
||||||
switch( pad->GetAttribute() )
|
switch( pad->GetAttribute() )
|
||||||
{
|
{
|
||||||
|
@ -573,6 +573,7 @@ public:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -602,7 +603,7 @@ public:
|
||||||
|
|
||||||
m_items.push_back( item );
|
m_items.push_back( item );
|
||||||
item->AddAnchor( via->GetStart() );
|
item->AddAnchor( via->GetStart() );
|
||||||
item->SetLayers( LAYER_RANGE( 0, PCB_LAYER_ID_COUNT ) );
|
item->SetLayers( LAYER_RANGE( F_Cu, B_Cu ) );
|
||||||
addItemtoTree( item );
|
addItemtoTree( item );
|
||||||
SetDirty();
|
SetDirty();
|
||||||
return item;
|
return item;
|
||||||
|
|
Loading…
Reference in New Issue