commandline _Remove SF, not enough SF
Posted: Mon Jan 09, 2023 1:04 pm
Hi,
I think I found a silly bug.
In a file fin 10 SF, if I attemp to remove 6 or more, commandline will complaint.
command:
for %%f in (E:\LIDAR_JAPAN\MMS8\MMS\_00_ORIGINAL_PCV\08OE2713.las) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -REMOVE_SF 1 -REMOVE_SF 2 -REMOVE_SF 3 -REMOVE_SF 4 -REMOVE_SF 5 -REMOVE_SF 6 -SAVE_CLOUDS
I think that what happens is that it check the remaining SF's count which after each command seems to go lower, so when trying to delete 6th, having removed 5 out of 10 it complaints, yet, until 5th it removes properly the SF pointed ( I tried several times in a row _SF1 and does not work) so somehow the data seems stored in an array fed openning yet the count variable seems to update on each removal. May be it would need to check against the data holding array's count. Or resize array on each iteration. I'm speaking without knowing the code, but I think makes sense. :D
I think I found a silly bug.
In a file fin 10 SF, if I attemp to remove 6 or more, commandline will complaint.
command:
for %%f in (E:\LIDAR_JAPAN\MMS8\MMS\_00_ORIGINAL_PCV\08OE2713.las) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -REMOVE_SF 1 -REMOVE_SF 2 -REMOVE_SF 3 -REMOVE_SF 4 -REMOVE_SF 5 -REMOVE_SF 6 -SAVE_CLOUDS
I think that what happens is that it check the remaining SF's count which after each command seems to go lower, so when trying to delete 6th, having removed 5 out of 10 it complaints, yet, until 5th it removes properly the SF pointed ( I tried several times in a row _SF1 and does not work) so somehow the data seems stored in an array fed openning yet the count variable seems to update on each removal. May be it would need to check against the data holding array's count. Or resize array on each iteration. I'm speaking without knowing the code, but I think makes sense. :D