Hand cherry-pick fixes from master.

0a8718cd1d
7fb4a2c0a5
This commit is contained in:
Jeff Young 2022-03-15 13:19:12 +00:00
parent ad2486b09f
commit b9d7a0565f
1 changed files with 26 additions and 20 deletions

View File

@ -418,18 +418,21 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
{ {
ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() ); ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() );
int islandIdx = zoneLayer->SubpolyIndex(); int islandIdx = zoneLayer->SubpolyIndex();
const SHAPE_POLY_SET& fill = zone->GetFilledPolysList( layer );
const SHAPE_LINE_CHAIN& island = fill.COutline( islandIdx );
std::shared_ptr<SHAPE> flashing = pad->GetEffectiveShape();
for( const VECTOR2I& pt : island.CPoints() ) if( zone->IsFilled() )
{ {
if( !flashing->Collide( pt ) ) const auto& fill = zone->GetFilledPolysList( layer );
const auto& padOutline = pad->GetEffectivePolygon()->Outline( 0 );
for( const VECTOR2I& pt : fill.COutline( islandIdx ).CPoints() )
{
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;
} }
} }
@ -449,18 +452,21 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
{ {
ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() ); ZONE* zone = static_cast<ZONE*>( zoneLayer->Parent() );
int islandIdx = zoneLayer->SubpolyIndex(); int islandIdx = zoneLayer->SubpolyIndex();
const SHAPE_POLY_SET& fill = zone->GetFilledPolysList( layer );
const SHAPE_LINE_CHAIN& island = fill.COutline( islandIdx );
SHAPE_CIRCLE flashing( via->GetCenter(), via->GetWidth() / 2 );
for( const VECTOR2I& pt : island.CPoints() ) if( zone->IsFilled() )
{ {
if( !flashing.SHAPE::Collide( pt ) ) const auto& fill = zone->GetFilledPolysList( layer );
SHAPE_CIRCLE viaCircle( via->GetCenter(), via->GetWidth() / 2 );
for( const VECTOR2I& pt : fill.COutline( islandIdx ).CPoints() )
{
if( !viaCircle.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;
} }
} }