| NC (numerical control) machining is a machining method which controls the displacement of component and cutter with the numerical information, and the source of the numerical information is the graphic files. However, NC system can not run the graphic files directly. Only after the graphic information was extracted and converted to the control information of NC machine, can the NC system drive the NC machine to work. Two special graphics files of different organizational structure were researched and simulated in the paper, which are the embroidery pattern files used in the computerized embroidery machine and the cutting parts files used in the NC cutting machine. The main contents are as follows.(1) A conversion program among the mainstream pattern files including the formats of DSB, DST and DSZ was proposed, which was achieved on the basis of the analysis and contrast of the mainstream pattern files and by the reference of Tajima plate software. And the correctness of the program is proved by the simulation of the coverted pattern files.(2) An NC code compiler was designed, in which the cutting parts files composed of NC code were read first, then the lexical and grammatical analysis for the NC procedure in the case of NC rulemaking were done, error handling was started in the reasonable situation, and the DMC control commands were generated at last.(3) The programming route drawing module was designed, with the help of which the contour can be static mapped with the import of cutting parts files which passed the compiler.(4) The cutter centre track drawing module was designed, in which the coordinates of cutter compensation swiching points were calculated by the cutter compensation sub-module first, then the coordinates of interpolation points were calculated by the interpolation sub-module using a improved time dividing interpolation method, and the interpolate points were linked with lines in sequence by the track drawing sub-module, to achieve the dynamic drawing of the cutter centre track finally. The mapping results meet the anticipated target.Through the above-mentioned work, the graphic information of the machined workpiece in the two kinds of graphics files were extracted for guiding the corresponding NC machine, at the same time the machined workpiece were simulated using the extracted information for verifying the correctness of the graphics files. |