Skip to content

[mxcad_3d API Document](../README. md)/Mx3dGeCSYS

Class: Mx3dGeCSYS ​

A class that represents a universal coordinate system.

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

Mx3dGeAxis

The axis of the coordinate system.


CSYSR ​

▸ CSYSR(): Mx3dGeCSYSR

Obtain the right-hand coordinate system.

Returns ​

Mx3dGeCSYSR

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 ​

Mx3dGeDir

The direction of the coordinate system.


IsCoplanarWithAxis ​

▸ IsCoplanarWithAxis(axis, linearTolerance, angularTolerance): boolean

Determine whether the coordinate system is coplanar with an axis.

Parameters ​

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object
Linear ToleranceNumberLinear Tolerance
Angular ToleranceNumberAngular Tolerance

Returns ​

boolean

Is it coplanar.


IsCoplanarWithCSYS ​

▸ IsCoplanarWithCSYS(other, linearTolerance, angularTolerance): boolean

Determine whether the coordinate system is coplanar with another coordinate system.

Parameters ​

NameTypeDescription
Other[Mx3dGeCSYS] (Mx3dGeCSYS. md)Another coordinate system
Linear ToleranceNumberLinear Tolerance
Angular ToleranceNumberAngular Tolerance

Returns ​

boolean

Is it coplanar.


Location ​

▸ Location(): Mx3dGePoint

Obtain the origin position of the coordinate system.

Returns ​

Mx3dGePoint

The origin position of the coordinate system.


MirrorByAxis ​

▸ MirrorByAxis(axis): void

Mirror the coordinate system through an axis.

Parameters ​

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns ​

void


MirrorByCSYSR ​

▸ MirrorByCSYSR(csysr): void

Mirror the current coordinate system using the right-handed coordinate system.

Parameters ​

NameTypeDescription
Csysr[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Right hand coordinate system object

Returns ​

void


MirrorByPoint ​

▸ MirrorByPoint(point): void

Mirror the coordinate system through a point.

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns ​

Mx3dGeCSYS

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 ​

NameTypeDescription
Csysr[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Right hand coordinate system object

Returns ​

Mx3dGeCSYS

Mirrored coordinate system object.


MirroredByPoint ​

▸ MirroredByPoint(point): Mx3dGeCSYS

Mirror the coordinate system through a point and return the mirrored coordinate system object.

Parameters ​

NameTypeDescription
Point[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns ​

Mx3dGeCSYS

Mirrored coordinate system object.


Rotate ​

▸ Rotate(axis, ang): void

Rotate the coordinate system around the axis.

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
'ang''number'Rotation angle

Returns ​

Mx3dGeCSYS

The rotated coordinate system object.


Scale ​

▸ Scale(point, s): void

Scale the coordinate system proportionally.

Parameters ​

NameTypeDescription
Point[Mx3dGePoint] (Mx3dGePoint. md)The base point for scaling
Snumberscaling ratio

Returns ​

void


Scaled ​

▸ Scaled(point, s): Mx3dGeCSYS

Scale the coordinate system proportionally and return the scaled coordinate system object.

Parameters ​

NameTypeDescription
Point[Mx3dGePoint] (Mx3dGePoint. md)The base point for scaling
Snumberscaling ratio

Returns ​

Mx3dGeCSYS

The scaled coordinate system object.


SetAxis ​

▸ SetAxis(z_axis): void

Set the axis of the coordinate system.

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
Y_dir[Mx3dGeDir] (Mx3dGeDir. md)Y-axis direction

Returns ​

void


Transform ​

▸ Transform(t): void

Transform the coordinate system.

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
T[Mx3dGetStrf] (Mx3dGetStrf. md)Transform the object

Returns ​

Mx3dGeCSYS

The transformed coordinate system object.


TranslateBy2Points ​

▸ TranslateBy2Points(point1, point2): void

Translate the coordinate system through two points.

Parameters ​

NameTypeDescription
Point1[Mx3dGePoint] (Mx3dGePoint. md)Starting point
Point2[Mx3dGePoint] (Mx3dGePoint. md)Endpoint

Returns ​

void


TranslateByVec ​

▸ TranslateByVec(vec): void

Translate the coordinate system by vector.

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
Point1[Mx3dGePoint] (Mx3dGePoint. md)Starting point
Point2[Mx3dGePoint] (Mx3dGePoint. md)Endpoint

Returns ​

Mx3dGeCSYS

Translated coordinate system object.


TranslatedByVec ​

▸ TranslatedByVec(vec): Mx3dGeCSYS

Translate the coordinate system by vector and return the translated coordinate system object.

Parameters ​

NameTypeDescription
Vec[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns ​

Mx3dGeCSYS

Translated coordinate system object.


XDirection ​

▸ XDirection(): Mx3dGeDir

Obtain the X-axis direction of the coordinate system.

Returns ​

Mx3dGeDir

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 ​

Mx3dGeDir

Y-axis direction.


YReverse ​

▸ YReverse(): void

Reverse the Y-axis direction.

Returns ​

void


ZReverse ​

▸ ZReverse(): void

Reverse the Z-axis direction.

Returns ​

void