Normalize `IsInsideCourtyard`

(cherry picked from commit c18d9b9baf)
This commit is contained in:
Seth Hillbrand 2022-03-04 15:49:02 -08:00
parent 0cfa88ca9a
commit f4cdb97141
1 changed files with 2 additions and 11 deletions

View File

@ -197,17 +197,8 @@ bool calcIsInsideCourtyard( BOARD_ITEM* aItem, const EDA_RECT& aItemBBox,
footprintCourtyard = aFootprint->GetPolyCourtyard( aSide ); footprintCourtyard = aFootprint->GetPolyCourtyard( aSide );
if( aItem->Type() == PCB_ZONE_T || aItem->Type() == PCB_FP_ZONE_T ) if( !aFootprint->GetBoundingBox().Intersects( aItemBBox ) )
{ return false;
// A zone must be entirely inside the courtyard to be considered
if( !aFootprint->GetBoundingBox().Contains( aItemBBox ) )
return false;
}
else
{
if( !aFootprint->GetBoundingBox().Intersects( aItemBBox ) )
return false;
}
if( !aItemShape ) if( !aItemShape )
aItemShape = aItem->GetEffectiveShape( aCtx->GetLayer() ); aItemShape = aItem->GetEffectiveShape( aCtx->GetLayer() );