How to debug a manifold that is not "manifold". #726
Replies: 2 comments 1 reply
-
Yes. https://github.com/elalish/manifold/wiki/Manifold-Library#manifoldness-definition Note that we only care about the topology, i.e. how the triangles are connected, ignoring the point coordinates, for the manifoldness definition. Also, stl does not preserve manifoldness because you cannot distinguish points with the same coordinate, so you should use formats such as obj to check the mesh.
The only case this can happen is when users import a mesh into manifold, and only the input can be faulty, so there is no need to return the faulty mesh. We have some internal checks, e.g. https://github.com/elalish/manifold/blob/master/src/manifold/src/properties.cpp#L286, maybe we can expand them a bit to provide more useful diagnostics, but this may not be very helpful as we are not a GUI application...
Not sure how you implement that, if you are modifying the halfedge data structure, e.g. adding some points, you need to make sure it is consistent after the modification. And I don't think you need to experiment with other triangulation methods, it is much better to focus on improving the general algorithm. #723 shows a way to improve the triangulator algorithmic complexity. |
Beta Was this translation helpful? Give feedback.
-
@pca006132 Thanks! I, made the As to triangulate. It might not be important to you... but to normal users, one always tries to do as much as In my case I've written my own extruder, and want a fast triangulation. Fan save me like 40% of the time over triangulate. I'll take another look at midpoint... maybe the obj format will show me something in MeshLab. BTW, are there alternatives to MeshLab I should know about? |
Beta Was this translation helpful? Give feedback.
-
In ways it's great that you check everything... but what happens when it fails?
There's no real information provided by status.
Worse, you get returned an empty mesh to look at.
Is there some sort of diagnostic that will explain?
Currently what I do in Python is:
(I uncomment these out as needed)
Both trimesh and meshlab can detect manifold issues... and in mesh lab you can even see where the problem is,
which is a big help.
In at least one instance trimesh and meshlab both said the mesh was perfectly manifold... but Manifold() was still
returning empty.
I was experimenting with MidPoint triangulation... and manifold seems to have an issue with the point being in the middle
like that. (Fan works fine.)
Is there at least a good definition of manifold (specific to Manifold) running around?
I ask because I'm about to release a polyhedron function to the world... and I'm sure it will be ugly!
Sadly, I can't find an easy way for people to do this.
Beta Was this translation helpful? Give feedback.
All reactions