Page 1 of 1
PLY merge via command line
Posted: Wed Jun 14, 2017 1:26 pm
by Gius
Hi,
I need to merge many ply files into a single one; using GUI I can open files and save, but I need to do this work via command line.
In wiki (
http://www.cloudcompare.org/doc/wiki/in ... .9.beta.29) I found -MERGE_CLOUDS {filename} but I didn't understood if it can be useful in my case and how it works.
Some idea?
Thank you!
Re: PLY merge via command line
Posted: Thu Jun 15, 2017 8:33 am
by daniel
Yes, you can load all the files in a row and then use the 'MERGE_CLOUDS' method to make one cloud that you'll be able to export to a PLY file.
Re: PLY merge via command line
Posted: Thu Jun 15, 2017 10:01 am
by Gius
Thank you Daniel.
I tryed this command line:
CloudCompare -O EDIFICIO\Mesh\0000_0000_0006.ply -O EDIFICIO\Mesh\0000_0000_0007.ply -O EDIFICIO\Mesh\0000_0001_0004.ply -O EDIFICIO\Mesh\0000_0001_0005.ply -O EDIFICIO\Mesh\0000_0001_0006.ply -O EDIFICIO\Mesh\0000_0001_0007.ply -O EDIFICIO\Mesh\0000_-001_0006.ply -O EDIFICIO\Mesh\0000_-001_0007.ply -O EDIFICIO\Mesh\0000_-002_0006.ply -O EDIFICIO\Mesh\0000_-002_0007.ply -O EDIFICIO\Mesh\0000_-003_0006.ply -O EDIFICIO\Mesh\0000_-003_0007.ply -MERGE_CLOUDS
and I have the "Less than 2 clouds! Nothing to do..." as you can se in attached image.
Where I'm wrong?
Thank you.
Re: PLY merge via command line
Posted: Thu Jun 15, 2017 3:55 pm
by daniel
This probably means that the PLY files contain meshes and not clouds ;)
Re: PLY merge via command line
Posted: Mon Jun 19, 2017 3:35 pm
by Gius
Thank you Daniel.
We solved using -SAVE_MESHES with param ALL_AT_ONCE, for example
cloudcompare -O -001_-001_0006.ply -O -001_-002_0006.ply -O -001_-002_0007.ply -SAVE_MESHES ALL_AT_ONCE
This way we obtain a bin file that we can open with CC, but if we try importing with MeshLab we have an header error (the single PLY files opening is ok)
This is not a "standard" PLY?
Gius
Re: PLY merge via command line
Posted: Mon Jun 19, 2017 7:02 pm
by daniel
Well, it should be a standard PLY file... does it work when applying the same command line with only one PLY file?
You can also play with the ASCII/BINARY format (see PLY_EXPORT_FMT)