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
| Name | Type | Access | Description |
|---|---|---|---|
control_points | List[Vector4] | Read | Holds the list of vertex positions as Vector4 objects |
edges | List[int] | Read | Stores edge indices defining mesh connectivity |
polygon_count | int | Read | Provides the total number of polygons in the mesh |
polygons | List[List[int]] | Read | Contains lists of vertex indices for each polygon |
deformers | `` | Read | Gives access to the mesh’s deformation modifiers |
Methods
| Signature | Description |
|---|---|
__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) → int | Returns 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() → bool | Checks 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 |