Page 1 of 1

Trouble with creating SF using CLI

Posted: Tue Oct 05, 2021 8:24 pm
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.

Re: Trouble with creating SF using CLI

Posted: Tue Oct 05, 2021 9:42 pm
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.

Re: Trouble with creating SF using CLI

Posted: Tue Oct 05, 2021 10:58 pm
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.