Mesh

Overview

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

Mesh.optimize(vertex_elements, tolerance_control_point, tolerance_normal, tolerance_uv) reduces mesh complexity while preserving visual fidelity.

This class declares 25 methods for 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_deformers, get_element, get_entity_renderer_key, and 11 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

NameTypeAccessDescription
control_pointsArrayListAdapter[Vector4]ReadGets the control points.
edgesArrayListAdapter[int]ReadGets the edges.
polygon_countintReadGets the polygon count.
polygonsList[List[int]]ReadGets the polygons.
visibleboolRead/WriteGets or sets the visible.
cast_shadowsboolRead/WriteGets or sets the cast shadows.
receive_shadowsboolRead/WriteGets or sets the receive shadows.
deformersList['Deformer']ReadGets the deformers.
vertex_elementsList['VertexElement']ReadGets the vertex elements.
parent_nodesList['Node']ReadGets the parent nodes.
parent_nodeOptional['Node']Read/WriteGets or sets the parent node.
excludedboolRead/WriteGets or sets the excluded.
scene``Read/WriteGets or sets the scene.
namestrRead/WriteGets or sets the name.
propertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
__init__(name: str, height_map, transform: Matrix4, tri_mesh: bool)Calls init(name, height_map, transform, tri_mesh) on this Mesh instance.
create_polygon()Creates a new polygon and returns its index
get_polygon_size(index: int)intReturns 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()boolNot 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. Calls intersect(a, b) on this Mesh instance.
triangulate()'Mesh'Converts all polygon faces in the mesh to triangles and returns the updated 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.
__init__(name: str)Calls init(name) on this Mesh instance.
get_deformers(deformer_type: type)List['Deformer']Gets all deformers of the specified type, or all deformers if no type is specified.
create_element(element_type: 'VertexElementType', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode')'VertexElement'Creates a new vertex element for custom per‑vertex data
create_element_uv(uv_mapping: 'TextureMapping', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode')'VertexElementUV'Calls create_element_uv(uv_mapping, mapping_mode, reference_mode) on this Mesh instance.
add_element(element: 'VertexElement')Calls add_element(element) on this Mesh instance.
get_element(element_type: 'VertexElementType')Calls get_element(element_type) on this Mesh instance.
get_vertex_element_of_uv(texture_mapping: 'TextureMapping')Optional['VertexElementUV']Calls get_vertex_element_of_uv(texture_mapping) on this Mesh instance.
remove_property(property)Calls remove_property(property) on this Mesh instance.
remove_property(property_name: str)Calls remove_property(property_name) on this Mesh instance.
get_property(property: str)Calls get_property(property) on this Mesh instance.
set_property(property: str, value)Sets the property value.
find_property(property: str)Calls find_property(property) on this Mesh instance.

See Also

 English