Normalize `IsInsideCourtyard`
This commit is contained in:
parent
cd7141fd10
commit
c18d9b9baf
|
@ -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() );
|
||||||
|
|
Loading…
Reference in New Issue