广州大学华软软件学院
论文题目专 业班 级姓 名学 号指导教师
本科毕业论文
三维数据模型分层图形传递
和中间层的研究与实现
电子信息工程(嵌入式软件开发) 10嵌入式软件开发1 陈 存 1040907108 张芒、叶小艳 广州大学华软软件学院电子系
2014年 4 月
摘要 3D打印机中间层软件作为CAD到RP的数据转换和处理接口,是3D打印
机的灵魂。各大3D打印机生产商一般都开发有自己的分层软件,国外也涌现了很多作为CAD与RP系统之间桥梁的第三方分层软件。但是,这些分层软件价格昂贵,并且无标准化,软件的二次开发困难。针对此现状,我们设计和开发了一种基于STL文件格式的具有快速分层能力的分层软件,以满足自行研发的3D打印机的需要。本文详细介绍了这种3D打印机分层软件的设计与实现。
文章首先介绍了快速成型技术的发展,结合自行设计的3D打印机分析了系统的功能需求,设计了3D打印机分层软件的总体方案,并根据总体的设计方案逐步展开。本文中软件采用了模块化和层次化的设计方法,根据软件工程的模型,进行了软件的模块划分并确定了各部分的功能,对软件的详细设计进行了重点描述。
最后,对本文的工作做了一个总结,并对后续的开发工作指出了方向,对3D打印机分层软件的研发做了相关展望。
关键词 3D打印机;STL;分层;算法;RP;软件设计;模块
I
ABSTRACT As the interface of data conversion and data processing from CAD
to RP ,Slicing software is the soul of 3D printer.Major 3D printer manufacturers generally have developed their own slicing software. There are also a lot of third-part software as the bridge between CAD and RP abroad.However,these slicing software are very expensive and have no standardization,and they are difficult for secondary development.Against the status quo,we design and develop a quick slicing software which is based on STL file format to meet the needs of self-designed 3D printer.The paper introduces the design and realization of slicing software of 3D printer in detail.
Firstly,the paper introduces the development of rapid prototyping technology.The paper unfolds gradually according to the overall project plan.slicing software is partly based on the modular and hierarchical design method,according to the model of software engineering,the paper describes software modules and corresponding functions,and especially the detail design of the software.
Finally,a brief summarize is described and the following research work is discussed.
KEY WORDS 3D Printer;STL;Slicing;Algorithm;Rapid Prototyping;
Software design,Modular
II
目 录
1.前言.............................................................. 1
1.1 课题研究的背景和意义........................................ 1 1.2 3D打印技术介绍 ............................................. 1 1.3 3D打印技术的原理 ........................................... 2 1.4 3D打印技术发展前景以及应用 ................................. 2 2.需求分析.......................................................... 4
2.1 Solidworks三维建模软件介绍 ................................. 4 2.2 可行性分析.................................................. 4
2.2.1技术可行性 ............................................ 4 2.2.2经济可行性 ............................................ 5 2.3软件需求分析 ................................................ 5 2.4 QT和QT Creater 介绍........................................ 6 3.系统总体设计...................................................... 7
3.1功能分析 .................................................... 7 3.2设计分析 .................................................... 9 3.3软件功能模块化设计分析 ...................................... 9 3.4 STL文件的读入与分析 ....................................... 11 3.5下位机需要获取的文件分析 ................................... 14 3.6 G代码转换成下位机格式数据的过程分析 ....................... 15 4.软件的模块化设计................................................. 18
4.1文本文件操作相关概念 ....................................... 18 4.2 数据转换模块............................................... 19
4.2.1初始化模块 ........................................... 19 4.2.2数据读写模块 ......................................... 20 4.2.3坐标值数据转换模块 ................................... 22 4.2.4格式化输出坐标模块 ................................... 22 4.2.5去重坐标模块 ......................................... 23
III
4.3 数据显示模块............................................... 24
4.3.1源文件界面显示 ....................................... 24 4.3.2目标文件显示 ......................................... 26 4.4数据传输模块 ............................................... 27 5.程序的编译与运行................................................. 32
5.1程序的编译、连接和运行 ..................................... 32 5.2测试结果并分析结论 ......................................... 33
5.2.1测试结果 ............................................. 33 5.2.2数据分析 ............................................. 37
6.总 结............................................................ 40 参考文献........................................................... 42 附录............................................................... 43
附录1:STL模型生成的G代码数据test.gcode ..................... 43 附录2:分层程序处理后的目标数据test.txt.xyz................... 44 致 谢.............................................................. 48
IV