Command Line SF_ARITHMETIC

To post any request/idea for new functionalities
Post Reply
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Command Line SF_ARITHMETIC

Post by PablerasBCN »

Please add parameter for "Update SF1 directly" so that the operations that support it do not generate new scalar fields, this way we can avoid bloat and unnecesary file size increases. Cheers.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line SF_ARITHMETIC

Post by daniel »

Not sure if it's still interesting to you, but this is now possible with the -IN_PLACE sub-option.
Daniel, CloudCompare admin
DaveOZ
Posts: 4
Joined: Sat Oct 22, 2022 4:35 am

Re: Command Line SF_ARITHMETIC

Post by DaveOZ »

Will the command line eventually get the option to apply basic operations to two scalar fields like it's possible in the GUI?

Code: Select all

-SF_OP {SF_index1} {operation} {SF_index2}
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line SF_ARITHMETIC

Post by daniel »

Do you mean other operations than (+,-,*,/)?
Daniel, CloudCompare admin
DaveOZ
Posts: 4
Joined: Sat Oct 22, 2022 4:35 am

Re: Command Line SF_ARITHMETIC

Post by DaveOZ »

Hey Daniel,

no, I’d like to apply these basic operations to two scalar fields using both as operands. So far I only figured out how to use a constant value as the second operand (VALUE in the wiki). But can I use a scalar field index as the value that gets e.g. multiplied with another scalar field index?

I know it works in the GUI but I haven’t achieved that on the command line yet.

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

Re: Command Line SF_ARITHMETIC

Post by daniel »

Ah sorry, I realize the Wiki was not up to date!

There's the -SF_OP_SF command that works the same as the -SF_OP option (but with 2 scalar field indexes). I've updated the wiki, and also the code (so that it can work on meshes just as the -SF_OP option does now) but in the older versions it was already working on clouds at least.

Thanks for the feedback.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line SF_ARITHMETIC

Post by daniel »

Ah sorry, I realize the Wiki was not up to date!

There's the -SF_OP_SF command that works the same as the -SF_OP option (but with 2 scalar field indexes). I've updated the wiki, and also the code (so that it can work on meshes just as the -SF_OP option does now) but in the older versions it was already working on clouds at least.

Thanks for the feedback.
Daniel, CloudCompare admin
DaveOZ
Posts: 4
Joined: Sat Oct 22, 2022 4:35 am

Re: Command Line SF_ARITHMETIC

Post by DaveOZ »

Awesome! Thank you.
Post Reply