Skip to content

[mxcad_3d API Document](../README. md)/Mx3dMkPolygon

Class: Mx3dMkPolygon

The class that represents modeling polylines inherits from Mx3dMkObject.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dMkPolygon()

Constructor, initialize polyline object.

Overrides

Mx3dMkObject.constructor

Methods

Add

Add(P): void

Add a vertex to a polyline.

Parameters

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)Point object to be added

Returns

void


Added

Added(): boolean

Check if the last added vertex coincides with the previous vertex.

Returns

boolean

If the last added vertex does not coincide with the previous vertex, return true; Otherwise, return false.


Build

Build(): void

Execute modeling algorithms for polylines.

Returns

void


Close

Close(): void

Close polylines to form a closed shape.

Returns

void


Edge

Edge(): Mx3dShapeEdge

Retrieve the Edge object of polylines.

Returns

Mx3dShapeEdge

Edge object for polylines.


FirstVertex

FirstVertex(): Mx3dShapeVertex

Get the first vertex of the polyline.

Returns

Mx3dShapeVertex

The first vertex object.


IsDone

IsDone(): boolean

Check if the modeling algorithm has been executed successfully.

Returns

boolean

The flag indicating whether the modeling algorithm execution has been completed, with true indicating completion and false indicating failure.


LastVertex

LastVertex(): Mx3dShapeVertex

Get the last vertex of the polyline.

Returns

Mx3dShapeVertex

The last vertex object.


Shape

Shape(): Mx3dShapeObject

Obtain the shape of polylines.

Returns

Mx3dShapeObject

The shape object of polylines.


Wire

Wire(): Mx3dShapeWire

Retrieve the Wire object of a polyline.

Returns

Mx3dShapeWire

Wire object for polylines.