Yes, I know. It is curved-bended surface. I am trying to make it flat-like (not disturbing the roghness on it) using filters and measure the roughness according to the desired cutoff.
You have two problems: how good is the pointcloud (vertices of the mesh), and how good is the triangulation of those vertices.
Since you KNOW what the surface should be, there is no need to fit some high order polynomial to the points. You could calculate the RMS and the MAX distance of the points to the surface. Maybe cut the surface in regions and do those calculations per region, so you know where the points are least accurate.
Concerning the triangulation, you could try edge-swapping. Two adjacent triangles ABC and CBD have the edge BC in common. However, the patch ABDC could also consist of triangles ABD and ADC, having edge DA in common. You could calculate the distance to the surface of a point half-way BC and half-way DA. If the latter distance is smaller, then swap edges.
you have a curved surface sample and you desire to measure roughness of this surface. If you straighten it, it may itself introduce roughness in addition. What you may try is to create a few steps on different sides of this surface and then try microhardness Tester to measure the roughness in different portions through the vaious step structures you have created at differnt positions on the surface under examination.
Thank you for your advices, I determined the RMS (root mean square). But it is very sensitive and change at different parts of the surfaces. For similar measurements at every point of the surface I'm trying to make it more uniform.