Skip to content

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

Class: Mx3dWireTool ​

Interface for handling wire

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dWireTool()

Methods ​

ConnectEdgesToWires ​

▸ Static ConnectEdgesToWires(edges, toler?, shared?): Mx3dShapeObject[]

Connect a set of edges into the longest line (line). The standard for connection is that the distance between the endpoints of edges should be less than the given tolerance. This method converts the input set of edges into a set of lines with the maximum length.

Parameters ​

NameTypeDefault valueDescription
edges[Mx3dShapeObject] (Mx3dShapeObject. md) []undefinedArray of edge objects to be connected
Tolerant value when connecting edges
SharedbooleanfalseIf true, only connect when adjacent edges share the same vertex; If false, connect when the distance between the endpoints of adjacent edges is less than the tolerance

Returns ​

Mx3dShapeObject[]

A new array of line objects containing the maximum length of connected lines.


ConnectWiresToWires ​

▸ Static ConnectWiresToWires(wires, toler?, shared?): Mx3dShapeObject[]

Connect a set of lines into the longest line (line). The standard for connection is that the distance between the endpoints of the line should be less than the given tolerance. This method converts the input line set into the maximum length line set.

Parameters ​

NameTypeDefault valueDescription
Wires[Mx3dShapeObject] (Mx3dShapeObject. md) []undefinedArray of line objects to be connected
Tolernumber1e-6Tolerance value when connecting lines
SharedbooleanfalseIf true, only connect when adjacent lines share the same vertex; If false, connect when the distance between the endpoints of adjacent lines is less than the tolerance

Returns ​

Mx3dShapeObject[]

A new array of line objects containing the maximum length of connected lines.


EdgeToWire ​

▸ Static EdgeToWire(theEdge): Mx3dShapeWire

Parameters ​

NameType
theEdgeMx3dShapeEdge

Returns ​

Mx3dShapeWire