Thread measurement