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

getTriArea may return -nan #1

Open
Raven1996 opened this issue Nov 7, 2018 · 3 comments
Open

getTriArea may return -nan #1

Raven1996 opened this issue Nov 7, 2018 · 3 comments

Comments

@Raven1996
Copy link

Hello, I‘ve tried obj2pcd on ShapeNetSem and found a problem.
The "getTriArea" function returned -nan only on one face among the 12k models.
The model ID is wss.dba37de1080c048f4f32009f59473bea.
I think this problem is due to the double precision.
In sampler.h line 58, it is necessary to check the sign before applying sqrt.

@jiangwei221
Copy link
Owner

Hi,
Thank you for using the software, and the feedback!
I just downloaded the models-OBJ.zip from ShapeNetSem website. But I cannot locate the obj file. Could you provide the file name of that obj file?

@jiangwei221
Copy link
Owner

I see, it happened when 3 points of a triangle lies on the same line, which caused the area of the triangle become 0.

@Raven1996
Copy link
Author

I see, it happened when 3 points of a triangle lies on the same line, which caused the area of the triangle become 0.

Sorry for the late reply. That's what I mean. The area is too tiny so that float number may be negative.

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