python-plyfile icon indicating copy to clipboard operation
python-plyfile copied to clipboard

binary_little_endian to ascii

Open ziwenjie opened this issue 3 years ago • 1 comments

Hi, authors: the plyfile can read the mesh ply files, and how to convert the binary_little_endian to ascii?

Thanks! Yours, sincerely.

ziwenjie avatar Jun 13 '22 03:06 ziwenjie

The simplest way is to set the text attribute of the PlyData instance to True.

dranjan avatar Jun 13 '22 16:06 dranjan

f_in = open(C://file_in.ply, 'r') f_out = open(C://file_out.ply, 'w+')

data = plyfile.PlyData.read(f_in) data.text = True data.write(f_out) f_in.close() f_out.close()

smoluck avatar Feb 16 '23 08:02 smoluck

Exactly, @smoluck.

I'm going to close this, since the issue seems to have been resolved.

dranjan avatar Feb 16 '23 17:02 dranjan