ddiakopoulos / tinyply

:earth_africa: C++11 ply 3d mesh format importer & exporter
598 stars 118 forks source link

Cannot read a ply file correctly #46

Open wlsdzyzl opened 3 years ago

wlsdzyzl commented 3 years ago

Hey, ddiakopoulos, the library is really cool. However, during my use of it, something wrong happend. I use tinyply to generate the file I needed, which contains other 4 properties for vertex. The writing part works well. When i tried to read it, it just crashed, or read some nosense content. I think the file itself has no errors, because meshlab can parse it properly. Here is the file: download_link . It's written through ascii, when i use binary format to write it, tinyply works well. However i want to figure out what happened. I will be very thankful if you will take some time to check this out!

ddiakopoulos commented 3 years ago

I will take a look at this for tinyply version 2.4. As we discussed over email, the specific issue is that tinyply will write NaN values fine, but fails to read them correctly. NaNs work as expected (reading/writing) in binary mode.