mxcad_3d API 文档 / Mx3dShapeEdge
Class: Mx3dShapeEdge 
表示一个边形状
Hierarchy 
- ↳ - Mx3dShapeEdge
Table of contents 
Constructors 
Methods 
- Centroid
- Explore
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Orientation
- Quantities
- Rotate
- Rotated
- Scale
- Scaled
- ShapeType
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- clone
- common
- cut
- fuse
- getBndBox
- move
- moved
- reverse
- reversed
- section
- spliter
Constructors 
constructor 
• new Mx3dShapeEdge()
Overrides 
• new Mx3dShapeEdge(pt1, pt2)
创建一个边形状,传入起点和终点
Parameters 
| Name | Type | Description | 
|---|---|---|
| pt1 | Mx3dGePoint | 起点 | 
| pt2 | Mx3dGePoint | 终点 | 
Overrides 
Mx3dShapeObject.constructor
Methods 
Centroid 
▸ Centroid(theAspect): Mx3dGePoint
获取形状的质心。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theAspect | MxQuantAspect | 需要根据形状类型进行设置的质心类型。 | 
Returns 
质心点。
Inherited from 
Explore 
▸ Explore(ToFind): Mx3dShapeObject[]
遍历形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| ToFind | MxShapeEnum | 要查找的形状类型。 | 
Returns 
形状对象数组。
Inherited from 
MirrorByAxis 
▸ MirrorByAxis(axis): void
根据一个轴镜像当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 镜像轴。 | 
Returns 
void
Inherited from 
MirrorByCSYSR 
▸ MirrorByCSYSR(csysr): void
根据一个坐标系镜像当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| csysr | Mx3dGeCSYSR | 镜像坐标系。 | 
Returns 
void
Inherited from 
MirrorByPoint 
▸ MirrorByPoint(theP): void
根据一个点镜像当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 镜像点。 | 
Returns 
void
Inherited from 
MirroredByAxis 
▸ MirroredByAxis(axis): Mx3dShapeObject
返回根据一个轴镜像后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 镜像轴。 | 
Returns 
镜像后的形状对象。
Inherited from 
Mx3dShapeObject.MirroredByAxis
MirroredByCSYSR 
▸ MirroredByCSYSR(csysr): Mx3dShapeObject
返回根据一个坐标系镜像后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| csysr | Mx3dGeCSYSR | 镜像坐标系。 | 
Returns 
镜像后的形状对象。
Inherited from 
Mx3dShapeObject.MirroredByCSYSR
MirroredByPoint 
▸ MirroredByPoint(theP): Mx3dShapeObject
返回根据一个点镜像后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 镜像点。 | 
Returns 
镜像后的形状对象。
Inherited from 
Mx3dShapeObject.MirroredByPoint
Orientation 
▸ Orientation(): MxOrientation
获取形状的朝向
Returns 
朝向
Inherited from 
Quantities 
▸ Quantities(theAspect): number
获取形状的长度,面积,体积等。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theAspect | MxQuantAspect | 设置获取长度,面积还是体积。 | 
Returns 
number
数量值。
Inherited from 
Rotate 
▸ Rotate(axis, ang): void
旋转当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 旋转轴。 | 
| ang | number | 旋转角度。 | 
Returns 
void
Inherited from 
Rotated 
▸ Rotated(axis, ang): Mx3dShapeObject
返回旋转后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| axis | Mx3dGeAxis | 旋转轴。 | 
| ang | number | 旋转角度。 | 
Returns 
旋转后的形状对象。
Inherited from 
Scale 
▸ Scale(point, s): void
缩放当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point | Mx3dGePoint | 缩放中心点。 | 
| s | number | 缩放比例。 | 
Returns 
void
Inherited from 
Scaled 
▸ Scaled(point, s): Mx3dShapeObject
返回缩放后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point | Mx3dGePoint | 缩放中心点。 | 
| s | number | 缩放比例。 | 
Returns 
缩放后的形状对象。
Inherited from 
ShapeType 
▸ ShapeType(): MxShapeEnum
获取形状类型。
Returns 
形状类型。
Inherited from 
Transform 
▸ Transform(trsf): void
根据变换矩阵变换当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| trsf | Mx3dGeTrsf | 变换矩阵。 | 
Returns 
void
Inherited from 
Transformed 
▸ Transformed(trsf): Mx3dShapeObject
返回根据变换矩阵变换后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| trsf | Mx3dGeTrsf | 变换矩阵。 | 
Returns 
变换后的形状对象。
Inherited from 
TranslateBy2Points 
▸ TranslateBy2Points(point1, point2): void
根据两个点平移当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point1 | Mx3dGePoint | 起点。 | 
| point2 | Mx3dGePoint | 终点。 | 
Returns 
void
Inherited from 
Mx3dShapeObject.TranslateBy2Points
TranslateByVec 
▸ TranslateByVec(vec): void
根据向量平移当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| vec | Mx3dGeVec | 平移向量。 | 
Returns 
void
Inherited from 
Mx3dShapeObject.TranslateByVec
▸ TranslateByVec(theX, theY, theZ): void
根据坐标平移当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theX | number | X坐标。 | 
| theY | number | Y坐标。 | 
| theZ | number | Z坐标。 | 
Returns 
void
Inherited from 
Mx3dShapeObject.TranslateByVec
TranslatedBy2Points 
▸ TranslatedBy2Points(point1, point2): Mx3dShapeObject
返回根据两个点平移后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| point1 | Mx3dGePoint | 起点。 | 
| point2 | Mx3dGePoint | 终点。 | 
Returns 
平移后的形状对象。
Inherited from 
Mx3dShapeObject.TranslatedBy2Points
TranslatedByVec 
▸ TranslatedByVec(vec): Mx3dShapeObject
返回根据向量平移后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| vec | Mx3dGeVec | 平移向量。 | 
Returns 
平移后的形状对象。
Inherited from 
Mx3dShapeObject.TranslatedByVec
▸ TranslatedByVec(theX, theY, theZ): Mx3dShapeObject
返回根据坐标平移后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theX | number | X坐标。 | 
| theY | number | Y坐标。 | 
| theZ | number | Z坐标。 | 
Returns 
平移后的形状对象。
Inherited from 
Mx3dShapeObject.TranslatedByVec
clone 
▸ clone(): Mx3dShapeObject
克隆当前形状对象。
Returns 
克隆后的形状对象。
Inherited from 
common 
▸ common(theOther): Mx3dShapeObject
返回当前形状对象与另一个形状对象的公共部分。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOther | Mx3dShapeObject | 另一个形状对象。 | 
Returns 
公共部分的形状对象。
Inherited from 
cut 
▸ cut(theOther): Mx3dShapeObject
从当前形状对象中减去另一个形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOther | Mx3dShapeObject | 另一个形状对象。 | 
Returns 
削减后的形状对象。
Inherited from 
fuse 
▸ fuse(theOther): Mx3dShapeObject
与另一个形状对象融合。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOther | Mx3dShapeObject | 另一个形状对象。 | 
Returns 
融合后的形状对象。
Inherited from 
getBndBox 
▸ getBndBox(): Mx3dGeBndBox
获取形状对象的边界框。
Returns 
边界框对象。
Inherited from 
move 
▸ move(theLocation): void
移动形状对象到指定位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theLocation | Mx3dGeLocation | 移动的位置。 | 
Returns 
void
Inherited from 
moved 
▸ moved(theLocation): Mx3dShapeObject
返回移动后的形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theLocation | Mx3dGeLocation | 移动的位置。 | 
Returns 
移动后的形状对象。
Inherited from 
reverse 
▸ reverse(): void
形状反向
Returns 
void
Inherited from 
reversed 
▸ reversed(): Mx3dShapeObject
获取反向后的新形状
Returns 
反向后的新形状
Inherited from 
section 
▸ section(theOther): Mx3dShapeObject
返回当前形状对象与另一个形状对象的相交轮廓。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOther | Mx3dShapeObject | 另一个形状对象。 | 
Returns 
相交轮廓的形状对象。
Inherited from 
spliter 
▸ spliter(theTools): Mx3dShapeObject[]
使用工具形状对象分割当前形状对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theTools | Mx3dShapeObject[] | 工具形状对象数组。 | 
Returns 
分割后的形状对象数组。