Adding the ability to turn off signed distances for C2M_DIST in command line?

Feel free to ask any question here
Post Reply
tbere9
Posts: 5
Joined: Tue Sep 06, 2022 8:30 am

Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by tbere9 »

Hi,

I am trying to automate C2M distance calculations using command line, but I want the mean distances to be calculated with absolute values as positive and negative values are currently cancelling each other out. I know this is achievable by unticking the signed distances box in the C2M distance window, but there is no option for this in command line. I tried running C2C distance calculations using the mesh vertices, but the mean values are different.

Are there any workarounds for this? Is this something that might be available in the future?
Thank you :)
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by daniel »

Indeed, this option is not available via the command line yet.

But we could add it of course (we just need to find the time and motivation ;).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by daniel »

That's you lucky day ;)

I added the -UNSIGNED sub-option to the -C2M_DIST command. You'll have to download the latest 2.13.alpha version.
Daniel, CloudCompare admin
tbere9
Posts: 5
Joined: Tue Sep 06, 2022 8:30 am

Re: Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by tbere9 »

Hi Daniel,

Thank you so much for doing that!

I downloaded and installed the 2.13.alpha, but I can't seem to get it to work for me. These are the commands I'm using to compare my STL files:

set local EnableDelayedExpansion
set Compared=C:\CC_TEST\COMP
set Reference=C:\CC_TEST\REF
for %%f in ( "%Reference%"\* ) do ("C:\Program Files\CloudCompare\CloudCompare.exe" -SILENT -O %Compared%\%%~nxf -O %Reference%\%%~nxf -C2M_DIST -UNSIGNED)
cmd /k

Am I doing something wrong?
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by daniel »

What's the error on your side? Or do you still get signed distances?
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by daniel »

Oh no, I realize I made a silly mistake! I'll update the code ASAP. In your current version, you can just not set the -UNSIGNED option and you'll get unsigned distances!

This will be fixed in the next release (hopefully online tomorrow).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Adding the ability to turn off signed distances for C2M_DIST in command line?

Post by daniel »

The fixed 2.13.alpha version is now online!
Daniel, CloudCompare admin
Post Reply