Zones must be entirely inside for insideCourtyard.
This is a huge performance win as otherwise we're doing *lots* of shape collisions with ground planes. Fixes https://gitlab.com/kicad/code/kicad/issues/7720
This commit is contained in:
parent
22005299af
commit
c7a71b44e5
|
@ -177,8 +177,17 @@ static void insideCourtyard( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
else
|
||||
footprintCourtyard = footprint->GetPolyCourtyardFront();
|
||||
|
||||
if( !footprint->GetBoundingBox().Intersects( itemBBox ) )
|
||||
return false;
|
||||
if( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T )
|
||||
{
|
||||
// A zone must be entirely inside the courtyard to be considered
|
||||
if( !footprint->GetBoundingBox().Contains( itemBBox ) )
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !footprint->GetBoundingBox().Intersects( itemBBox ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !shape )
|
||||
shape = item->GetEffectiveShape( context->GetLayer() );
|
||||
|
|
Loading…
Reference in New Issue