Nc programming for sliding head lathes