[mxcad_3d API Document](../README. md)/Mx3dGeCSYS
Class: Mx3dGeCSYS 
A class that represents a universal coordinate system.
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()
Create a default coordinate system object.
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYS(csysr)
Create a coordinate system object using the right-handed coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Csysr | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object | 
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYS(origin, z_axis)
Create a coordinate system object using the origin and Z-axis direction.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Origin | [Mx3dGePoint] (Mx3dGePoint. md) | The origin of the coordinate system | 
| The Z-axis direction of the coordinate system is Mx3dGeDir (Mx3dGeDir. md) | 
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCSYS(origin, z_axis, x_vec)
Create a coordinate system object using the origin, Z-axis direction, and X-axis vector.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Origin | [Mx3dGePoint] (Mx3dGePoint. md) | The origin of the coordinate system | 
| The Z-axis direction of the coordinate system is Mx3dGeDir (Mx3dGeDir. md) | ||
| The X-axis vector of the coordinate system [Mx3dGeDir] (Mx3dGeDir. md) | 
Overrides 
Mx3dGeObject.constructor
Methods 
Angle 
▸ Angle(other): number
Calculate the angle with another coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Other | [Mx3dGeCSYS] (Mx3dGeCSYS. md) | Another coordinate system | 
Returns 
number
The angle between two coordinate systems.
Axis 
▸ Axis(): Mx3dGeAxis
Obtain the axes of the coordinate system.
Returns 
The axis of the coordinate system.
CSYSR 
▸ CSYSR(): Mx3dGeCSYSR
Obtain the right-hand coordinate system.
Returns 
Right hand coordinate system object.
Direct 
▸ Direct(): boolean
Determine whether the coordinate system is direct.
Returns 
boolean
Is it direct.
Direction 
▸ Direction(): Mx3dGeDir
Obtain the direction of the coordinate system.
Returns 
The direction of the coordinate system.
IsCoplanarWithAxis 
▸ IsCoplanarWithAxis(axis, linearTolerance, angularTolerance): boolean
Determine whether the coordinate system is coplanar with an axis.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object | 
| Linear Tolerance | Number | Linear Tolerance | 
| Angular Tolerance | Number | Angular Tolerance | 
Returns 
boolean
Is it coplanar.
IsCoplanarWithCSYS 
▸ IsCoplanarWithCSYS(other, linearTolerance, angularTolerance): boolean
Determine whether the coordinate system is coplanar with another coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Other | [Mx3dGeCSYS] (Mx3dGeCSYS. md) | Another coordinate system | 
| Linear Tolerance | Number | Linear Tolerance | 
| Angular Tolerance | Number | Angular Tolerance | 
Returns 
boolean
Is it coplanar.
Location 
▸ Location(): Mx3dGePoint
Obtain the origin position of the coordinate system.
Returns 
The origin position of the coordinate system.
MirrorByAxis 
▸ MirrorByAxis(axis): void
Mirror the coordinate system through an axis.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis | 
Returns 
void
MirrorByCSYSR 
▸ MirrorByCSYSR(csysr): void
Mirror the current coordinate system using the right-handed coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Csysr | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object | 
Returns 
void
MirrorByPoint 
▸ MirrorByPoint(point): void
Mirror the coordinate system through a point.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point | 
Returns 
void
MirroredByAxis 
▸ MirroredByAxis(axis): Mx3dGeCSYS
Mirror the coordinate system through an axis and return the mirrored coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis | 
Returns 
Mirrored coordinate system object.
MirroredByCSYSR 
▸ MirroredByCSYSR(csysr): Mx3dGeCSYS
Mirror the current coordinate system using the right-hand coordinate system and return the mirrored coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Csysr | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object | 
Returns 
Mirrored coordinate system object.
MirroredByPoint 
▸ MirroredByPoint(point): Mx3dGeCSYS
Mirror the coordinate system through a point and return the mirrored coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point | 
Returns 
Mirrored coordinate system object.
Rotate 
▸ Rotate(axis, ang): void
Rotate the coordinate system around the axis.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis | 
| 'ang' | 'number' | Rotation angle | 
Returns 
void
Rotated 
▸ Rotated(axis, ang): Mx3dGeCSYS
Rotate the coordinate system around the axis and return the rotated coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis | 
| 'ang' | 'number' | Rotation angle | 
Returns 
The rotated coordinate system object.
Scale 
▸ Scale(point, s): void
Scale the coordinate system proportionally.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point | [Mx3dGePoint] (Mx3dGePoint. md) | The base point for scaling | 
| S | number | scaling ratio | 
Returns 
void
Scaled 
▸ Scaled(point, s): Mx3dGeCSYS
Scale the coordinate system proportionally and return the scaled coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point | [Mx3dGePoint] (Mx3dGePoint. md) | The base point for scaling | 
| S | number | scaling ratio | 
Returns 
The scaled coordinate system object.
SetAxis 
▸ SetAxis(z_axis): void
Set the axis of the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The Z-axis of the coordinate system [Mx3dGeAxis] (Mx3dGeAxis. md) | 
Returns 
void
SetDirection 
▸ SetDirection(z_dir): void
Set the direction of the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The Z-axis direction of the coordinate system [Mx3dGeDir] (Mx3dGeDir. md) | 
Returns 
void
SetLocation 
▸ SetLocation(origin): void
Set the origin position of the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Origin | [Mx3dGePoint] (Mx3dGePoint. md) | The origin of the coordinate system | 
Returns 
void
▸ SetLocation(theX, theY, theZ): void
Set the origin position of the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The X coordinate of the origin | ||
| The Y coordinate of the origin | ||
| The Z coordinate of the origin | 
Returns 
void
SetXDirection 
▸ SetXDirection(x_dir): void
Set the X-axis direction of the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| X_dir | [Mx3dGeDir] (Mx3dGeDir. md) | X-axis direction | 
Returns 
void
SetYDirection 
▸ SetYDirection(y_dir): void
Set the Y-axis direction of the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Y_dir | [Mx3dGeDir] (Mx3dGeDir. md) | Y-axis direction | 
Returns 
void
Transform 
▸ Transform(t): void
Transform the coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object | 
Returns 
void
Transformed 
▸ Transformed(t): Mx3dGeCSYS
Transform the coordinate system and return the transformed coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object | 
Returns 
The transformed coordinate system object.
TranslateBy2Points 
▸ TranslateBy2Points(point1, point2): void
Translate the coordinate system through two points.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point | 
| Point2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint | 
Returns 
void
TranslateByVec 
▸ TranslateByVec(vec): void
Translate the coordinate system by vector.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Vec | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector | 
Returns 
void
TranslatedBy2Points 
▸ TranslatedBy2Points(point1, point2): Mx3dGeCSYS
Translate the coordinate system through two points and return the translated coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point | 
| Point2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint | 
Returns 
Translated coordinate system object.
TranslatedByVec 
▸ TranslatedByVec(vec): Mx3dGeCSYS
Translate the coordinate system by vector and return the translated coordinate system object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Vec | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector | 
Returns 
Translated coordinate system object.
XDirection 
▸ XDirection(): Mx3dGeDir
Obtain the X-axis direction of the coordinate system.
Returns 
X-axis direction.
XReverse 
▸ XReverse(): void
Reverse the X-axis direction.
Returns 
void
YDirection 
▸ YDirection(): Mx3dGeDir
Obtain the Y-axis direction of the coordinate system.
Returns 
Y-axis direction.
YReverse 
▸ YReverse(): void
Reverse the Y-axis direction.
Returns 
void
ZReverse 
▸ ZReverse(): void
Reverse the Z-axis direction.
Returns 
void