api_change_body_trans
List of: Functions
Subjects: Modifying Models, Transforms
Contents: Kernel

Action: Substitutes the given transform for the existing transform of the body.

Prototype: outcome api_change_body_trans (


BODY* body,
// body to get new





// transform


TRANSFORM* new_transform, // new transform


logical negate = FALSE,
// negate the body


AcisOptions* ao = NULL
// acis options


);

Includes: #include "kernel/acis.hxx"

#include "kernel/kernapi/api/api.hxx"

#include "kernel/kernapi/api/kernapi.hxx"

#include "kernel/kerndata/geom/transfrm.hxx"

#include "kernel/kerndata/top/body.hxx"

#include "baseutil/logical.h"

#include "kernel/kernapi/api/acis_options.hxx"

Description: 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. Since SPAresabs doesn't 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.

Library: kernel

Filename: kern/kernel/kernapi/api/kernapi.hxx

Effect: Changes model
PDF/KERN/16FNA.PDF
HTM/DATA/KERN/KERN/16FNA/0012.HTM