# 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 et.al. 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)
```