Page 1 of 1

Why Binary to Ascii change the Properties order ?

Posted: Wed Oct 18, 2023 8:42 am
by smoluck
Hi Daniel and team.

I've been using CC convert a ply binary little endian to ASCII via CommandLine bat file.

My issue is that the converted file RAW ASCII doesn't use a same Properties order than in the Original BINARY (position normal color)
Converted file RAW ASCII from CloudCompare is (position color normal)

How can i preserve the original properties order ?

Original BINARY

Code: Select all

ply
format binary_little_endian 1.0
obj_info XXXXXXXXXXXXXXX
element vertex 318456
property float x
property float y
property float z
property float nx
property float ny
property float nz
property uchar red
property uchar green
property uchar blue
Converted file RAW ASCII from CloudCompare

Code: Select all

ply
format ascii 1.0
comment Created by CloudCompare v2.13.alpha
comment Created 2023-10-18T17:19:40
obj_info Generated by CloudCompare!
element vertex 318456
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property float nx
property float ny
property float nz

Re: Why Binary to Ascii change the Properties order ?

Posted: Thu Oct 19, 2023 8:36 pm
by daniel
Ah, sadly that's not something that we really control (everything is done by the rPly library...).

Maybe it depends on the order in which the properties are declared (see https://github.com/CloudCompare/CloudCo ... r.cpp#L289). You would have to play with the code and see if declaring the RGB colors after the scalar fields makes a difference or not...

And then you would have to add an option in the command line tool to control this behavior...