Page 1 of 2

Scripting?

Posted: Tue Jan 17, 2017 2:25 pm
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.

Re: Scripting?

Posted: Tue Jan 17, 2017 9:00 pm
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).

Re: Scripting?

Posted: Fri Jan 20, 2017 9:50 am
by Haowyr
Hey this is good news Daniel! Will 2.9 be available in 7z format? :)

Re: Scripting?

Posted: Tue Jan 24, 2017 8:55 pm
by daniel
That's done, the 2.9.alpha is now available on the main download page.

Re: Scripting?

Posted: Mon Feb 06, 2017 10:29 am
by Haowyr
I still haven't found the way to call for a plug in in command line!

Re: Scripting?

Posted: Mon Feb 06, 2017 12:21 pm
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

Re: Scripting?

Posted: Mon Feb 06, 2017 1:04 pm
by Haowyr
Oh ok, I didn"t get that! Well I cannot do that, my skills are too low :(

Re: Scripting?

Posted: Mon Jun 27, 2022 6:26 pm
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!

Re: Scripting?

Posted: Wed Jun 29, 2022 7:14 pm
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)

Re: Scripting?

Posted: Wed Sep 21, 2022 11:25 pm
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