Command Line running much slower than application

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
jeffNIAR
Posts: 1
Joined: Tue Apr 07, 2020 5:56 pm

Command Line running much slower than application

Post by jeffNIAR »

Hello,

I have a command line batch file, that takes a point cloud, and slices it up into 1.5m cubes. Then exports it.
For some reason it has been really slow with larger, spatially, point clouds. For example, manually going through the process in the application, takes about 25 minutes total, and generates roughly 10,000 files. The command line version after an hour, had only generated 10 files, all with less than 5 points in them. Most of the files were generated within the last 10 minutes, of the hour.

Is there something wrong with my batch file? It is almost like it is processing all the empty cubes between everything?

echo off
echo This is a script to automatically slice point cloud files into smaller pieces/cubes
echo.
echo %Date%
echo %time%
set SliceSettings="SliceSettings.xml"
IF EXIST SliceSettings.xml (goto SSExist) else goto SSNExist
:SSExist
echo Using Slice Settings file found within the directory
goto SSExist

:SSNExist
echo Slice Settings XML file:
set dialog="about:<input type=file id=FILE><script>FILE.click();new ActiveXObject
set dialog=%dialog%('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);
set dialog=%dialog%close();resizeTo(0,0);</script>"
for /f "tokens=* delims=" %%p in ('mshta.exe %dialog%') do set "file=%%p"
set SliceSettings=%file%
echo Slice Settings file selected is: "%SliceSettings%"
:SSExist

echo.
echo Specify point cloud:
set dialog="about:<input type=file id=FILE><script>FILE.click();new ActiveXObject
set dialog=%dialog%('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);
set dialog=%dialog%close();resizeTo(0,0);</script>"
for /f "tokens=* delims=" %%p in ('mshta.exe %dialog%') do set "file=%%p"
set PointCloud=%file%
echo Point Cloud file selected is: "%PointCloud%"
echo.

"C:\Program Files\CloudCompare\CloudCompare.exe" -C_EXPORT_FMT ASC -ADD_PTS_COUNT -EXT txt -o "%PointCloud%" -CROSS_SECTION "%SliceSettings%"
echo.
echo ALL DONE!
echo %Date%
echo %time%
pause
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line running much slower than application

Post by daniel »

Do you have large coordinates maybe? In this case you have to explicitly tell CC how to handle them in command line mode (with -GLOBAL_SHIFT).
Daniel, CloudCompare admin
Post Reply