PK_FACE_check   


PK_ERROR_code_t              PK_FACE_check
(
--- received arguments ---
PK_FACE_t                    face,         --- face to be checked
const PK_FACE_check_o_t     *options,      --- options structure

--- returned arguments ---
int                   *const n_faults,     --- number of faults
PK_check_fault_t     **const faults        --- faults
)


This function checks the given face.


Specific Errors:
    PK_ERROR_check_error        a fault has been found when max_faults = 0
    PK_ERROR_check_failure      checker failure
    PK_ERROR_bad_option_data    max_faults < 0



This function performs a series of checks on a face, and returns information
about the faults found, if any.


option structure
------ ---------
The option structure allows the caller to control which checks are performed;
if no options are supplied, all checks appropriate to the edge will be made.

The option structure allows the following to be set:

    max_faults
        maximum number of faults to be returned and whether to force checking
        to raise a PK error instead of returning check faults.

    geom
        what general geometry checking is to be performed

    bgeom
        whether specific B-geometry checking is to be performed

    top_geo
        whether checks for consistency of topology and geometry are to be
        performed

    size_box
        whether checks for size box violation are to be performed.

    fa_X
        whether checks for face self-intersection are to be performed

    loops
        whether loop consistency within the face is to be performed.

These options and the check faults they may give rise to are described  in
the documentation of PK_BODY_check.

Faults are returned in an array of PK_check_fault_t structures.
If there are no faults found, then n_faults is returned as zero.

If there is more than one fault then the function does not
guarantee to return all the faults.

When some types of check are omitted, a face which would fail them may
produce misleading results or checker failures when other checks are applied.
Very occasionally, checker failures are caused by difficult geometric
configurations or the unexpected failure of an internal numerical algorithm;
such failures should not be taken to indicate that the face is invalid.
This will lead to the function failing with the error PK_ERROR_check_fail and
the faulty entity being returned in the PK_ERROR_sf_t structure.

For more details on fault types and how they may arise, see the chapter on
'Checking' in the Functional Description.