Why Binary to Ascii change the Properties order ?

Feel free to ask any question here
Post Reply
smoluck
Posts: 15
Joined: Mon Dec 02, 2019 2:15 am

Why Binary to Ascii change the Properties order ?

Post 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
daniel
Site Admin
Posts: 7479
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Why Binary to Ascii change the Properties order ?

Post 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...
Daniel, CloudCompare admin
Post Reply