Measurement of the thread resistance to twisting and the critical snarl formation parameters