The paper presented the development of free-form surface axis NC machining tool path optimization module. In the UG environment, have three-dimensional solid modeling to the surface, and then have the secondary development of free-form surfaces five-axis machining path optimization module through the UG/Open API and VC++6.0. This can realize NC processing path automatically generation and optimization after the three-dimensional modeling. Introduction