Command Line – Merge with Original Cloud Index

Feel free to ask any question here
Post Reply
Marek
Posts: 3
Joined: Wed May 08, 2024 11:54 am

Command Line – Merge with Original Cloud Index

Post 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 \
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line – Merge with Original Cloud Index

Post by daniel »

Currently the command line code doesn't allow for this. One would have to upgrade it...
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line – Merge with Original Cloud Index

Post by daniel »

Maybe it would be 'easier' with CloudCompy (CloudCompare Python wrapper).
Daniel, CloudCompare admin
HeadLess
Posts: 56
Joined: Mon Mar 25, 2019 9:27 pm

Re: Command Line – Merge with Original Cloud Index

Post 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.
Marek
Posts: 3
Joined: Wed May 08, 2024 11:54 am

Re: Command Line – Merge with Original Cloud Index

Post by Marek »

Thank you for your replies and suggestions, I appreciate it!

I will try it with the python.

Good luck!
HeadLess
Posts: 56
Joined: Mon Mar 25, 2019 9:27 pm

Re: Command Line – Merge with Original Cloud Index

Post 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.
Marek
Posts: 3
Joined: Wed May 08, 2024 11:54 am

Re: Command Line – Merge with Original Cloud Index

Post 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.
Post Reply