working principle of metal grinding machine