Page 1 of 1
Scalar field to Coordinate on Command line
Posted: Sat Feb 26, 2022 3:55 pm
by gil
It will be great if a SF_TO_COORD will be available on command line.
Regards Gil
Re: Scalart field too Coordinate on Command line
Posted: Sun Feb 27, 2022 9:46 pm
by daniel
I added this to the TODO list ;)
Re: Scalar field to Coordinate on Command line
Posted: Mon May 29, 2023 7:31 am
by 20cent
Is there any chance you add this soon to CC?
It would be nice ;-)
Re: Scalar field to Coordinate on Command line
Posted: Sat Jun 03, 2023 2:52 pm
by daniel
This will be available in the new 2.13.alpha version (see the -SF_TO_COORD command description in the wiki)
Re: Scalar field to Coordinate on Command line
Posted: Wed Sep 27, 2023 3:45 pm
by Rene Geelen
Hello. I am a newby to CloudCompare and I am interested in using -SF_TO_COORD as well. I have downloaded CloudCompare version 2.13.beta on Windows.
When I run a command line like CloudCompare.exe -O "D:\test_C2M_DIST.ply" -NO_TIMESTAMP -C_EXPORT_FMT PLY -M_EXPORT_FMT PLY -SF_TO_COORD 0 z , an error is logged in the console, saying Unknown or misplaced command: '-SF_TO_COORD' .
What am I doing wrong ? Or is it that -SF_TO_COORD does not yet work in version 2.13.beta ?
BTW, file "D:\test_C2M_DIST.ply" is the result of a -C2M_DIST command and it contains a SF, named C2M signed distances . I want to apply -SF_TO_COORD on this SF and then save the result to disk again for processing as a surface in MountainsMap software of DigitalSurf.
Re: Scalar field to Coordinate on Command line
Posted: Thu Sep 28, 2023 7:11 am
by daniel
Interestingly, this is a bug that has just been fixed in the latest 2.13.beta version (online since Sunday only). Can you try again? (or first you can simply check that your version is prior to the 24th of September).
Re: Scalar field to Coordinate on Command line
Posted: Fri Sep 29, 2023 8:51 am
by Rene Geelen
Hello Daniel.
My 2.13.beta version was Aug 25. I downloaded version of Sep 24 and now the error "Unknown or misplaced command: '-SF_TO_COORD'" is no longer there.
Instead, I get another error : [SF_TO_COORD] (in black) and then 'No point cloud available. Be sure to open or generate one first.' (in red).
When I work with CloudCompare interactively via the GUI, after loading my PLY file, I see in DB tree an item, labeled 'Vertices' and a checkbox which is not checked.
I select 'Vertices' by clicking on it and then I go to menu 'Edit ==> Scalar Fields ==> Set SF as coordinates(s)'. That works fine.
Now I want to do the same thing via command line. Which command does the same thing as selecting point cloud 'Vertices' in interactive mode ?
I guess that if I include that command prior to -SF_TO_COORD, the error 'No point cloud available' will be gone. Right ?
And how can I selected 2 meshes or 2 clouds or 1 cloud and 1 mesh in command line mode ?
Imagine the following workflow in interactive mode via the GUI :
1. I load my PLY file
2. I expand DB tree to see cloud 'Vertices' and select it
3. I run RANSAC in order to detect 2 planes. The result is 2 planes, Plane_0001 and Plane_0002, each consisting of a cloud and a primitive (dip & dip dorection having 2 faces).
4. I expand DB tree and select both dip objects and merge them together, yielding 'Merged mesh'
5. I select 'Merged mesh' and resample points to 1000000, yielding cloud 'Merged mesh.sampled'
6. I select cloud 'Vertices' and 'Merged mesh.sampled' and perform a C2C distance
7. I go to menu 'Edit ==> Scalar Fields ==> Set SF as coordinates(s)' and then save the flattened cloud to a file on disk for post-processing in MountainsMap software
Which sequence of commands in command line mode would execute this workflow automatically ?
Especially, how can I simulate an action like 'I select a specific cloud or mesh somewhere in DB tree' or even 2 such objects in command line mode ?
Or is this a complexity which is beyond command line mode ?
Re: Scalar field to Coordinate on Command line
Posted: Sat Sep 30, 2023 7:33 am
by daniel
You have to use the -EXTRACT_VERTICES option (to 'convert' the mesh vertices to a standalone point cloud). So that you are able to use cloud-only tools on it (such as Ransac SD).
Then -MERGE_MESHES if you want to merge all detected shapes. Then -SAMPLE_MESH, etc.
See
https://www.cloudcompare.org/doc/wiki/i ... _line_mode
Re: Scalar field to Coordinate on Command line
Posted: Tue Oct 03, 2023 6:33 am
by Rene Geelen
Hello Daniel. Thanks a lot for clearing the mist. It works now. Super !