AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
TransformTool类 参考

静态 Public 成员函数

static TopoShape Translate (TopoShape pShape, GVec vec, boolean copyGeom)
 
static TopoShape Translate (TopoShape pShape, GVec vec)
 
static TopoShape Translate (TopoShape pShape, double x, double y, double z, boolean copyGeom)
 
static TopoShape Translate (TopoShape pShape, double x, double y, double z)
 
static TopoShape Rotation (TopoShape pShape, GAx1 axis, double angle, boolean copyGeom)
 
static TopoShape Rotation (TopoShape pShape, GAx1 axis, double angle)
 
static TopoShape Scale (TopoShape pShape, GPnt center, double scale, boolean copyGeom)
 
static TopoShape Scale (TopoShape pShape, GPnt center, double scale)
 
static TopoShape Mirror (TopoShape shape, GAx1 axis, boolean copyGeom)
 
static TopoShape Mirror (TopoShape shape, GAx1 axis)
 
static TopoShape MirrorByAx2 (TopoShape shape, GAx2 axis, boolean copyGeom)
 
static TopoShape MirrorByAx2 (TopoShape shape, GAx2 axis)
 
static TopoShape MirrorByPoint (TopoShape shape, GPnt point, boolean copyGeom)
 
static TopoShape MirrorByPoint (TopoShape shape, GPnt point)
 
static TopoShape Copy (TopoShape shape)
 
static TopoShape Transform (TopoShape pShape, GTrsf trf, boolean copyGeom)
 
static TopoShape Transform (TopoShape pShape, GTrsf trf)
 
static TopoShape Transform (TopoShape pShape, GAx3 trf, boolean copyGeom)
 
static TopoShape Transform (TopoShape pShape, GAx3 trf)
 
static TopoShape TransformByMatrix (TopoShape pShape, Matrix4 matrix, boolean copyGeom)
 
static TopoShape TransformByMatrix (TopoShape pShape, Matrix4 matrix)
 
static TopoShape TransformByMatrix (TopoShape pShape, Matrix4d matrix, boolean copyGeom)
 
static TopoShape TransformByMatrix (TopoShape pShape, Matrix4d matrix)
 
static Matrix4 ToMatrix4 (GAx3 ax)
 
static Matrix4 ToMatrix4 (GAx2 ax)
 
static Matrix4 ToMatrix4 (GTrsf trf)
 
static GTrsf ToTransform (Matrix4 mat)
 
static Matrix4d ToMatrix4d (GAx3 ax)
 
static Matrix4d ToMatrix4d (GAx2 ax)
 
static Matrix4d ToMatrix4d (GTrsf trf)
 
static GTrsf ToTransform (Matrix4d mat)
 
static void Decompose (Matrix4 mat, Vector3 pos, Quaternion rot, Vector3 scale)
 
static GAx2 ComputeAxis (GPln p1, GPln p2, GPln p3)
 

详细描述

<> TransformTool
用于对TopoShape进行空间变换、复制

成员函数说明

◆ Copy()

static TopoShape TransformTool.Copy ( TopoShape shape)
static

复制一个新的Shape

参数
shape母体
返回
新的Shape

◆ Decompose()

static void TransformTool.Decompose ( Matrix4 mat,
Vector3 pos,
Quaternion rot,
Vector3 scale )
static

矩阵分解

参数
mat矩阵
pos平移
rot旋转
scale缩放

◆ Mirror() [1/2]

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

Mirror the shape.

参数
shapethe input shape.
axisthe axis to mirror.
返回
the new shape.

◆ Mirror() [2/2]

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

Mirror the shape.

参数
shapethe input shape.
axisthe axis to mirror.
返回
the new shape.

◆ MirrorByAx2() [1/2]

static TopoShape TransformTool.MirrorByAx2 ( TopoShape shape,
GAx2 axis )
static

以平面镜像

参数
shape几何
axis坐标系
返回
新对象

◆ MirrorByAx2() [2/2]

static TopoShape TransformTool.MirrorByAx2 ( TopoShape shape,
GAx2 axis,
boolean copyGeom )
static

以平面镜像

参数
shape几何
axis坐标系
返回
新对象

◆ MirrorByPoint() [1/2]

static TopoShape TransformTool.MirrorByPoint ( TopoShape shape,
GPnt point )
static

以点为中心镜像

参数
shape几何
point
返回
新的对象

◆ MirrorByPoint() [2/2]

static TopoShape TransformTool.MirrorByPoint ( TopoShape shape,
GPnt point,
boolean copyGeom )
static

以点为中心镜像

参数
shape几何
point
返回
新的对象

◆ Rotation() [1/2]

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

Rotate the shape.

参数
pShapethe input shape.
axisthe axis.
anglethe angle to rotate. by radians
返回
the new shape.

◆ Rotation() [2/2]

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

Rotate the shape.

参数
pShapethe input shape.
axisthe axis.
anglethe angle to rotate. by radians
返回
the new shape.

◆ Scale() [1/2]

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

Scale the shape.

参数
pShapethe input shape.
centerthe scale center.
scalethe scale value.
返回
the new shape.

◆ Scale() [2/2]

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

Scale the shape.

参数
pShapethe input shape.
centerthe scale center.
scalethe scale value.
返回
the new shape.

◆ Transform() [1/2]

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

基于gp_Trsf对象将空间变换作用到几何对象
gp_Trsf表示一些常见的变换,包括平移、旋转、等比例缩放以及关于点、线、面的对称变换
此种变换不会改变几何对象的性质

参数
pShape将作用变换的几何对象
trf表示空间变换的gp_Trsf对象
返回
空间变化后的集合对象

◆ Transform() [2/2]

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

基于gp_Trsf对象将空间变换作用到几何对象
gp_Trsf表示一些常见的变换,包括平移、旋转、等比例缩放以及关于点、线、面的对称变换
此种变换不会改变几何对象的性质

参数
pShape将作用变换的几何对象
trf表示空间变换的gp_Trsf对象
返回
空间变化后的集合对象

◆ TransformByMatrix() [1/2]

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

基于一个自定义的4x4矩阵对几何对象进行空间变换
需要注意的是,变换可能改变几何对象的性质(如:圆->椭圆)

参数
pShape将作用变换的几何对象
matrixthe matrix.
返回
表示空间变换的gp_Trsf对象

◆ TransformByMatrix() [2/2]

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

基于一个自定义的4x4矩阵对几何对象进行空间变换
需要注意的是,变换可能改变几何对象的性质(如:圆->椭圆)

参数
pShape将作用变换的几何对象
matrixthe matrix.
返回
表示空间变换的gp_Trsf对象

◆ Translate() [1/2]

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

Move the shape.

参数
pShapethe input shape.
vecthe direction and length of moving.
返回
the new shape.

◆ Translate() [2/2]

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

Move the shape.

参数
pShapethe input shape.
vecthe direction and length of moving.
返回
the new shape.