PK_CURVE_make_approx   


PK_ERROR_code_t                 PK_CURVE_make_approx
(
--- received arguments ---
PK_CURVE_t                      curve,          --- Original curve
PK_INTERVAL_t                   curve_interval, --- interval on the curve
const PK_CURVE_make_approx_o_t *options,        --- options

--- returned arguments ---
PK_CURVE_t               *const new_curve,      --- new curve
PK_INTERVAL_t            *const new_interval,   --- new interval
PK_LOGICAL_t             *const exact           --- if returned curve is exact
)


This function creates a curve which is an arc length parametrised
approximation to a supplied curve.


Specific Errors:

    PK_ERROR_bad_parameter              Supplied parameter interval
                                        is outside curve range.




Description

New curve with 'arclength' or 'even' parameterisation is created which
is coincident with the given curve to within the given tolerance.

Parameter value on 'arclength' parameterised curve represents the length
along the curve. In case of the 'even' parameterisation, the ratio of
parameter value to length along the curve is constant.

Returned interval will be [0, length] for 'arclength' parameterisation.

When supplied curve is a straight line then its point will be moved to
the beginning of the supplied interval. Circle's x_axis will be
repositioned in a similar way.

Returned exact flag indicates whether the returned curve is an
approximation or exact copy of the original.

Supplied tolerance represents new curve fit tolerance through a series
of samples on the original curve. Recommended range is 0.0001 to 0.00001.
Smaller values may cause excessive number of vertices on the resulting
curve.