简体   繁体   中英

Open 3D issues creating a 3D mesh

I am trying to create a 3D mesh in Open3D given a set of 3D points. My code is the following:

pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(points)
hull, _ = pcd.compute_convex_hull()
hull_ls = o3d.geometry.LineSet.create_from_triangle_mesh(hull)
hull_ls.paint_uniform_color((1, 0, 0))
o3d.visualization.draw_geometries([pcd, hull_ls])

The visualization I obtain is the following:

在此处输入图像描述

The main issue is that there are 2 points that are not connected correctly. See highlighted area.

What I am trying to obtain instead is something like this:

在此处输入图像描述

The second image was drawn using Open3D LineSet, since I have the points and order in which they need to be connected. The issue with the second visualization is that I am not able to export is a mesh file, since it is just a set of line. Any help is appreciated.

The expected mesh is not a convex hull . Therefore, compute_convex_hull will not produce the expected result anyways.

You should be able to export a LineSet using write_line_set and read using read_line_set .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM