-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of duplicate/unused vertices in SimpleMesh #306
Comments
Throughout the entire source code we assume that the vertices are numbered from 1 to N without missing integers in between. I don't think it is worth moving towards a design where we allow arbitrary enumerations of vertices. These algorithms are really hard to implement already assuming that the indices are 1:N. I suggest that you fix your IO pipeline to make sure that all vertices are numbered consecutively without gaps. |
Wait a minute. You are saying that the topology itself is not doing the right thing, correct? That HalfEdgeTopology should have identified the maximum number of vertices 6 and assume that this is the number of vertices? The issue is probably somewhere else. I think if you can share the overall goal, we can track down what needs to be fixed, if anything needs to be fixed on the Meshes.jl side. |
The issue arises when you construct a SimpleMesh for which the connections do not reference all indices from 1 to What I was suggesting, is to make halfedge.jl#L225 similar to simple.jl#L50, i.e. return the maximum, and to have |
Yes, it makes total sense. Thanks for looking into it. Can you help with these two PRs? :) |
I’ll look into it 👍 |
When loading an STL file with MeshIO.jl and converting it to a SimpleMesh with the code in MeshBridge.jl, I ended up with a mesh that has duplicate vertices, only some of which are referenced in the connectivity list. While it is probably best to avoid creating such meshes, it might be worth improving the way topologies handle this case:
Maybe the
HalfEdgeTopology
could also basevertices
on the maximum value, andCoboundary
could give an empty vector instead?The text was updated successfully, but these errors were encountered: