 |
PK_CURVE_make_bcurve |
|
PK_ERROR_code_t PK_CURVE_make_bcurve
(
--- received arguments ---
PK_CURVE_t curve, --- curve
PK_INTERVAL_t range, --- parameter bounds: required part of curve
PK_LOGICAL_t cubic, --- force cubic BCURVE
PK_LOGICAL_t non_rational, --- force non_rational BCURVE
double tolerance, --- for approximate result
--- returned arguments ---
PK_BCURVE_t *const b_curve, --- created BCURVE
PK_LOGICAL_t *const exact --- whether b_curve is exact
)
This function creates a bcurve which is coincident with the given parametric
'interval' of the given 'curve'.
NOTE: This function is deprecated and has been superseded by
PK_CURVE_make_bcurve_2. This function does not support facet geometry [NF]
Specific Errors:
PK_ERROR_cant_make_bspline failed to create equivalent geometry
(MILD)
PK_ERROR_tolerances_too_tight tolerance is too tight (MILD)
PK_ERROR_zero_interval 'range' has zero extent (MILD)
PK_ERROR_facet_geometry 'curve' is a polyline (MILD)
The created BCURVE will be exactly coincident with the given 'curve' if
possible. Where this is not possible, the maximum distance between 'curve' and
'result' will be limited by 'tolerance'. The function will usually achieve
this condition but this is not guaranteed.
When the 'curve' is being approximated, and excessive subdivision of the
'curve' has failed to achieve the requested 'tolerance', then the function will
fail with the error PK_ERROR_tolerances_too_tight. A looser tolerance may
allow the function to succeed.
Representations of lines and the rational forms of circles and ellipses are
exact. When the representation of a bcurve is changed it will, in general,
only be exact when the order is not decreased. The returned argument 'exact'
is set to PK_LOGICAL_true if the 'result' is exact, otherwise to
PK_LOGICAL_false.
If 'cubic' is set to PK_LOGICAL_true, then the resulting bcurve is forced to
be cubic. If `non-rational' is set to PK_LOGICAL_true, then the resulting
bcurve is forced to be non-rational.
The form of the created curve depends upon the given values of 'cubic' and
`non-rational' as follows:
| false true true false | cubic
curve | false false true true | non_rational
--------|-----------|----------|--------|----------|
line | linear | cubic | cubic | linear |
| | | | |
circle | rational | rational | cubic | cubic |
| cubic | cubic | | |
| | | | |
ellipse | rational | rational | cubic | cubic |
| cubic | cubic | | |
| | | | |
bcurve | no change | cubic | cubic | rational |
| | | | to cubic |
| | | | |
others* | cubic | cubic | cubic | cubic |
--------|-----------|----------|--------|----------|
* If an intersection curve or spcurve lies on a bsurf and coincides with a
constant parameter line on that bsurf, the equivalent bcurve will be
extracted from the surface. In this case, the options will apply to the
extracted bcurve and so exact representations will be possible in certain
cases.