Mesh
Overview
Mesh is a class in Aspose.3D FOSS for Python.
Inherits from: Geometry.
Mesh.create_polygon creates a new polygon and returns its index.
This class provides 22 methods for working with Mesh objects in Python programs.
Available methods include: __init__, add_element, create_element, create_element_uv, create_polygon, difference, do_boolean, find_property, get_bounding_box, get_element, get_entity_renderer_key, get_polygon_size, and 10 additional methods.
All public members are accessible to any Python application after installing the Aspose.3D FOSS for Python package.
Properties: cast_shadows, control_points, deformers, edges, excluded, name, and 9 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
control_points | List[Vector4] | Read | Gets the control points. |
edges | List[int] | Read | Gets the edges. |
polygon_count | int | Read | Gets the polygon count. |
polygons | List[List[int]] | Read | Gets the polygons. |
deformers | `` | Read | Gets the deformers. |
visible | bool | Read/Write | Gets or sets the visible. |
cast_shadows | bool | Read/Write | Gets or sets the cast shadows. |
receive_shadows | bool | Read/Write | Gets or sets the receive shadows. |
vertex_elements | List['VertexElement'] | Read | Gets the vertex elements. |
parent_nodes | List['Node'] | Read | Gets the parent nodes. |
parent_node | Optional['Node'] | Read/Write | Gets or sets the parent node. |
excluded | bool | Read/Write | Gets or sets the excluded. |
scene | `` | Read/Write | Gets or sets the scene. |
name | str | Read/Write | Gets or sets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
__init__(name: str, height_map, transform: Matrix4, tri_mesh: bool) | |
create_polygon() | Creates a new polygon and returns its index |
get_polygon_size(index: int) → int | Returns the number of vertices in the polygon at 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' | Not implemented in the FOSS edition — throws at runtime. Reduces mesh complexity using tolerances and optional vertex elements |
do_boolean(op: BooleanOperation, a: 'Mesh', transform_a: Optional[Matrix4], b: 'Mesh', transform_b: Optional[Matrix4]) → 'Mesh' | Not implemented in the FOSS edition — throws at runtime. Performs a Boolean operation on two meshes with optional transforms |
is_manifold() → bool | 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 representing the union of two meshes |
difference(a: 'Mesh', b: 'Mesh') → 'Mesh' | Not implemented in the FOSS edition — throws at runtime. Returns a new mesh representing 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 to triangles and returns the modified mesh |
get_bounding_box() | Returns the bounding box. |
get_entity_renderer_key() | Not implemented in the FOSS edition — throws at runtime. Returns the entity renderer key. |
create_element(element_type: 'VertexElementType', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElement' | |
create_element_uv(uv_mapping: 'TextureMapping', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElementUV' | |
add_element(element: 'VertexElement') | |
get_element(element_type: 'VertexElementType') | |
get_vertex_element_of_uv(texture_mapping: 'TextureMapping') → Optional['VertexElementUV'] | |
remove_property(property) | |
get_property(property: str) | |
set_property(property: str, value) | Sets the property value. |
find_property(property: str) |