Skip to content

mxcad_3d API 文档 / Mx3dGeCylinder

Class: Mx3dGeCylinder ​

表示圆柱体的类。

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dGeCylinder()

创建一个默认的圆柱体对象。

Overrides ​

Mx3dGeObject.constructor

• new Mx3dGeCylinder(theA3, theRadius)

使用坐标系和半径创建一个圆柱体对象。

Parameters ​

NameTypeDescription
theA3Mx3dGeCSYS坐标系。
theRadiusnumber圆柱体的半径。

Overrides ​

Mx3dGeObject.constructor

Methods ​

Axis ​

▸ Axis(): Mx3dGeAxis

获取圆柱体的轴。

Returns ​

Mx3dGeAxis

圆柱体的轴。


Direct ​

▸ Direct(): boolean

检查圆柱体的方向是否为正向。

Returns ​

boolean

是否为正向。


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): Mx3dGeCylinder

通过一个轴对圆柱体进行镜像,并返回镜像后的圆柱体对象。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis镜像轴。

Returns ​

Mx3dGeCylinder

镜像后的圆柱体对象。


MirroredByCSYSR ​

▸ MirroredByCSYSR(theA2): Mx3dGeCylinder

通过右手坐标系对圆柱体进行镜像,并返回镜像后的圆柱体对象。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR右手坐标系。

Returns ​

Mx3dGeCylinder

镜像后的圆柱体对象。


MirroredByPoint ​

▸ MirroredByPoint(theP): Mx3dGeCylinder

通过一个点对圆柱体进行镜像,并返回镜像后的圆柱体对象。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像点。

Returns ​

Mx3dGeCylinder

镜像后的圆柱体对象。


Position ​

▸ Position(): Mx3dGeCSYS

获取圆柱体的位置。

Returns ​

Mx3dGeCSYS

圆柱体的位置。


Radius ​

▸ Radius(): number

获取圆柱体的半径。

Returns ​

number

圆柱体的半径。


Rotate ​

▸ Rotate(theA1, theAng): void

绕轴旋转圆柱体。

Parameters ​

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

Returns ​

void


Rotated ​

▸ Rotated(theA1, theAng): Mx3dGeCylinder

绕轴旋转圆柱体,并返回旋转后的圆柱体对象。

Parameters ​

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

Returns ​

Mx3dGeCylinder

旋转后的圆柱体对象。


Scale ​

▸ Scale(theP, theS): void

对圆柱体进行缩放。

Parameters ​

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

Returns ​

void


Scaled ​

▸ Scaled(theP, theS): Mx3dGeCylinder

对圆柱体进行缩放,并返回缩放后的圆柱体对象。

Parameters ​

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

Returns ​

Mx3dGeCylinder

缩放后的圆柱体对象。


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


SetRadius ​

▸ SetRadius(theR): void

设置圆柱体的半径。

Parameters ​

NameTypeDescription
theRnumber圆柱体的半径。

Returns ​

void


Shape ​

▸ Shape(H, Angle?): Mx3dShapeObject

创建一个 Mx3dShapeObject 对象,表示圆柱体的形状。

Parameters ​

NameTypeDescription
Hnumber圆柱体的高度。
Angle?number可选参数,表示圆柱体的角度。

Returns ​

Mx3dShapeObject

返回一个新的 Mx3dShapeObject 对象,表示圆柱体的形状。


Transform ​

▸ Transform(theT): void

变换圆柱体。

Parameters ​

NameTypeDescription
theTMx3dGeTrsf变换矩阵。

Returns ​

void


Transformed ​

▸ Transformed(theT): Mx3dGeCylinder

变换圆柱体,并返回变换后的圆柱体对象。

Parameters ​

NameTypeDescription
theTMx3dGeTrsf变换矩阵。

Returns ​

Mx3dGeCylinder

变换后的圆柱体对象。


TranslateBy2Points ​

▸ TranslateBy2Points(theP1, theP2): void

将圆柱体的位置沿着两个点之间的直线进行平移。

Parameters ​

NameTypeDescription
theP1Mx3dGePoint第一个点,用于确定平移的起点。
theP2Mx3dGePoint第二个点,用于确定平移的终点。

Returns ​

void


TranslateByVec ​

▸ TranslateByVec(theV): void

通过向量平移圆柱体。

Parameters ​

NameTypeDescription
theVMx3dGeVec平移向量。

Returns ​

void


TranslatedBy2Points ​

▸ TranslatedBy2Points(theP1, theP2): Mx3dGeCylinder

创建一个新的圆柱体对象,位置沿着两个点之间的直线进行平移。

Parameters ​

NameTypeDescription
theP1Mx3dGePoint第一个点,用于确定平移的起点。
theP2Mx3dGePoint第二个点,用于确定平移的终点。

Returns ​

Mx3dGeCylinder

返回一个新的 Mx3dGeCylinder 对象,平移后的圆柱体。


TranslatedByVec ​

▸ TranslatedByVec(theV): Mx3dGeCylinder

通过向量平移圆柱体,并返回平移后的圆柱体对象。

Parameters ​

NameTypeDescription
theVMx3dGeVec平移向量。

Returns ​

Mx3dGeCylinder

平移后的圆柱体对象。


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 轴。