Nc programming of machine tools