Performance enhancement for zone filling.
This commit is contained in:
parent
907cafef6d
commit
90bc5c19cf
|
@ -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
|
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() )
|
for( ZONE* candidate : GetBoard()->Zones() )
|
||||||
{
|
{
|
||||||
|
@ -1002,6 +1005,9 @@ void ZONE::GetInteractingZones( PCB_LAYER_ID aLayer, std::vector<ZONE*>* aZones
|
||||||
if( candidate->GetNetCode() != GetNetCode() )
|
if( candidate->GetNetCode() != GetNetCode() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if( !candidate->GetCachedBoundingBox().Intersects( bbox ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
for( auto iter = m_Poly->CIterate(); iter; iter++ )
|
for( auto iter = m_Poly->CIterate(); iter; iter++ )
|
||||||
{
|
{
|
||||||
if( candidate->m_Poly->Collide( iter.Get(), epsilon ) )
|
if( candidate->m_Poly->Collide( iter.Get(), epsilon ) )
|
||||||
|
|
Loading…
Reference in New Issue