PLY merge via command line

Feel free to ask any question here
Post Reply
Gius
Posts: 3
Joined: Wed Jun 14, 2017 1:08 pm

PLY merge via command line

Post 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!
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: PLY merge via command line

Post 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.
Daniel, CloudCompare admin
Gius
Posts: 3
Joined: Wed Jun 14, 2017 1:08 pm

Re: PLY merge via command line

Post 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.
Attachments
merge_clouds.png
merge_clouds.png (22.6 KiB) Viewed 6131 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: PLY merge via command line

Post by daniel »

This probably means that the PLY files contain meshes and not clouds ;)
Daniel, CloudCompare admin
Gius
Posts: 3
Joined: Wed Jun 14, 2017 1:08 pm

Re: PLY merge via command line

Post 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
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: PLY merge via command line

Post 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)
Daniel, CloudCompare admin
Post Reply