Measurement of 3D shapes