PK_BODY_thicken_3   


PK_ERROR_code_t            PK_BODY_thicken_3
(
--- received arguments ---
PK_BODY_t                  body,            --- body to be thickened
double                     front_default,   --- default front offset
double                     back_default,    --- default back offset
double                     tolerance,       --- tolerance
const PK_BODY_thicken_o_t *options,         --- options

--- returned arguments ---
PK_TOPOL_track_r_t  *const tracking,        --- tracking information
PK_TOPOL_local_r_t  *const results          --- status information
)


This function thickens a sheet body into a solid body.

NOTE: This function supersedes PK_BODY_thicken_2, which is now obsolete.


Specific Errors:
    PK_ERROR_cant_thicken          (SERIOUS) thickening failure
    PK_ERROR_bad_tolerance         (MILD) proposed edge tolerance is too small
    PK_ERROR_not_sheet             (MILD) body is not a sheet body
    PK_ERROR_bad_thickness         (MILD) total thickness is zero
    PK_ERROR_inconsistent_offset   (MILD) the front (or the back ) offsets have
                                   inconsistent sign
    PK_ERROR_inconsistent_thicken  (MILD) the thicken "sense" is inconsistent
    PK_ERROR_not_a_unit_vector     (MILD) the thicken method is
                                   PK_thicken_method_punch_c and the
                                   punch direction is not an unit vector



Introduction
The sheet body is thickened by front_default outwards (i.e. in the
direction of the face normal) and back_default inwards. Exception
faces, which have offsets other that the default, can be specified
within the option structure, together with their front and back
offsets.

Only manifold sheet bodies can be thickened.

Some edge geometry on the sheet boundary may have to be approximated by
SP-curves in order to generate a boundary curve on the offset faces. If
this is necessary, such edges will have a tolerance less than or equal
to the tolerance supplied through the tolerance argument.


Offset Values
The following points must be considered when specifying offset values
for the sheet thickening operation :

 o The "sense" of the thicken for a given face, is the sign of the sum of
   the front and back offsets for that face. This function will return
   PK_ERROR_inconsistent_thicken, if the "sense" varies over the faces
   of the specified sheet body.

 o If the sign of the specified front offset varies with faces of the
   sheet body, this function will return PK_ERROR_inconsistent_offset.
   Similarly, for the sign of the back offset values.

 o If any face within the sheet body has a front and back offset such
   that the resulting thickness is within the session precision of zero,
   then this function will return PK_ERROR_bad_thickness.


Checking Results
Thickening which would lead to a self-intersecting or non-manifold solid
is not allowed. Some of these cases will not be detected when face-face
checking is switched off (via the check_fa_fa field in the option
structure). In this event the resulting body will be invalid.


User options
The PK_BODY_thicken_o_t structure contains user control options. See
its documentation for detail.

Tracking
The PK_TOPOL_track_t structure contains topology tracking information on
the operation. In the case of this function, two types of tracking information
records may be returned :
1)  PK_TOPOL_track_create_c, to report newly created offset faces and
    side faces (or faces deriving from them). Offset faces will have their
    relevant original face as original topologies whereas, those of side faces
    will be their originating edges or vertices.
2)  PK_TOPOL_track_derive_c, to report faces deriving from existing ones,
    through any combination of splitting and merging.

Error Handling
If this function returns PK_ERROR_no_errors, the result of the operation
will be indicated by the value of the status field of the results
structure.

When the value of the status field is not PK_local_status_ok_c or
PK_local_status_nocheck_c, it indicates an operation failure. When
possible, an array of entities involved in the failure is returned via
the error_entities field of the results structure.

For more information regarding the failure status code and the returned
entities, refer to the PK_TOPOL_local_r_t documentation.