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

NameTypeAccessDescription
control_pointsList[Vector4]ReadGets the control points.
edgesList[int]ReadGets the edges.
polygon_countintReadGets the polygon count.
polygonsList[List[int]]ReadGets the polygons.
deformers``ReadGets the deformers.
visibleboolRead/WriteGets or sets the visible.
cast_shadowsboolRead/WriteGets or sets the cast shadows.
receive_shadowsboolRead/WriteGets or sets the receive shadows.
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)
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.
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)

See Also

 English