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() )
|
if( zone->IsFilled() )
|
||||||
{
|
{
|
||||||
const auto& fill = zone->GetFilledPolysList( layer );
|
const SHAPE_POLY_SET* zoneFill = zone->GetFill( layer );
|
||||||
const auto& padOutline = pad->GetEffectivePolygon()->Outline( 0 );
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -462,22 +462,22 @@ 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 ) )
|
||||||
{
|
{
|
||||||
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_POLY_SET* zoneFill = zone->GetFill( layer );
|
||||||
const SHAPE_LINE_CHAIN& island = zone->GetFill( layer )->COutline( idx );
|
SHAPE_CIRCLE viaHull( via->GetCenter(), via->GetWidth() / 2 );
|
||||||
SHAPE_CIRCLE flashing( 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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the entire island is inside the via's flashing then the via 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