Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

average_edge_length
Compute the average edge length of the mesh.
classify_edge
Classify an edge between two triangles by their dihedral angle.
classify_feature_vertices
Classify every vertex as smooth or feature based on the maximum dihedral angle between its adjacent triangle faces.
cluster_id
Compute the grid cell coordinates for vertex v with cell size grid_size.
collapse_edge
Collapse edge (v1, v2): move v1 to new_pos, redirect all references to v2 toward v1, then remove any resulting degenerate (zero-area) triangles. Returns the index of the surviving vertex (v1, updated in-place).
collect_decimation_metrics
Collect decimation statistics before and after simplification.
compute_vertex_quadrics
Compute per-vertex quadric matrices by summing Kp over adjacent triangles.
edge_collapse_cost
Compute the optimal collapse target and error for collapsing edge (v1→v2).
feature_aware_cost
Feature-aware QEM cost: penalizes collapsing crease or boundary edges.
find_boundary_edges
Return all edges that belong to exactly one triangle (boundary edges).
is_manifold_after_collapse
Check whether collapsing edge (v1, v2) preserves manifold topology.
mesh_centroid
Area-weighted centroid of the mesh surface.
mesh_compactness
Compactness ratio: 36π V² / A³ (= 1 for a sphere, < 1 otherwise).
mesh_volume
Signed volume of the mesh via the divergence theorem. Positive for outward-facing normals with CCW winding.
one_sided_hausdorff
Compute the Hausdorff-like error between two meshes (approximate).
simplify_with_features
Simplify mesh using QEM edge collapses, preserving feature vertices (those for which is_feature[v] == true will never be the removed vertex).
vertex_clustering
Decimate mesh by merging all vertices that fall inside the same voxel cell. Each cluster is represented by the average position of its members. Triangles with two or more vertices in the same cluster are discarded.
vertex_clustering_decimate
Vertex clustering decimation: reduces mesh by merging vertices within cells of a uniform grid, then rebuilding triangles.