Making a Mesh a Watertight Manifold

Many algorithms in geometry processing require a mesh to be manifold, and watertight. For example, computing signed distances from meshes requires watertight shapes.

Point-Cloud-Utils implements the Robust Watertight Manifold Surface Generation Method for ShapeNet Models algorithm by Huang for converting meshes to watertight manifolds.

import point_cloud_utils as pcu

v, f = pcu.load_mesh_vf("chair.ply")

# The resolution parameter controls the density of the output mesh
# It is linearly proportional to the number of faces in the output
# mesh. A higher value corresponds to a denser mesh.
resolution = 50_000
vw, fw = pcu.make_mesh_watertight(v, f, resolution)

Non-manifold, non-watertight mesh
Watertight, Manifold version of the input mesh
The left mesh is non-manifold and non-watertight. The Manifold algorithm converts it to a watertight manifold on the left.