Binary PLY files with Rhinos 6.0 line ending issue
When I try to open some binary PLY files exported by Rhinos 6.0, VTK raises an error and stops loading them. I think it is because of the non-Unix terminator CR LF used as line ending.
import vtk
reader = vtk.vtkPolyDataReader()
reader.SetFileName("Box.ply")
reader.Update()
results in
property for file: Box.plys Version 6.095F740] vtkDataReader.cxx:543 ERR| vtkPolyDataReader (0x4b85ab0): Unrecognized file type: ply
The PLY file is here: https://github.com/cnr-isti-vclab/meshlab/files/3330082/Box.ply.zip
It would be nice if it read it correctly, adopting this philosophy:
https://github.com/dranjan/python-plyfile
Seems the same issue as in:
- https://developer.blender.org/T78278
- https://github.com/PointCloudLibrary/pcl/pull/1370/files
- https://github.com/google/draco/issues/613
- https://github.com/cnr-isti-vclab/meshlab/issues/463
- https://developer.blender.org/rBA04c0573ee77cc955cf585a0d7a61163375eb57cd
- https://github.com/isl-org/Open3D/issues/5091
Edited by ferdymercury