Unknown or misplaced command: '-SF_OP_SF'

Feel free to ask any question here
Post Reply
pfisk
Posts: 15
Joined: Thu Sep 13, 2018 9:08 pm

Unknown or misplaced command: '-SF_OP_SF'

Post 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'
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: Unknown or misplaced command: '-SF_OP_SF'

Post 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"
pfisk
Posts: 15
Joined: Thu Sep 13, 2018 9:08 pm

Re: Unknown or misplaced command: '-SF_OP_SF'

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

Re: Unknown or misplaced command: '-SF_OP_SF'

Post 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.
Daniel, CloudCompare admin
pfisk
Posts: 15
Joined: Thu Sep 13, 2018 9:08 pm

Re: Unknown or misplaced command: '-SF_OP_SF'

Post by pfisk »

Just checked and I have Alpha 2.1.3 installed
CC_version.jpg
CC_version.jpg (184.13 KiB) Viewed 3026 times
any other ideas?

Thanks for helping out with this,

Paul
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Unknown or misplaced command: '-SF_OP_SF'

Post 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.
Daniel, CloudCompare admin
pfisk
Posts: 15
Joined: Thu Sep 13, 2018 9:08 pm

Re: Unknown or misplaced command: '-SF_OP_SF'

Post by pfisk »

With the most recent Alpha version, all worked perfectly.
Thanks for your help

Paul
Post Reply