Synopsis

PDX_MSGT gdx_CurveGetLength(long option, MDA_PTR gdx_curv_ptr, double t0, double t1, double pc_error, double *length)

Purpose

Compute arc length of a curve or curve segment

Description

This function computes the arc length of a curve or of a curve segment.

Input

option

Not used.

gdx_curv_ptr

The GDX curve.

t0

Start parameter value (not normalized)

t1

End parameter value (not normalized). If the curve is closed, then t1 may be less than t0, in which case the sum of the lengths of the segments [t1,tmax] and [tmin,t0] will be computed.

pc_error

Allowable per cent error in the computed arc length. Example: if the true arc length is 100, and pc_error = 1, then the computed arc length should be between 99 and 101.

Output

length

The computed arc length.

Return

      GDX_NOERR
      GDX_BADSUBPARMS
      Low level error return
      .fi