depends on what you mean by 'machining'. grinding is at least 7000 years old https://en.wikipedia.org/wiki/Shoe-last_celt and roughly contemporary with pottery. casting presumably began with pottery but was definitely in full swing by the bronze age, a mere few thousand years later