Page 1 of 2

Automating common workflows?

Posted: Fri Oct 16, 2020 7:43 pm
by Laserbrain
Greetings.

I find myself doing the exact same steps in CC - like 100 times a month. I'd love to have a batch or script. It'd save hours and hours of time. But it seems like the CMD line version doesn't support many features at this point?

Any help or ideas would be great. This is what I do:

1) Import a bunch of already registered e57 files
2) Select all in the DB tree
3) Edit > Scalar Fields > Convert to RGB > Yes
4) Edit > Normals > Compute - Yes to default settings (occasionally need to adjust actree radius, but typically default works)
5) Edit > Merge
6) Poisson reconstruction > specific values I always use, not the defaults > ok
7) Then I adjust the scalar field clipping by hand
8) Min/Max > Export
9) Save mesh as PLY

Automating 2-6 would be a godsend.

Thanks!

Re: Automating common workflows?

Posted: Mon Oct 19, 2020 7:52 am
by daniel
Hi,

I believe you will be able to do everything up to 6 as the PoissonRecon plugin doesn't have a command line interface. But the real PoissonRecon project provides a command line tool that may be able to help for the following steps? (I don't know the tool well: see http://www.cs.jhu.edu/~misha/Code/PoissonRecon)

Re: Automating common workflows?

Posted: Tue Oct 20, 2020 5:15 pm
by Laserbrain
Thanks, Daniel. I'll take a closer look at the command line options.

Re: Automating common workflows?

Posted: Tue Oct 20, 2020 7:09 pm
by Laserbrain
Is it possible to open all files in a folder with a wildcard? Like cloudcompare -o *.e57?

Re: Automating common workflows?

Posted: Thu Oct 22, 2020 10:20 am
by daniel
Ah, no!

Re: Automating common workflows?

Posted: Sun Oct 25, 2020 3:21 am
by Laserbrain
Thanks to stack overflow...

This windows .bat works:

Code: Select all

setlocal EnableDelayedExpansion

for %%i in (*.e57) do set "files=-o "%%i" !files!"

cloudcompare -AUTO_SAVE OFF -C_EXPORT_FMT PLY %files% -OCTREE_NORMALS .01 -SF_CONVERT_TO_RGB TRUE -MERGE_CLOUDS -PLY_EXPORT_FMT BINARY_BE -SAVE_CLOUDS FILE "NormalsComputedAndMerged.ply"
pause

Re: Automating common workflows?

Posted: Tue Oct 27, 2020 5:35 pm
by Laserbrain
For anyone interested, here is a batch command to accomplish 1-5:

cloudcompare -AUTO_SAVE OFF -C_EXPORT_FMT PLY -o <file names.e57> -OCTREE_NORMALS .01 -SF_CONVERT_TO_RGB FALSE -MERGE_CLOUDS -PLY_EXPORT_FMT BINARY_BE -SAVE_CLOUDS FILE "NormalsComputedAndMerged.ply"

OCTREE_NORMALS radius may need to be manually adjusted.

Don't forget to put the cloudcompare.exe into the system path (in Windows).

I used this in an input to the standalone poissonrecon.exe and output the Density.

But the density values didn't come into CC in a way that could be trimmed successfully with the SF display range.

Daniel, should this work? Maybe I need to change the poissonrecon parameters...

Re: Automating common workflows?

Posted: Fri Oct 30, 2020 6:00 pm
by daniel
Not sure. How is the density output by the executable version? Or maybe you have to change the default SF index?

Re: Automating common workflows?

Posted: Fri Oct 30, 2020 8:27 pm
by Laserbrain
Here is the file from the poissonrecon.exe being imported into CC. Notice 2 scalar fields. (neither works as expected).

In case you're interested
Screenshot 2020-10-30 132244.jpg
Screenshot 2020-10-30 132244.jpg (99.95 KiB) Viewed 8510 times

Re: Automating common workflows?

Posted: Fri Oct 30, 2020 8:53 pm
by daniel
So no density scalar field?