OUGESU   

Equivalent PK functions: PK_SPUN_ask
PK_SWEPT_ask

OUGESU ( surfac, sftype, ntypes, codes, ncode, ints, reals, geoms, singc, 
==========================================================================
         nsingc, singp, singo, nsingp, sense, ifail )
         ============================================

  Output generated surface

Receives:
  KI_tag_surface           *surfac         --- surface to output

Returns:
  KI_tag_list_int          *sftype         --- type and subtypes of surface
  KI_int_nitems            *ntypes         --- number of entries in 'sftype'
  KI_tag_list_int          *codes          --- codes formatting return data
  KI_int_nitems            *ncode          --- number of format codes
 <KI_tag_list_int>         *ints           --- integer data
 <KI_tag_list_dbl>         *reals          --- real data
 <KI_tag_list_geometry>    *geoms          --- underlying geometries
 <KI_tag_list_curve>       *singc          --- list of singular curves
 <KI_int_nitems>           *nsingc         --- number of singular curves
 <KI_tag_list_dbl>         *singp          --- singularities
 <KI_tag_list_curve>       *singo          --- owners of singularities
 <KI_int_nitems>           *nsingp         --- number of singularities
  KI_cod_logical           *sense          --- surface sense
  KI_cod_error             *ifail          --- failure indicator

Specific errors:
  KI_wrong_sub_type         not a surface supported by this routine

Description:
  This routine outputs a swept or spun surface. Information about the surface
  is returned in the form of several lists, some of which may be null for some
  surface types:

      a) a list of codes which enable the data from the integer, real and
         geometry lists to be interpreted
      b) lists of integers and reals giving specific details about the surface
      c) a list of underlying geometries, from which the surface is generated
      d) lists of singular curves and points

  The surface type and the sense of the surface are also returned.

  Each type of surface is output to a fixed format, so it is possible to
  interpret the integer, real and geometric data solely from a knowledge of the
  surface type. However, it may be necessary to read the codes to decide whether
  a particular piece of data has been output for a particular surface.
  Conversely, the data can be interpreted completely from an understanding
  of the various codes, without looking at the surface type.

  The surface type, which is a token from the range TYSU00, is returned in the
  list 'sftype'. In version 2.0, only one element of the list is used, so
  'ntypes' always has the value 1.

  The surface may have point or curve singularities (creases) and these are
  returned in separate lists. The surface normal and curvature cannot be
  calculated at either type of singularity. An example of a point singularity
  occurs when a swung curve meets the swing axis. A curve singularity is formed
  when a curve with a singularity (such as an intersection curve that meets
  itself at a terminator) is swept or swung. Curve singularities are returned
  as tags of curves in the list 'singc'; 'nsingc' is the number of singular
  curves. Point singularities are returned in the list 'nsingp' and the number
  of singular points is 'nsingp'. The argument 'singo' (owners of singular
  points) is not used at present, and is always null.

  Each surface has a default normal direction, but this may be reversed. The
  'sense' argument is set to KI_true if the surface normal is in the default
  direction, KI_false otherwise. The default direction varies according to
  the surface type, and is described in the information for each surface below.


  Data returned for Swept Surface
  ===============================
    A swept surface is one that is generated by sweeping a planar curve in
    a straight line normal to the plane. The real and geometry lists are used
    to output data defining a swept surface. The real list contains the sweep
    direction, and the curve that is swept to form the surface (the section
    curve) is in the geometry list. If the curve has singularities, then these
    will be swept into singular curves (which will actually be straight lines).

    'sftype':                     TYSUSE
    'sbtype':                     -
    'ncode':                      2
    'nsingc':   corresponds to number of singularities on section curve
    'nsingp':                     0
    length of 'ints' list:        0
    length of 'reals' list:       3
    length of 'geoms' list:       1
    default normal direction:     cross product of section curve tangent
                                  and sweep direction

      'codes' ||  list    |       data            |   start   |   length
      -------------------------------------------------------------------
              ||          |                       |           |
      OUFODR  || 'reals'  |   sweep direction     |     1     |     3
              ||          |                       |           |
      OUFOCU  || 'geoms'  |   curve to be swept   |     1     |     1
              ||          |                       |           |


  Data returned for Swung Surface
  ===============================
    A swung surface is generated by swinging a planar curve about an axis in
    its plane. The real and geometry lists are used to output data defining
    a swung surface. The real list contains the swing axis, and the curve
    that is swung to form the surface (the profile curve) is in the geometry
    list. If the curve has singularities, then these will be swung into
    singular curves (which will actually be circles). There may also be point
    singularities where the profile curve meets the axis. The profile may be
    bounded by two endpoints; this will be necessary if it intersects the axis.
    Note that the tokens in 'codes' are used to indicate whether bounds are
    present in the 'reals' list, but that the 'reals' list will always have
    the same length whether or not bounds are present.

    'sftype':                     TYSUSU
    'sbtype':                     -
    'ncode':                      4
    'nsingc':   corresponds to number of singularities on profile curve
    'nsingp':                     0, 1 or 2
    length of 'ints' list:        0
    length of 'reals' list:       12
    length of 'geoms' list:       1
    default normal direction:     cross product of the profile curve tangent and
                                  the swing direction; the swing direction is
                                  clockwise when viewed down the swing axis

      'codes' ||  list    |       data            |   start   |   length
      -------------------------------------------------------------------
              ||          |                       |           |
      OUFOAX  || 'reals'  |  point and direction  |     1     |     6
              ||          |   for swing axis      |           |
              ||          |                       |           |
      OUFOPV  || 'reals'  |   start position of   |     7     |     3
              ||          | valid region on curve |           |
              ||          |                       |           |
      OUFONP  || 'reals'  |    no start position  |     7     |     3
              ||          |                       |           |
      OUFOPV  || 'reals'  |    end position of    |    10     |     3
              ||          | valid region on curve |           |
              ||          |                       |           |
      OUFONP  || 'reals'  |    no end position    |    10     |     3
              ||          |                       |           |
      OUFOCU  || 'geoms'  |   curve to be swung   |     1     |     1
              ||          |                       |           |