| CNC machine tools manufacture the workpieces based on the CNC machining program. For complex workpieces, the manual programming is unable to meet the demand of CNC machining, so automatic programming software has developed rapidly.The existing automatic programming software at current mostly generates code offline,but for some special control system, the users want to be able to machine the workpieces directly from DXF files which are designed by CAD software. To achieve this purpose, by analyzing the structure of DXF files and considering the characteristics of NC programming, the paper completes to design and implement the inline automatic programming system that is based on DXF files, what is more, the automatic programming system has been already integrated into Lantian serial high-end CNC system successfully.In this paper, the main work done is as follows: Firstly, according to analyzing the characteristics of DXF files, the paper proposes a function to extract the graphic information, and to convert the information to interpolation curve which can be distinguished by NC systems, the paper also do some mathematical treatment on the information extracted from the files; secondly, the paper completes the design and implementation of system interface and designs and implements many functions which are commonly used on the system, such as: the selection of the tools, the setting of parameters, the settings of tool compensation, clone of documents, mirroring, the setting of datum, the setting of clear angle; thirdly, the paper completes the generation of the machining path and the optimization of the path using genetic algorithm, and generates NC code which can be used on Lantian serial high-end CNC system after setting parameters and optimizing the path; finally, the paper describes the system running process by a running instance and proves the availability of the system. |