meshing.remove_slivers
meshing.remove_slivers(mesh)
Weld coincident vertices and drop the triangles that collapse.
At a sharp concave crease dual contouring can emit triangles whose corners are distinct vertex rows at one position (about 1e-15 apart). The index graph is manifold, but a file without indices is not: an STL reader merges coincident points, those triangles then have no area, and their edges are used a third and fourth time — the file is not watertight. This does that merge first, keeps the faces on the lowest row of each coincident group, and drops every triangle that no longer has three distinct corners. save_stl and save_obj apply it; save_step has its own edge weld.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| mesh | Mesh | A dual-contour :class:~cadjoint.meshing.dual_contouring.Mesh. |
required |
Returns
| Name | Type | Description |
|---|---|---|
| Mesh | The mesh with re-indexed faces (vertices, normals, quads and |
|
| int | cells untouched), paired with the number of triangles dropped. |