 |
PK_CURVE_is_isoparam |
|
PK_ERROR_code_t PK_CURVE_is_isoparam
(
--- received arguments ---
PK_CURVE_t curve, --- curve to test
PK_INTERVAL_t bounds, --- range to bound the curve
PK_SURF_t surf, --- embedding surface
const PK_CURVE_is_isoparam_o_t *options, --- options structure
--- returned arguments ---
PK_CURVE_is_isoparam_t *const is_isoparam, --- whether given curve is an
--- isoparameter
double *const iso_value, --- value of the constant
--- surface parameter
PK_PARAM_direction_t *const iso_direction, --- which surface parameter
--- (u or v) is constant
PK_INTERVAL_t *const param_interval, --- interval in the surface's
--- non-constant parameter
--- covered by bounded curve
PK_isoparam_alignment_t *const param_alignment --- how the the surface's non-
--- constant parameter varies
--- with respect to the curve
--- parameterisation.
)
Tests whether a bounded curve lying within a surface is a constant-parameter
curve (i.e., an isoparameter) for that surface.
This function does not support facet geometry [NF]
Specific Errors:
PK_ERROR_not_on_surface Could not ascertain that 'curve' lies
entirely within 'surf' over the given
parameter 'bounds'.
(MILD)
PK_ERROR_bad_parameter Given 'bounds' lie outside 'curve''s domain
of definition.
(MILD)
PK_ERROR_interval_le_0 Length of 'bounds' <= 0.
(MILD)
PK_ERROR_curve_too_short Segment of 'curve' too short for analysis.
(MILD)
PK_ERROR_not_implemented Unavailable functionality called.
(MILD)
This function tests whether a given segment of 'curve' with parameter interval
'bounds' is an isoparameter on a surface 'surf'. If so, it also returns which
surface parameter is constant, and that parameter's value.
In order for a curve to be identified as an isoparameter of a surface, it
must (1) be an exact isoparameter; and (2) cover a single, well-defined range
in the surface's parameter space (so it may not, for example, cross a seam in
a closed but non-periodic surface).
The curve's 'bounds' should be such that the curve segment lies entirely
within the surface. If not, the error code PK_ERROR_not_on_surface will be
returned.
'is_isoparam' is set to PK_CURVE_ask_isoparam_yes_c if the curve is determined
to be an isoparameter of the surface. It is set to PK_CURVE_ask_isoparam_no_c
otherwise.
'iso_value' is the value of the constant parameter, if the curve is an
isoparameter of the surface. Otherwise, it is set to zero.
'iso_direction' indicates which of the surface's parameters is constant, and
is one of either PK_PARAM_direction_u or PK_PARAM_direction_v, if the curve is
an isoparameter. Otherwise, it is set to PK_PARAM_direction_u.
'param_interval' is the interval on the surface's non-constant parameter
occupied by the curve. It is only computed and set if the flag 'want_interval'
in 'options' is set to PK_LOGICAL_true. It returns an interval [0.0, 0.0] if
the curve is not an isoparameter.
'param_alignment' is PK_isoparam_alignment_aligned_c if the surface's
non-constant parameter increases with increasing curve parameter, or
conversely PK_isoparam_alignment_opposed_c. It is set to
PK_isoparam_alignment_unset_c if the curve is not an isoparameter.
'param_alignment' is only computed and set if the flag 'want_alignment' in
'options' is set to PK_LOGICAL_true.
This function does not support foreign geometry. If either 'curve' or 'surf'
is foreign, the error code PK_ERROR_not_implemented will be returned.