enclosedByArea test for zone needs to be outline-based.
(Otherwise it's order-specific when filling, which
is pretty unpredictable.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18202
(cherry picked from commit 5ba2896968
)
This commit is contained in:
parent
4ee2a007eb
commit
df3924421d
|
@ -772,8 +772,15 @@ static void enclosedByAreaFunc( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
SHAPE_POLY_SET itemShape;
|
||||
bool enclosedByArea;
|
||||
|
||||
item->TransformShapeToPolygon( itemShape, layer, 0, maxError,
|
||||
ERROR_OUTSIDE );
|
||||
if( item->Type() == PCB_ZONE_T )
|
||||
{
|
||||
itemShape = *static_cast<ZONE*>( item )->Outline();
|
||||
}
|
||||
else
|
||||
{
|
||||
item->TransformShapeToPolygon( itemShape, layer, 0, maxError,
|
||||
ERROR_OUTSIDE );
|
||||
}
|
||||
|
||||
if( itemShape.IsEmpty() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue