Command line command for creating mesh from point cloud

Feel free to ask any question here
Post Reply
ivan-zd
Posts: 5
Joined: Thu Jan 21, 2016 4:36 pm

Command line command for creating mesh from point cloud

Post by ivan-zd »

Hello,
I am trying to use CloudCompare command line mode to create mesh from the point cloud file (.ply).
It looks like command line mode of CloudCompare still doesn't support something like Poisson Surface Reconstruction but i see there is this -DELAUNAY option which uses 2.5D Delaunay triangulation. So the command that i run on my Ubuntu (where I've previously compiled latest verision of cloud compare) looks like this:

Code: Select all

/usr/local/CloudCompare/CloudCompare -compute_normals -o data/my_point_cloud.ply -DELAUNAY
When i execute this command i get success message and i see that new .bin file is created in my data folder. However, when I open that file in cloud compare on Linux machine i can't see my triangles. I tried to execute same command on Windows machine and there I can see triangles when i import created .bin file but the mesh is not listed in layer tree and i can't export it to any other format.

Does anybody else have similair experiences here?

Thank you in advance
Ivan
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line command for creating mesh from point cloud

Post by daniel »

It's been a long time since I tested this option. I'll check it asp!

Meanwhile, can you change the output format to something like PLY, OBJ or STL? (use M_EXPORT_FMT)
Daniel, CloudCompare admin
ivan-zd
Posts: 5
Joined: Thu Jan 21, 2016 4:36 pm

Re: Command line command for creating mesh from point cloud

Post by ivan-zd »

Hi, I tried with different output formats but it's still always saved as .bin and I am not sure why? This is how my command looks like (in case i want to export it as obj)

Code: Select all

/usr/local/CloudCompare/CloudCompare -compute_normals -o data/my_point_cloud.ply -DELAUNAY -M_EXPORT_FMT OBJ
Did you maybe find time to test it on your side?

Thank you very much
Ivan
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line command for creating mesh from point cloud

Post by daniel »

You have to define '-M_EXPORT_FMT OBJ' before the DELAUNAY command (as commands are executed in the order they appear).
Daniel, CloudCompare admin
ivan-zd
Posts: 5
Joined: Thu Jan 21, 2016 4:36 pm

Re: Command line command for creating mesh from point cloud

Post by ivan-zd »

Yes, I tried also like that but then it was always complaining about 'incompatible entity/file types' .. I tried both with .las and .ply as source file and i set export format to .obj but it didn't work either way. The only thing that passed is when input and output were defined in same type (.ply) but then the output file didn't have mesh inside, it was again only the point cloud even though i applied delaunay triangulation in command.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line command for creating mesh from point cloud

Post by daniel »

Okay, I found the bug. You can now specify an output format other than BIN (and before using the DELAUNAY option).

You can download the latest beta version online (2.6.3).

By the way, the 'compute_normals' option is only used when reading gridded point clouds (PTX, FARO, DP, etc.). Therefore you can drop it.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line command for creating mesh from point cloud

Post by daniel »

Oups I just realized the update of the online version was not completed! Now it's ok ;)
Daniel, CloudCompare admin
Post Reply