Page 1 of 1

Save all entities in command-line mode?

Posted: Sun Jul 06, 2025 3:34 am
by jselikof
Three solutions proposed by ChatGPT, none work!

CloudCompare -SILENT \
-O cloud1.las \
-O cloud2.las \
-O mesh1.obj \
-MERGE_CLOUDS \
-SAVE_CLOUDS FILE "combined_scene.bin"
🔹 What this does
✅ Loads two point clouds and a mesh.
✅ Merges all point clouds into one (optional — remove -MERGE_CLOUDS if you want separate point clouds).
✅ Saves all entities currently loaded — including point clouds and meshes — into a single CloudCompare .bin file named combined_scene.bin.

CloudCompare -SILENT -AUTO_SAVE OFF \
-O cloud1.las \
-O mesh1.obj \
-SAVE FILE "combined_scene.bin"

🔹 What this does:

Loads the point cloud and the mesh into the DB tree.
Tells CloudCompare not to autosave partial results (-AUTO_SAVE OFF).
Explicitly saves all currently loaded entities to the .bin file.

CloudCompare -SILENT \
-O cloud1.las \
-O mesh1.obj \
-o combined_scene.bin

🔹 How it works:
The -O options load your clouds and meshes.
The lowercase -o combined_scene.bin sets the output .bin file for all currently loaded entities.
CloudCompare automatically writes all entities (point clouds + meshes) to the specified .bin.

Link to the chat if interested: https://chatgpt.com/share/6869ea2b-6a24 ... f48f2cf12a

Re: Save all entities in command-line mode?

Posted: Wed Jul 09, 2025 9:37 pm
by daniel
Ah ah, ChatGPT is not that smart apparently ;)

If you want to mix clouds and meshes, I don't think it's possible. At least not with the command line mode. Anyway only the BIN format would work in this case.

But if you want to save the clouds and the vertices of the mesh for instance, you could use -EXTRACT_VERTICES first, and then -ALL_AT_ONCE to save all the clouds in a single file (but once again, not all formats support that, maybe BIN and E57).

Re: Save all entities in command-line mode?

Posted: Thu Jul 10, 2025 1:01 pm
by jselikof
Thanks for the reply!

In this case .bin would be great. Basically, there are 1 to 10 point clouds, and any number of small wireframe meshes representing camera orientation where photos were taken. Unfortunately the meshes are too sparse to use their vertices. There could be e.g. 20 of these, so it's too cumbersome to apply transformations to these in the UI, command-line mode seemed perfect in this case.

Since a .bin with the point clouds and meshes can be saved in the UI, there's no fundamental reason why this couldn't also be enabled in the command-line, is there?

Best regards,

Jim

Re: Save all entities in command-line mode?

Posted: Sat Jul 12, 2025 1:42 pm
by daniel
There was no reason, just no use case so far! We can add this idea to the TODO list (which is sadly already very long).