Skip to content

mxcad_3d API 文档 / Mx3dGePlane

Class: Mx3dGePlane ​

表示3D几何中的平面。 平面对象可通过坐标系、点、方向向量等多种方式定义,并提供了多种几何变换和操作方法。

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dGePlane()

默认构造函数,创建一个平面。

Overrides ​

Mx3dGeObject.constructor

• new Mx3dGePlane(theA3)

构造函数,使用指定坐标系初始化平面。

Parameters ​

NameTypeDescription
theA3Mx3dGeCSYS用于初始化平面的坐标系(CSYS)对象。

Overrides ​

Mx3dGeObject.constructor

• new Mx3dGePlane(theP, theV)

构造函数,使用指定点和向量初始化平面。

Parameters ​

NameTypeDescription
thePMx3dGePoint平面上的点。
theVMx3dGeDir与平面垂直的向量,用于定义平面的方向。

Overrides ​

Mx3dGeObject.constructor

• new Mx3dGePlane(theA, theB, theC, theD)

构造函数,使用平面方程的系数初始化平面。

Parameters ​

NameTypeDescription
theAnumber平面方程中的系数A。
theBnumber平面方程中的系数B。
theCnumber平面方程中的系数C。
theDnumber平面方程中的系数D。

Overrides ​

Mx3dGeObject.constructor

Methods ​

Axis ​

▸ Axis(): Mx3dGeAxis

获取平面的法向轴向。

Returns ​

Mx3dGeAxis

平面的法向轴向对象。


Contains ​

▸ Contains(theP, theLinearTolerance): boolean

检查点是否在平面上。

Parameters ​

NameTypeDescription
thePMx3dGePoint需要检查的点。
theLinearTolerancenumber线性容差,用于判定点是否在平面上。

Returns ​

boolean

如果点在平面上,则返回true;否则返回false。


Direct ​

▸ Direct(): boolean

检查平面是否是右手坐标系。

Returns ​

boolean

如果平面是右手坐标系,则返回true;否则返回false。


DistanceToPlane ​

▸ DistanceToPlane(theOther): number

计算两个平面之间的距离。

Parameters ​

NameTypeDescription
theOtherMx3dGePlane另一个平面对象。

Returns ​

number

两个平面之间的距离值。


DistanceToPoint ​

▸ DistanceToPoint(theP): number

计算点到平面的距离。

Parameters ​

NameTypeDescription
thePMx3dGePoint需要计算距离的点。

Returns ​

number

点到平面的距离值。


Location ​

▸ Location(): Mx3dGePoint

获取平面上的位置点。

Returns ​

Mx3dGePoint

平面上的点对象。


MirrorByAxis ​

▸ MirrorByAxis(theA1): void

将平面通过指定轴进行镜像。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis镜像轴向。

Returns ​

void


MirrorByCSYSR ​

▸ MirrorByCSYSR(theA2): void

将平面通过指定坐标系进行镜像。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR镜像坐标系。

Returns ​

void


MirrorByPoint ​

▸ MirrorByPoint(theP): void

将平面通过指定点进行镜像。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像点。

Returns ​

void


MirroredByAxis ​

▸ MirroredByAxis(theA1): Mx3dGePlane

返回镜像平面对象(通过指定轴)。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis镜像轴向。

Returns ​

Mx3dGePlane

镜像后的平面对象。


MirroredByCSYSR ​

▸ MirroredByCSYSR(theA2): Mx3dGePlane

返回镜像平面对象(通过指定坐标系)。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR镜像坐标系。

Returns ​

Mx3dGePlane

镜像后的平面对象。


MirroredByPoint ​

▸ MirroredByPoint(theP): Mx3dGePlane

返回镜像平面对象(通过指定点)。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像点。

Returns ​

Mx3dGePlane

镜像后的平面对象。


Position ​

▸ Position(): Mx3dGeCSYS

获取平面的坐标系位置。

Returns ​

Mx3dGeCSYS

平面的坐标系对象。


Rotate ​

▸ Rotate(theA1, theAng): void

将平面绕指定轴旋转。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis旋转轴向。
theAngnumber旋转角度。

Returns ​

void


Rotated ​

▸ Rotated(theA1, theAng): Mx3dGePlane

返回旋转后的平面对象。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis旋转轴向。
theAngnumber旋转角度。

Returns ​

Mx3dGePlane

旋转后的平面对象。


Scale ​

▸ Scale(theP, theS): void

将平面缩放到指定点和比例。

Parameters ​

NameTypeDescription
thePMx3dGePoint缩放点。
theSnumber缩放比例。

Returns ​

void


Scaled ​

▸ Scaled(theP, theS): Mx3dGePlane

返回缩放后的平面对象。

Parameters ​

NameTypeDescription
thePMx3dGePoint缩放点。
theSnumber缩放比例。

Returns ​

Mx3dGePlane

缩放后的平面对象。


SetAxis ​

▸ SetAxis(theA1): void

设置平面的轴向。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis平面轴向对象。

Returns ​

void


SetLocation ​

▸ SetLocation(theLoc): void

设置平面的位置。

Parameters ​

NameTypeDescription
theLocMx3dGePoint平面上的一个点,用于定义平面的具体位置。

Returns ​

void


SetPosition ​

▸ SetPosition(theA3): void

设置平面的位置和方向。

Parameters ​

NameTypeDescription
theA3Mx3dGeCSYS用于设置平面位置和方向的坐标系。

Returns ​

void


Shape ​

▸ Shape(): Mx3dShapeObject

获取平面的拓扑形状。

Returns ​

Mx3dShapeObject

平面形状对象。

▸ Shape(UMin, UMax, VMin, VMax): Mx3dShapeObject

获取平面在指定范围内的拓扑形状。

Parameters ​

NameTypeDescription
UMinnumberU方向的最小值。
UMaxnumberU方向的最大值。
VMinnumberV方向的最小值。
VMaxnumberV方向的最大值。

Returns ​

Mx3dShapeObject

平面形状对象。


SquareDistanceToPlane ​

▸ SquareDistanceToPlane(theOther): number

计算两个平面之间的平方距离。

Parameters ​

NameTypeDescription
theOtherMx3dGePlane另一个平面对象。

Returns ​

number

两个平面之间的平方距离值。


SquareDistanceToPoint ​

▸ SquareDistanceToPoint(theP): number

计算点到平面的平方距离。

Parameters ​

NameTypeDescription
thePMx3dGePoint需要计算平方距离的点。

Returns ​

number

点到平面的平方距离值。


Transform ​

▸ Transform(theT): void

对平面应用变换。

Parameters ​

NameTypeDescription
theTMx3dGeTrsf变换矩阵。

Returns ​

void


Transformed ​

▸ Transformed(theT): Mx3dGePlane

返回变换后的平面对象。

Parameters ​

NameTypeDescription
theTMx3dGeTrsf变换矩阵。

Returns ​

Mx3dGePlane

变换后的平面对象。


TranslateBy2Points ​

▸ TranslateBy2Points(theP1, theP2): void

将平面通过两点平移。

Parameters ​

NameTypeDescription
theP1Mx3dGePoint第一个点。
theP2Mx3dGePoint第二个点。

Returns ​

void


TranslateByVec ​

▸ TranslateByVec(theV): void

将平面沿指定向量平移。

Parameters ​

NameTypeDescription
theVMx3dGeVec平移向量。

Returns ​

void


TranslatedBy2Points ​

▸ TranslatedBy2Points(theP1, theP2): Mx3dGePlane

返回通过两点平移后的平面对象。

Parameters ​

NameTypeDescription
theP1Mx3dGePoint第一个点。
theP2Mx3dGePoint第二个点。

Returns ​

Mx3dGePlane

平移后的平面对象。


TranslatedByVec ​

▸ TranslatedByVec(theV): Mx3dGePlane

返回平移后的平面对象。

Parameters ​

NameTypeDescription
theVMx3dGeVec平移向量。

Returns ​

Mx3dGePlane

平移后的平面对象。


UReverse ​

▸ UReverse(): void

反转U方向。

Returns ​

void


VReverse ​

▸ VReverse(): void

反转V方向。

Returns ​

void


XAxis ​

▸ XAxis(): Mx3dGeAxis

获取平面X轴的方向。

Returns ​

Mx3dGeAxis

平面X轴的轴向对象。


YAxis ​

▸ YAxis(): Mx3dGeAxis

获取平面Y轴的方向。

Returns ​

Mx3dGeAxis

平面Y轴的轴向对象。