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

NameTypeAccessDescription
edgesnumber[]ReadProperty holds an array of edge indices defining mesh connectivity
polygonCountnumberReadProperty reports the total number of polygons in the mesh
polygonsnumber[][]ReadProperty is a 2‑D array where each sub‑array lists vertex indices of a polygon
deformersany[]ReadProperty contains an array of deformer objects applied to the mesh

Methods

SignatureDescription
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)numberReturns the vertex count of the polygon at the specified index
toMesh()MeshReturns a Mesh instance, typically a copy or conversion of the current object
optimize(_vertexElements: boolean, _toleranceControlPoint: number, _toleranceNormal: number, _toleranceUV: number)MeshSimplifies 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)MeshPerforms the boolean operation defined by _op on meshes _a and _b with given transforms
isManifold()booleanChecks whether the mesh is manifold and returns true or false
union(_a: Mesh, _b: Mesh)MeshReturns a new Mesh representing the union of meshes _a and _b
difference(_a: Mesh, _b: Mesh)MeshReturns a new Mesh representing mesh _a minus mesh _b
intersect(_a: Mesh, _b: Mesh)Mesh
triangulate()MeshConverts all polygons to triangles and returns the updated mesh
getBoundingBox()anyReturns the axis‑aligned bounding box of the mesh
getEntityRendererKey()anyReturns a renderer‑specific key identifying this mesh entity