-
Notifications
You must be signed in to change notification settings - Fork 4
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
Converting pointcloud to watertight mesh #170
Comments
@RohanChacko, I played around with this dataset and wasn't able to get |
The |
If you do find a solution down the road, please be sure to report back so we can know for future reference! |
Hi, |
It isn't the same implementation, but I would be surprised if the results are any different |
Actually, it'd be worth trying their Delaunay 3D structure or the Voxel grid structure as your data seems to have some sort of regularness to it |
@RohanChacko you could try the |
Ah yes, I totally forgot about Here's a function I made at the time but I don't know if it's too relevant/helpful here: import open3d as o3d
def poisson_mesh(pc, depth=8, width=0, scale=1.1, linear_fit=False):
"""`pc` is a `pyvista.PolyData` point cloud. The default arguments are abitrary"""
cloud = o3d.geometry.PointCloud()
cloud.points = o3d.utility.Vector3dVector(pc.points)
cloud.normals = o3d.utility.Vector3dVector(pc["norms"])
trimesh, _ = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(cloud, depth=depth, width=width, scale=scale, linear_fit=linear_fit)
v = np.asarray(trimesh.vertices)
f = np.array(trimesh.triangles)
f = np.c_[np.full(len(f), 3), f]
mesh = pv.PolyData(v, f)
return mesh.clean() Basically I was taking point clouds like: and creating meshed surfaces: not exactly the same thing as creating water tight meshes, but hopefully this helps you see the logic of working between PyVista and open3d |
Interesting example, anyway! |
@akaszynski and @banesullivan What about |
Surface reconstruction is an open issue that we've only partially resolved with Surface Reconstruction. If we want to support ball pivoting or additional algorithms, a PR would be really helpful as I'm swamped (though we all are)... |
Hi, I am using pyvista's reconstruct_surface to generate a mesh from a 3D point cloud. The visual result is impressive but something looks wrong with the curvature. By mesh.plot_curvature I observe very similar values (for mean curvature) in both flat and more curved regions. I also computed the mean curvature values with a custom algorithm for the discrete Laplace-Beltrami operator and I still had a very little variance in curvatures. Then I guess this depends on the definition of the mesh/ connection between points. Have you already faced this problem? Can you help me? Thank you in advance! |
This support forum is now closed. Please open a new discussion topic here: https://github.com/pyvista/pyvista/discussions |
Hi
I am pretty new to pyvista and was looking to convert a numpy (n,3) array to a watertight mesh. I have a pointcloud like this (zoomed in):

And I convert it to a mesh by:
But this is the result I end up with. There are significant holes in the reconstructed mesh:

I tried using
pymeshfix
as pointed out in the other issues but was not able to fill the holes in the mesh. It looks likedelaunay_3d
creates triangles that overlap? Is there a way to reconstruct a watertight mesh for the same?The pointcloud and mesh are in: mesh_repair.zip
The text was updated successfully, but these errors were encountered: