Mesh
Overview
Mesh is a class in Aspose.3d for Typescript.
Inherits from: Mesh, Geometry.
Mesh provides boolean operations (union, difference, intersect) and a triangulate() method to convert polygons into triangles.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
edges | number[] | Read | Property holds an array of edge indices defining mesh connectivity |
polygonCount | number | Read | Property reports the total number of polygons in the mesh |
polygons | number[][] | Read | Property is a 2‑D array where each sub‑array lists vertex indices of a polygon |
deformers | any[] | Read | Property contains an array of deformer objects applied to the mesh |
Methods
| Signature | Description |
|---|---|
constructor(name: string | null, _heightMap: any, _transform: any, _triMesh: boolean | null) | Creates a new Mesh with optional name, height map, transform, and tri‑mesh flag |
createPolygon() | Adds a new polygon to the mesh |
getPolygonSize(index: number) → number | Returns the vertex count of the polygon at the specified index |
toMesh() → Mesh | Returns a Mesh instance, typically a copy or conversion of the current object |
optimize(_vertexElements: boolean, _toleranceControlPoint: number, _toleranceNormal: number, _toleranceUV: number) → Mesh | Simplifies the mesh using vertex element flag and tolerance values for points, normals, and UVs |
doBoolean(_op: any, _a: Mesh, _transformA: any, _b: Mesh, _transformB: any) → Mesh | Performs the boolean operation defined by _op on meshes _a and _b with given transforms |
isManifold() → boolean | Checks whether the mesh is manifold and returns true or false |
union(_a: Mesh, _b: Mesh) → Mesh | Returns a new Mesh representing the union of meshes _a and _b |
difference(_a: Mesh, _b: Mesh) → Mesh | Returns a new Mesh representing mesh _a minus mesh _b |
intersect(_a: Mesh, _b: Mesh) → Mesh | |
triangulate() → Mesh | Converts all polygons to triangles and returns the updated mesh |
getBoundingBox() → any | Returns the axis‑aligned bounding box of the mesh |
getEntityRendererKey() → any | Returns a renderer‑specific key identifying this mesh entity |