import pdal
xyz = np.array([(0.0, 0.0, 0.0), (1.0, 0.0, 0.0),(1.0, 2.0, 0.0),(4.0, 1.0, 0.0)], dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8')])
abc = np.array([(0, 1, 2), (2, 1, 3)], dtype=[('A', '<u4'), ('B', '<u4'), ('C', '<u4')])
pipeline = pdal.Writer.ply(filename="myply.ply", faces=True).pipeline(xyz)
pipeline.execute()
Basically I'm reading a point cloud file, making a mesh (using poisson), removing some triangles and points from the mesh (this part not in pdal), and writing the resulting points from the mesh. After the mesh stage I also tried deleting rows from pipeline.meshes and pipeline.arrays but I believe they are read only. I tried using filters.crop on the meshed pointcloud - while points are deleted the entire mesh is destroyed. Is there anyway to pass meshes to filters along with arrays? and is it possible for crop etc filters to also crop the mesh?
I can write a ply file of points by passing an array to the pipeline object:
Is there anyway to pass an array of faces too (
abcin my snippet above)?Looking in
Pipeline.__init__there is only a spot forarrays.python/src/pdal/pipeline.py
Line 37 in 32328ac
Basically I'm reading a point cloud file, making a mesh (using poisson), removing some triangles and points from the mesh (this part not in pdal), and writing the resulting points from the mesh. After the mesh stage I also tried deleting rows from pipeline.meshes and pipeline.arrays but I believe they are read only. I tried using filters.crop on the meshed pointcloud - while points are deleted the entire mesh is destroyed. Is there anyway to pass meshes to filters along with arrays? and is it possible for crop etc filters to also crop the mesh?