 |
PK_BCURVE_create_spline_2_o_t |
|
struct PK_BCURVE_create_spline_2_o_s
{
int o_t_version; --- options structure version
PK_INTERVAL_t param_interval;--- parameter range for the
--- B-curve(s) (0,1)
int n_parameters; --- number of parameters (0)
const double *parameters; --- parameters for 'positions'
--- (NULL)
const int *param_indices; --- indices linking 'parameters' to
--- 'positions' (NULL)
int n_derivs; --- number of derivatives (0)
const PK_VECTOR_t *derivs; --- derivatives at 'positions'
--- (NULL)
const int *deriv_orders; --- order of each derivative (NULL)
const int *deriv_indices; --- indices linking 'derivs' to
--- 'positions' (NULL)
PK_spline_method_t spline_method; --- the default behaviour for each
--- 'position'
--- (PK_spline_method_interpolate_c)
int n_special; --- number of 'positions' to have
--- non-default behaviour (0)
const int *special_indices;
--- indices of 'positions' that have
--- behaviour different to the
--- default (NULL)
PK_LOGICAL_t have_fit_tol; --- whether a fitted tolerance is
--- supplied (PK_LOGICAL_false)
double fit_tol; --- fit tolerance
PK_LOGICAL_t have_chordal_tol;
--- whether a chordal tolerance is
--- supplied (PK_LOGICAL_false)
double chordal_tol; --- the maximum distance between a
--- chord between two consecutive
--- 'positions', and the resultant
--- B-curve(s)
int n_breaks; --- number of break points (0)
const int *break_indices; --- indices of 'positions' that are
--- to be break points (NULL)
int degree; --- degree for B-curve(s) (0)
PK_LOGICAL_t is_periodic; --- whether spline is periodic
--- (PK_LOGICAL_false)
int n_knots; --- number of knots supplied (0)
const double *knots; --- the knots (NULL)
const int *knot_mults; --- multiplicities of the knots
--- (NULL)
PK_BCURVE_overdefined_t overdefined; --- behaviour if overdefined
--- (PK_BCURVE_overdefined_fail_c)
PK_BCURVE_clamp_t clamp; --- clamp to apply to the
--- B-curve(s)
--- (PK_BCURVE_clamp_no_c)
PK_LOGICAL_t have_clamp_axes;
--- whether 'clamp_axes' are
--- supplied (PK_LOGICAL_false)
PK_AXIS2_sf_t clamp_axes; --- clamp axes
PK_spline_update_t update; --- update flag
--- (PK_spline_update_default_c)
};
typedef struct PK_BCURVE_create_spline_2_o_s PK_BCURVE_create_spline_2_o_t;
This options structure defines optional controls for creating one or more
B-curves by splining.
Used in:
PK_BCURVE_create_spline_2
It contains the following options:
'param_interval' Parameter interval for the B-curve(s). If 'break_indices'
are supplied, then more than one B-curve will be returned,
in which case the low end of 'param_interval' will
correspond to the low end of the first B-curve's parameter
interval, and the high end of 'parameter_interval' will
correspond to the high end of the last B-curve's parameter
interval. (0,1)
'n_parameters' Number of parameters supplied. It must be no greater than
'n_positions'. (0)
'parameters' An array of length 'n_parameters'. If this option is not
NULL then the resultant B-curve(s) will interpolate the
specified 'positions' at the corresponding 'parameters'.
The parameters must lie in the interval 'param_interval'
and be monotonically increasing with respect to the order
of the 'positions'. If 'is_periodic' is PK_LOGICAL_true,
the start and end of the parameter range should not both be
supplied as parameters. (NULL)
'param_indices' An array of length 'n_parameters' giving the index of the
position in 'positions' that has the parameter given by the
corresponding entry in 'parameters'. (NULL)
'n_derivs' Number of derivatives supplied. (0)
'derivs' An array of length 'n_derivs'. If this option is not NULL
then the resultant B-curve(s) will have the specified
derivatives at the corresponding 'positions'. The order of
the derivatives is specified in 'deriv_orders'. (NULL)
'deriv_orders' An array of length 'n_derivs' giving the order of the
corresponding derivative in 'derivs'. Values must be less
than four. (NULL)
'deriv_indices' An array of length 'n_derivs' giving the index of the
position in 'positions' that has the derivative given by
the corresponding entry in 'derivs'.
The maximum number of derivatives of a particular order
that can be supplied is 'n_positions'. First order
derivatives with magnitude zero are not allowed, except at
the start or end positions. (NULL)
'spline_method' The default behaviour of each position. Each position may
be interpolated, or fitted to within 'fit_tol'.
(PK_spline_method_interpolate_c)
'n_special' The number of 'positions' with behaviour different to the
default 'spline_method'. (0)
'special_indices' An array of length 'n_special' giving the indices of the
positions in 'positions' that do not follow the default
'spline_method'. If 'spline_method' is set to
PK_spline_method_interpolate_c, then the positions
specified by 'special_indices' will be fitted. If
'spline_method' is set to PK_spline_method_fit_c, then the
positions specified by 'special_indices' will be
interpolated.
The positions at indices 0 and 'n_positions'-1 may not be
fitted. If any positions are specified as being fitted,
then:
o 'n_knots' must be equal to zero.
o 'degree' must be equal to zero or three.
o 'clamp' must be set to PK_BCURVE_clamp_no_c.
(NULL)
'have_fit_tol' Whether a fit tolerance is supplied in 'fit_tol'. This must
be set to PK_LOGICAL_true if and only if at least one
position is specified as fitted. (PK_LOGICAL_false)
'fit_tol' The maximum distance between the resultant B-curve(s) and
any 'positions' which are fitted.
'have_chordal_tol' If set to PK_LOGICAL_true, then the resultant B-curve(s)
will be within a distance 'chordal_tol' of the chords
between consecutive 'positions'. If this option is enabled
then:
o 'n_knots' must be set to zero.
o 'degree' must be equal to zero or three.
o 'clamp' must be set to PK_BCURVE_clamp_no_c.
(PK_LOGICAL_false)
'chordal_tol' The tolerance value used for the chordal tolerance, if
'have_chordal_tol' is set to PK_LOGICAL_false. If
'have_fit_tol' is set to PK_LOGICAL_true, then this value
must be equal to or greater than 'fit_tol'.
'n_breaks' The number of breaks supplied. (0)
'break_indices' An array of length 'n_breaks'. If no breaks are supplied,
a single B-curve will be returned. Otherwise, the number of
B-curves returned will be equal to 'n_breaks'+1, and the
break between each consecutive pair of B-curves will be at
the position in 'positions' that is at the index given by
the corresponding entry in 'break_indices'. At a break, the
B-curves will join with C2 smoothness. No index in
'break_indices' may be equal to 0 or 'n_positions'-1. If
any 'break_indices' are supplied, then 'n_knots' must be
equal to zero. (NULL)
'degree' The degree of the B-curve(s). If this is zero, Parasolid
will choose an appropriate degree. Otherwise it must be
greater than zero. (0)
'is_periodic' If no 'break_indices' are returned, then this specifies the
resultant B-curve should be periodic. Otherwise more than
one B-curve will be returned which will each be
non-periodic, however if 'is_periodic' is set to
PK_LOGICAL_true, then the end of the last B-curve will join
the start of the first B-curve with C2 smoothness.
(PK_LOGICAL_false)
'n_knots' Number of knots supplied. (0)
'knots' An array of length 'n_knots' of distinct knot values for
the B-curve. (NULL)
'knot_mults' An array of length 'n_knots' specifying the multiplicities
of the knots. (NULL)
'overdefined' If a knotset is provided using the 'knots' and 'knot_mults'
arrays, then this option controls the behaviour if the
position, parameter and derivative conditions (locally)
overdefine a spline with the given knotset. Possible values
are:
PK_BCURVE_overdefined_fail_c: Fail if the spline is
overdefined. Therefore sufficient knots must be
provided to allow the imposition of the given
'positions' and 'derivs'.
PK_BCURVE_overdefined_insert_c: The resultant B-curve
will have additional knots inserted in order to match
the requested 'positions' and 'derivs'. Therefore the
supplied knotset will be a subset of the knots in the
resultant B-curve.
If a knotset is not provided, then this option has no
effect. (PK_BCURVE_overdefined_fail_c)
'clamp' Optionally applies a clamp to the resultant B-curve(s).
Clamping the spline can make it behave in a more controlled
manner by restricting it to the box of the supplied
'positions'.
If 'clamp' is set to a value other than
PK_BCURVE_clamp_no_c, then:
o 'n_knots' must be set to zero.
o 'degree' must be equal to zero, two or three.
o No derivative conditions are allowed, except setting
the first derivative of the first or last positions of
the spline to the zero vector.
The clamp planes will be a set of three orthogonal planes,
whose orientation is specified by 'clamp_axes'.
(PK_BCURVE_clamp_no_c)
'have_clamp_axes' This option must be set to PK_LOGICAL_true if and only if
'clamp' is set to a value other than PK_BCURVE_clamp_no_c.
(PK_LOGICAL_false)
'clamp_axes' If 'clamp' is set to a value other than
PK_BCURVE_clamp_no_c, then this field controls the
orientation of the clamp plane axes. The 'location' field
is ignored.
'update' The default value allows applications to take advantage of
the latest enhancements to the splining algorithm. To
maintain consistency when rebuilding models created in a
previous version of Parasolid, a non-default value should
be specified.
(PK_spline_update_default_c)