Cleanup.
This commit is contained in:
parent
fa5a484797
commit
cabcaf933c
|
@ -432,12 +432,12 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
|
|||
|
||||
if( zone->IsFilled() )
|
||||
{
|
||||
const auto& fill = zone->GetFilledPolysList( layer );
|
||||
const auto& padOutline = pad->GetEffectivePolygon()->Outline( 0 );
|
||||
const SHAPE_POLY_SET* zoneFill = zone->GetFill( layer );
|
||||
const SHAPE_LINE_CHAIN& padHull = pad->GetEffectivePolygon()->Outline( 0 );
|
||||
|
||||
for( const VECTOR2I& pt : fill->COutline( islandIdx ).CPoints() )
|
||||
for( const VECTOR2I& pt : zoneFill->COutline( islandIdx ).CPoints() )
|
||||
{
|
||||
if( !padOutline.PointInside( pt ) )
|
||||
if( !padHull.PointInside( pt ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -461,23 +461,23 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
|
|||
}
|
||||
else if( CN_ZONE_LAYER* zoneLayer = dynamic_cast<CN_ZONE_LAYER*>( connected ) )
|
||||
{
|
||||
ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() );
|
||||
ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() );
|
||||
int islandIdx = zoneLayer->SubpolyIndex();
|
||||
|
||||
if( zone->GetFill( layer )->OutlineCount() )
|
||||
if( zone->IsFilled() )
|
||||
{
|
||||
int idx = zoneLayer->SubpolyIndex();
|
||||
const SHAPE_LINE_CHAIN& island = zone->GetFill( layer )->COutline( idx );
|
||||
SHAPE_CIRCLE flashing( via->GetCenter(), via->GetWidth() / 2 );
|
||||
const SHAPE_POLY_SET* zoneFill = zone->GetFill( layer );
|
||||
SHAPE_CIRCLE viaHull( via->GetCenter(), via->GetWidth() / 2 );
|
||||
|
||||
for( const VECTOR2I& pt : island.CPoints() )
|
||||
for( const VECTOR2I& pt : zoneFill->COutline( islandIdx ).CPoints() )
|
||||
{
|
||||
if( !flashing.SHAPE::Collide( pt ) )
|
||||
if( !viaHull.SHAPE::Collide( pt ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// If the entire island is inside the via's flashing then the via won't
|
||||
// *actually* connect to anything *else* so don't consider it connected.
|
||||
// If the zone isn't filled, or the entire island is inside the pad's
|
||||
// flashing then the pad won't _actually_ connect to anything else.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue