Open Hafplo opened 3 years ago
Thanks, sounds good :) Fixed in master.
@rusty1s Amazed by the super quick response.
I still don't understand why this division is needed in the first place. Maybe @Yannick-S you can explain?
Hi, Its been a loooong time since I looked at any of this. I went through my code changes to sample_points.py and found this comment
when models are too big the following operations will give 'inf',
crashing the program. Thus we normalize the model, and later scale all
the sampled points back to the original size.
The problem was, if i remember correctly, that different modeling software gives models of vastly different scales. If you don't do some sort of normalization the points are either millimeters apart or kilometers. I had issues of inf, as i wrote back then. The points get converted back to their original size at the end of the function, thus this just fixes the intermediate 'infinity' issues.
I don't remember exactly where the infinity occurred, but if i were to guess its during division of area / area.sum()
🐛 Bug
SamplePoints in sample_points.py uses pos.max() instead of pos.abs().max() When all the points are negative, the maximum can be zero, causing division by zero. that produces NaNs to all positions.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Environment
Additional context
In my example I am placing the origin (0, 0, 0) based on some intrinsic properties of the point cloud (instead of just setting pos.mean() to be the origin)