Residual stress and distortion