How to detect if imported STL is watertight?

Does the three.js library come out of the box with method to detect non watertight mesh and method to close holes?

No. No¹.


¹ The closest I can think of is mergeVertices from the Three.js addon BufferGeometryUtils. It can be used to cover-up small gaps. Also, there is another add-on ConvexGeometry, which will transform a geometry into a convex polyhedron, which is guaranteed to be watertight … but you won’t want it.

1 Like