168

Nested holes

geometry

A hole containing an island (hole-in-hole-in-fill) violates simple-polygon assumptions; naive ring parity gets the interior/exterior classification backwards.

Nested holes illustration
Rendered from the real conversion/geometry code.

Detection

Ring nesting depth > 2 (exterior -> hole -> island -> hole...) detected via point-in-ring containment tests between rings.

Mitigation

Affected conversions