 |
PK_BODY_trim |
|
PK_ERROR_code_t PK_BODY_trim
(
--- received arguments ---
PK_BODY_t body, --- a body
int n_edges, --- number of edges
const PK_EDGE_t edges[], --- edges
int n_faces, --- number of faces
const PK_FACE_t faces[], --- faces
PK_LOGICAL_t keep --- Logical to determine whether we keep
--- 'faces' or remove 'faces'
)
This function trims the 'body' which must be a sheet.
Specific Errors:
PK_ERROR_fragment (SERIOUS) Trim would fragment the sheet body
into two or more sheets.
PK_ERROR_failed_to_trim (MILD) Edges not sufficient to trim sheet.
PK_ERROR_all_faces_in_body (MILD) Trim would either delete whole
sheet or remove nothing at all.
PK_ERROR_topol_not_from_body (MILD) Some of the 'edges' or 'faces' do
not belong to 'body'.
The 'edges' provided must divide the body into at least two sets of faces. The
function trims off some of these facesets.
If 'keep' is set to PK_LOGICAL_true then any sets of faces which have a face
in the 'faces' array will survive and all others will be deleted.
If 'keep' is set to PK_LOGICAL_false the converse applies - all sets of faces
with a face in the 'faces' array are deleted.
The operation must not fragment the sheet.
'edges' and 'faces' must all belong to 'body'.