Page 1 of 1
Command line mesh to mesh comparison
Posted: Fri Oct 21, 2016 8:20 am
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
Re: Command line mesh to mesh comparison
Posted: Fri Oct 21, 2016 8:34 am
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.
Re: Command line mesh to mesh comparison
Posted: Fri Oct 21, 2016 9:58 am
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
Re: Command line mesh to mesh comparison
Posted: Fri Oct 21, 2016 10:22 am
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.
Re: Command line mesh to mesh comparison
Posted: Fri Oct 21, 2016 11:47 am
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