3D contour measurement