Mesh
[Desktop Automation]
A mesh object contains the full information about a triangulated mesh and may be used for altering, transforming, and exporting the mesh data.
Caution: This is an object in memory. This is not a tray mesh, ie. a part (including CAD parts) in a buildroom, listed in the project tree. For those, refer to LUATrayMesh.
Properties
Property | Read/write | Type | Description |
---|---|---|---|
area | read-only | Number | Returns the surface area |
badedgecount | read | Number | Get the number of bad edges of the mesh |
boundaryedgecount | read | Number | Number of triangle edges not shared with any other triangle's edges |
boundarylength | read | Number | Get the length of the boundary of the mesh |
calculationerror | read-only | Boolean | Returns whether the last calculation has failed |
calculationfailed | read-only | String | Returns the message for a failed calculation |
edgecount | read-only | Number | Number of triangle edges, shared with triangles or otherwise |
facecount | read-only | Number | Number of triangles in the mesh |
flippedtriangles | read | Number | Count of triangles connected to others but with opposing normals. This is the smallest available count. For example, in a mesh of two triangles, with one of them flipped, the count is still 1. |
holecount | read-only | Number | Returns the number of holes, as in, shortest continuous chains of edges shared by only one triangle |
ismanifold | read-only | Boolean | True if the mesh has a closed surface |
isnice | read-only | Boolean | True if the mesh is manifold (Deprecated) |
isok | read-only | Boolean | True if both ismanifold and isoriented are true and the mesh has a positive volume |
isorientable | read-only | Boolean | True if mesh has no anomalies like a Moebius strip or a Klein bottle. |
isoriented | read-only | Boolean | True if the mesh has no flipped triangles |
loadingfailed | read-only | Boolean | Returns whether loading a file has failed |
loadingerror | read-only | String | Returns the loading error |
nodecount | read-only | Number | Returns the number of nodes/points |
outboxvolume | read-only | Number | Returns the mesh bounding box volume (in mm³) |
outboxbasearea | read-only | Number | Returns the mesh bounding box base area (in mm²) |
outboxheight | read-only | Number | Returns the mesh bounding box height (in mm) |
shadowarea | read | Number | Get the shadow area of the mesh |
shellcount | read-only | Number | Returns the number of shells |
volume | read-only | Number | Returns the volume in mm³. Negative if the shell surface is fully inverted, like for cavities. Important: This number is only valid when the mesh properties ismanifold and isoriented are both true, otherwise the number is meaningless. |
Methods
Methods are documented in their purpose-specific articles. Choose from the items below.