AnyCAD Rapid API 2023
Help you to create a better world!
TransformTool Class Reference

Static Public Member Functions

static TopoShape Translate (TopoShape pShape, GVec vec)
 
static TopoShape Rotation (TopoShape pShape, GAx1 axis, double angle)
 
static TopoShape Scale (TopoShape pShape, GPnt center, double scale)
 
static TopoShape Mirror (TopoShape shape, GAx1 axis)
 
static TopoShape Transform (TopoShape pShape, GTrsf trf)
 
static TopoShape Transform (TopoShape pShape, GAx3 trf)
 
static TopoShape TransformByMatrix (TopoShape pShape, Matrix4 matrix)
 
static Matrix4 ToMatrix4 (GTrsf trf)
 
static GTrsf ToTransform (Matrix4 mat)
 
static void Decompose (Matrix4 mat, Vector3 pos, Quaternion rot, Vector3 scale)
 

Detailed Description

Member Function Documentation

◆ Mirror()

static TopoShape TransformTool.Mirror ( TopoShape  shape,
GAx1  axis 
)
static

Mirror the shape.

Parameters
shapethe input shape.
axisthe axis to mirror.
Returns
the new shape.

◆ Rotation()

static TopoShape TransformTool.Rotation ( TopoShape  pShape,
GAx1  axis,
double  angle 
)
static

Rotate the shape.

Parameters
pShapethe input shape.
axisthe axis.
anglethe angle to rotate. by radians
Returns
the new shape.

◆ Scale()

static TopoShape TransformTool.Scale ( TopoShape  pShape,
GPnt  center,
double  scale 
)
static

Scale the shape.

Parameters
pShapethe input shape.
centerthe scale center.
scalethe scale value.
Returns
the new shape.

◆ Transform()

static TopoShape TransformTool.Transform ( TopoShape  pShape,
GTrsf  trf 
)
static

Transform the shape with arbitrary transfom.

Parameters
pShapethe input shape.
trfthe matrix
Returns
the new shape.

◆ TransformByMatrix()

static TopoShape TransformTool.TransformByMatrix ( TopoShape  pShape,
Matrix4  matrix 
)
static

Transform the shape with 4x4 matrix.

Parameters
pShapethe input shape.
matrixthe matrix.
Returns
the new shape.

◆ Translate()

static TopoShape TransformTool.Translate ( TopoShape  pShape,
GVec  vec 
)
static

Move the shape.

Parameters
pShapethe input shape.
vecthe direction and length of moving.
Returns
the new shape.