Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Writing a ply file with meshes from numpy arrays. #185

Copy link
Copy link
@rtrwalker

Description

@rtrwalker
Issue body actions

I can write a ply file of points by passing an array to the pipeline object:

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()

Is there anyway to pass an array of faces too (abc in my snippet above)?

Looking in Pipeline.__init__ there is only a spot for arrays.

def __init__(

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?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.