Browse Source

Performance enhancement for zone filling.

7.0
Jeff Young 3 years ago
parent
commit
90bc5c19cf
  1. 8
      pcbnew/zone.cpp

8
pcbnew/zone.cpp

@ -986,7 +986,10 @@ bool ZONE::IsIsland( PCB_LAYER_ID aLayer, int aPolyIdx ) const
void ZONE::GetInteractingZones( PCB_LAYER_ID aLayer, std::vector<ZONE*>* aZones ) const
{
int epsilon = Millimeter2iu( 0.001 );
int epsilon = Millimeter2iu( 0.001 );
BOX2I bbox = GetCachedBoundingBox();
bbox.Inflate( epsilon );
for( ZONE* candidate : GetBoard()->Zones() )
{
@ -1002,6 +1005,9 @@ void ZONE::GetInteractingZones( PCB_LAYER_ID aLayer, std::vector<ZONE*>* aZones
if( candidate->GetNetCode() != GetNetCode() )
continue;
if( !candidate->GetCachedBoundingBox().Intersects( bbox ) )
continue;
for( auto iter = m_Poly->CIterate(); iter; iter++ )
{
if( candidate->m_Poly->Collide( iter.Get(), epsilon ) )

Loading…
Cancel
Save