mxcad_3d API 文档 / Mx3dGeCylinder
Class: Mx3dGeCylinder 
表示圆柱体的类。
Hierarchy 
- ↳ - Mx3dGeCylinder
Table of contents 
Constructors 
Methods 
- Axis
- Direct
- Location
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Position
- Radius
- Rotate
- Rotated
- Scale
- Scaled
- SetAxis
- SetLocation
- SetPosition
- SetRadius
- Shape
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- UReverse
- VReverse
- XAxis
- YAxis
Constructors 
constructor 
• new Mx3dGeCylinder()
创建一个默认的圆柱体对象。
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeCylinder(theA3, theRadius)
使用坐标系和半径创建一个圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA3 | Mx3dGeCSYS | 坐标系。 | 
| theRadius | number | 圆柱体的半径。 | 
Overrides 
Mx3dGeObject.constructor
Methods 
Axis 
▸ Axis(): Mx3dGeAxis
获取圆柱体的轴。
Returns 
圆柱体的轴。
Direct 
▸ Direct(): boolean
检查圆柱体的方向是否为正向。
Returns 
boolean
是否为正向。
Location 
▸ Location(): Mx3dGePoint
获取圆柱体的原点位置。
Returns 
原点位置。
MirrorByAxis 
▸ MirrorByAxis(theA1): void
通过一个轴对圆柱体进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 镜像轴。 | 
Returns 
void
MirrorByCSYSR 
▸ MirrorByCSYSR(theA2): void
通过右手坐标系对圆柱体进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA2 | Mx3dGeCSYSR | 右手坐标系。 | 
Returns 
void
MirrorByPoint 
▸ MirrorByPoint(theP): void
通过一个点对圆柱体进行镜像。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 镜像点。 | 
Returns 
void
MirroredByAxis 
▸ MirroredByAxis(theA1): Mx3dGeCylinder
通过一个轴对圆柱体进行镜像,并返回镜像后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 镜像轴。 | 
Returns 
镜像后的圆柱体对象。
MirroredByCSYSR 
▸ MirroredByCSYSR(theA2): Mx3dGeCylinder
通过右手坐标系对圆柱体进行镜像,并返回镜像后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA2 | Mx3dGeCSYSR | 右手坐标系。 | 
Returns 
镜像后的圆柱体对象。
MirroredByPoint 
▸ MirroredByPoint(theP): Mx3dGeCylinder
通过一个点对圆柱体进行镜像,并返回镜像后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 镜像点。 | 
Returns 
镜像后的圆柱体对象。
Position 
▸ Position(): Mx3dGeCSYS
获取圆柱体的位置。
Returns 
圆柱体的位置。
Radius 
▸ Radius(): number
获取圆柱体的半径。
Returns 
number
圆柱体的半径。
Rotate 
▸ Rotate(theA1, theAng): void
绕轴旋转圆柱体。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 旋转轴。 | 
| theAng | number | 旋转角度。 | 
Returns 
void
Rotated 
▸ Rotated(theA1, theAng): Mx3dGeCylinder
绕轴旋转圆柱体,并返回旋转后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 旋转轴。 | 
| theAng | number | 旋转角度。 | 
Returns 
旋转后的圆柱体对象。
Scale 
▸ Scale(theP, theS): void
对圆柱体进行缩放。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 缩放中心点。 | 
| theS | number | 缩放比例。 | 
Returns 
void
Scaled 
▸ Scaled(theP, theS): Mx3dGeCylinder
对圆柱体进行缩放,并返回缩放后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 缩放中心点。 | 
| theS | number | 缩放比例。 | 
Returns 
缩放后的圆柱体对象。
SetAxis 
▸ SetAxis(theA1): void
设置圆柱体的轴。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 圆柱体的轴。 | 
Returns 
void
SetLocation 
▸ SetLocation(theLoc): void
设置圆柱体的原点位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theLoc | Mx3dGePoint | 原点位置。 | 
Returns 
void
SetPosition 
▸ SetPosition(theA3): void
设置圆柱体的位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA3 | Mx3dGeCSYS | 坐标系。 | 
Returns 
void
SetRadius 
▸ SetRadius(theR): void
设置圆柱体的半径。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theR | number | 圆柱体的半径。 | 
Returns 
void
Shape 
▸ Shape(H, Angle?): Mx3dShapeObject
创建一个 Mx3dShapeObject 对象,表示圆柱体的形状。
Parameters 
| Name | Type | Description | 
|---|---|---|
| H | number | 圆柱体的高度。 | 
| Angle? | number | 可选参数,表示圆柱体的角度。 | 
Returns 
返回一个新的 Mx3dShapeObject 对象,表示圆柱体的形状。
Transform 
▸ Transform(theT): void
变换圆柱体。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | Mx3dGeTrsf | 变换矩阵。 | 
Returns 
void
Transformed 
▸ Transformed(theT): Mx3dGeCylinder
变换圆柱体,并返回变换后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | Mx3dGeTrsf | 变换矩阵。 | 
Returns 
变换后的圆柱体对象。
TranslateBy2Points 
▸ TranslateBy2Points(theP1, theP2): void
将圆柱体的位置沿着两个点之间的直线进行平移。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP1 | Mx3dGePoint | 第一个点,用于确定平移的起点。 | 
| theP2 | Mx3dGePoint | 第二个点,用于确定平移的终点。 | 
Returns 
void
TranslateByVec 
▸ TranslateByVec(theV): void
通过向量平移圆柱体。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theV | Mx3dGeVec | 平移向量。 | 
Returns 
void
TranslatedBy2Points 
▸ TranslatedBy2Points(theP1, theP2): Mx3dGeCylinder
创建一个新的圆柱体对象,位置沿着两个点之间的直线进行平移。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP1 | Mx3dGePoint | 第一个点,用于确定平移的起点。 | 
| theP2 | Mx3dGePoint | 第二个点,用于确定平移的终点。 | 
Returns 
返回一个新的 Mx3dGeCylinder 对象,平移后的圆柱体。
TranslatedByVec 
▸ TranslatedByVec(theV): Mx3dGeCylinder
通过向量平移圆柱体,并返回平移后的圆柱体对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theV | Mx3dGeVec | 平移向量。 | 
Returns 
平移后的圆柱体对象。
UReverse 
▸ UReverse(): void
反转圆柱体的 U 参数方向。
Returns 
void
VReverse 
▸ VReverse(): void
反转圆柱体的 V 参数方向。
Returns 
void
XAxis 
▸ XAxis(): Mx3dGeAxis
获取圆柱体的 X 轴。
Returns 
X 轴。
YAxis 
▸ YAxis(): Mx3dGeAxis
获取圆柱体的 Y 轴。
Returns 
Y 轴。