optimize method
optimize
Optimize the mesh’s memory usage by eliminating duplicated control points
Returns
New mesh instance with compact memory usage
def optimize(self, vertex_elements):
...
Parameter | Type | Description |
---|---|---|
vertex_elements | bool | Optimize duplicated vertex element data |
Example
The following code shows how to eliminate duplicated control points from an unoptimized mesh:
from aspose.threed.entities import Sphere
# Sphere.ToMesh generates 117 control points
mesh = Sphere().to_mesh()
# After optimized, there're only 86 control points, polygon indices are also remapped.
optimized = mesh.optimize(True)
See Also
- module
aspose.threed.entities
- class
Mesh