 |
PK_BODY_sweep |
|
PK_ERROR_code_t PK_BODY_sweep
(
--- received arguments ---
PK_BODY_t body, --- minimum, wire or sheet body
PK_VECTOR_t path, --- translation vector
PK_LOGICAL_t local_check, --- whether local checking will be done
--- returned arguments ---
int *const n_laterals, --- number of laterals
PK_TOPOL_t **const laterals, --- new edges or faces (may be NULL)
PK_TOPOL_t **const bases, --- entities swept into laterals
--- (may be NULL)
PK_local_check_t *const check_result --- result of local check
)
This function sweeps a minimum body into a wire body, a wire body into a
sheet body, a sheet body into a solid body or a general body into a general
body.
This function does not support facet geometry [NF]
Specific Errors:
PK_ERROR_unsuitable_entity Body is unsuitable for sweep (MILD)
PK_ERROR_wrong_entity Bad arguments (MILD)
PK_ERROR_non_manifold Can't sweep body with non-manifold boundary
(MILD)
PK_ERROR_impossible_sweep Can't determine swept geometry (SERIOUS)
PK_ERROR_su_self_intersect Sweep would produce a self intersecting
surface (SERIOUS)
The body to be swept is moved along the path vector leaving lateral
entities in its wake. Bodies which may be swept, the laterals they produce
and the type of the resulting body are identified in the following table.
Swept Entities | Laterals Returned | Result
===========================================================================
Minimal body | One edge | Wire body
| |
Wire body | One or more faces | Sheet body
| |
Sheet body | One or more faces | Solid body
| |
General body | One or more faces | General body
| and edges |
===========================================================================
See Local Ops: Spinning or Sweeping an Entity for more information.
For every entry in 'laterals', there is a corresponding entry in 'bases'. This
array contains the topological entities extruded to create the lateral
entities. For every lateral face there is a swept edge from the original body
and for every lateral edge there is a swept vertex.
Suitable Sweep Entities:
. Any minimal body.
. Any wire body, either an open or closed loop of edges.
. Any sheet body whose boundary is manifold.
. Any general body with only one region and no edges with more than
two faces.
Attempting to sweep an entity which is not one of the above will give rise
to PK_ERROR_unsuitable_entity.
A body which has an edge whose attached curve is of the class PK_CLASS_fcurve
(i.e. foreign geometry) or class PK_CLASS_cpcurve (i.e. constant parameter
curve) cannot be swept.
After a sweep any coincident topology will not be fused or united.
Any new surfaces created are analytic surfaces if possible. If it is
not possible to use an analytic surface then the class of the new
surface will be PK_CLASS_swept or PK_CLASS_bsurf depending upon the most
recent call to PK_SESSION_set_swept_spun_surfs.
If local checking is switched on ('local_check' = PK_LOGICAL_true), consistency
checks will be made on newly created topological and geometrical
entities, and the result of the check returned.
A result of PK_local_check_ok_c indicates the body is valid. A result
of PK_local_check_negated_c indicates that the result body was originally
"inside out" but has been negated, and is now "positive" (has positive volume)
and valid. A result of PK_local_check_failed_c indicates the body
is self-intersecting and further modelling operations on it may fail.
If 'local_check' is PK_LOGICAL_false, local checking will be switched off and
the result returned will be PK_local_check_no_c.
For general bodies, the body is copied, the copy is transformed,
corresponding vertices on the body and its copy are joined with
lateral edges, and corresponding edges are joined with lateral faces.
All the lateral entities are returned, both edges and faces. The
result PK_local_check_negated_c is never returned since this has no
meaning for general bodies.