Page 1 of 1

Command line mode - Output problem

Posted: Thu May 06, 2021 11:29 am
by chris56tree
Hello there,

I am working in command line mode environment.

I have one point cloud (LAS format) and one mesh (OBJ format) data. I am just wondering if is it possible to save those two data in one .bin file?

What I would like for my final product is that when I open the single bin file, both point cloud and mesh will be opened.

I have tried command -save_clouds ALL_AT_ONCE and -save_meshes ALL_AT_ONCE, yet it seems only be able to group its own clouds / meshes.

Is there any way I can work it out? Your help would be highly appreciate.

Thank you!

Re: Command line mode - Output problem

Posted: Thu May 06, 2021 11:58 am
by daniel
Hum, indeed, I don't think it's possible to mix meshes and clouds right now. One would have to update the command line code...

Re: Command line mode - Output problem

Posted: Fri May 07, 2021 1:34 am
by chris56tree
i see .... I am looking forward to this upgrade. Thank you very much!

Re: Command line mode - Output problem

Posted: Fri May 07, 2021 8:54 am
by chris56tree
Hi Daniel,

I have other questions that I would like to solve.

1. I have a mesh (OBJ format). When I try to load the mesh model, the global shift window pops out. Is there anyway that I can set it off?

I tried this command and it seems it doesn't work. The output file becomes bin file, yet I want to keep it in obj format.

Cloudcompare -h_export_fmt obj -o -global_shift 0 0 0 "XXXX.obj" -save_meshes


2. I have already calculated the C2M distance (bin format). Is there anyway that I can preset the steps of color scale from 256 to 1024 and check the visible box?

As I will do the automatic calcuation for thousands of data, I would like to preset all of the above settings so that the user can open the files without setting anything.

Sorry for all the troubles that might caused you. I am really appreciate your help.

Have a good weekend!

Re: Command line mode - Output problem

Posted: Sat May 08, 2021 8:45 pm
by daniel
1. I bet you have to set the output mesh format with -M_EXPORT_FMT

2. You can set a custom color scale (that you should design in the 'Color scale manager' and export as an xml file) with -SF_COLOR_SCALE. However I don't think you can force the color scale to be 'visible' in the BIN file afterwards.

Re: Command line mode - Output problem

Posted: Mon May 10, 2021 4:42 pm
by WargodHernandez
the -h_export_fmt command will set the hierarchy file type (used to store cloud and mesh into a single file). The problem is I introduced that for the Ransac plugin to be able to save the resulting mesh and point clouds at the same time, I did not however add a general purpose -save-hierarchy command.
It shouldn't be too difficult to add as it would be pretty similar to the other -save_clouds and -save_meshes commands but would export the export entity would be forced to heirarchy like this:

Code: Select all

QString errorStr = cmd.exportEntity(clGroup, QString(), nullptr, ccCommandLineInterface::ExportOption::ForceHierarchy);