| AutoCAD is the most widely used drawing software currently, but itsdrawing files can not directly be used by the CNC cutting machine. This designanalyzes the data structure of the DXF (Drawing Exchange Format) documentwhich generated by AutoCAD, and extracts the data to write C++program tosimulate the AutoCAD rendering successfully. When using this simulationfunction to draw graphics, the drawings can be directly extracted to convert the Gcode for controlling the CNC cutting machine.This paper first briefly introduces the use of AutoCAD drawing software,and introduces the DXF graphics file saved by AutoCAD in detail. And itintroduces the extraction method of the data information in the DXF file for CNCcutting part based on the analysis of DXF file structure and content. Then,according to the requirements of CNC cutting machine processing, process thegraphic information further and use it to generate the G code which can controlthe work of CNC cutting machine. Finally, this project researches and develops aC++language program, and it be used to simulate the function of AutoCADdrawing software.This design successfully reads the geometry information of the DXF filesgenerated by AutoCAD, and converts it to G code that can control the CNCcutting machine; at the same time, it realizes the simulation of drawing functionin AutoCAD software by using C++program. Because the AutoCAD drawingdata is complex and cannot be directly control the work of cutting machines, thisstudy designs a access software between AutoCAD and CNC cutting machines,so that AutoCAD drawings can be used for CNC cutting. Based on the above, aC++program which can simulate the drawing function of AutoCAD is designed,and in this paper, two methods of curve fitting algorithm has been used andimproved to make the curve in the simulation program smooth and full. |