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

Action: Changes the transform entity attached to a body.

Prototype: outcome api_apply_transf (


ENTITY* entity, // entity to get new




// transform


SPAtransf const& trans, // new transform


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/data/entity.hxx"

#include "baseutil/vector/transf.hxx"

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

Description: When transformations are applied to a body in ACIS, the underlying geometries of all the subordinate entities are not changed. This API simply attaches the transformation to the body entity and indicates that calculations should pipe the geometry through the transform. Each body's transformation matrix gives the relationship between its internal coordinate system and the coordinate system of the world.


If you want the transform actually applied to the geometry, use the api_change_body_trans function. One way is to apply the transformation first:


BODY* my_body;

api_apply_transf(my_body, transf);


Then change the geometry of the object according to the transformation and set the body's transform to an empty transformation. (This does increase the risk of introducing round-off errors to the geometry.)


api_change_body_trans(my_body,NULL);


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.

Errors: The pointer to an entity is NULL.

Library: kernel

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

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