Abstract:The DXF file structure is analyzed and on the basis of the analysis introduces the graphic meta information briefly which ought to be extracted from DXF files. In order to reduce the path length, there is a router optimization algorithm proposed based on genetic algorithms. By comparing the length of the routers, we can see the idle stroke is reduced efficiently and the machining efficiency is improved.