Skip to content
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

Degenerate triangles removal #107

Open
QiaodongCui opened this issue May 11, 2022 · 1 comment
Open

Degenerate triangles removal #107

QiaodongCui opened this issue May 11, 2022 · 1 comment

Comments

@QiaodongCui
Copy link
Contributor

I have a question regiards the degenerate triangles removal code from line 10349 to line 10377 . It appears this part of the code first creates a KDtree data structure, i.e., (VHACD::fm_createVertexIndex), and then indexs each vertices of the triangle mesh into the KDtree, i.e., getIndex(), and then remove the triangle if two vertices have the same KDtree index. The entire point of this section seems to be removing degenerate triangles with edge length smaller than some threshold. If that's the case, why not just compute the edge length of each triangle and then check the edge length instead? Using the KDtree here seems like an overkill. Am I missing something here?

@jratcliff63367
Copy link
Collaborator

The main reason the input mesh is being reindexed isn't to find degenerate triangles but rather to remove duplicate vertices. The raycasting library is sensitive to that and will not work right if there are duplicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants