Design and optimization of CNC based polishing process