TAPFAS ( faces, point, direct, angle, flist, nfaces, state, ifail )
===================================================================
Taper faces in a body
Receives:
KI_tag_list_face *faces --- face(s) to be tapered
KI_vec_position point --- point on taper plane
KI_vec_direction direct --- normal to taper plane
KI_dbl_angle *angle --- taper angle (in radians)
Returns:
<KI_tag_list_face> *flist --- tapered face(s)
<KI_int_nitems> *nfaces --- number of tapered faces
KI_cod_rtlo *state --- state of the body
--- RTLOOK => Valid
--- RTLONG => Negated
--- RTLOSX => Self-Intersecting
KI_cod_error *ifail --- failure code
Specific errors:
KI_impossible_taper Taper cannot be performed
KI_cant_do_tweak Cannot taper rubber face
Taper can only work on a solid body
KI_not_in_same_part Faces must be from same part
KI_unsuitable_entity Mixed body
KI_general_body Taper does not work for general
KI_bad_angle Angle out of range
Description:
Faces to be tapered are changed such that at all points the angle between
the face normal direction and the vector 'direct' is decreased by 'angle'.
If 'angle' is negative, the angle will be increased. Curves and points of the
edges and vertices of the faces are recalculated. Either one face or a list of
faces which all belong to the same body can be tapered.
Where edges or faces (sharing a vertex or edge at the boundary of the faces to
be tapered) have geometry which is inextendable, it may not be possible to
recalculate vertices or edges. This is because the curve or surface does not
intersect the tapered surface. With such edges which have a user defined
tolerance this is likely to occur since SP-curves are inextendable.
'Angle' is given in radians and must have an absolute value of less than pi.
The arguments 'point' and 'direct' together define a planar taper surface.
The cross section of the body in this surface is unchanged.
Only planar surfaces which are not parallel to the taper surface, and
cylindrical and conical surfaces which have an axis parallel to 'direct'
can be tapered. All other faces in the list will be ignored and will not
be altered. Planar surfaces will remain planar, cylindrical surfaces will
become conical and conical surfaces will be given a different angle of
divergence or become cylindrical.
A list of all of the faces which were tapered and the number of entries in the
list is returned. If no faces are tapered the null tag is returned.
The amount of taper must not be so much that the topology of the body would be
altered, for instance if a tapered face no longer intersects an adjacent face.
Faces which are tangential to another face cannot be tapered, unless that face
is also tapered at the same time.
In general this procedure may give rise to self-intersecting object
boundaries which could cause unpredictable errors later.
If local checking is on, (see SEINTP and OUINTP) consistency checks will be
made on newly created topological and geometrical entities, and the state
of the body returned. A state of RTLOOK indicates the body is valid. A state
of RTLONG indicates that the result body was originally "inside out" but has
been negated, and is now "positive" (has positive volume) and valid. A state
of RTLOSX indicates the body is self-intersecting and further modelling
operations on it may fail. It is the responsibility of the calling routine to
make any necessary reparation.
If the session parameter for local checking is switched off, the state
returned will be RTLOOK regardless.
A self-intersecting body can be returned even if the ifail is zero.
This function is not supported for general bodies.