Skip to main content

curve_length

Function curve_length 

Source
pub fn curve_length(
    curve: &Curve,
    range: (f64, f64),
    tol: Tolerances,
) -> OgeomResult<f64>
Expand description

The arc length of a curve over range.

Integrated from the curve’s own speed, so it is the length of the curve rather than of a polyline that approximates it. A tessellated length is always short (every chord cuts a corner), and the shortfall is exactly what a deflection tolerance permits, which is far larger than this.

§Errors

OgeomError::Domain if range is not finite; OgeomError::NotDone if the integral does not converge, which means the parameterization is singular somewhere in the range rather than that the curve is long.