Error when loading .ply - Mesh.from_ply()


I am trying to import a .ply file with the Mesh.from_ply() function but I get an error because of the float 32 bit format.
Would there be a way to work around this problem?

You can find the ply file on this link


the PLY reader in compas is indeed not equipped to read scan data directly into meshes (it only deals with xyz coordinates for now). we will make a pointcloud reader available in the next release. will post here when it is available…

does this look correct?

1 Like

Yes it does!!

thank you!

will still until tonight before i can push the update though :slight_smile:

i updated the PLY reader in the latest commits. there is no new version yet though. so you need a “from source” install to use it for now.

this is the code i used to generate the image

from compas_viewers.objectviewer import ObjectViewer
from compas.datastructures import Mesh

FILE = 'temp/scan.ply'

mesh = Mesh.from_ply(FILE)

viewer = ObjectViewer()
viewer.view.use_shaders = True

viewer.add(mesh, settings={'vertices.on': False, 'edges.on': False, 'color': '#cccccc'})


0.16.2 released with the PLY upgrade…

Updated compas and everything works perfectly now!

Thanks a lot Tom

1 Like