Measurement of grooves and thickness