 |
PK_BCURVE_splinewise_sf_t |
|
struct PK_BCURVE_splinewise_sf_s
{
int degree; --- The degree = order-1.
int n_positions; --- The number of positions
PK_VECTOR_t *positions; --- The positions
PK_PARAM_end_t t_end; --- End condition at lower t
PK_PARAM_end_t T_end; --- End condition at upper T
PK_VECTOR_t t_deriv; --- Derivative at lower t
PK_VECTOR_t T_deriv; --- Derivative at upper T
PK_PARAM_knot_t how_knot; --- How knot vector defined
double *knot; --- Knot vector
};
typedef struct PK_BCURVE_splinewise_sf_s PK_BCURVE_splinewise_sf_t;
This data structure is the splinewise standard form of a 3D b-curve.
Specific Errors:
PK_ERROR_incompatible_props only one end is periodic or a periodic
curve has coincident end points (MILD)
PK_ERROR_bad_derivative 't_deriv' or 'T_deriv' too large (MILD)
PK_ERROR_insufficient_points not enough spline points (MILD)
PK_ERROR_coincident_points repeated spline points (MILD)
PK_ERROR_bad_position a spline point is outside size box (MILD)
PK_ERROR_bad_knots bad parameterisation (MILD)
PK_ERROR_repeated_knots repeated knots (MILD)
PK_ERROR_wrong_number_knots wrong number of knots (MILD)
PK_ERROR_bad_order degree < 0 or degree > 3 or
degree < 2 and supplied clamping vectors
are incorrect (MILD)
Used in:
PK_BCURVE_ask_splinewise
PK_BCURVE_create_splinewise
'degree' Curve degree.
When the standard form is input to Parasolid
(PK_BCURVE_create_splinewise), 'degree' may only be set to 3
to produce cubic curves or 0 in which case Parasolid will
select an appropriate degree.
'n_positions' Number of positions.
If 't_end' is PK_PARAM_end_periodic_c then 'n_positions'
must be at least 3, otherwise 'n_positions' must be at
least 2.
'positions' Array of positions.
Consecutive positions must not coincide.
For a closed, non-periodic curve the start and end
positions must coincide.
For a periodic curve the start and end positions must not
coincide.
't_end' End condition at lower t (i.e. start of curve).
If this is PK_PARAM_end_periodic_c then 'T_end' must also be
PK_PARAM_end_periodic_c.
If this is PK_PARAM_end_clamped_vector_c then 't_deriv' must
be set to the start derivative.
'T_end' End condition at upper T (i.e. end of curve).
If this is PK_PARAM_end_periodic_c then 't_end' must also be
PK_PARAM_end_periodic_c.
If this is PK_PARAM_end_clamped_vector_c then 'T_deriv'
must be set to the end derivative.
't_deriv' Derivative at start of curve if 't_end' is
PK_PARAM_end_clamped_vector_c.
'T_deriv' Derivative at end of curve if 'T_end' is
PK_PARAM_end_clamped_vector_c.
The derivatives in 't_deriv' and 'T_deriv' should be supplied
with respect to a parameter which varies from 0 to 1 between
the first or last two 'positions' (as appropriate). In other
words, the derivatives should have dimensions of length. The
magnitude is significant, and supplying vectors which are too
large may cause the curve to loop or have tight curvature.
'how_knot' How the knot vector is defined.
'knot' If 'how_knot' is PK_PARAM_knot_defined_c then 'knot' is the
knot vector of length 'n_positions' if the curve is not
periodic or 'n_positions' + 1 if the curve is periodic.
If 'how_knot' is PK_PARAM_knot_auto_c then 'knot' is ignored.