pub fn validate_arc_ring(
ring: &ArcRing,
tolerance: Tolerance,
) -> Result<(), OverlayError>Expand description
Validate an arc ring against the same contract as crate::Ring,
plus the arc-specific degeneracies.
Refused, each with a reason the caller can act on:
- fewer than two vertices: a circle needs two, a polygon needs three, and one vertex cannot describe either
- a polygonal ring with fewer than three vertices: two straight edges enclose no area
- non-finite coordinates or a non-finite bulge
- a zero-length edge, which leaves the arc centre undefined
- an arc whose implied radius is below tolerance, the zero-radius case ADR 0050 flagged: such an arc is a point, not a boundary
- a ring enclosing no measurable area
Self-intersection is NOT checked here. Arc/arc and arc/segment crossing tests are genuinely part of the overlay algorithm, and a cheap approximation would either reject valid input or pass invalid input. The straight-edge contract checks it because there the test is exact; claiming the same guarantee for arcs without the machinery would be dishonest, so the gap is named instead.