Command Line Use

Feel free to ask any question here
Amac321
Posts: 2
Joined: Mon Aug 04, 2014 6:04 am

Command Line Use

Post by Amac321 »

Hi guys,

I've been trying to use the command line to merge a heap of clouds but i've been getting some weird effect. I eventually just tried opening a cloud and saving it again with the command line and i still get the same problem.
Has anyone else experienced the problem in the images below?

Before:
Original File
Original File
original.jpg (171.54 KiB) Viewed 11114 times
After:
After Command Line
After Command Line
error.jpg (133.77 KiB) Viewed 11114 times
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line Use

Post by daniel »

This looks like an accuracy issue... I guess your original file has very big coordinates? Does CC bothers you when you try to load the file the normal way?

In command line mode, CC won't bother the user about very big coordinates (as we try to avoid any user interaction). But it's clearly a problem here as you lose a lot of numerical precision when loading the file(s) without apply any temporary shift. Not sure how to handle that in the command line mode though... Maybe using a flag to tell CC to try to handle this "automagically"?
Daniel, CloudCompare admin
Amac321
Posts: 2
Joined: Mon Aug 04, 2014 6:04 am

Re: Command Line Use

Post by Amac321 »

Ah i thought something like that might be the case. The file does have very large coordinates, cc opens it ok but always asks for a global shift.
Is there a way to force it to shift from the command line?
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line Use

Post by daniel »

I'm going to add an option to handle this via the command line mode. I'll post there a beta version as soon as it's ready.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line Use

Post by daniel »

As promised, you'll find a new (beta) version here:
(edit: links removed)

I've added an option '-GLOBAL_SHIFT' that comes right after '-O' to setup how CC should handle the global shift. It should be followed:
  • either by AUTO (CC will handle this automatically)
  • of by 3 values (x y z) representing the Global Shift vector to apply to the loaded entity(ies)
I've updated the wiki accordingly (http://www.cloudcompare.org/doc/wiki/in ... ommandLine)
Daniel, CloudCompare admin
ccastilloro
Posts: 3
Joined: Wed Oct 22, 2014 12:40 pm

Re: Command Line Use

Post by ccastilloro »

I would like to ask how to use the command line mode. Do I need to work with the cmd console in windows or is there any specific window in CloudCompare that allows operating in command line mode while you see the results on the 3D view?

Can the label connected components tool be executed using the command line mode?

Sorry for the basic questions,

Thanks a lot,

Carlos
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line Use

Post by daniel »

Yes, you have to call CC through the (windows/linux/mac OS) console.

All the commands actually implemented are listed here:
http://www.cloudcompare.org/doc/wiki/in ... ommandLine

The Connected Components extraction is not implemented yet, but it would be quite easy to add it.
Daniel, CloudCompare admin
ccastilloro
Posts: 3
Joined: Wed Oct 22, 2014 12:40 pm

Re: Command Line Use

Post by ccastilloro »

Thank you!!

Would it be possible to see on the 3D View the results of the operations resulting from the command line?

I mean calling CloudCompare opens the interface, but if I open a point cloud (CloudCompare -o 'whatever file'), although the command line window shows it is successful, we cannot see the point cloud loaded. I would like to use some of the commands in command line mode and working manually afterwards on the interface.

Thank you in advance,

Carlos
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line Use

Post by daniel »

You could simply call CloudCompare again but without the '-o' (only the filename). It should open the GUI version of CC and automatically load the file.
Daniel, CloudCompare admin
ccastilloro
Posts: 3
Joined: Wed Oct 22, 2014 12:40 pm

Re: Command Line Use

Post by ccastilloro »

It worked!

Thanks for the rapid response.

Cheers.
Post Reply