PK_BSURF_create_constrained   

PK_ERROR_code_t                         PK_BSURF_create_constrained
(
--- received arguments ---
const PK_BSURF_create_constrained_o_t  *options,    --- options

--- returned arguments ---
PK_BSURF_t                       *const bsurf,      --- constrained B-surface
PK_BSURF_constrained_fault_t     *const fault       --- fault data
)


This function creates a constrained B-surface.


Specific Errors:
    PK_ERROR_bad_position           A position is repeated in 'positions', and
                                    the repeated positions have different
                                    normal constraints or parameters.
                                    (MILD)

    PK_ERROR_bad_parameter          Different positions are given the same
                                    uv parameters by 'uvs' or by normal
                                    projection to the parameterising surface.
                                    (MILD)

    PK_ERROR_bad_tolerance          'tolerance' or 'angular_tolerance' is
                                    too small.
                                    (MILD)

    PK_ERROR_bad_value              Incorrect values are provided for
                                    assigning 'normals' to 'positions'.
                                    (MILD)

    PK_ERROR_bad_combination        A non-zero 'angular_tolerance' is supplied
                                    without 'normals', or 'normals' supplied
                                    with a zero 'angular_tolerance'.
                                    Both 'uvs' and 'uv_surface' are supplied.
                                    (MILD)

    PK_ERROR_insufficient_points    Too few 'positions' have been supplied
                                    to support a least square plane.
                                    (MILD)




The function will produce a PK_BSURF_t. The resultant 'bsurf' will be
bicubic and with continuous second derivatives. It will be open in both
u and v parameter directions.

The shape of the surface is governed by the constraining 'positions' and
'normals' specified through 'options'. The surface fit of the resultant
'bsurf' to the 'positions' and 'normals' is controlled by the options
'tolerance' and 'angular_tolerance'.

The constraints are formed primarily by 'positions' where the resultant
'bsurf' will need to fit within the 'tolerance'. At some or all of these
'positions', 'normals' may be imposed to further constrain the resultant
'bsurf'. When supplied, the 'normals' are assigned to their associated
'positions' according to the indices provided in the 'normal_indices'.

When the 'tolerance' or the 'angular_tolerance' is unable to be met, an
attempt will still be made to return a B-surface. This is identified by
having the status PK_BSURF_constrained_not_fit_c in the 'fault' structure.