Mesh
Overview
Mesh is a class in Aspose.3D FOSS for Typescript.
Inherits from: Geometry.
Mesh.constructor creates a new Mesh with optional name, height map, transform, and tri‑mesh flag.
This class provides 13 methods for working with Mesh objects in Typescript programs.
Available methods include: constructor, createPolygon, difference, doBoolean, getBoundingBox, getEntityRendererKey, getPolygonSize, intersect, isManifold, optimize, toMesh, triangulate, and 1 additional methods.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: deformers, edges, polygonCount, polygons.
Description
Mesh is a class in the Aspose.3D FOSS library for TypeScript that exposes 12 methods and 4 properties for programmatic use. It extends Geometry, inheriting shared functionality from its parent type.
Core capabilities include: number[]; number; number[][]. These operations enable developers to integrate mesh functionality directly into TypeScript applications.
The class also provides the edges property (gets the edges), the polygonCount property (gets the polygon count), the polygons property (gets the polygons).
Instances are created through a single constructor that initializes the object with default values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
edges | number[] | Read | Gets the edges. |
polygonCount | number | Read | Gets the polygon count. |
polygons | number[][] | Read | Gets the polygons. |
deformers | any[] | Read | Gets the deformers. |
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 number of vertices in the polygon at the given index |
toMesh() → Mesh | Returns a Mesh instance representing the current object (identity conversion) |
optimize(_vertexElements: boolean, _toleranceControlPoint: number, _toleranceNormal: number, _toleranceUV: number) → Mesh | Not implemented in the FOSS edition — throws at runtime. Reduces mesh complexity using vertex element flag and tolerance values for control points, normals, and UVs |
doBoolean(_op: any, _a: Mesh, _transformA: any, _b: Mesh, _transformB: any) → Mesh | Not implemented in the FOSS edition — throws at runtime. Performs a boolean operation defined by _op on meshes _a and _b with respective transforms |
isManifold() → boolean | Not implemented in the FOSS edition — throws at runtime. Returns true if manifold is set. |
union(_a: Mesh, _b: Mesh) → Mesh | Not implemented in the FOSS edition — throws at runtime. Returns a new Mesh that is the union of meshes _a and _b |
difference(_a: Mesh, _b: Mesh) → Mesh | Not implemented in the FOSS edition — throws at runtime. Returns a new Mesh that is the difference of mesh _a minus mesh _b |
intersect(_a: Mesh, _b: Mesh) → Mesh | Not implemented in the FOSS edition — throws at runtime. |
triangulate() → Mesh | Converts all polygons in the mesh to triangles and returns the mesh |
getBoundingBox() → any | Returns the bounding box. |
getEntityRendererKey() → any | Not implemented in the FOSS edition — throws at runtime. Returns the entity renderer key. |