-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
SimplifyQuadricDecimation fixes #6163
Conversation
…oth vertices of the removed edge The previous code checks if any triangles connected to the removed vertex are flipped in the process of collapsing the edge. However, since the remaining vertex on the collapsed edge can be moved during the operation, triangles connected to this vertex can flip as well. This commit puts the flip-checking code into a loop so we can check both sets of triangles.
This sets a threshold on how much any triangle can shrink in area during an edge collapse which should avoid creating degenerate triangles. The threshold is somewhat arbitrary, I found 0.001 worked well but it may make sense for this to become a function parameter.
When a vertex is connected to exactly 3 triangles and an edge of one of these triangles not connected to the vertex is collapsed, the remaining 2 triangles end up sharing the same vertices, with opposite normals. This creates a non-manifold location which is nearly always undesirable. This commit adds a check to see if any of the triangles attached to the collapsing edge share an edge that is not connected to `vidx0` or `vidx1`
…after they are no longer needed
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
Looks like the failing test (Ubuntu Wheel / Test wheel CPU (3.10, false)) failed because no runners were available, can someone manually rerun it? |
…d for vbars & costs maps Reduces the memory footprint by 27% in my tests runs ~15% faster as we remove a lot of allocations.
Changing from tracking edges (`unordered_set<Vector2i>`) to vertices (`unordered_map<int, int>) gives a good performance increase
@bjudeworley Thank you for this PR. Do you have an example to compare changes before and after this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, all discussions resolved
Type
Motivation and Context
Checklist:
python util/check_style.py --apply
to apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
The existing Quadric Error Decimation code could create some faulty meshes under certain circumstances
This PR fixes these three issues and clears a few vectors once they are finished being used to save a little memory.
This change is