numpy – how to convert a 3D point cloud into .stl file in python
I have a 3D point cloud in Python and want to make a .stl file out of it. How can I do it? The figure shows the point cloud:

The points are stored in a 2D numpy array which has three columns and several rows. The first column is the x, second is y and third is z.
I tried using PyVista but this package did not give me .stl export option:
import pyvista as pv
from numpy import genfromtxt
F2 = genfromtxt('surface.csv', delimiter=",") # This array contains my points
point_cloud = pv.PolyData(F2)
surf = point_cloud.delaunay_3d()
surf.save('mesh.stl') # only .vtk and .ctu are available!
Read more here: Source link
