Command line mesh to mesh comparison

Feel free to ask any question here
Post Reply
lmazzoleni
Posts: 3
Joined: Fri Oct 21, 2016 8:09 am

Command line mesh to mesh comparison

Post by lmazzoleni »

Hello,
I have a problem in computing distances for 2 STL files (ASCII format) using command line.

In command line I write

Code: Select all

cloudcompare -o file1.stl -o file2.stl -c2m_dist
but I get the error "No point cloud available. Be sure to open or generate one first".

Using the GUI, I import the 2 files, select their ASCII children in the tree and click "compute cloud/mesh distance": everything goes fine and I get the comparison without problems.

Thank you in advance

Luca
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line mesh to mesh comparison

Post by daniel »

Yes because the GUI implicitly uses the compared mesh vertices as 'compared cloud'. While the command line doesn't (I guess this was not identified as something necessary at the time it has been developed ;).

You could sample points on the first mesh you load (with the -SAMPLE_MESH option), then remove the mesh from memory (the sampled points will remain) and then load the other (reference) mesh.
Daniel, CloudCompare admin
lmazzoleni
Posts: 3
Joined: Fri Oct 21, 2016 8:09 am

Re: Command line mesh to mesh comparison

Post by lmazzoleni »

Thank you for the quick answer.

Is there a way to get the same behaviour in console? I mean, if I use the -SAMPLE_MESH option, is there a safe number of points / density to use?
I need to use the command in batch and the files will vary in number of points and dimensions.

Thank you

Luca
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line mesh to mesh comparison

Post by daniel »

It depends on what you are looking for? If it's statistics (average and max distance, etc.) then it's safe and you just need to use a lot of points.

Otherwise, if you really need to get the distances on the STL mesh vertices (for display, etc.) then the only way it to patch / update the code.
Daniel, CloudCompare admin
lmazzoleni
Posts: 3
Joined: Fri Oct 21, 2016 8:09 am

Re: Command line mesh to mesh comparison

Post by lmazzoleni »

No, it's not statistics.
I have to compare two CAD models to visually display the differences between the 3d model and its actual manufactured counterpart.
Right now I'm trying with -SAMPLE_MESH parameter using a fairly high amount of points and see if I can get a good result.

Thank you

Luca
Post Reply