I had asked this question before but on github here , but never got farther into it. Now I have picked it up, and am trying to get this mesh tetrahedralized, but I keep getting errors see below. Ahlthough the statement clearly says "Found a segment and a subface intersect", I don't know how would I go about resolving that ? The question here is more precisely how to find if mesh has an open boundary and how to locate that and fix that in perhaps blender ? I am asking about open boundary since "camel.off" which clearly has an open boundary gives the same error. I even tried using another geometry processing tool but it showed no holes found, and its auto repair didn't work either. I get the obj file of Emily 3D scan and remove everything such as eye lashes, eyeballs, inner and outer extra subgeometries. I am using blender to export and using libigl tetgen example to see it if it works. I inspected the mesh, I don't see any holes in the topology, the base hole I fill up using the blender grid fill functionality. See the attached picture. In libigl I launched it in the viewer before processing with tetgen and it looks fine, I also tried all the blender clean up tool, see .
Is there a way to do some more preprocessing automatically before trying to create a tetrahedralized mesh that would ensure smooth operation ? Please advice.
Notice that the lips of Emily has self-intersecting faces. This can be viewed in MeshLab as suggested by @Dominik Mokris. However after deleting those faces, it is hard to get it properly filled without additional faces becoming self-intersecting. See one of the main errors from the tetgen was about self-intersection. The only great tool I found is MeshMixer from Autodesk, in it there is tool called makesolid that takes care of closing the holes and self intersecting faces, etc. Great tool, I can now generate tetgen nicely using libigl !