INFAFA   

Equivalent PK functions: PK_FACE_intersect_face

INFAFA ( face1, face2, nopts, opts, optdat, npts, pts, nintcu, intcu, intty, 
=============================================================================
         ifail )
         =======

  Intersect two faces

Receives:
  KI_tag_face              *face1          --- face 1
  KI_tag_face              *face2          --- face 2
 <KI_int_nitems>           *nopts          --- number of options supplied
  KI_cod_inop               opts[nopts]    --- array of options
  KI_tag_list_dbl           optdat[nopts]  --- options data

Returns:
 <KI_int_nitems>           *npts           --- number of intersection points
 <KI_tag_list_dbl>         *pts            --- list of intersection pts
 <KI_int_nitems>           *nintcu         --- number of intersection curves
 <KI_tag_list_curve>       *intcu          --- list of intersection curves
 <KI_tag_list>             *intty          --- list of types of int curves
  KI_cod_error             *ifail          --- returned - failure indicator

Specific errors:
  KI_cant_do_intersect      cant do intersect
                            failure in intersection routine
  KI_not_on_curve           given point not on intersection curve
  KI_bad_option_data        incorrect number of values for a point
                            
                            incorrect number of values for a box
                            Incompatible items in option data
  KI_duplicate_item         Duplicate item in option data
  KI_missing_geom           face lacks geometry

Description:

   INFAFA finds the intersections between two faces ('face1' and 'face2'),
   returning intersection points ('pts') and curves of intersection ('intcu').

   If the faces are from the same body any curves returned will be created as
   construction geometry in the body.

   If the faces are from different bodies and any of the curves returned are of
   type TYCUIN (intersection curve) then these curves will refer to copies of
   the surfaces of faces.

   No attempt is made to define surface regions of partial coincidence, and
   if the surfaces of faces are fully coincident no intersection data will be
   returned.

   The returned points ('pts') will be returned at points where the faces
   make point contact. 'npts' indicates the number of intersection points.
   The 'pts' are returned as a list of doubles of length 3*'nintpt'.

   The curves returned ('intcu') will be trimmed curves, 'nintcu' indicating
   the number of curves returned.

   'intty' classifies curves as being either:

        SICLSI: Simple intersection curves
     or SICLTG: Tangent intersection curves


   The available options ('opts') and related options data ('optdat') are as
   described below:

   The option INOPBX enables a 3-space box of interest to be supplied. The
   box may be used to improve performance. The intersection curves returned
   are not guaranteed to lie within the bounds of the box. The box is specified
   by supplying six doubles in 'optdat':

    Its 1st element contains the minimum x component of the area of interest
    "   2nd    "        "     "  minimum y_component  "  "    "  "     "
    "   3rd    "        "     "  minimum z_component  "  "    "  "     "
    "   4th    "        "     "  maximum x_component  "  "    "  "     "
    "   5th    "        "     "  maximum y_component  "  "    "  "     "
    "   6th    "        "     "  maximum z_component  "  "    "  "     "

   The options INOPPF and INOPPS enable the supplying of parameter boxes for the
   first and second face respectively. Again these boxes are only used to
   constrain the region of interest for performance purposes. The intersection
   curves returned are not trimmed to lie within the boundaries of the parameter
   box/es. Four parameters should be supplied to define the parameter box, U-min,
   U-max, V-min and V-max. The values of these parameters should follow the same
   conventions as CRBYGE.

   The option INOPSI enables a point on a branch of the intersection to be
   specified (by supplying the x, y, and z coordinates in 'optdat'). For this
   case only the branch of the intersection on which this point lies will be
   returned.