mxcad_3d API 文档 / Mx3dGeCSYSR
Class: Mx3dGeCSYSR 
表示右手坐标系的类。
Hierarchy 
- ↳ - Mx3dGeCSYSR
Table of contents 
Constructors 
Methods 
- Angle
- Axis
- Direction
- IsCoplanarWithAxis
- IsCoplanarWithCSYSR
- Location
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Rotate
- Rotated
- Scale
- Scaled
- SetDirection
- SetLocation
- SetXDirection
- SetYDirection
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- XDirection
- YDirection
Constructors 
constructor 
• new Mx3dGeCSYSR()
创建一个默认的右手坐标系对象。
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYSR(origin, z_axis, x_vec)
使用原点、Z 轴方向和 X 轴向量创建一个右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| origin | Mx3dGePoint | 坐标系的原点。 | 
| z_axis | Mx3dGeDir | 坐标系的 Z 轴方向。 | 
| x_vec | Mx3dGeDir | 坐标系的 X 轴向量。 | 
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYSR(origin, z_axis)
使用原点、Z 轴方向创建一个右手坐标系对象,X Y 方向自动确定。
Parameters 
| Name | Type | Description | 
|---|---|---|
| origin | Mx3dGePoint | 坐标系的原点。 | 
| z_axis | Mx3dGeDir | 坐标系的 Z 轴方向。 | 
Overrides 
Mx3dGeObject.constructor
Methods 
Angle 
▸ Angle(theOther): number
计算与另一个右手坐标系的角度。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOther | Mx3dGeCSYSR | 另一个右手坐标系。 | 
Returns 
number
两个坐标系之间的角度。
Axis 
▸ Axis(): Mx3dGeAxis
获取右手坐标系的轴。
Returns 
右手坐标系的轴。
Direction 
▸ Direction(): Mx3dGeDir
获取右手坐标系的 Z 轴方向。
Returns 
Z 轴方向。
IsCoplanarWithAxis 
▸ IsCoplanarWithAxis(A1, LinearTolerance, AngularTolerance): boolean
判断右手坐标系是否与一个轴共面。
Parameters 
| Name | Type | Description | 
|---|---|---|
| A1 | Mx3dGeAxis | 轴对象。 | 
| LinearTolerance | number | 线性公差。 | 
| AngularTolerance | number | 角度公差。 | 
Returns 
boolean
是否共面。
IsCoplanarWithCSYSR 
▸ IsCoplanarWithCSYSR(Other, LinearTolerance, AngularTolerance): boolean
判断右手坐标系是否与另一个右手坐标系共面。
Parameters 
| Name | Type | Description | 
|---|---|---|
| Other | Mx3dGeCSYSR | 另一个右手坐标系。 | 
| LinearTolerance | number | 线性公差。 | 
| AngularTolerance | number | 角度公差。 | 
Returns 
boolean
是否共面。
Location 
▸ Location(): Mx3dGePoint
获取右手坐标系的原点位置。
Returns 
原点位置。
MirrorByAxis 
▸ MirrorByAxis(A1): void
通过一个轴对右手坐标系进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| A1 | Mx3dGeAxis | 镜像轴。 | 
Returns 
void
MirrorByCSYSR 
▸ MirrorByCSYSR(A2): void
通过右手坐标系对当前右手坐标系进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| A2 | Mx3dGeCSYSR | 右手坐标系对象。 | 
Returns 
void
MirrorByPoint 
▸ MirrorByPoint(P): void
通过一个点对右手坐标系进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| P | Mx3dGePoint | 镜像点。 | 
Returns 
void
MirroredByAxis 
▸ MirroredByAxis(A1): Mx3dGeCSYSR
通过一个轴对右手坐标系进行镜像,并返回镜像后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| A1 | Mx3dGeAxis | 镜像轴。 | 
Returns 
镜像后的右手坐标系对象。
MirroredByCSYSR 
▸ MirroredByCSYSR(A2): Mx3dGeCSYSR
通过右手坐标系对当前右手坐标系进行镜像,并返回镜像后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| A2 | Mx3dGeCSYSR | 右手坐标系对象。 | 
Returns 
镜像后的右手坐标系对象。
MirroredByPoint 
▸ MirroredByPoint(P): Mx3dGeCSYSR
通过一个点对右手坐标系进行镜像,并返回镜像后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| P | Mx3dGePoint | 镜像点。 | 
Returns 
镜像后的右手坐标系对象。
Rotate 
▸ Rotate(theA1, theAng): void
绕轴旋转右手坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 旋转轴。 | 
| theAng | number | 旋转角度。 | 
Returns 
void
Rotated 
▸ Rotated(theA1, theAng): Mx3dGeCSYSR
绕轴旋转右手坐标系,并返回旋转后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 旋转轴。 | 
| theAng | number | 旋转角度。 | 
Returns 
旋转后的右手坐标系对象。
Scale 
▸ Scale(theP, theS): void
对右手坐标系进行缩放。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 缩放中心点。 | 
| theS | number | 缩放比例。 | 
Returns 
void
Scaled 
▸ Scaled(theP, theS): Mx3dGeCSYSR
对右手坐标系进行缩放,并返回缩放后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 缩放中心点。 | 
| theS | number | 缩放比例。 | 
Returns 
缩放后的右手坐标系对象。
SetDirection 
▸ SetDirection(z_dir): void
设置右手坐标系的 Z 轴方向。
Parameters 
| Name | Type | Description | 
|---|---|---|
| z_dir | Mx3dGeDir | Z 轴方向。 | 
Returns 
void
SetLocation 
▸ SetLocation(origin): void
设置右手坐标系的原点位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| origin | Mx3dGePoint | 坐标系的原点。 | 
Returns 
void
▸ SetLocation(theX, theY, theZ): void
设置右手坐标系的原点位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theX | number | 原点的 X 坐标。 | 
| theY | number | 原点的 Y 坐标。 | 
| theZ | number | 原点的 Z 坐标。 | 
Returns 
void
SetXDirection 
▸ SetXDirection(x_dir): void
设置右手坐标系的 X 轴方向。
Parameters 
| Name | Type | Description | 
|---|---|---|
| x_dir | Mx3dGePoint | X 轴方向。 | 
Returns 
void
SetYDirection 
▸ SetYDirection(y_dir): void
设置右手坐标系的 Y 轴方向。
Parameters 
| Name | Type | Description | 
|---|---|---|
| y_dir | Mx3dGeDir | Y 轴方向。 | 
Returns 
void
Transform 
▸ Transform(theT): void
变换右手坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | Mx3dGeTrsf | 变换矩阵。 | 
Returns 
void
Transformed 
▸ Transformed(theT): Mx3dGeCSYSR
变换右手坐标系,并返回变换后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | Mx3dGeTrsf | 变换矩阵。 | 
Returns 
变换后的右手坐标系对象。
TranslateBy2Points 
▸ TranslateBy2Points(theP1, theP2): void
通过两个点平移右手坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP1 | Mx3dGePoint | 起点。 | 
| theP2 | Mx3dGePoint | 终点。 | 
Returns 
void
TranslateByVec 
▸ TranslateByVec(theV): void
通过向量平移右手坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theV | Mx3dGeVec | 平移向量。 | 
Returns 
void
TranslatedBy2Points 
▸ TranslatedBy2Points(theP1, theP2): Mx3dGeCSYSR
通过两个点平移右手坐标系,并返回平移后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP1 | Mx3dGePoint | 起点。 | 
| theP2 | Mx3dGePoint | 终点。 | 
Returns 
平移后的右手坐标系对象。
TranslatedByVec 
▸ TranslatedByVec(theV): Mx3dGeCSYSR
通过向量平移右手坐标系,并返回平移后的右手坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theV | Mx3dGeVec | 平移向量。 | 
Returns 
平移后的右手坐标系对象。
XDirection 
▸ XDirection(): Mx3dGeDir
获取右手坐标系的 X 轴方向。
Returns 
X 轴方向。
YDirection 
▸ YDirection(): Mx3dGeDir
获取右手坐标系的 Y 轴方向。
Returns 
Y 轴方向。