PK_SURF_general_eval_f_t   

typedef PK_ERROR_code_t(*PK_SURF_general_eval_f_t)
(
--- received arguments ---
PK_UV_t                  uv,            --- u and v parameter pair
int                      n_u_derivs,    --- number of u derivatives
int                      n_v_derivs,    --- number of v derivatives
PK_HAND_t                u_hand_dir,    --- u evaluation direction
PK_HAND_t                v_hand_dir,    --- v evaluation direction
PK_POINTER_t             external_data, --- external application data
--- returned arguments ---
double            *const p              --- point and derivatives
);



This is the type definition for the external evaluator functions expected
by PK_BSURF_create_fitted.  The functions themselves are to be
provided by the application.

Used in:

PK_SURF_general_user_t


The function calculates the model space coordinates of the point at the
given parameter pair 'uv' on a general surface, and also the derivatives with
respect to 'uv',  up to order 'n_u_derivs' and 'n_v_derivs' respectively.

The maximum number of derivatives that can be returned by this function
is determined by the surface's external evaluator. However, no derivatives
will be requested by the current Parasolid fitting method.

The return argument 'p' is an array of doubles returning the point and
possibly derivatives on the user surface at 'uv'.

The 'u_hand_dir' and 'v_hand_dir' arguments allow evaluation from both the left
and right at patch boundaries. Usually these arguments should be set to
PK_HAND_right_c which results in evaluation approaching from the right. This
means that if the parameter t lies on a patch boundary then the derivatives
will be calculated using the next patch and the starting local parameter. If
the arguments are set to PK_HAND_left_c (evaluate from left) then the
derivatives will be calculated using the previous patch and the end local
parameter.

The following examples show how the direction arguments affect the evaluation
at the given parameter position (shown as #), where straight lines represent
surface patch boundaries:

                ^ U                                   ^ U
                |                                     |
   u_on_right   |  u_on_right        u_on_right/left  #  u_on_right/left
    v_on_left   |  v_on_right              v_on_left  |  v_on_right
 ---------------#--------------> V   -----------------+------------------> V
    u_on_left   | u_on_left                           |
    v_on_left   | v_on_right

The derivatives obtained from left and right evaluation may be different if
there is a discontinuity at the patch boundary.

If a parameter (u or v) is at the beginning / end of a global parameter
boundary and in non-periodic direction,  PK_HAND_left_c / PK_HAND_right_c
means the evaluation will use the surface extended from the boundary.

The 'external_data' should be supplied to Parasolid via the
'PK_SURF_general_eval_data_t' structure.

Functions of this type should return 'PK_ERROR_no_errors' on success.  Any
other return value will be taken to be an evaluation failure and the return
arguments will not be examined.  In these circumstances, a value of
'PK_BSURF_fitted_eval_failure_c' will be returned in the corresponding array
entry of the 'status' field of the 'PK_BSURF_fitted_fault_t' 'fault' structure
returned by PK_BSURF_create_fitted.