STL в Pointcloud - PullRequest
       36

STL в Pointcloud

1 голос
/ 20 апреля 2020

Я пытаюсь преобразовать STL-файл в точки, используя open3d lib.

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

Проблема в том, что мне нужно загрузить sh .surfaces вместо вершин, но я не вижу open3d.open3d.geometry .TriangleMe sh .Поверхность объекта. Мне нужно выровнять поверхности вместо вершин.

Как мне получить очки от tri angular me sh?

Ввод

Выход

1 Ответ

0 голосов
/ 20 апреля 2020

Это может помочь:

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
...