PK_BCURVE_make_bsurf_lofted   

PK_ERROR_code_t                        PK_BCURVE_make_bsurf_lofted
(
--- received arguments ---
int                                    n_bcurves,  --- number of bcurves
const PK_BCURVE_t                      bcurves[],  --- bcurves
const PK_BCURVE_make_bsurf_lofted_o_t *options,    --- options structure

--- returned arguments ---
PK_BSURF_t                      *const bsurf       --- lofted surface
)


This function creates a bsurf by lofting through a set of bcurves.


Specific Errors:
    PK_ERROR_incompatible_curves    curves cannot be matched
    PK_ERROR_insufficient_curves    too few curves provided
    PK_ERROR_bad_curves             coincidence between curves


Each of the given 'bcurves' lies on a v isoparameter line of the lofted
surface.

The surface is always continuous up to the second order in the loft ( v )
direction.  If the lofted curves were splined or created as B-splines and
they all share the same knot vector, then a surface is produced which is
continuous in the curve ( u ) direction to the same order as the lofted
curves.  Otherwise the surface is, in general, only position continuous
in the curve direction.

The 'bsurf' will be rational if any of the 'bcurves' are rational.

If the surface is to be periodic in the loft direction then 'n_bcurves' must
be at least 3.  If it is to be non-periodic then 'n_bcurves' must be at
least 2.

The 'bcurves' must be supplied in the order in which they become v
isoparameter lines of the lofted surface.

The 'bcurves' are unchanged by this function.

The 'bcurves' must have the same number of segments unless either the
'amalgamate' option is requested, or the number of segments is equated by
adding degenerate segments.

Either end of the lofted surface may have one of the following end conditions:

  PK_PARAM_end_periodic_c       the surface is periodic in the loft direction.
                                The other end must also have this end
                                condition.
                                'n_bcurves' must be at least 3.
                                The surface will have continuity of tangent
                                and curvature across the seam.

  PK_PARAM_end_natural_c        the surface has no curvature in the loft
                                direction across the end

  PK_PARAM_end_clamped_vector_c derivative vectors are supplied across the
                                end curve.  Derivatives should be supplied
                                with respect to a parameter which varies
                                from 0 to 1 between the first or last two
                                curves (as appropriate).  The magnitude is
                                significant.

  PK_PARAM_end_clamped_bcurve_c when a derivative b-spline is used to clamp
                                an end of the surface it is only necessary
                                to supply the control vertices.  This is
                                because the knot vector of the derivative
                                curve will be the same as the knot vector of
                                the corresponding start or end curve.  The
                                dimension of the vertices and the number of
                                vertices are the same as those for the
                                corresponding start or end curve.

If clamped boundary conditions are used with the insert degenerate segment
option ('n_v_degen_segs' or 'n_V_degen_segs' != 0 ) then it should be noted
that for every extra segment added the end curve will have one extra spline
point and one extra control vertex. This means that if the end is clamped with
derivative vectors one extra vector must be supplied for every segment added.
Similarly if the surface is clamped with a derivative curve one extra
control vertex is required for every segment added.

Twist vectors 'u_v_twist', u_V_twist', 'U_v_twist', 'U_V_twist':

A twist vector is a derivative with respect to both u and v; i.e. it is
the rate of change of the cross boundary derivatives in the direction of
the curves. The twist vectors may be supplied at any of the four corners,
but only when clamped boundary conditions have been supplied across the
corresponding boundary.
If the twist vectors are supplied when they are not required then they are
ignored. If the twist vectors are not supplied then a suitable default value
is used.

The lofted surface may degenerate to a point at either the start or the
end of the loft. This degeneracy may be supplied either as a single point
using PK_PARAM_degen_vector_c or as a degenerate b-spline curve using
PK_PARAM_degen_bcurve_c.
A degenerate b-spline curve will provide greater control when lofting curves
that are rational.

When a degenerate b-spline curve is used to define the degeneracy it is
only necessary to supply the control vertices. This is because the knot
vector of the degenerate curve will be the same as the knot vector of
the corresponding start or end curve.  The dimension of the vertices and
the number of vertices are the same as those for the corresponding start
or end curve.

Periodic end conditions cannot be used if either end of the lofted
surface is degenerate, but it is possible to use clamped or natural end
conditions. The insert degenerate segment options cannot be used if the
corresponding end of the surface is degenerate.

If a knot vector is supplied ('how_knot' = PK_PARAM_knot_defined_c) it
must satisfy the following conditions:
  . The knot values must form an increasing sequence; repeated knots are
    not permitted.
  . For non-periodic lofting there must be 'n_bcurves' knot values.
  . For periodic lofting there must be ('n_bcurves'+1) knot values.

If the knot vector is not supplied ('how_knot' = PK_PARAM_knot_auto_c )
then an averaged accumulated chord length parametrisation is used.

If 'amalgamate' is set to PK_LOGICAL_true then an attempt is made to
amalgamate the various knot vectors for the curves, and produce a surface
which is continuous to the same order as the definition curves. However,
this may produce a surface with a large number of patches, and should
only be used on a small number of curves. The amalgamate option cannot
be used in conjunction with inserted degenerate segments.

If the first curve has fewer segments than the other curves 'v_degen_segs'
may be used add the required number of segments to the first curve. Similarly
'V_degen_segs' may be used to add segments to the last curve. The segments
added using these properties are degenerate, that is they contain the order
of the curve coincident control points. Each degenerate segment added will
cause the lofting process to make a patch with a corresponding degenerate
boundary.

See documentation for PK_BCURVE_make_bsurf_lofted_o_t for further information
about the options.