Page 1 of 1
Command Line – Merge with Original Cloud Index
Posted: Wed May 08, 2024 12:05 pm
by Marek
Dear community,
I am interested in merging point clouds that are produced by the `-EXTRACT_CC` function. The problem is, that, I would like to generate their original cloud indexes into a Scalar Field (SF), similarly to what is possible in the GUI version of Cloud Compare.
Could you please provide any suggestions on how to accomplish this using the Command Line mode of Cloud Compare?
Thank you!
...
previous code
...
-EXTRACT_CC {CCoctreelevel} {CCpts} \
-SELECT_ENTITIES -CLOUD -ALL \
-here i need to merge with the indexes
-SAVE_CLOUDS \
Re: Command Line – Merge with Original Cloud Index
Posted: Thu May 09, 2024 7:28 am
by daniel
Currently the command line code doesn't allow for this. One would have to upgrade it...
Re: Command Line – Merge with Original Cloud Index
Posted: Thu May 09, 2024 7:29 am
by daniel
Maybe it would be 'easier' with CloudCompy (CloudCompare Python wrapper).
Re: Command Line – Merge with Original Cloud Index
Posted: Thu May 09, 2024 7:00 pm
by HeadLess
daniel wrote: ↑Thu May 09, 2024 7:28 am
Currently the command line code doesn't allow for this. One would have to upgrade it...
Well you can hack your way to achive the same... probably it is generated by script so easier to use command files
Code: Select all
-O cloud1.bin
-SELECT_ENTITIES -LAST 1
-SF_ADD_CONST orig_index 1
-O cloud2.bin
-SELECT_ENTITIES -LAST 1
-SF_ADD_CONST orig_index 2
.
.
.
-O cloudn.bin
-SELECT_ENTITIES -LAST 1
-SF_ADD_CONST orig_index n
Sorry missed it, is generated connected components well that is harder yeah.
Re: Command Line – Merge with Original Cloud Index
Posted: Fri May 10, 2024 6:22 am
by Marek
Thank you for your replies and suggestions, I appreciate it!
I will try it with the python.
Good luck!
Re: Command Line – Merge with Original Cloud Index
Posted: Fri May 10, 2024 7:46 pm
by HeadLess
Marek wrote: ↑Fri May 10, 2024 6:22 am
Thank you for your replies and suggestions, I appreciate it!
I will try it with the python.
Good luck!
If the clouds not very big you can always save all files into their own files then reread them with a script where you could do that what i wrote earlier, but it means that you need to write/reread everything so it is a waste of time.
Re: Command Line – Merge with Original Cloud Index
Posted: Tue May 14, 2024 5:14 am
by Marek
This is actually what I did. Since the clouds are very tiny, they don't even process too long.
Thanks for your suggestion.