Cross-sectional mapping of residual stresses by measuring the surface contour after a cut