Используя библиотеку Open3D в Python, она извлекает в облако точек только вершины с отрицательными нормалями. Я исходил из того, что точки на нижней стороне объекта будут иметь только отрицательные нормали.
Код: Выделить всё
import open3d as o3d
import numpy as np
mesh = o3d.io.read_triangle_mesh("mypath")
mesh.compute_vertex_normals()
vertex_normals = np.asarray(mesh.vertex_normals)
vertices = np.asarray(mesh.vertices)
underside_indices = np.where(vertex_normals[:, 2] < 0)[0]
underside_points = vertices[underside_indices]
underside_point_cloud = o3d.geometry.PointCloud()
underside_point_cloud.points = o3d.utility.Vector3dVector(underside_points)
#Remove outliers
cl, ind = underside_point_cloud.remove_statistical_outlier(nb_neighbors=40, std_ratio=2.0)
clean_underside_point_cloud = underside_point_cloud.select_by_index(ind)
#Compute the centroid of the mesh and Visualize
centroid = mesh.get_center()
centroid_sphere = o3d.geometry.TriangleMesh.create_sphere(radius=1)
centroid_sphere.translate(centroid)
centroid_sphere.paint_uniform_color([1, 0, 0])
#Visualization
o3d.visualization.draw_geometries([clean_underside_point_cloud, centroid_sphere])
Облако точек. Модель STL.
Вид спереди:

Вид сбоку:

Вид сверху (обратите внимание на непрерывную поверхность под случайными точками над ней):
[img]https://i.sstatic. net/M1cjrBpB.png[/img]
Нижняя сторона:
Подробнее здесь: https://stackoverflow.com/questions/785 ... a-pointclo