PK_ERROR_code_t PK_BODY_simplify_geom
(
--- received arguments ---
PK_BODY_t body, --- body
PK_LOGICAL_t local, --- whether partial replacement allowed
--- returned arguments ---
int *const n_geoms, --- number of geoms returned
PK_GEOM_t **const geoms --- new geoms (optional)
)
This function simplifies the geometry of a body where possible.
This function takes a body and attempts to simplify its free form geometry.
The body itself, and topological nodes in the body are not affected; the
geometric ones may be replaced by simpler geometries, and the old geometries
deleted. The number of new geometric entities is returned in n_geoms.
The new geometric entities may be returned in geoms.
The output array geoms is optional. If it is set to NULL, the function
will only return the number of new geometries in the body.
Two levels of simplification are available:
o local = PK_LOGICAL_false - Global simplification
A B-curve or B-surface will only be replaced if a single
curve or surface can replace the entire original.
o local = PK_LOGICAL_true - Local simplification
A B-curve or B-surface may be partially replaced by simpler
curves or surfaces. A side effect of this is that edges or faces
that were originally on the same B-curve or B-surface, may
be on different curves or surfaces after the simplification
The following simplifications may be made on curves:
original form simplified form
------------- ---------------
Rational B-curve Non-rational B_curve
B-curve line or circle
The following simplifications may be made on surfaces:
original form simplified form
------------- ---------------
Rational B-surface Non-rational B-surface
B-surface plane, cylinder, cone, sphere, torus