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

NameTypeAccessDescription
edgesnumber[]ReadGets the edges.
polygonCountnumberReadGets the polygon count.
polygonsnumber[][]ReadGets the polygons.
deformersany[]ReadGets the deformers.

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 number of vertices in the polygon at the given index
toMesh()MeshReturns a Mesh instance representing the current object (identity conversion)
optimize(_vertexElements: boolean, _toleranceControlPoint: number, _toleranceNormal: number, _toleranceUV: number)MeshNot 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)MeshNot implemented in the FOSS edition — throws at runtime. Performs a boolean operation defined by _op on meshes _a and _b with respective transforms
isManifold()booleanNot implemented in the FOSS edition — throws at runtime. Returns true if manifold is set.
union(_a: Mesh, _b: Mesh)MeshNot 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)MeshNot 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)MeshNot implemented in the FOSS edition — throws at runtime.
triangulate()MeshConverts all polygons in the mesh to triangles and returns the mesh
getBoundingBox()anyReturns the bounding box.
getEntityRendererKey()anyNot implemented in the FOSS edition — throws at runtime. Returns the entity renderer key.

See Also

 English