RESUSH   

Equivalent PK functions: PK_BODY_embed_in_surf

RESUSH ( sheet, surf, tol, edges, nedges, ifail )
=================================================

  Replaces the surface of a sheet body

Receives:
  KI_tag_body              *sheet          --- Sheet body
  KI_tag_surface           *surf           --- new surface for sheet body
  KI_dbl_distance          *tol            --- tolerance of SP_curves

Returns:
 <KI_tag_list_edge>        *edges          --- edges converted to SP_curves
 <KI_int_nitems>           *nedges         --- number of converted edges
  KI_cod_error             *ifail          --- failure code

Specific errors:
  KI_invalid_geometry       surface fails continuity checks
  KI_bad_tolerance          edge too short for tolerance
  KI_failed_to_replace      unable to replace surface of sheet
  KI_bad_sharing            illegal sharing of surface
  KI_wrong_surface          surface is incompatible
  KI_unsuitable_entity      sheet has more than one non-rubber face
  KI_missing_geom           sheet has no surface attached
  KI_not_sheet              body is not a sheet
  KI_not_in_same_partition  Sheet and surf are in different partitions

Description:
  The surface of the sheet is tweaked to the new surface while the
  parameter space representation of the edges is maintained.

  The supplied body, 'sheet' must be a sheet body, which must have only
  one face and there must be a surface attached to the face.

  The new surface, 'surf' must be of the same type as the surface currently
  attached to the face of the sheet or an offset of that type. The new
  surface must also have the same bound classification, as given by
  ENSUPA, as the surface of the face and must be capable of passing the
  checks imposed by CHCKEN.  Continuity checks are also performed (see ENDIPE)
  if the appropriate option is set (see SEINTP).

  If the curve of an edge is an SP-curve (TYCUSP) or a constant parameter
  curve of the surface of the face then it will be transfered to the new
  surface.

  All other edges will be converted to SP-curves using the supplied
  tolerance, 'tol' and then transfered to the new surface. It is an
  error if any of these edges are shorter than twice the
  tolerance. During the conversion the edges may need to be split at
  surface discontinuities.

  All the edges whose curves have been converted to SP-curves will be
  returned in 'edges'.

  NOTE that RESUSH will not replace the surface of a blend face (type
  TYSUBL).