Page 1 of 1

Unknown or misplaced command: '-SF_OP_SF'

Posted: Fri Jan 13, 2023 5:58 am
by pfisk
I have a command in a batch file as shown below.
Below is part of the trace from the console when it runs.

It errors on the -SF_OP_SF command for some reason. (See last line below)
I reviewed the command line documentation and it seems like it should be pretty straight forward.

Any ideas why it is failing?

C:\Downloads\BATCH TEST>"C:\CloudCompare.exe" -SILENT -O "C:\Downloads\BATCH TEST\Step2.bin" -AUTO_SAVE OFF -SF_OP_SF 3 add 4 -SAVE_CLOUDS FILE 'Step3.bin'
--- Deleted the Initializing stuff and loading plugins etc
[LOADING]
Opening file: 'C:\Downloads\BATCH TEST\Step2.bin'
[BIN] Opening file 'C:\Downloads\BATCH TEST\Step2.bin'...
[BIN] Version 5.2 (coords: float / scalar: float)
[I/O] File 'C:\Downloads\BATCH TEST\Step2.bin' loaded successfully
Found one cloud with 6120162 points
Auto-save is disabled
Unknown or misplaced command: '-SF_OP_SF'

Re: Unknown or misplaced command: '-SF_OP_SF'

Posted: Fri Jan 13, 2023 9:54 pm
by PablerasBCN
I donĀ“t know for sure but I would say

"-SF_OP {SF index} {operation} {value}" SF index reffers only to the SF value so I would try this:


"-SF_OP 3 add 4"

Re: Unknown or misplaced command: '-SF_OP_SF'

Posted: Sat Jan 14, 2023 5:45 pm
by pfisk
So running with the -SF_OP command worked, BUT it just adds the constant value 1 to the first Scalar field
"C:\Program Files\CloudCompare\CloudCompare.exe" -SILENT -O %1 -SF_OP 0 add 1

What I need is to add 2 scalar fields together i.e. SF(at index 0) + SF (at index 1).


The other command that I believe should work for this according to the wiki is: -SF_OP_SF
"C:\Program Files\CloudCompare\CloudCompare.exe" -O %1 -SF_OP_SF 0 add 1
and I tried:
"C:\Program Files\CloudCompare\CloudCompare.exe" -O %1 -SF_OP_SF 0 add LAST
Both give the error about unknown or misplaced command,

Anyone able to add 2 scalar fields together via command line mode?
Thanks in advance
Paul

from wiki
-SF_OP_SF {SF1 index} {operation} {SF1 index}
applies an arithmetic operation on two scalar fields of the loaded cloud/mesh.
SF = SF1 (+,-,*,/) SF2
The scalar-field indexes start from 0. The user can use the keyword 'LAST' to designate the last scalar field.

Re: Unknown or misplaced command: '-SF_OP_SF'

Posted: Sat Jan 21, 2023 10:52 am
by daniel
Can you retry with the latest 2.13.alpha version?

There might have been a previous alpha version that was behaving strangely due to a small bug.

Re: Unknown or misplaced command: '-SF_OP_SF'

Posted: Tue Jan 24, 2023 3:54 pm
by pfisk
Just checked and I have Alpha 2.1.3 installed
CC_version.jpg
CC_version.jpg (184.13 KiB) Viewed 3055 times
any other ideas?

Thanks for helping out with this,

Paul

Re: Unknown or misplaced command: '-SF_OP_SF'

Posted: Wed Jan 25, 2023 8:56 pm
by daniel
Have you downloaded it again? Because the 'alpha' version changes often, you have to refer to the date at which it has been released on the website.

Re: Unknown or misplaced command: '-SF_OP_SF'

Posted: Fri Jan 27, 2023 6:21 pm
by pfisk
With the most recent Alpha version, all worked perfectly.
Thanks for your help

Paul