mxcad_3d API 文档 / Mx3dGeCSYS
Class: Mx3dGeCSYS 
表示通用坐标系的类。
Hierarchy 
- ↳ - Mx3dGeCSYS
Table of contents 
Constructors 
Methods 
- Angle
- Axis
- CSYSR
- Direct
- Direction
- IsCoplanarWithAxis
- IsCoplanarWithCSYS
- Location
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Rotate
- Rotated
- Scale
- Scaled
- SetAxis
- SetDirection
- SetLocation
- SetXDirection
- SetYDirection
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- XDirection
- XReverse
- YDirection
- YReverse
- ZReverse
Constructors 
constructor 
• new Mx3dGeCSYS()
创建一个默认的坐标系对象。
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYS(csysr)
使用右手坐标系创建一个坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| csysr | Mx3dGeCSYSR | 右手坐标系对象。 | 
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYS(origin, z_axis)
使用原点和 Z 轴方向创建一个坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| origin | Mx3dGePoint | 坐标系的原点。 | 
| z_axis | Mx3dGeDir | 坐标系的 Z 轴方向。 | 
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYS(origin, z_axis, x_vec)
使用原点、Z 轴方向和 X 轴向量创建一个坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| origin | Mx3dGePoint | 坐标系的原点。 | 
| z_axis | Mx3dGeDir | 坐标系的 Z 轴方向。 | 
| x_vec | Mx3dGeDir | 坐标系的 X 轴向量。 | 
Overrides 
Mx3dGeObject.constructor
Methods 
Angle 
▸ Angle(other): number
计算与另一个坐标系的角度。
Parameters 
| Name | Type | Description | 
|---|---|---|
| other | Mx3dGeCSYS | 另一个坐标系。 | 
Returns 
number
两个坐标系之间的角度。
Axis 
▸ Axis(): Mx3dGeAxis
获取坐标系的轴。
Returns 
坐标系的轴。
CSYSR 
▸ CSYSR(): Mx3dGeCSYSR
获取右手坐标系。
Returns 
右手坐标系对象。
Direct 
▸ Direct(): boolean
判断坐标系是否为直接的。
Returns 
boolean
是否为直接的。
Direction 
▸ Direction(): Mx3dGeDir
获取坐标系的方向。
Returns 
坐标系的方向。
IsCoplanarWithAxis 
▸ IsCoplanarWithAxis(axis, linearTolerance, angularTolerance): boolean
判断坐标系是否与一个轴共面。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 轴对象。 | 
| linearTolerance | number | 线性公差。 | 
| angularTolerance | number | 角度公差。 | 
Returns 
boolean
是否共面。
IsCoplanarWithCSYS 
▸ IsCoplanarWithCSYS(other, linearTolerance, angularTolerance): boolean
判断坐标系是否与另一个坐标系共面。
Parameters 
| Name | Type | Description | 
|---|---|---|
| other | Mx3dGeCSYS | 另一个坐标系。 | 
| linearTolerance | number | 线性公差。 | 
| angularTolerance | number | 角度公差。 | 
Returns 
boolean
是否共面。
Location 
▸ Location(): Mx3dGePoint
获取坐标系的原点位置。
Returns 
坐标系的原点位置。
MirrorByAxis 
▸ MirrorByAxis(axis): void
通过一个轴对坐标系进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 镜像轴。 | 
Returns 
void
MirrorByCSYSR 
▸ MirrorByCSYSR(csysr): void
通过右手坐标系对当前坐标系进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| csysr | Mx3dGeCSYSR | 右手坐标系对象。 | 
Returns 
void
MirrorByPoint 
▸ MirrorByPoint(point): void
通过一个点对坐标系进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point | Mx3dGePoint | 镜像点。 | 
Returns 
void
MirroredByAxis 
▸ MirroredByAxis(axis): Mx3dGeCSYS
通过一个轴对坐标系进行镜像,并返回镜像后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 镜像轴。 | 
Returns 
镜像后的坐标系对象。
MirroredByCSYSR 
▸ MirroredByCSYSR(csysr): Mx3dGeCSYS
通过右手坐标系对当前坐标系进行镜像,并返回镜像后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| csysr | Mx3dGeCSYSR | 右手坐标系对象。 | 
Returns 
镜像后的坐标系对象。
MirroredByPoint 
▸ MirroredByPoint(point): Mx3dGeCSYS
通过一个点对坐标系进行镜像,并返回镜像后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point | Mx3dGePoint | 镜像点。 | 
Returns 
镜像后的坐标系对象。
Rotate 
▸ Rotate(axis, ang): void
绕轴旋转坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 旋转轴。 | 
| ang | number | 旋转角度。 | 
Returns 
void
Rotated 
▸ Rotated(axis, ang): Mx3dGeCSYS
绕轴旋转坐标系,并返回旋转后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 旋转轴。 | 
| ang | number | 旋转角度。 | 
Returns 
旋转后的坐标系对象。
Scale 
▸ Scale(point, s): void
按比例缩放坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point | Mx3dGePoint | 缩放的基点。 | 
| s | number | 缩放比例。 | 
Returns 
void
Scaled 
▸ Scaled(point, s): Mx3dGeCSYS
按比例缩放坐标系,并返回缩放后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point | Mx3dGePoint | 缩放的基点。 | 
| s | number | 缩放比例。 | 
Returns 
缩放后的坐标系对象。
SetAxis 
▸ SetAxis(z_axis): void
设置坐标系的轴。
Parameters 
| Name | Type | Description | 
|---|---|---|
| z_axis | Mx3dGeAxis | 坐标系的 Z 轴。 | 
Returns 
void
SetDirection 
▸ SetDirection(z_dir): void
设置坐标系的方向。
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 | Mx3dGeDir | X 轴方向。 | 
Returns 
void
SetYDirection 
▸ SetYDirection(y_dir): void
设置坐标系的 Y 轴方向。
Parameters 
| Name | Type | Description | 
|---|---|---|
| y_dir | Mx3dGeDir | Y 轴方向。 | 
Returns 
void
Transform 
▸ Transform(t): void
变换坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| t | Mx3dGeTrsf | 变换对象。 | 
Returns 
void
Transformed 
▸ Transformed(t): Mx3dGeCSYS
变换坐标系,并返回变换后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| t | Mx3dGeTrsf | 变换对象。 | 
Returns 
变换后的坐标系对象。
TranslateBy2Points 
▸ TranslateBy2Points(point1, point2): void
通过两个点平移坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point1 | Mx3dGePoint | 起点。 | 
| point2 | Mx3dGePoint | 终点。 | 
Returns 
void
TranslateByVec 
▸ TranslateByVec(vec): void
按向量平移坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| vec | Mx3dGeVec | 平移向量。 | 
Returns 
void
TranslatedBy2Points 
▸ TranslatedBy2Points(point1, point2): Mx3dGeCSYS
通过两个点平移坐标系,并返回平移后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point1 | Mx3dGePoint | 起点。 | 
| point2 | Mx3dGePoint | 终点。 | 
Returns 
平移后的坐标系对象。
TranslatedByVec 
▸ TranslatedByVec(vec): Mx3dGeCSYS
按向量平移坐标系,并返回平移后的坐标系对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| vec | Mx3dGeVec | 平移向量。 | 
Returns 
平移后的坐标系对象。
XDirection 
▸ XDirection(): Mx3dGeDir
获取坐标系的 X 轴方向。
Returns 
X 轴方向。
XReverse 
▸ XReverse(): void
反转 X 轴方向。
Returns 
void
YDirection 
▸ YDirection(): Mx3dGeDir
获取坐标系的 Y 轴方向。
Returns 
Y 轴方向。
YReverse 
▸ YReverse(): void
反转 Y 轴方向。
Returns 
void
ZReverse 
▸ ZReverse(): void
反转 Z 轴方向。
Returns 
void