|
A
transformation (also referred to as a transform) is a change in form, such as repositioning, scaling, reflection, inversion, rotation, etc. In
ACIS, a transformation can be applied to an entity (e.g., body) and/or the underlying geometry, as well as to positions or gvectors.
|
|
|
Internally,
ACIS transformations are matrix operations. When combining transformations and/or applying them to an entity,
ACIS performs the more complex linear algebra and matrix tasks, allowing you to define in a more general sense the operation desired.
|
|
|
Each body has a transformation matrix associated with it. Each body's transformation matrix gives the relationship between its internal coordinate system and the coordinate system of the world.
|
|
|
In general, when transformations are applied to a body, the underlying geometries of all the subordinate entities are not changed.
ACIS simply attaches the transformation to the body entity and indicates that calculations should pipe the geometry through the transform. This reduces the risk of introducing round-off errors to the geometry.
|
|
|
If you want a transform actually applied to the underlying geometry, you must explicitly do so. For example, you can apply the transformation to the body first, then change the geometry using
api_change_body_trans or the transform method of the
BODY class.
|
|
|
Many operations in
ACIS create objects at the working coordinate system origin with simple geometric relationships. The reason for this is that it simplifies the syntax of the primitive operations if positioning and orientation are left to later steps. Because of this, model entities may need to be moved.
|
|
|
Transformations should be applied with caution. Scaling and translation effects can combine to produce increasingly severe gaps in the geometry. Scaling transforms not only scale the geometry, but also gaps in the geometry. If you translate the geometry, you can move it far enough away from the origin that a gap is represented with 0 bits of resolution, and you cannot resolve it. At some point, geometric operations may fail.
|
|
|
|
Functions
|
|
|
Some of the functions related to transforms are:
|
|
|
api_apply_transf
|
Changes the transform entity attached to a body.
|
|
|
api_change_body_trans
|
Substitutes the given transform for the existing transform of the body. Call this API after
api_transform_body to apply an attached transformation to the underlying geometry.
|
|
|
api_remove_transf
|
Removes (discards) the transformation of a body.
|
|
|
api_transform_entity
|
Applies a transformation to an entity.
|
|
|
coordinate_transf
|
Constructs a coordinate transformation.
|
|
|
reflect_transf
|
Constructs a reflection transformation for a reflection about the plane through the perpendicular to the given vector.
|
|
|
rotate_transf
|
Constructs a rotation transformation for a simple rotation by an angle about the given vector.
|
|
|
scale_transf
|
Constructs a transformation for overall scaling.
|
|
|
translate_transf
|
Constructs a translation transformation to translate along the given vector.
|
|
|
Classes
|
|
|
Some of the classes related to transforms are:
|
|
|
TRANSFORM
|
Represents an overall transformation applied to a body, and is saved as part of the model.
|
|
|
SPAtransf
|
Represents a 3D affine transformation
|