Normalize `IsInsideCourtyard`

This commit is contained in:
Seth Hillbrand 2022-03-04 15:49:02 -08:00
parent cd7141fd10
commit c18d9b9baf
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() );