 |
PK_CURVE_fix_self_int |
|
PK_ERROR_code_t PK_CURVE_fix_self_int
(
--- received arguments ---
PK_CURVE_t curve, --- curve to be checked
const PK_CURVE_self_ints_t *self_ints, --- self intersections
const PK_CURVE_fix_self_int_o_t *options, --- options structure
--- returned arguments ---
PK_CURVE_fix_self_int_r_t *results --- results
)
This function attempts to fix self-intersections in the given curve.
This function does not support facet geometry [NF]
Specific Errors:
PK_ERROR_invalid_geometry The curve has invalidities other than
self-intersections (MILD)
PK_ERROR_bad_parameter Cannot extract non-self-intersecting
piece because the supplied 'param' lies
on point of intersection (MILD)
PK_ERROR_fix_self_int_failed Failure (MILD)
This function generates one or more valid curves that are coincident with the
supplied 'curve'.
PK_CURVE_find_self_int should first be called on 'curve', and the resulting
PK_CURVE_self_ints_t structure passed to this function.
Curves are generated either by extracting valid regions of 'curve', or by
creating approximations. Where possible, the maximum deviation between 'curve'
and the resultant approximation will be limited by 'tolerance', however this
condition is not guaranteed.
Note that in the special case where all of the following three options are set
as follows:
* 'fix_method' == PK_CURVE_fix_method_extract_c
* 'allow_multiple' == PK_LOGICAL_false
* 'have_param' == PK_LOGICAL_false
Then the first non-self-intersecting piece of the curve will be returned.