Files
Seth Hillbrand 8818f79dcf SHAPE_POLY_SET: fix triangulation of zone fills with holes
Commit c1ef019d35 moved splitSelfTouchingOutlines() into
cacheTriangulation(), placing it before Fracture().  When a polygon
has holes, splitSelfTouchingOutlines() splits the outer boundary but
the new sub-polygon inherits no holes.  Its triangulation then spans
the knockout areas, producing false DRC clearance violations.

Fix the order: call Fracture() first so holes are merged into the
outline, then call splitSelfTouchingOutlines().

After Fracture(), Clipper2 rounds corridor-cut vertices to integer
coordinates; they can land within 1nm of a segment endpoint.
SEG::Contains() accepts points within sqrt(3) nm as on-segment, so
those vertices trigger false pinch-point splits.  Use SquaredDistance()
== 0, which requires exact coincidence, to detect only true pinch
points.

Fixes https://gitlab.com/kicad/code/kicad/issues/23123
2026-02-25 21:31:22 -08:00
..