Skip to content
Advertisement

How to convert 3D cloud datapoints to mesh using python?

I have a set of 3D data points that looks similar to sphere. I need these data points to be connected as a watertight mesh so that it can be used for simulation.

I have worked with Meshlab and obtained a reasonable mesh but not watertight.

After this, I have tried with Open3D python library by using ball pivot algorithm. From this, I am unable to obtain water tight mesh as expected. I tried to work with hole_fixer external library (Hole_fixer), but finding and error in installing using cmake.

I have inserted the code and also “xyz” datapoints used for open3D.

JavaScript

Link for “xyz file”: xyz_file_link

Mesh obtained from Open3D: Mesh_from_open3D

I would like to know how to obtain water tight mesh for these datapoints.

Any leads will be appreciated.

Regards,

Sunag R A.

Advertisement

Answer

To achieve a water tight mesh, you can use o3d.geometry.TriangleMesh.create_from_point_cloud_poisson.

However, Poisson reconstruction requires consistent normal orientation. In your case, you can just orient all normals toward the center of your point cloud. To do that:

JavaScript

Mesh obtained using the above code snippet: enter image description here


For point clouds with complex topology, it might not be easy to obtain a consistent normal orientation, read my other answer for more info.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement