-
Notifications
You must be signed in to change notification settings - Fork 320
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
About the function "__get_invalids" #43
Comments
Hi @liangqianqian123 , When encountering "bad" (valence 3) vertices (aka "invalids"), we clean them if possible. The issue is that these "valence 3" vertices cause many edges to be unable to be collapsed. See this illustration, on the left is a valid edge collapse, on the right is a collapse which results in a non-manifold geometry: |
@ranahanocka , Thanks for the reply. I also encounter a problem about the invalid edges.
The assert(len(vertex) ==1) is triggered. I debugged a little bit is that: it seems it is caused by wrong neighbour information. The label information is as below: Have you encounter this problem before? What could be the reason and any recommendation to solve the problem? Thanks & Regards, |
@ranahanocka , I found the answer from #7, so it is caused due to a very small connected but isolated component. Do you have any idea that how we can solve it in programming way? |
Hi @chengzg , You can remove small connected components using meshlab (via scripting). |
Hi @ranahanocka , Thanks very much for your reply. I am thinking of solving the problem in MeshCNN code. For example, in the scenario mentioned above, i could delete the whole triangle or adding another array to reduce its priority to be collapsed. Do you think will it work? Also you added the assert there, it must be some reason. May i know what problem you have experienced before? Thanks & Regards, |
Hi @chengzg , It is certainly possible, but it is more complicated. I believe meshlab is an easier approach. Here is a script which will do it
You need to save that to a file and call it something that ends with .mlx, for example remove_island.mlx. Also, install meshlab and then you can call it from the command line:
where cube.obj is the input file and cube_out.obj is the output file. |
So if the smallest connected component (a pyramid object) cannot have any more edges removed. It is the smallest genus-0 primitive that exists. Basically, removing an edge on this small object will result in non-manifold geometry. |
Again thanks very much for your reply. Thanks & Regards, |
Could you please explain the function "__get_invalids" which is defined in file "mesh_pool.py"? I want to know what will happen after these operations?
"
MeshPool.__redirect_edges(mesh, edge_id, side, update_key_a, update_side_a)
MeshPool.__redirect_edges(mesh, edge_id, side + 1, update_key_b, update_side_b)
MeshPool.__redirect_edges(mesh, update_key_a, MeshPool.__get_other_side(update_side_a), update_key_b, MeshPool.__get_other_side(update_side_b))
MeshPool.__union_groups(mesh, edge_groups, key_a, edge_id)
MeshPool.__union_groups(mesh, edge_groups, key_b, edge_id)
MeshPool.__union_groups(mesh, edge_groups, key_a, update_key_a)
MeshPool.__union_groups(mesh, edge_groups, middle_edge, update_key_a)
MeshPool.__union_groups(mesh, edge_groups, key_b, update_key_b)
MeshPool.__union_groups(mesh, edge_groups, middle_edge, update_key_b)
"
Thank you very much!
The text was updated successfully, but these errors were encountered: