marian42 / mesh_to_sdf

Calculate signed distance fields for arbitrary meshes
https://pypi.org/project/mesh-to-sdf/
MIT License
991 stars 107 forks source link

sample_sdf_near_surface() method samples different number of points #7

Closed tansinjahan closed 4 years ago

tansinjahan commented 4 years ago

I am trying to sample points near-surface of multiple meshes inside a loop. But it samples different amount of points for different or same mesh running multiple times. I specifically set the number of points 2500 as parameters, i.e. points, sdf = sample_sdf_near_surface(mesh, number_of_points=2500). Is this issue a bug or something happening in my method, I am not sure. Do you have any suggestions? Slide1

marian42 commented 4 years ago

This is a bug in this project that seems to appear more frequently for smaller numbers of points. I just pushed a fix and I'll update the pypi project in the coming days.