PK_ERROR_code_t PK_BODY_transform
(
--- received arguments ---
PK_BODY_t body, --- body to be transformed
PK_TRANSF_t transf, --- transformation
double tolerance, --- tolerance for replacement geometry
--- returned arguments ---
int *const n_replaces, --- number of geoms replaced
PK_GEOM_t **const replaces, --- replaced geometry (optional)
PK_LOGICAL_t **const exact --- whether replaced geometry is exact
--- (optional)
)
This function transforms the given body by the given transformation.
Specific Errors:
PK_ERROR_general_body general bodies not supported
PK_ERROR_wrong_transf transformation not valid for body
PK_ERROR_bad_option_data exact non-NULL when replaces is NULL
All geometry of the given body, which is attached to topology, is replaced
by geometry which is derived from the original geometry by transforming it
through the given transformation.
Replacement surfaces will satisfy the first possible of the following list
of criteria:
1 - be of the same class as the original geometry,
2 - be exactly coincident with the transformation of the original geometry,
3 - not deviate by more than the given tolerance from the transformation of
the original geometry.
Replacement curves will satisfy the same criteria in order of precedence
unless the curve lies on an edge which is at the junction of faces, of which
at least one of the attached surfaces has been approximated (criterion 3), in
which case, the edge curve will be re-computed as the intersection of the face
surfaces.
Replacement points are all computed by putting the original point through the
transformation.
All of the new surfaces of faces may be returned in replaces. Each element
in the exact array may indicate whether the surface is an exact
transformation (criterion 1 or 2), or an approximation (criterion 3).
replaces is optional. If it is set to NULL then only the number of new
surfaces will be returned (in n_replaces). exact is optional. It may only
be non-NULL if replaces is non_NULL.