PK_FACE_intersect_curve   


PK_ERROR_code_t           PK_FACE_intersect_curve
(
--- received arguments ---
PK_FACE_t                 face,           --- face
PK_CURVE_t                curve,          --- curve
PK_INTERVAL_t             bounds,         --- bounds of curve

--- returned arguments ---
int                *const n_vectors,      --- number of intersections
PK_VECTOR_t       **const vectors,        --- positions of intersections
PK_UV_t           **const uvs,            --- parameters on face's surface
double            **const ts,             --- parameters on curve
PK_TOPOL_t        **const topols,         --- topological entities intersected
PK_intersect_fc_t **const types           --- types of intersections
)


PK_FACE_intersect_curve finds the intersections between a face and the
specified region of a curve.


Specific Errors:
    PK_ERROR_missing_geom              missing geometry
    PK_ERROR_invalid_geometry          invalid geometry
    PK_ERROR_not_on_curve              given parameters not on curves
    PK_ERROR_bad_end_points            bad end points
    PK_ERROR_bad_parameter             bad parameter given
    PK_ERROR_cant_do_intersect         intersection cannot be done





PK_FACE_intersect_curve finds the intersections between a bounded curve
and a face. It returns an array of intersection vectors vectors,
an array of the face's surface parameters uvs and an array of curve
parameters ts, it also returns an array of intersection types types.
If the bounded curve passes through an edge or vertex of the
face the tag of the appropriate entity is also returned in topols.
If the bounded curve does not intersect the face, no tag information is
returned, but is deemed to be a successful operation.

The intersections are ordered along the bounded curve, and are classified
according to the direction of the curve.

The part of the curve to be intersected with the face is specified by
giving the parametric interval in bounds.



The intersection coordinates are returned in an array vectors; if
there are no intersections of the curve and face within the interval of
the curve bounded by interval, a null array is returned.
If 'n_vectors' intersections are found the list ts contains n_vectors
corresponding curve parameters and 'uvs' contains the corresponding
u,v pairs of surface parameters. The curve and surface parametrisations are
defined in the documentation of PK_CURVE_ask_param and PK_SURF_ask_params.

Any edges or vertices intersected by the curve are returned in an array
(topols) of length n_vectors.

The intersection types are returned in an array (types) of length
n_vectors. There are two codes for points of intersection when
the curve and the surface of the face intersect in a single point
and eleven codes for intersections where all or part of the
curve lies in the surface.





    Single point intersections between bounded curve and surface of face:

  Type                     |  Possible entry   | Description
                           |  in topols      |
 __________________________|___________________|___________________________
 PK_intersect_fc_simple_c  | Edge or Vertex    | The curve passes through
                           | or PK_ENTITY_null | the surface of the face
 __________________________|___________________|___________________________
 PK_intersect_fc_tangent_c | Edge or Vertex    | The curve touches the
                           | or PK_ENTITY_null | surface of the face
                           |                   | but does not pass through
                           |                   | the surface.




    Intersections with the bounded curve lying in the surface of the face:

  Type                         |  Possible entry  | Description
                               |  in topols     |
 ______________________________|__________________|____________________________
 PK_intersect_fc_out_in_c      | Edge or Vertex   | The curve passes from
                               |                  | being outside the face
                               |                  | to being in its interior.
 ______________________________|__________________|____________________________
 PK_intersect_fc_in_out_c      | Edge or Vertex   | The curve passes from
                               |                  | being in the interior
                               |                  | of the face to being
                               |                  | outside the face.
 ______________________________|__________________|____________________________
 PK_intersect_fc_out_coi_c     | Vertex           | The curve passes from
                               |                  | being outside the face
                               |                  | to a region of coincidence
                               |                  | with its boundary
 ______________________________|__________________|____________________________
 PK_intersect_fc_coi_out_c     | Vertex           | The curve passes from
                               |                  | a region of coincidence
                               |                  | with the boundary of the
                               |                  | face to being outside
                               |                  | the face.
 ______________________________|__________________|____________________________
 PK_intersect_fc_coi_in_c      | Vertex           | The curve passes from a
                               |                  | region of coincidence with
                               |                  | the boundary of the face
                               |                  | to being in the interior
                               |                  |  of the face.
 ______________________________|__________________|____________________________
 PK_intersect_fc_in_coi_c      | Vertex           | The curve passes from
                               |                  | being in the interior
                               |                  | of the face to a region
                               |                  | of coincidence with
                               |                  | the boundary of the face.
 ______________________________|__________________|____________________________
 PK_intersect_fc_in_tangent_c  | Edge or Vertex   | The curve is tangent to
                               |                  | the inside of an
                               |                  | edge or passes through
                               |                  | a vertex but remains
                               |                  | inside the face.
 ______________________________|__________________|____________________________
 PK_intersect_fc_out_tangent_c | Edge or Vertex   | The curve is tangent to
                               |                  | the outside of an
                               |                  | edge or passes through
                               |                  | a vertex but remains
                               |                  | outside the face.
 ______________________________|__________________|____________________________
 PK_intersect_fc_in_c          | Edge or Vertex   | The start or end of
                               | or PK_ENTITY_null| the curve is inside
                               |                  | the face or lies on
                               |                  | its boundary.
 ______________________________|__________________|____________________________
 PK_intersect_fc_start_c       | Edge or Vertex   | The curve enters the
                               | or PK_ENTITY_null| face at the start of a
                               |                  | region of coincidence
                               |                  | with the surface.
 ______________________________|__________________|____________________________
 PK_intersect_fc_end_c         | Edge or Vertex   | The curve leaves the
                               | or PK_ENTITY_null| face at the end of a
                               |                  | region of coincidence
                               |                  | with the surface.



Whether the curve enters or leaves the face is determined by the direction
of the curve, curve.



Any B-curve must be capable of passing the full checks imposed by
PK_GEOM_check.