SAMPLE_MESH with CLI

Feel free to ask any question here
Post Reply
omarladen
Posts: 8
Joined: Fri Jun 06, 2025 7:17 pm

SAMPLE_MESH with CLI

Post by omarladen »

I am trying to read the documentation to implement the process that I am currently doing with the GUI, which is:
- Open an FBX model
- Select all elements
- Sample points on a mesh (Density = 10000, don't generate normals, get colors from material/texture)
- Select all clouds generated
- Merge
- Save as CSV (comma, columns title)


I got confused with the combination of commands, and also I kept getting an error "Cloud sampling failed!" after a small element could not generate a cloud: "[ccGenericMesh::samplePoints] No point was generated (sampling density is too low?)". When using the GUI, this doesn't stop the execution.

The commands I've tried were:
"C:\Program Files\CloudCompare\CloudCompare.exe" -O example.fbx -SAMPLE_MESH DENSITY 10000
"C:\Program Files\CloudCompare\CloudCompare.exe" -AUTO_SAVE OFF -O example.fbx -REMOVE_NORMALS -SAMPLE_MESH DENSITY 10000
"C:\Program Files\CloudCompare\CloudCompare.exe" -AUTO_SAVE OFF -O example.fbx -REMOVE_NORMALS -SAMPLE_MESH DENSITY 10000 -MERGE_CLOUDS -C_EXPORT_FMT ASC -SAVE_CLOUDS
"C:\Program Files\CloudCompare\CloudCompare.exe" -AUTO_SAVE OFF -O example.fbx -REMOVE_NORMALS -SAMPLE_MESH DENSITY 10000 -MERGE_CLOUDS -SAVE_CLOUDS
daniel
Site Admin
Posts: 8158
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: SAMPLE_MESH with CLI

Post by daniel »

Can you maybe share the mesh file with me? (admin@cloudcompare.com)
Daniel, CloudCompare admin
omarladen
Posts: 8
Joined: Fri Jun 06, 2025 7:17 pm

Re: SAMPLE_MESH with CLI

Post by omarladen »

Are the commands I sent correct? I will try to send an example later.
daniel
Site Admin
Posts: 8158
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: SAMPLE_MESH with CLI

Post by daniel »

They look correct to me!
Daniel, CloudCompare admin
omarladen
Posts: 8
Joined: Fri Jun 06, 2025 7:17 pm

Re: SAMPLE_MESH with CLI

Post by omarladen »

I have made a pull request to fix this issue:
https://github.com/CloudCompare/CloudCompare/pull/2265
Post Reply