Fix issue when we ask if a pad is connected to a zone we're in the middle of filling.
This commit is contained in:
parent
89e61ff73b
commit
0a8718cd1d
|
@ -427,10 +427,12 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
|
||||||
}
|
}
|
||||||
else if( CN_ZONE_LAYER* zoneLayer = dynamic_cast<CN_ZONE_LAYER*>( connected ) )
|
else if( CN_ZONE_LAYER* zoneLayer = dynamic_cast<CN_ZONE_LAYER*>( connected ) )
|
||||||
{
|
{
|
||||||
BOARD_CONNECTED_ITEM* item = zoneLayer->Parent();
|
ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() );
|
||||||
int islandIdx = zoneLayer->SubpolyIndex();
|
int islandIdx = zoneLayer->SubpolyIndex();
|
||||||
|
|
||||||
const auto& fill = static_cast<ZONE*>( item )->GetFilledPolysList( layer );
|
if( zone->IsFilled() )
|
||||||
|
{
|
||||||
|
const auto& fill = zone->GetFilledPolysList( layer );
|
||||||
const auto& padOutline = pad->GetEffectivePolygon()->Outline( 0 );
|
const auto& padOutline = pad->GetEffectivePolygon()->Outline( 0 );
|
||||||
|
|
||||||
for( const VECTOR2I& pt : fill->COutline( islandIdx ).CPoints() )
|
for( const VECTOR2I& pt : fill->COutline( islandIdx ).CPoints() )
|
||||||
|
@ -438,9 +440,10 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
|
||||||
if( !padOutline.PointInside( pt ) )
|
if( !padOutline.PointInside( pt ) )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the entire island is inside the pad's flashing then the pad won't
|
// If the zone isn't filled, or the entire island is inside the pad's
|
||||||
// *actually* connect to anything *else* so don't consider it connected.
|
// flashing then the pad won't _actually_ connect to anything else.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue