Flatness measurement by a grazing Ronchi test