The 3D ACIS® Modeler (ACIS) is Spatial’s prominent 3D solid modeling engine. 3D InterOp is a CAD data translation framework (Interoperability)
HowTo:Create a Transformation with a translation, rotation, scale or shear?
From DocR19
There are several helper functions in transf.hxx that support the creation of a SPAtransf. Transformations can be applied to entities using api_transform_entity.
Contents |
Signature
SPAtransf scale_transf( double scale ); SPAtransf scale_transf( double xs, double ys, double zs ); SPAtransf scale_transf( double xs, double ys, double zs, double xys, double xzs, double yzs ); SPAtransf shear_transf( double shearxy, double shearxz, double shearyz); SPAtransf rotate_transf( double angle, SPAvector const &axis ); SPAtransf reflect_transf( SPAvector const &axis ); SPAtransf translate_transf( SPAvector const &disp ); SPAtransf coordinate_transf( SPAposition const &new_origin, SPAunit_vector const &new_x_axis, SPAunit_vector const &new_y_axis );
Header Files
#include "transf.hxx"
Example
ENTITY* ent = someentity; SPAvector disp(2.0, 3.0, 4.0); SPAtransf trans1 = translate_transf( disp ); outcome result = api_transform_entity(ent, trans1);
Scheme Commands
Scheme Examples
; create a block (define blk (solid:block 0 0 0 5 5 5)) ; define a translation (define trans1 (transform:translation (gvector 3 4 5))) ; define a rotation (define rot1 (transform:rotation (position 1 4 2) (gvector 1 1 2) 20)) ; translate the block (entity:transform blk trans1) ; rotate the block (entity:transform blk rot1)
Related Content
- See also: :Category:FAQs
