Hi
We have come across this before regarding PCB work, there was a post with a link to software to compensate, you secure your work and using a probe take readings to the face of the PCB or whatever in various positions(grid) the software uses this to plot Z axis offsets.
Regards
Mike