Skip to content

mxcad_3d API 文档 / Mx3dMkPolygon

Class: Mx3dMkPolygon ​

表示建模多段线的类,继承自 Mx3dMkObject。

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dMkPolygon()

构造函数,初始化多段线对象。

Overrides ​

Mx3dMkObject.constructor

Methods ​

Add ​

▸ Add(P): void

添加一个顶点到多段线。

Parameters ​

NameTypeDescription
PMx3dGePoint要添加的点对象。

Returns ​

void


Added ​

▸ Added(): boolean

检查最后添加的顶点是否与前一个顶点重合。

Returns ​

boolean

如果最后一个添加的顶点与前一个顶点不重合,则返回 true;否则返回 false。


Build ​

▸ Build(): void

执行多段线的建模算法。

Returns ​

void


Close ​

▸ Close(): void

闭合多段线,形成一个闭合的图形。

Returns ​

void


Edge ​

▸ Edge(): Mx3dShapeEdge

获取多段线的Edge对象。

Returns ​

Mx3dShapeEdge

多段线的Edge对象。


FirstVertex ​

▸ FirstVertex(): Mx3dShapeVertex

获取多段线的第一个顶点。

Returns ​

Mx3dShapeVertex

第一个顶点对象。


IsDone ​

▸ IsDone(): boolean

检查建模算法是否执行完成。

Returns ​

boolean

建模算法执行是否完成的标志,true 完成,false 失败。


LastVertex ​

▸ LastVertex(): Mx3dShapeVertex

获取多段线的最后一个顶点。

Returns ​

Mx3dShapeVertex

最后一个顶点对象。


Shape ​

▸ Shape(): Mx3dShapeObject

获取多段线的形状。

Returns ​

Mx3dShapeObject

多段线的形状对象。


Wire ​

▸ Wire(): Mx3dShapeWire

获取多段线的Wire对象。

Returns ​

Mx3dShapeWire

多段线的Wire对象。