 |
PK_BODY_make_spun_outline |
|
PK_ERROR_code_t PK_BODY_make_spun_outline
(
--- received arguments ---
const int n_bodies, --- number of bodies
const PK_BODY_t bodies[], --- bodies
const PK_TRANSF_t transfs[], --- body transformation
const PK_AXIS1_sf_t *spin_axis, --- spin axis
const PK_BODY_make_spun_outline_o_t *options, --- option structure
--- returned arguments ---
int *const n_curves, --- number of curves
PK_CURVE_t **const curves, --- boundary curves
PK_INTERVAL_t **const intervals, --- parametric
--- interval
--- of curves
PK_TOPOL_t **const topols, --- edges/faces of
--- curves
int **const outlines, --- indicates which
--- curves belong to
--- which outline
double **const curve_tolerances,--- curve tolerance
double *const max_separation --- largest gap
--- between adjacent
--- ends of the curves
)
This function outputs one or more outlines of a body or bodies for a given
spin axis as a set of ordered curves together with their intervals.
Specific Errors:
PK_ERROR_bad_component 'transfs' is inappropriate (MILD)
PK_ERROR_unsuitable_entity body is not a solid body (MILD)
PK_ERROR_non_manifold Outline is non-manifold (MILD)
PK_ERROR_failed_to_make_outline Function failure (MILD)
PK_ERROR_failed_to_facet Failed to facet (MILD)
The function is only implemented for entities of type PK_BODY_type_solid_c.
If the 'transfs' argument is NULL, no transforms are applied to the bodies and
the bodies array must not contain duplicates.
If the 'transfs' argument is not NULL, it refers to an array of 'n_bodies'
PK_TRANSF_t entities. Each body is transformed by its corresponding entry in
'transfs'. The bodies array may contain duplicates. Instancing transforms may
contain reflection, translation and rotation but not perspective terms.
If an instance does not need to be transformed, its 'transfs' entry can be
set to PK_ENTITY_null.
'topols' returns the edges or faces of these curves.
An edge is returned when it coincides with an edge.
A face is returned when its outline is a silhouette curve of that face.
See Returning topological entities for more information.
The one or more outlines of the body or bodies are represented by the curves
and their intervals which make up the boundary(s) of the body(s) if they were
spun around the spin axis. The curves are returned as a set of ordered curves
such that the body, when spun around the spin axis, lies to the left of the
curve when looking in the direction of the curve. When two or more bodies
overlap when spun around the spin axis , the outline will be that of the
combination of the bodies.
'outlines' returns a set of integers indicating which curves belong to which
outline. For instance if this function was used on a body with a hole in it
and 9 curves were returned, 5 of which belonged to the outer outline and 4 to
the inner outline then 'outlines' would return ( 0 0 0 0 0 1 1 1 1 ).
Note: Where the function returns several outlines the order of those outlines
is undefined.
See Differentiating between several outlines for more information.
'curve_tolerances' returns the accuracy to which each curve represents the
outline.
When modelling with tolerant bodies the curves will meet to tolerance and gaps
may occur. 'max_separation' will return the largest gap between the ends of
the adjacent curves.
See Creating outline curves and spun outlines for more information.