Skip to content

mxcad_3d API 文档 / Mx3dShapeShell

Class: Mx3dShapeShell ​

表示一个壳,由面构成,可以是不闭合的

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dShapeShell(p?)

Parameters ​

NameType
p?object

Overrides ​

Mx3dShapeObject.constructor

Methods ​

Centroid ​

▸ Centroid(theAspect): Mx3dGePoint

获取形状的质心。

Parameters ​

NameTypeDescription
theAspectMxQuantAspect需要根据形状类型进行设置的质心类型。

Returns ​

Mx3dGePoint

质心点。

Inherited from ​

Mx3dShapeObject.Centroid


Explore ​

▸ Explore(ToFind): Mx3dShapeObject[]

遍历形状对象。

Parameters ​

NameTypeDescription
ToFindMxShapeEnum要查找的形状类型。

Returns ​

Mx3dShapeObject[]

形状对象数组。

Inherited from ​

Mx3dShapeObject.Explore


MirrorByAxis ​

▸ MirrorByAxis(axis): void

根据一个轴镜像当前形状对象。

Parameters ​

NameTypeDescription
axisMx3dGeAxis镜像轴。

Returns ​

void

Inherited from ​

Mx3dShapeObject.MirrorByAxis


MirrorByCSYSR ​

▸ MirrorByCSYSR(csysr): void

根据一个坐标系镜像当前形状对象。

Parameters ​

NameTypeDescription
csysrMx3dGeCSYSR镜像坐标系。

Returns ​

void

Inherited from ​

Mx3dShapeObject.MirrorByCSYSR


MirrorByPoint ​

▸ MirrorByPoint(theP): void

根据一个点镜像当前形状对象。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像点。

Returns ​

void

Inherited from ​

Mx3dShapeObject.MirrorByPoint


MirroredByAxis ​

▸ MirroredByAxis(axis): Mx3dShapeObject

返回根据一个轴镜像后的形状对象。

Parameters ​

NameTypeDescription
axisMx3dGeAxis镜像轴。

Returns ​

Mx3dShapeObject

镜像后的形状对象。

Inherited from ​

Mx3dShapeObject.MirroredByAxis


MirroredByCSYSR ​

▸ MirroredByCSYSR(csysr): Mx3dShapeObject

返回根据一个坐标系镜像后的形状对象。

Parameters ​

NameTypeDescription
csysrMx3dGeCSYSR镜像坐标系。

Returns ​

Mx3dShapeObject

镜像后的形状对象。

Inherited from ​

Mx3dShapeObject.MirroredByCSYSR


MirroredByPoint ​

▸ MirroredByPoint(theP): Mx3dShapeObject

返回根据一个点镜像后的形状对象。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像点。

Returns ​

Mx3dShapeObject

镜像后的形状对象。

Inherited from ​

Mx3dShapeObject.MirroredByPoint


Orientation ​

▸ Orientation(): MxOrientation

获取形状的朝向

Returns ​

MxOrientation

朝向

Inherited from ​

Mx3dShapeObject.Orientation


Quantities ​

▸ Quantities(theAspect): number

获取形状的长度,面积,体积等。

Parameters ​

NameTypeDescription
theAspectMxQuantAspect设置获取长度,面积还是体积。

Returns ​

number

数量值。

Inherited from ​

Mx3dShapeObject.Quantities


Rotate ​

▸ Rotate(axis, ang): void

旋转当前形状对象。

Parameters ​

NameTypeDescription
axisMx3dGeAxis旋转轴。
angnumber旋转角度。

Returns ​

void

Inherited from ​

Mx3dShapeObject.Rotate


Rotated ​

▸ Rotated(axis, ang): Mx3dShapeObject

返回旋转后的形状对象。

Parameters ​

NameTypeDescription
axisMx3dGeAxis旋转轴。
angnumber旋转角度。

Returns ​

Mx3dShapeObject

旋转后的形状对象。

Inherited from ​

Mx3dShapeObject.Rotated


Scale ​

▸ Scale(point, s): void

缩放当前形状对象。

Parameters ​

NameTypeDescription
pointMx3dGePoint缩放中心点。
snumber缩放比例。

Returns ​

void

Inherited from ​

Mx3dShapeObject.Scale


Scaled ​

▸ Scaled(point, s): Mx3dShapeObject

返回缩放后的形状对象。

Parameters ​

NameTypeDescription
pointMx3dGePoint缩放中心点。
snumber缩放比例。

Returns ​

Mx3dShapeObject

缩放后的形状对象。

Inherited from ​

Mx3dShapeObject.Scaled


ShapeType ​

▸ ShapeType(): MxShapeEnum

获取形状类型。

Returns ​

MxShapeEnum

形状类型。

Inherited from ​

Mx3dShapeObject.ShapeType


Transform ​

▸ Transform(trsf): void

根据变换矩阵变换当前形状对象。

Parameters ​

NameTypeDescription
trsfMx3dGeTrsf变换矩阵。

Returns ​

void

Inherited from ​

Mx3dShapeObject.Transform


Transformed ​

▸ Transformed(trsf): Mx3dShapeObject

返回根据变换矩阵变换后的形状对象。

Parameters ​

NameTypeDescription
trsfMx3dGeTrsf变换矩阵。

Returns ​

Mx3dShapeObject

变换后的形状对象。

Inherited from ​

Mx3dShapeObject.Transformed


TranslateBy2Points ​

▸ TranslateBy2Points(point1, point2): void

根据两个点平移当前形状对象。

Parameters ​

NameTypeDescription
point1Mx3dGePoint起点。
point2Mx3dGePoint终点。

Returns ​

void

Inherited from ​

Mx3dShapeObject.TranslateBy2Points


TranslateByVec ​

▸ TranslateByVec(vec): void

根据向量平移当前形状对象。

Parameters ​

NameTypeDescription
vecMx3dGeVec平移向量。

Returns ​

void

Inherited from ​

Mx3dShapeObject.TranslateByVec

▸ TranslateByVec(theX, theY, theZ): void

根据坐标平移当前形状对象。

Parameters ​

NameTypeDescription
theXnumberX坐标。
theYnumberY坐标。
theZnumberZ坐标。

Returns ​

void

Inherited from ​

Mx3dShapeObject.TranslateByVec


TranslatedBy2Points ​

▸ TranslatedBy2Points(point1, point2): Mx3dShapeObject

返回根据两个点平移后的形状对象。

Parameters ​

NameTypeDescription
point1Mx3dGePoint起点。
point2Mx3dGePoint终点。

Returns ​

Mx3dShapeObject

平移后的形状对象。

Inherited from ​

Mx3dShapeObject.TranslatedBy2Points


TranslatedByVec ​

▸ TranslatedByVec(vec): Mx3dShapeObject

返回根据向量平移后的形状对象。

Parameters ​

NameTypeDescription
vecMx3dGeVec平移向量。

Returns ​

Mx3dShapeObject

平移后的形状对象。

Inherited from ​

Mx3dShapeObject.TranslatedByVec

▸ TranslatedByVec(theX, theY, theZ): Mx3dShapeObject

返回根据坐标平移后的形状对象。

Parameters ​

NameTypeDescription
theXnumberX坐标。
theYnumberY坐标。
theZnumberZ坐标。

Returns ​

Mx3dShapeObject

平移后的形状对象。

Inherited from ​

Mx3dShapeObject.TranslatedByVec


clone ​

▸ clone(): Mx3dShapeObject

克隆当前形状对象。

Returns ​

Mx3dShapeObject

克隆后的形状对象。

Inherited from ​

Mx3dShapeObject.clone


common ​

▸ common(theOther): Mx3dShapeObject

返回当前形状对象与另一个形状对象的公共部分。

Parameters ​

NameTypeDescription
theOtherMx3dShapeObject另一个形状对象。

Returns ​

Mx3dShapeObject

公共部分的形状对象。

Inherited from ​

Mx3dShapeObject.common


cut ​

▸ cut(theOther): Mx3dShapeObject

从当前形状对象中减去另一个形状对象。

Parameters ​

NameTypeDescription
theOtherMx3dShapeObject另一个形状对象。

Returns ​

Mx3dShapeObject

削减后的形状对象。

Inherited from ​

Mx3dShapeObject.cut


fuse ​

▸ fuse(theOther): Mx3dShapeObject

与另一个形状对象融合。

Parameters ​

NameTypeDescription
theOtherMx3dShapeObject另一个形状对象。

Returns ​

Mx3dShapeObject

融合后的形状对象。

Inherited from ​

Mx3dShapeObject.fuse


getBndBox ​

▸ getBndBox(): Mx3dGeBndBox

获取形状对象的边界框。

Returns ​

Mx3dGeBndBox

边界框对象。

Inherited from ​

Mx3dShapeObject.getBndBox


move ​

▸ move(theLocation): void

移动形状对象到指定位置。

Parameters ​

NameTypeDescription
theLocationMx3dGeLocation移动的位置。

Returns ​

void

Inherited from ​

Mx3dShapeObject.move


moved ​

▸ moved(theLocation): Mx3dShapeObject

返回移动后的形状对象。

Parameters ​

NameTypeDescription
theLocationMx3dGeLocation移动的位置。

Returns ​

Mx3dShapeObject

移动后的形状对象。

Inherited from ​

Mx3dShapeObject.moved


reverse ​

▸ reverse(): void

形状反向

Returns ​

void

Inherited from ​

Mx3dShapeObject.reverse


reversed ​

▸ reversed(): Mx3dShapeObject

获取反向后的新形状

Returns ​

Mx3dShapeObject

反向后的新形状

Inherited from ​

Mx3dShapeObject.reversed


section ​

▸ section(theOther): Mx3dShapeObject

返回当前形状对象与另一个形状对象的相交轮廓。

Parameters ​

NameTypeDescription
theOtherMx3dShapeObject另一个形状对象。

Returns ​

Mx3dShapeObject

相交轮廓的形状对象。

Inherited from ​

Mx3dShapeObject.section


spliter ​

▸ spliter(theTools): Mx3dShapeObject[]

使用工具形状对象分割当前形状对象。

Parameters ​

NameTypeDescription
theToolsMx3dShapeObject[]工具形状对象数组。

Returns ​

Mx3dShapeObject[]

分割后的形状对象数组。

Inherited from ​

Mx3dShapeObject.spliter