Jump to content

Calculation of deviation in best-fit alignment


Recommended Posts

I am trying to align a CAD and a mesh, so I am running a pre-alignment (with best fit).
At the end of the pre-alignment, I’m getting a deviation result : I understood from a reply on this forum that the deviation was the "average absolute distance of the points of the actual mesh to the specified CAD which were used during the local best fit".
Then, to improve the result, I am running a best fit alignment with a custom selection of points.
I have noticed that when I specify a max distance that is very small (and of course not sufficient to adjust) for instance 0.01mm, the mesh position is almost not modified after best fit and I have a very small deviation (0.0038mm in my example), while I have a much bigger deviation (x100) when I specify a bigger max distance (sufficient to have a good alignment).
This seems very confusing to me, because when I see a small deviation, it makes me believe I have a better alignment, but this is not what is displayed on the surface comparison.
Here I have a small deviation after best fit, and max distance that is not sufficient to adjust.
Here I have a large deviation after best fit, and large max distance that allowed to have an almost perfect alignment.
(both images have the same scale).
What is the relationship between this deviation calculation result and the distances displayed in the histogram ?
How is the deviation calculated in this case? In particular, I am wondering :
- Is it calculated using only the points from the selected surface or all points?
- Is it calculated between the CAD and the mesh after best fit? Or between the mesh before and after a best fit alignment?
- Is it still the average absolute distance between 2 sets of points in 2 different situations?
Thanks for your help !
Link to comment
Share on other sites

  • 2 weeks later...

Hello Anne-Sophie,

the distance must always be larger than the deviations (using values smaller than 1mm do not make sense in most cases). Only point with a smaller distance than the given value are used. The deviation value is calculated by all points that are used for the alignment.

Best regards,

Jens Braun

Link to comment
Share on other sites

  • 2 weeks later...

One additional clarification: If the maximum distance is too low, all points which have a bigger distance to the CAD are NOT considered for the the calculation for the transformation as well for the deviation calculation. Analogy: A plane bestfitted from three (selected) points has always the residual of zero -> seems perfect but of course it is not. It would be better to consider as much points as possible to measure the "reality" even if the residual values increases.



Link to comment
Share on other sites


  • Create New...