 |
PK_CURVE_make_bcurve_array |
|
PK_ERROR_code_t PK_CURVE_make_bcurve_array
(
--- received arguments ---
int n_curves, --- number of curves
PK_CURVE_t curves[], --- curves
PK_INTERVAL_t ranges[], --- curve intervals
const PK_CURVE_make_bcurve_array_o_t *options, --- option structure [PF]
--- returned arguments ---
PK_CURVE_make_bcurve_res_t results[], --- results
PK_LOGICAL_t *const all_succeeded --- whether succeeded for
--- all curves
)
Given an array of curves and intervals this function creates
B-curves that satisfy the 'options' specified.
This function offers partial support for facet geometry [PF]
Each created B-curve will be exactly coincident with the given curve if
possible. Where this is not possible, the maximum distance between the curve
and the returned B-curve will be limited by 'tolerance'. The function will
usually achieve this condition but this is not guaranteed.
If an exact result does not match the specified continuity, an approximation
will be used.
Finer control over the form of the resulting bcurve can be provided through
the option structure.
The resulting B-curves will be attached to the specified 'destination'.
Notes for specific classes of input curve
=========================================
Line: Unless the 'have_degree' option is set, the B-curve will be
linear (degree 1). The result will always be exact.
Circle/Ellipse: The result will be cubic by default, and exact unless the
'force_non_rational' option is set. The parameterisation
of the input curve may not be preserved.
B-curve: Unless you specify the degree of the output B-curve, using
the 'have_degree' and 'degree' option fields, the output
B-curve will have the same degree as the input curve if
the result is exact.
The result will be an approximation if and only if any of
the following are true:
o The degree is lowered (note that increasing the degree
can be done with an exact result).
o The input curve is rational and the
'force_non_rational' option is true, except in the
special case when all the weights of the rational curve
are equal.
o Any discontinuities are eliminated (via the
'force_continuity' option).
Intersection/SP: The output will usually be approximate (and cubic by
default) unless the curve coincides with a constant
parameter line of an underlying B-surface. In this case
the options will apply to the extracted B-curve and an
exact result will be possible in some cases.
Polyline: The output B-curve will be piecewise linear (degree 1) and
the result will be exact. If either the 'have_degree'
option or 'force_continuity' option is set to an
unsupported value, then PK_ERROR_facet_geometry error will
be returned.