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
This commit is contained in:
parent
eae85742cc
commit
5ba2896968
|
@ -812,8 +812,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