繁体   English   中英

STL 到点云

[英]STL to pointcloud

我正在尝试使用 open3d lib 将 stl 文件转换为点。

mesh = o3d.io.read_triangle_mesh("./stl.stl")
pcd = o3d.geometry.PointCloud()
pcd.points = mesh.vertices
pcd.colors = mesh.vertex_colors
pcd.normals = mesh.vertex_normals

问题是需要加载mesh.surfaces而不是顶点,但我看不到open3d.open3d.geometry.TriangleMesh.Surface object。 我需要对齐曲面而不是顶点。

如何从三角形网格中获取点?

输入

Output

这可能会有所帮助:

open3d.geometry.sample_points_uniformly(input, number_of_points=100)

    Function to uniformly sample points from the mesh.

    Parameters
            input (open3d.geometry.TriangleMesh) – The input triangle mesh.
            number_of_points (int, optional, default=100) – Number of points that should be uniformly sampled.

    Returns
        open3d.geometry.PointCloud

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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