PK_FACE_offset   


PK_ERROR_code_t     PK_FACE_offset
(
--- received arguments ---
int                 n_faces,           --- number of faces > 0
const PK_FACE_t     faces[],           --- faces to offset
const double        offsets[],         --- offset for each face
double              tolerance,         --- tolerance
PK_LOGICAL_t        face_face_check    --- do face face checks

--- returned arguments ---
)


Offsets faces of a solid or sheet body


Specific Errors:
    PK_ERROR_cant_offset           offseting failure
    PK_ERROR_bad_tolerance         proposed edge tolerance is too small
    PK_ERROR_unsuitable_entity     body is not a sheet or solid body
    PK_ERROR_cant_get_point        failed to find vertex geometry
    PK_ERROR_cant_get_curve        failed to find edge geometry
    PK_ERROR_cant_offset           surf failed to offset or face could not
                                   be deleted
    PK_ERROR_cant_get_surf         (SERIOUS)can not produce isocline surface
    PK_ERROR_edge_didnt_vanish     (SERIOUS)an edge should have disappeared



Introduction
Each face in faces is offset by the corresponding distance in offsets.
A positive offset indicates an offset outwards (i.e. in the direction of the
face normal) and a negative offset an offset inwards.

Under some circumstances the function may need to replace exact geometry by
tolerant geometry. For instance, in the case of a sheet body some edge
geometry at the boundary may have to be approximated by SP curves in order
to generate a boundary curve on the offset sheet. In all such situations the
new geometry will have a tolerance less than or equal to the tolerance
supplied through the tolerance argument.

Three situations can give rise to changes in the topology of the body :

    1) Dealing with degeneracies on a sheet body comprised of a single face.
       For example, a vertex may offset to an edge.

    2) Dealing with geometry which fails to offset. If it is known that the
       offset surface of a face would be self-intersecting an attempt is made
       to remove the face. For example, a blend may be removed from an edge.
       The investigation of self-intersection is not exhaustive, however,
       and it can occur that instances are not trapped.

    3) Dealing with configurations which can be repaired. For instance an edge
       can offset to a point or a face can become absorbed into the body.


Checking options
The extent to which checking is applied to the body is specified by the
'face_face_check' argument. If this is set to PK_LOGICAL_true then face-face
checks are done on the body in addition to default checks. For most
applications setting face_face_check to PK_LOGICAL_false will give an
adequate level of checking.


Error handling
When an error occurs, the function will, where possible, make extra
information regarding the error available to the application
by means of a GROUP.
This GROUP is accessible from the standard form of the error.  Note that,
while the members of the GROUP will be objects which existed before the
call (and so will survive rollback), the GROUP itself will be destroyed by
rollback.  The members of the GROUP will be as follows:

    PK_ERROR_cant_get_point         1 VERTEX   Failed to find new geometry for
                                               existing vertex
                                    n FACEs    Failed to find geometry for
                                               new vertex.

    PK_ERROR_cant_get_curve         1 EDGE     Failed to find new geometry for
                                               existing edge
                                    n FACEs    Failed to find geometry for
                                               new edge

    PK_ERROR_cant_get_surf          n FACEs    Unable to produce isocline
                                               surfaces for these faces.
                                               No surface replacement is
                                               performed.

    PK_ERROR_edge_didnt_vanish      1 EDGE     An existing edge should have
                                               disappeared
                                    n FACEs    A transient edge should have
                                               disappeared

    PK_ERROR_face_check_fails       1 FACE     Face which failed check

    PK_ERROR_face_face_check_fails  2 FACEs    Pair of faces where
                                               inconsistency found.

    PK_ERROR_cant_offset            1 FACE     Failed to offset or face could
                                               not be deleted

This function is not supported for general bodies.