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

the comparsion of float when removing duplicate vertice #1453

Open
DamonsJ opened this issue Dec 28, 2023 · 2 comments
Open

the comparsion of float when removing duplicate vertice #1453

DamonsJ opened this issue Dec 28, 2023 · 2 comments

Comments

@DamonsJ
Copy link

DamonsJ commented Dec 28, 2023

when I load stl file in meshlab, I want to unify the vertice, and remove the duplicate vertice.
It is in the function RemoveDuplicateVertex which is located at src\vcglib\vcg\complex\algorithms\clean.h
As a result , I found it compare vertice coordinate using simple operator ==
which is located at : src\vcglib\vcg\space\deprecated_point3.h

It means if the vetex is float type , it just compare float using operator ==

Is this reasonable? Or are there other considerations?

thanks!

@alemuntoni
Copy link
Member

Well, it depends on the application. If duplicated vertices are there because imported from a format that stores not indexed meshes, it is reasonable because the vertex coordinates are going to be likely the same, and detected with operator ==.
But I agree that for some other applications, an additional tolerance could be useful.

@jmespadero
Copy link
Contributor

To use tolerance in the distances, you can use the filter "Merge close vertices" instead of "Remove duplicates"

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

No branches or pull requests

3 participants