Mesh

Overview

Mesh is a class in Aspose.3d for Python. Inherits from: Geometry.

Mesh.triangulate converts all polygons in the mesh to triangles.

Properties

NameTypeAccessDescription
control_pointsList[Vector4]ReadHolds the list of vertex positions as Vector4 objects
edgesList[int]ReadStores edge indices defining mesh connectivity
polygon_countintReadProvides the total number of polygons in the mesh
polygonsList[List[int]]ReadContains lists of vertex indices for each polygon
deformers``ReadGives access to the mesh’s deformation modifiers

Methods

SignatureDescription
__init__(name: str, height_map, transform: Matrix4, tri_mesh: bool)
create_polygon()Creates a new polygon and adds it to the mesh
get_polygon_size(index: int)intReturns the number of vertices in the polygon at the given index
to_mesh()'Mesh'Returns a Mesh instance representing the current object
optimize(vertex_elements: bool, tolerance_control_point: float, tolerance_normal: float, tolerance_uv: float)'Mesh'Reduces mesh complexity using tolerances and optional vertex element removal
do_boolean(op: BooleanOperation, a: 'Mesh', transform_a: Optional[Matrix4], b: 'Mesh', transform_b: Optional[Matrix4])'Mesh'Performs a Boolean operation on two meshes with optional transforms
is_manifold()boolChecks whether the mesh is a closed, non-self-intersecting manifold
union(a: 'Mesh', b: 'Mesh')'Mesh'Returns a new mesh that is the union of two input meshes
difference(a: 'Mesh', b: 'Mesh')'Mesh'Returns a new mesh representing the subtraction of the second mesh from the first
intersect(a: 'Mesh', b: 'Mesh')'Mesh'
triangulate()'Mesh'returns a new Mesh` instance whose polygons are all triangles
get_bounding_box()Computes and returns the axis-aligned bounding box of the mesh
get_entity_renderer_key()Retrieves the renderer-specific key for the mesh entity