PK_BODY_make_curves_outline   

PK_ERROR_code_t                        PK_BODY_make_curves_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_VECTOR1_t                     view_direction,  --- viewing direction
const PK_BODY_make_curves_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
view direction as a set of ordered curves together with their intervals.


Specific Errors:
    PK_ERROR_bad_component          (MILD)  'transfs' is inappropriate
    PK_ERROR_unsuitable_entity      (MILD)  Supplied body is neither sheet, nor
                                            solid, nor wire, nor general body.
                                            Supplied body contains component
                                            of zero dimension.
    PK_ERROR_bad_tolerance          (MILD)  Supplied tolerance is less than
                                            1.0e-7 if not PK_outline_update_0_c
    PK_ERROR_non_manifold           (MILD)  Outline is non-manifold
    PK_ERROR_failed_to_make_outline (MILD)  Function failure
    PK_ERROR_failed_to_facet        (MILD)  Failed to facet
    PK_ERROR_not_edge_on            (MILD)  body contains a non-edge-on face
                                            and the 'edge_on' option is set to
                                            PK_outline_edge_on_all_c


The function is only implemented for entities of type PK_BODY_type_solid_c,
PK_BODY_type_sheet_c, PK_BODY_type_wire_c or PK_BODY_type_general_c. Bodies of
type PK_BODY_type_general_c must not contain any zero dimensional components.

PK_ERROR_non_manifold will be returned if any part of the outline does not
consist of a closed loop with non-empty interior and the 'edge_on' option is
the default value of PK_outline_edge_on_none_c. This could happen if
a portion of a sheet body is edge-on in the view direction for example.

PK_ERROR_not_edge_on will be returned if the 'edge_on' option is set to
PK_outline_edge_on_all_c and the input bodies contains any solid or non-edge-on
sheet components.

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) for the given
view direction. The curves are returned as a set of ordered curves such that
the body, when viewed in the view direction, lies to the left of the curve when
looking in the direction of the curve. When two or more bodies overlap in the
view direction, 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 ).

In cases where the value of 'edge_on' is set to PK_outline_edge_on_both_c,
the outlines from solid and non-edge-on sheet components will have zero and
positive integers, the outlines from wire and edge-on sheet components will
have negative integers. If the value of 'want_body' is set to PK_LOGICAL_true,
the function may produce up to two result bodies in cases where the value of
'edge_on' is set to PK_outline_edge_on_both_c. The outlines with negative
integers always produce a body with maximum dimension 1. The outlines with
positive integers produce a body with dimension specified by the value of
'body_dimension'.

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.