PK_CURVE_project   

PK_ERROR_code_t              PK_CURVE_project
(
--- received arguments ---
int                          n_curves,       --- number of tool curves
const PK_CURVE_t             curves[],       --- array of tool curves
const PK_INTERVAL_t          intervals[],    --- array of curve intervals
int                          n_targets,      --- number of target entities
const PK_ENTITY_t            targets[],      --- array of target entities
const PK_CURVE_project_o_t  *options,        --- options structure

--- returned arguments ---
PK_CURVE_project_r_t  *const results,        --- results structure
PK_ENTITY_track_r_t   *const tracking        --- tracking information
)


This function projects and/or imprints the supplied curves onto the
given target entities.


Specific Errors:
    PK_ERROR_invalid_geometry       (MILD)     An input curve or target entity
                                               is invalid or self-intersecting.
    PK_ERROR_not_in_same_body       (MILD)     The 'targets' array contains
                                               faces from different bodies.
    PK_ERROR_bad_combination        (MILD)     An invalid combination of
                                               options has been provided.
    PK_ERROR_unsupported_operation  (MILD)     Cannot project to a wire body
                                               or imprint on a surface.
    PK_ERROR_curve_nmnl_off         (MILD)     Nominal curves are not enabled
                                               on the target body.
    PK_ERROR_failed_to_project      (SERIOUS)  Failed to project curve.
    PK_ERROR_cant_do_imprint        (SERIOUS)  Failed to imprint curve.
    PK_ERROR_ambiguous_imprint      (SERIOUS)  Failed to complete imprint
                                               because the completion is
                                               not unique.
    PK_ERROR_cant_complete_imprint  (SERIOUS)  Other failure of the imprint
                                               completion algorithm.



This function will produce a set of curves and points which are coincident with
the target entities. Depending on the value of the 'function' option, the
projections will be returned as pure geometry and/or imprinted on the target as
edges and vertices. The projection is performed according to the specified
'method'.

The 'targets' array may contain a single body, a single surface, or a list of
faces from the same body. This function does not support wire bodies, or bodies
whose faces have no attached geometry. If an imprint operation is chosen in
'function', the target may not be a surface.

The 'curves' array may not contain self-intersecting curves or foreign
geometry.  The resulting curves will be split at g1 discontinuities. Further
splitting of projected curves is controlled by the 'split_clash' option. The
default splitting is compulsory if an imprint operation is chosen in
'function'.

Where possible, the direction of a projected curve will be the same as the
input curve. When this is ambiguous (e.g. side faces) the curve will be in
the direction of projection.

The results structure contains the projected and imprinted items, along with
the appropriate curve interval (or a zero interval for points) and the achieved
tolerance of the projection. An achieved tolerance of 0.0 indicates that the
projection has been performed exactly.

When clashing the end-points of projections (for ensuring the chaining of
imprints, or for identifying point-like projections) Parasolid considers
the tolerance as applying to both ends. In this scenario, this can lead to
vertex tolerances (or achieved tolerances) which are up to twice the input
'tolerance'.

The returned tracking contains a track record for each projected or imprinted
entity in 'product_entities'. Each of these is mapped to two
'original_entities': an input curve and a target. The target entity is usually
a face or surface, but may be an edge or vertex if the projection is coincident
with existing topology on the target. Edges arising from imprint completion are
tracked in the same way, but the original curve will be tracked as a zero tag.

If no projections can be determined (e.g. there is no projection in the
supplied vector direction), an empty results structure is returned.

Under normal projection ('method' is PK_proj_method_normal_c), best results are
obtained when the input curve remains close to the target, so that the
projection is well-defined. For this reason it is advisable always to use
the 'max_dist' option in such cases. Normal projection from beyond the local
radius of curvature of the target is not defined.

Finer control over the output may be provided through the options structure.