cars_mesh.core.simplify_mesh
Simplifying methods for the mesh to decrease the number of faces
Module Contents
Functions
|
Function to simplify mesh using Quadric Error Metric Decimation by |
|
Function to simplify mesh using vertex clustering. |
- cars_mesh.core.simplify_mesh.simplify_quadric_decimation(mesh: cars_mesh.tools.handlers.Mesh, reduction_ratio_of_triangles: float = 0.9, target_number_of_triangles: int | None = None, maximum_error: float = float('inf'), boundary_weight: float = 1.0) cars_mesh.tools.handlers.Mesh [source]
Function to simplify mesh using Quadric Error Metric Decimation by Garland and Heckbert
- Parameters:
mesh (Mesh) – Mesh object
reduction_ratio_of_triangles (float (default=0.9)) – Reduction ratio of triangles (for instance, 0.9 to keep 90% of the triangles)
target_number_of_triangles (int or None (default=None)) – The number of triangles that the simplified mesh should have. It is not guaranteed that this number will be reached. If both reduction_ratio_of_triangles and target_number_of_triangles are specified, the latter will be used.
maximum_error (float (default=inf)) – The maximum error where a vertex is allowed to be merged
boundary_weight (float (default=1.0)) – A weight applied to edge vertices used to preserve boundaries
- Returns:
out_mesh – Simplified mesh object
- Return type:
- cars_mesh.core.simplify_mesh.simplify_vertex_clustering(mesh: cars_mesh.tools.handlers.Mesh, dividing_size: float = 16.0, contraction=o3d.geometry.SimplificationContraction.Average) cars_mesh.tools.handlers.Mesh [source]
Function to simplify mesh using vertex clustering.
- Parameters:
mesh (Mesh) – Mesh object
dividing_size (float) – A new voxel size is computed as max(max_bound - min_bound) / dividing size
contraction (open3d.geometry.SimplificationContraction) –
0>) ((default=<SimplificationContraction.Average –) – Method to aggregate vertex information. Average computes a simple average, Quadric minimizes the distance to the adjacent planes.
- Returns:
out_mesh – Simplified mesh object
- Return type: