Repository navigation
SimplifyQuadricDecimation fixes - #6163
Merged
Merged
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. |
Contributor
Author
|
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
Contributor
|
@bjudeworley Thank you for this PR. Do you have an example to compare changes before and after this PR? |
Contributor
benjaminum
approved these changes
Aug 15, 2023
benjaminum
left a comment
Contributor
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, all discussions resolved
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Type
Motivation and Context
Checklist:
python util/check_style.py --applyto 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β