Trouble with creating SF using CLI

Feel free to ask any question here
Post Reply
JacekJaskolski
Posts: 4
Joined: Fri Oct 01, 2021 9:14 am
Contact:

Trouble with creating SF using CLI

Post by JacekJaskolski »

Hi All,

I'm trying to export the Z coordinates to a new scalar field using the command line interface:

Code: Select all

CloudCompare.exe -AUTO_SAVE OFF -O C:\CloudCompareIO\test.e57 -COORD_TO_SF Z -C_EXPORT_FMT E57 -SAVE_CLOUDS FILE C:\CloudCompareIO\test+Z.e57
The script runs without any errors and the console acknowledges the operation with a [COORD TO SF] entry, but the resulting cloud doesn't have the new scalar field.

Interrestingly enough, if I use the command on an input cloud which doesn't have the "Intensity" SF then the Z coordinates do get written to a SF in the output cloud, but... CC forces it to be renamed to "Intensity" (Console: [E57] No 'intensity' scalar field found, we'll use the current displayed one instead (Coord.Z))

I have no clue what's going on. Am I doing something wrong or should this be considered a bug?

I'm using CC 2.12 Alpha on Windows.
daniel
Site Admin
Posts: 7479
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Trouble with creating SF using CLI

Post by daniel »

The E57 format doesn't manage scalar fields in a generic way. It only handles intensities. Therefore CC will use the active scalar field as 'intensity' by default. But that's all.
Daniel, CloudCompare admin
JacekJaskolski
Posts: 4
Joined: Fri Oct 01, 2021 9:14 am
Contact:

Re: Trouble with creating SF using CLI

Post by JacekJaskolski »

Thanks Daniel, that explains everything!
I'm not bound to E57 for output so I guess I'll switch to PLY or BIN, that should work.
Post Reply