Check surface meshes generated with the surface toolbox

Dear All,

I’m using the Surface Toolbox, specifically Uniform Remesh, via the Python API to generate STL surface meshes with a target edge length. Occasionally the resulting STL is not watertight (e.g., open boundaries / non-manifold elements).

I wanted to ask if there is a slicer inbuild solution to check for watertightness or fix falsely stl files/surface meshes?

Context:

  • Slicer Version 5.8.1
  • OS: Windows 11

Thanks in advance and best,

Daniel

This discussion might help: is there any way to check mesh is watertight? - Support - VTK

VTK classes like this are available in the Slicer python environment.

1 Like

Thanks Steve!

I’ll have a look at it, I also stumbled across trimesh which seems to also have the capability of repairing STLs

Hi,
If it helps: I’m sealing the mesh in Blender after exporting it to STL from 3D Slicer. There are dedicated tools for this (the 3D Print add-on – quite effective). I also wrote my own add-on that checks for watertightness (in Polish it’s that tricky word: “wodoszczelna” :slight_smile: at the top of addon) and allows automating the available there mesh optimization methods, as well as performing a remesh to make the mesh less chaotic than the raw one from 3D Slicer (as in the illustration), smoothing it, reducing size etc. – basically preparing it for 3D printing.

If you don’t feel like using Blender, a good, simple, and effective tool is the Windows mesh repair service, for example through Bambu Studio.

Best regards :slight_smile:

BEFORE REMESH:

AFTER REMESH: