Scripting?

To post any request/idea for new functionalities
adequat
Posts: 5
Joined: Thu Sep 29, 2016 9:54 pm

Scripting?

Post by adequat »

I was wondering about the opinions on a possibility to script something in CC or to somehow use the full functionality of CC in scripts. I am still fairly new to this game but from what I see, having the ability to script a process in CC would make it a much more powerful tool for many applications.
I know that there is the command line processing but from the Wiki it looks like quite some functions are missing. Are any of the plugins available via the command line?
My application would be running the same steps on similar clouds (e.g. import, distance computations, rasterizing, save as plus, some volume calculations or a few areas, ...). Some of this would probably be possible with the command line but not all of it.

What I also like a lot about scripting is that one can be sure that (given the CC version does not change) the steps are exactly the same or vary only by what is defined in the script. Which makes it great for trying different parameters and so on and is good for scientific data, where every step from the raw data to the output should be well defined and reproducible.

I suspect that adding something like this would be a fairly large amount of work but I just wanted to see, what other people think.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scripting?

Post by daniel »

1) Since version 2.9, plugins can now be called through the command line... technically

2) Yes, only a limited number of functions is accessible through the command line interface, but it's because I'm the only one who seems to be willing to add new commands (hum, hum), and I don't have the time / motivation to add all of them as, as you guessed, it's quite some work and I don't personally use the command line!

3) Adding a more generic scripting mechanism (Python, etc.) would be great but would imply indeed a huge work (much more than simply extending the command line tool).
Daniel, CloudCompare admin
Haowyr
Posts: 48
Joined: Wed Feb 11, 2015 11:01 am

Re: Scripting?

Post by Haowyr »

Hey this is good news Daniel! Will 2.9 be available in 7z format? :)
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scripting?

Post by daniel »

That's done, the 2.9.alpha is now available on the main download page.
Daniel, CloudCompare admin
Haowyr
Posts: 48
Joined: Wed Feb 11, 2015 11:01 am

Re: Scripting?

Post by Haowyr »

I still haven't found the way to call for a plug in in command line!
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scripting?

Post by daniel »

Well, someone has to add the code for each plugin ;)

I said it's 'technically' possible. Before that it was not even possible :D
Daniel, CloudCompare admin
Haowyr
Posts: 48
Joined: Wed Feb 11, 2015 11:01 am

Re: Scripting?

Post by Haowyr »

Oh ok, I didn"t get that! Well I cannot do that, my skills are too low :(
cmackSIO
Posts: 12
Joined: Fri Jun 24, 2022 10:32 pm

Re: Scripting?

Post by cmackSIO »

Has this been updated at all since 2017? I'm looking to automate change detection/volumetric calculations using the M3C2 plugin on large coastal cliff point clouds. I've seen the cloudcompy python wrapper was published but I'm not sure if that will work with M3C2? I'm hoping to run M3C2, isolate areas of significant change and then find rock slide volume of these areas, potentially using the Poisson Surface Reconstruction algorithm. Would it be possible to make this process at least semi-automated by using the python wrappers? I know this post is old so I'll likely create a new thread with more info/photos of the datasets etc. Any help would be greatly appreciated, thank you!
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scripting?

Post by daniel »

So M3C2 is now accessible via the command line (partly - see https://www.cloudcompare.org/doc/wiki/i ... _line_mode, and especially the -M3C2 option). Not sure if that was the case at that time.

And next, we now have a Python interface (CloudCompy). M3C2 might not be accessible, but its author is really active and might be able to create the interface quickly (see https://github.com/CloudCompare/CloudComPy)
Daniel, CloudCompare admin
Coldpoints
Posts: 3
Joined: Tue Oct 18, 2016 1:40 am

Re: Scripting?

Post by Coldpoints »

Hello Daniel,
I just reviewed the CloudComppy release notes, and I still don't see the M3C2 plugin integrated, is that correct? Do you see the M3C2 being added soon!? Also, regarding the M3C2 I would like to use the Precision maps and select Sigma(x), Sigma(y), and Sigma(z).

Also, is Interpolate from another entity available in the scripting!? Sorry if this is a repetitive question or if the answer is obvious.
Thanks
Post Reply