ATGETO   

Equivalent PK functions: PK_FACE_attach_surfs
PK_EDGE_attach_curves
PK_FIN_attach_curves
PK_VERTEX_attach_points

ATGETO ( ntopol, topol, sense, ngeom, geom, ifail )
===================================================

  Attach geometry to topology

Receives:
  int                      *ntopol         --- number of topological entities
  KI_tag_topology           topol[ntopol]  --- topological entities
  KI_cod_logical            sense[ntopol]  --- face senses
  int                      *ngeom          --- number of topological entities
  KI_tag_geometry           geom[ngeom]    --- geometric entities

Returns:
  KI_cod_error             *ifail          --- failure code

Specific errors:
  KI_has_parent             'geom' is already attached
  KI_bad_shared_dep         attempt to illegally share a dependent of 'geom'
  KI_bad_shared_entity      attempt to illegally share 'geom'
  KI_geom_not_needed        'topol' already owns geometry
  KI_geom_topol_mismatch    geometry/topology mismatch
  KI_inconsistent_geom      inconsistent geometry
  KI_wrong_entity           type of 'topol' incorrect
  KI_invalid_geometry       geometry does not pass checks
  KI_not_in_same_partition  Entities are not all in the same partition

Description:
  This function connects geometric entities (geom[]) to topological entities
  (topol[]). The array of senses (sense[]) must be the same length as the array
  of topology. The senses are used to set the face sense only and are ignored if
  the corresponding topology is not a face (edges and fins do not have a sense).

  The length of the geometrical entity array ngeom must be either 1 or equal to
  the length of the topological entity array ntop.

  If the geometrical entity array is the same length as the topological
  entity array then ATGETO connects each geometric entity to the
  corresponding topological entity in the arrays. A geometric entity may
  occur more than once in the array of geometrical entities and if this
  is the case then geometry will be shared, providing the sharing is
  legal.

  If the geometrical entity array only has one element then this element
  will be connected to all of the elements in the topological entity array
  and thus shared between them.

  Each geometric entity is connected to the corresponding topological entity
  if their types permit. The combinations of topology and geometry allowed
  are:


         geometry       |   topology
        ----------------|------------
         surface        |   face
         curve          |   edge
         curve          |   fin
         point          |   vertex
         transform      |   instance

  ATGETO will not copy any geometric entity, thus attachments are further
  restricted by constraints on the sharing of geometry:

      o Geometry that will be shared after the call to ATGETO may only be
        shared by topology within one body. Points and transforms may not
        be shared.

      o A curve cannot be shared between two edges which have opposing
        directions.

      o Orphan geometry may be attached to a face, edge or vertex if neither the
        entity nor any of its dependents are attached to topology and neither
        the entity nor any of its dependents are shared with any other
        orphan entity.

      o Construction geometry in a body may be attached to a face, edge or
        vertex so long as it is in the same body.

  There are also restrictions on the types of curve that may be attached to
  edges and fins. Only trimmed curves with SP curve basis curves may be attached
  to fins and the corresponding edge must be approximate. No curve may
  be attached to an approximate edge and no curves may be attached to the fins
  of an accurate edge.

  When surfaces are attached to faces, 'sense' specifies the value to which
  the face sense is set. If 'sense' is true, the face normal is parallel
  to the surface normal. For all other combinations of geometry and
  topology the 'sense' is ignored.

  The curve or 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).

  If a transform is being attached to an instance it may only contain
  translation and rotation components. Reflections, scales and shears are not
  allowed.

  Note: ATGETO may not be used to attach construction geometry to a body or
  assembly: use DEFCON for this.