pcbnew/drc: dont process edge case zone w/ 0 area

If a filled zone is outside of the board outline, it gets reduced
to the interection of the two, which is zero.  This change stops
zero-area polygons from being added to the drc rtree in this case,
because they alias to the origin.

Fixes: https://gitlab.com/kicad/code/kicad/issues/18600
This commit is contained in:
Troy Denton 2024-10-20 23:24:27 -04:00
parent 385d22aba7
commit 516a9d8008

View File

@ -136,6 +136,12 @@ public:
BOX2I bbox = subshape->BBox();
// there is an edge case where filled zones can get reduced to a point,
// e.g. when they exist outside of the board outline, the intersection
// w/ the board outline becomes a polygon of area 0
if (bbox.GetArea() == 0)
continue;
bbox.Inflate( aWorstClearance );
const int mmin[2] = { bbox.GetX(), bbox.GetY() };