INCUSU ( cu, bound, surf, intbox, intpts, cuparm, suparm, incods, nintpt,
==========================================================================
ifail )
=======
Intersect curve and surface
Receives:
KI_tag_curve *cu --- curve
KI_vec_position bound[2] --- start and end of curve
KI_tag_surface *surf --- surface
KI_dbl_box intbox[6] --- box of interest
Returns:
<KI_tag_list_dbl> *intpts --- points of intersection
<KI_tag_list_dbl> *cuparm --- curve parameters at ints.
<KI_tag_list_dbl> *suparm --- surface parameters at ints.
<KI_tag_list_int> *incods --- tokens describing intersections
<KI_int_nitems> *nintpt --- number of points returned
KI_cod_error *ifail --- failure indicator
Specific errors:
KI_cant_do_intersect cant perform requested intersection
cant do intersect
KI_invalid_geometry curve fails checks
surface fails checks
KI_not_on_curve start or end point not on curve
KI_bad_end_points curve not defined between start and end points
Description:
INCUSU finds the intersections between a bounded curve and a surface. It
returns a list of intersection coordinates and a list of tokens classifying
the intersections. The intersections are ordered along the bounded curve,
and are classified according to the direction of the curve.
The intersection coordinates are returned in a list of length 3*'nintpt'; if
there are no intersections of the curve and surface within the bounds,
'nintpt' is returned as zero and 'intpts' is returned as the NULTAG.
If 'nintpt' intersections are found the list 'cuparm' contains 'nintpt'
corresponding curve parameters and 'suparm' contains the corresponding
u,v pairs of surface parameters. The curve and surface parametrisations
are defined in the documentation of ENCUPA and ENSUPA. The surface parameters
in 'suparm' are only valid for simple and touch intersections. For coincident
intersections the values in 'suparm' are not defined.
The intersection types are returned in a list of length 'nintpt'. There are
four types of intersection, given by the tokens CICLSI, CICLTG, CICLSC, and
CICLEC.
CICLSI: A simple intersection not adjoining a region of coincidence.
CICLTG: The curve touches the surface at a point.
CICLSC: An intersection at the start of a region of coincidence.
CICLEC: An intersection at the end of a region of coincidence.
Whether an intersection is at the start or end of a region of coincidence
(CICLSC or CICLEC) is determined by the direction of the curve, 'cu'. In the
current version regions of coincidence will only be reported when the curve
given is found to be coincident with the surface at all points within the
bounds supplied.
Coincident intersections (CICLSC and CICLEC) are returned for all points
lying at the bounds of regions of coincidence, including the ends of the
bounded curve, which are coincident with the surface.
The interval of the curve to be intersected with the surface is specified
by giving start and end coordinates. These are given in the array 'bound',
in the order start and then end. If these points are the same, and the
geometry of the curve is closed, the complete curve will be used.
If the curve is a trimmed curve the supplied bounds are ignored. However valid
vectors should be supplied.
'intbox' describes the box that contains the area of interest. It is
specified in the same way as the box passed to INCUCU. The box is used to
improve performance. No guarantee is made that all the intersections returned
will lie in it.
For a box to be valid the difference between the maximum and minimum
components in all three principal directions must be greater than zero.
Any B-curve or B-surface or offset surface must be capable of passing the
checks imposed by CHCKEN. The self intersection check is only performed
if the appropriate option is set (see SEINTP).