All Frameworks  Class Hierarchy  This Framework  Indexes

SPAkern Global Function api_change_body_trans


outcome api_change_body_trans(BODY* body,
TRANSFORM* new_transform,
logical negate= FALSE,
AcisOptions* ao= NULL)
Substitutes the given transform for the existing transform of the BODY.

Role: This API changes the geometry to leave the body unaltered in its global coordinate space. Each BODY contains a transformation matrix that gives the relationship between the internal coordinate system and that of the world coordinate system. This API transforms the geometric definitions within the object so that with the new transformation set in the body transformation, the shape and position of the object are unchanged.

If negate is TRUE, this API negates the BODY by reflecting it about the origin and reversing all directions.

Calling this API with a NULL transform pointer leaves the body with a NULL transform, and any existing transforms are applied to the body geometry. For example, to scale the BODY's geometry, first call this API with the scaling transform and then call it again with a NULL transform.

Use transformations with caution. Scaling and translation effects can combine to produce increasingly severe gaps in the geometry. Scaling transforms not only scale up or down the geometry, but also scale up or down 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. Because SPAresabs does not change, at some point geometric operations fail.

Call api_change_body_trans after api_transform_entity.

Errors: The pointer to a body is NULL or does not point to a BODY.

The pointer to a transform does not point to a TRANSFORM.

Effect: Changes model

Journal: Not Available

Parameters:
body
body to get new transform.
new_transform
new transform.
negate
negate the body.
ao
acis options.

This object is included in the file: kernapi.hxx

Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.