节点文献
雕刻机数控代码自动生成的研究
Study on NC Code Generated Automatically of Engraving Machine
【作者】 江小勇;
【导师】 纪爱敏;
【作者基本信息】 河海大学 , 机械电子工程, 2007, 硕士
【摘要】 数控代码自动生成有助于提高数控编程的效率,降低编程难度,解决设计、生产过程自动化问题。本文对AutoCAD中二维图形和矢量汉字的雕刻机数控代码自动生成进行了研究。首先,对AutoCAD的DXF文件进行了研究,通过编程提取DXF文件中的图形实体数据,实现了G代码的自动生成。在图形实体数据的处理过程中,将圆(弧)与椭圆(弧)用直线进行了拟合,且建立数据链表,将处理后的数据存入链表。为方便G代码的输出,减少加工过程中的起落刀次数,在数据存入时采用了链表插入排序算法。然后,依据RT-4500雕刻机的数控加工代码将链表中的数据以G代码文本输出。为了验证生成的G代码的正确性,在Visual C++6.0中进行了数控加工程序的轨迹仿真,直观地显示了雕刻后的图形轨迹。其次,本课题研究了汉字中形文件(.shp)结构及其矢量汉字编码,通过编程提取矢量汉字的笔划数据,将获得的笔划数据整理并以G代码的格式输出。最后进行实例运行,将图形和汉字自动生成的G代码导入到RT-4500数控雕刻系统中进行雕刻,雕刻结果达到了预期效果。
【Abstract】 NC code generated automatically is helpful for improving efficiency, reducing the difficulties for NC programming and solving the automation problems during the course of design and production process. The paper studies NC code generated automatically of engraving machine of 2D graphics and vector Chinese characters. First, DXF files from AutoCAD are studied and drawing entity data of DXF files are extracted by programming. Then, G code is generated automatically. In the process of dealing with drawing entity data, circle (or arc) and ellipse are fitted by lines. And the data-link is built to store to the data. Insertion-sorting algorithm of link is adopted while data are stored, which would be convenient for output of G code and reduce the number of up-and-down of cutter as well. And then, based on the NC processing programs of RT-4500 engraving machine, data in link are exported in the form of G code. In order to validate the correctness of G code, the NC processing programs are run to simulate trace in Visual C++6.0, which shows the trace of engraved clearly. Next, the paper studied the structure of shape files and coding of vector Chinese characters in detail. Strokes’ data of vector Chinese characters are extracted by programming, and then pack up and export the data in the form of G code. Finally, examples are taken. The G code generated by graphics and vector Chinese characters are imported to RT-4500 engraving machine to engrave. The results are proved well as expected.
【Key words】 DXF files; G code; Shape files; automatic NC programming; computer engrave;
- 【网络出版投稿人】 河海大学 【网络出版年期】2007年 06期
- 【分类号】TG659
- 【被引频次】4
- 【下载频次】641