happly icon indicating copy to clipboard operation
happly copied to clipboard

add support for 64 bit integer

Open christian-rauch opened this issue 4 years ago • 3 comments

This adds type support for int64_t and uint64_t with their equivalent PLY types int64 and uint64.

There is no standard uint128_t for testing the exception in addFaceIndices. This requires boost and is therefore optional.

christian-rauch avatar Jan 12 '22 11:01 christian-rauch

Thanks for submitting this! Pardon the slow response.

Although I see the obvious utility, I'm reluctant to merge this because the 8+ byte int types are not listed in the "specification" of the .ply format here. Honestly that page is not much of an official spec, but it's the closest we have. I don't want to encourage folks to casually create .ply files that other software definitely cannot read.

If we really wanted to add this, maybe we could guard it behind some obnoxiously-worded functions like PlyData::write_nonstandard() or something like that....

nmwsharp avatar Feb 07 '24 03:02 nmwsharp

Not sure where a proper "standard" would be, but at least Wikipedia (https://en.wikipedia.org/wiki/PLY_(file_format)) says:

The type can be specified with one of char uchar short ushort int uint float double, or one of int8 uint8 int16 uint16 int32 uint32 float32 float64.

I would say that software that cannot handle a certain data type should ignore the property and notify the user.

christian-rauch avatar Feb 07 '24 19:02 christian-rauch