| Equivalent PK functions: |
PK_BODY_spin PK_FACE_spin PK_VERTEX_spin |
SWIENT ( swung, point, direct, angle, latrls, extent, nlatrl, state, ifail )
============================================================================
Swing entity
Receives:
KI_tag_list_topology *swung --- body, vertex, face or list of
--- faces to swing
KI_vec_position point --- point on axis of rotation
KI_vec_axis direct --- direction of axis of rotation
KI_dbl_angle *angle --- angle of swing (in radians)
Returns:
KI_tag_list_topology *latrls --- lateral edge or face(s)
KI_tag_list_topology *extent --- extruded vertex or edge(s)
KI_int_nitems *nlatrl --- number of laterals
KI_cod_rtlo *state --- state of the body after the swing
--- RTLOOK => Valid
--- RTLONG => Negated
--- RTLOSX => Self-intersecting
KI_cod_error *ifail --- failure code
Specific errors:
KI_su_self_intersect Swing would produce a self intersecting surface
KI_impossible_swing Swing would produce a self intersecting surface
Cannot determine swung geometry
KI_non_manifold Cannot swing body with non-manifold boundary
KI_bad_angle Angle must be in the range -2pi <= angle <= 2pi
Full swing impossible in this context
KI_unsuitable_entity Body unsuitable for swing
KI_wrong_entity Swing entity not a body, vertex or face
Description:
The entity to be swung is moved along an arc specified by the axis leaving
lateral entities in its wake. Entities which may be swung, the laterals they
produce and the type of the resulting body are identified in the following
table.
Swung Entities | Laterals | Result
===========================================================================
Minimal body | One edge | Wire body
| |
End vertex of wire body | One edge | Wire body
| |
Wire body | One or more faces | Sheet body
| |
Sheet body | One or more faces | Solid body
| |
One or more faces of a | One or more faces | Solid body
solid body | |
| |
General body | One or more faces | General body
| and edges |
============================================================================
For every entry in 'latrls', there is a corresponding entry in 'extent'. This
list contains the topological entities extruded to create the lateral entities
For every lateral face there is a swung edge from the original body and for
every lateral edge there is a swung vertex.
Suitable Swing Entities:
. Any minimal body not coincident with the axis of rotation.
. End vertices (in contradistinction to interior vertices) of wires not
coincident with the axis of rotation.
. Any wire body, either an open or closed loop of edges.
. Any sheet body whose boundary is manifold.
. Any group of manifold faces of a solid body. Entire shells must
not be contained within the list.
. Any general body with only one region and no edges with more than
two faces.
Attempting to swing an entity which is not one of the above will give rise
to one of the ifails KI_wrong_entity, KI_unsuitable_entity or KI_non_manifold
as appropriate.
Permissible Swings:
. An entity may not be swung through more than 2pi or less than -2pi.
It is not possible to perform full swings (where the angle is 2pi or
-2pi) on faces of a solid or end vertices of a wire.
. For a wire body none of the edges may be coincident with the axis, nor
are they allowed to intersect the axis at any points other than at the
ends of the wire.
. For full swings of a sheet body the axis may not intersect the sheet at a
single point, but it may be coincident with any edges of the sheet.
. When the General topology session flag is enabled, full spins of single
faced sheet bodies with "point contacts", at vertices, on the spin axis
will be allowed. The result will be a general body with non_manifold
vertices for every "point contact".
. For partial swings of a sheet body or faces from a solid body the
restriction is that the axis may not intersect with any edges
tangentially. One special case is allowed when the curve of the edge is
a circle orthogonal and tangential to the swing axis.
. Bodies of revolution are created using a full swing. The spun entities
(the vertex of a minimal body, the edges of a wire, or the faces of a
sheet) are not deleted.
An entity which has an edge whose attached curve is of the type TYCUIN (ie
intersection curve), TYCUFG (ie foreign geometry), TYCUSP (ie sp-curve),
or TYCUCP (ie constant parameter curve) cannot be swung. However tolerant
edges and sheet bodies, which have curves of type TYCUSP (ie sp-curves)
attached to their fins, can be swung.
After a swing any coincident topology will not be fused or united.
In general this procedure may give rise to self-intersecting body
boundaries, which could cause unpredictable errors later.
Any new surfaces created are analytic surfaces if possible. If it is
not possible to use an analytic surface then the type of the new
surface will depend on SLIPGS (see SEINTP and OUINTP). If the creation
of generated surfaces is off, then any new non-analytic surfaces will
be B-surfaces; if it is on, then they will be swung surfaces.
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.
If the interface 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.
For general bodies, the body is copied, the copy is transformed,
corresponding vertices on the body and its copy are joined with
lateral edges, and corresponding edges are joined with lateral faces.
All the lateral entities are returned, both edges and faces. The
state of RTLONG is never returned since this has no meaning for
general bodies.