Entering command line mode

Feel free to ask any question here
Post Reply
adriantaylor09
Posts: 9
Joined: Mon Jun 16, 2014 8:48 pm

Entering command line mode

Post by adriantaylor09 »

Dumb question here,

How do I actually begin the command line mode?

Thanks in advance
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Entering command line mode

Post by daniel »

Hi,

In fact you simply have to start a Windows "command" window (http://windows.microsoft.com/en-us/wind ... mpt-window) then change the directory to CC's one (with the 'cd' command).

Note: more simply you can right click on CC's folder in the explorer while holding the SHIFT key, and select the 'Open command window here' entry.

From there, you can type your command 'CloudCompare -O myfile.bin ...'.
Daniel, CloudCompare admin
AnthonyM
Posts: 2
Joined: Sun Dec 01, 2019 11:00 pm

Re: Entering command line mode

Post by AnthonyM »

If anyone like me initially got stuck trying to understand CloudCompare command line and how it works, here is a script below including explanations on how to subsample a pointcloud file.
With a Windows PC simply copy and paste the below script into notepad, follow steps 1 to 3, once you do so save the file on your computer, change the extension of this file from .txt to .bin, double click on the file and it should now launch Cloudcompare in command line mode. The below script is for subsampling but you can change the command for any of the ones listed at https://www.cloudcompare.org/doc/wiki/i ... _line_mode. Hope this helps, good luck!


@echo off

echo "Script running..."

:: STEP 1 - Copy and paste the required file paths. First line - where the file you are importing is located. Second line - where the result will be saved, and the third line - where CloudCompare is located.

set ImportFilePath="G:\Bondi Project \Bondi Pointcloud.e57"

set ExportFilePath="G:\CloudCompareOutput\Test01.e57"

set CloudCompareExe="C:\Program Files\CloudCompare\CloudCompare.exe"

:: STEP 2 - Set the type of subsampling and the amount required. If you want to change the type of subsampling performed, change the below word "RANDOM" to "SPATIAL" or "OCTREE" as required
:: Current settings are for "RANDOM" subsampling and with a value of "34000000" which will output a file of 500MB

%CloudCompareExe% -AUTO_SAVE OFF -O %ImportFilePath% -SS RANDOM 34000000 -C_EXPORT_FMT E57 -SAVE_CLOUDS FILE %ExportFilePath%

:: STEP 3 - Save this file and then double click it (i.e. double click on "CloudCompareHelper.bat") which will now run CloudCompare subsampling in command line mode. Upon completion the subsampled pointcloud result should be where you specified!


echo "Script complete."

cmd /k
Gorgious
Posts: 1
Joined: Wed Jan 05, 2022 1:22 pm

Re: Entering command line mode

Post by Gorgious »

Thanks for the explanation and given batch script. It should be noted the extension should be changed from .txt to .bat, and not .bin if you want to be able to run it by double-clicking on it. Cheers
Nico3D
Posts: 2
Joined: Tue Feb 01, 2022 3:09 pm

Re: Entering command line mode

Post by Nico3D »

Hi,
Thanks for the script. However, i always have an error while using it:
"invalid parameter: specified 2 files names, but there are 1 clouds"

i don't understand why? I just changed with my directory.
If anyone got a clue. Thanks.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Entering command line mode

Post by daniel »

Can you paste here the exact command you used?
Daniel, CloudCompare admin
Nico3D
Posts: 2
Joined: Tue Feb 01, 2022 3:09 pm

Re: Entering command line mode

Post by Nico3D »

I solved my issue by changing my export path from "\EXPORT 3D\" to \EXPORT_3D\
Unformately the error code is not very explicit.
Thank for your help.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Entering command line mode

Post by daniel »

Indeed
Daniel, CloudCompare admin
Post Reply