Page 1 of 1
c2m operation works in GUI, but not from command line
Posted: Thu Mar 19, 2020 2:46 pm
by aerogt3
Hi!
This is a great tool, with really nice documentation as well! I'm using it to see differences in STL files, and within the GUI it works great, but when using this command
Code: Select all
cloudcompare.CloudCompare -o temp.stl -o temp4.stl -c2m_dist
It fails with the error:
Code: Select all
No point cloud available. Be sure to open or generate one first!
The images show the console output. Not sure if there are any additional command line steps I need to take in addition to loading in the files, but according to the documentation I seem to be doing it correctly?
https://www.cloudcompare.org/doc/wiki/i ... h_distance
Re: c2m operation works in GUI, but not from command line
Posted: Thu Mar 19, 2020 4:43 pm
by daniel
Yes, the C2M command is meant to compare a Cloud (C) with a mesh (M). In the GUI version, the tool automatically uses the vertices of the compared mesh to do the calculation. But not in the CLI version.
You have to chose between two options:
- use the same strategy (compute the distances on the compared mesh vertices only) with the -EXTRACT_VERTICES option after you have loaded the compared mesh (it should be loaded first)
- sample points on the compared mesh (it's better if the compared vertices density is low) with the -SS tool (and don't forget to remove the loaded mesh afterwards)
Re: c2m operation works in GUI, but not from command line
Posted: Fri Mar 20, 2020 10:12 am
by aerogt3
Thanks for the reply. The problem is that I actually want the mesh as output, rather than the cloud (the inputs are both STL geometry, and I want the output to be an STL geometry as well, so that I can view the physical differences) But, I downloaded the nightly branch from snap and now it's working. Seems the command line tool now copies the behavior of the GUI - cool!
The filter points by value tool I notice is working both on clouds and mesh, in the GUI. This is useful, because around 90% of the STLs are identical, so I typically filter away differences less than 1mm and look only at significant differences. But, the command line filter_sf option only works for clouds.
Would it be possible for the command line tool (filter_sf) to automatically operate on meshes, like in the GUI? At the moment, the only work around is to convert the mesh to cloud, as you suggested, but this then results in a point cloud which isn't useful for visualizing the surface. So, I currently do the "filter_sf" in paraview.
Re: c2m operation works in GUI, but not from command line
Posted: Fri Mar 20, 2020 1:46 pm
by daniel
Hum, STL files don't support scalar fields or colors, don't they? How do you export the result as STL then?
And regarding your other query, everything is possible with an open source tool, and I can add that to the huge TODO list, but I'm not sure if and when this will be implemented ;)
Re: c2m operation works in GUI, but not from command line
Posted: Sat Mar 21, 2020 8:50 am
by aerogt3
I'm exporting as VTK, which gives me a surface colored by difference between the 2 stls. Really nice!
Re: c2m operation works in GUI, but not from command line
Posted: Sat Mar 21, 2020 11:51 am
by aerogt3
daniel wrote: ↑Fri Mar 20, 2020 1:46 pmAnd regarding your other query, everything is possible with an open source tool, and I can add that to the huge TODO list, but I'm not sure if and when this will be implemented ;)
Is it possible to fund this development? Feel free to send me a PM.
Re: c2m operation works in GUI, but not from command line
Posted: Mon Mar 23, 2020 11:19 am
by daniel
We don't have such mechanism yet... Maybe we should move to a bidding platform to let users say how much they are willing to pay if any developer is interested.