Fundamentals of numerical control