Parallelized Heterogeneous Slicing Algorithm in Metal Additive Manufacturing
-
摘要: 金属增材制造行业飞速发展,对数据处理的速度也有越来越高的要求,传统的串行切片算法以及不能满足工业制造需求。本文研究了在金属增材制造领域中对传统的基于面片拓扑关系的切片算法的异构并行化改进。首先我们对基于面片拓扑关系的数据结构进行改造,然后使用了GPU通用并行架构CUDA技术对算法进行并行计算加速。为了使用CUDA架构进行并行化加速,我们对数据进行了一系列的准备工作,以提高性能。经过实验验证此算法大大提高了三角面片与切平面求交时间,对整体切片过程的效率也有很大的改进,并且当数据量增大时,算法效率提升更加明显。Abstract: Nowadays, the metal additive manufacturing is developing rapidly, and the speed of data processing is also increasing. The traditional serial slicing algorithm cannot meet the requirement of industrial manufacturing. The improvement of heterogeneous parallelization of traditional slice-based topological-based slicing algorithms in the field of metal additive manufacturing is studied. Firstly, the patch topological relationship based data structure is modified, and then the GPU (Graphics processing unit) general parallel architecture CUDA (Compute unified device architecture) technology is used to accelerate the algorithm. In order to use the CUDA architecture for parallel computing, a series of preparations for the data are obtained to improve the performance. It is verified by experiments that the present algorithm greatly improves the intersection time between the triangular patch and the tangent plane, and the efficiency of the whole slicing process is also greatly improved. With the increasing of data amount, the efficiency of the algorithm is more obvious.
-
Key words:
- additive manufacturing /
- slicing /
- parallel computing /
- CUDA /
- heterogeneous structure
-
表 1 CPU和CUDA切片时间对比
文件名 大小/MB 切片次数 CPU/ms CUDA/ms 雕塑 150 17909614 3241 2588 柱子 320 12707088 5039 3275 网格圆柱 450 28520383 9106 4798 霸王龙 750 71596940 23056 10482 表 2 具有拓扑结构的切片时间对比
文件名 大小/MB 切片次数 CPU/ms CUDA/ms 模具 85 3467887 12810 13810 电路板 206 9986598 37805 27331 柱子 320 12707088 48540 32646 雕塑 150 17909614 69898 41461 -
[1] 王强华, 孙阿良. 3D打印技术在复合材料制造中的应用和发展[J]. 玻璃钢, 2015,(4): 9-14Wang Q H, Sun A L. Application and development of 3D printing technology in composite materials manufacturing[J]. Fiber Reinforced Plastics, 2015,(4): 9-14 (in Chinese) [2] 张学军, 唐思熠, 肇恒跃, 等. 3D打印技术研究现状和关键技术[J]. 材料工程, 2016, 44(2): 122-128 doi: 10.11868/j.issn.1001-4381.2016.02.019Zhang X J, Tang S Y, Zhao H Y, et al. Research status and key technologies of 3D printing[J]. Journal of Materials Engineering, 2016, 44(2): 122-128 (in Chinese) doi: 10.11868/j.issn.1001-4381.2016.02.019 [3] 蔡冬根, 周天瑞. 基于STL模型的快速成形分层技术研究[J]. 精密成形工程, 2012,(6): 1-4 doi: 10.3969/j.issn.1674-6457.2012.06.003Cai D G, Zhou T R. Research on the slicing technology of rapid prototyping based on STL model[J]. Journal of Netshape Forming Engineering, 2012,(6): 1-4 (in Chinese) doi: 10.3969/j.issn.1674-6457.2012.06.003 [4] 杨光, 刘伟军, 王维, 等. STL格式文件拓扑重建及快速切片算法研究[J]. 现代制造工程, 2009,(10): 32-35 doi: 10.3969/j.issn.1671-3133.2009.10.009Yang G, Liu W J, Wang W, et al. Research on the rapid slicing algorithm based on STL topology construction[J]. Modern Manufacturing Engineering, 2009,(10): 32-35 (in Chinese) doi: 10.3969/j.issn.1671-3133.2009.10.009 [5] 王增波. STL格式文件的快速拓扑重建算法[J]. 计算机应用, 2014, 34(9): 2720-2724 doi: 10.11772/j.issn.1001-9081.2014.09.2716Wang Z B. Fast topological reconstruction algorithm for a STL file[J]. Journal of Computer Applications, 2014, 34(9): 2720-2724 (in Chinese) doi: 10.11772/j.issn.1001-9081.2014.09.2716 [6] 王春香, 郝志博. 快速成型技术STL模型等厚分层算法研究[J]. 机械设计与制造, 2014,(4): 133-136 doi: 10.3969/j.issn.1001-3997.2014.04.042Wang C X, Hao Z B. The uniform thickness hierarchical algorithm of rapid prototyping technology STL model[J]. Machinery Design & Manufacture, 2014,(4): 133-136 (in Chinese) doi: 10.3969/j.issn.1001-3997.2014.04.042 [7] 王素, 刘恒, 朱心雄. STL模型的分层邻接排序快速切片算法[J]. 计算机辅助设计与图形学学报, 2011, 23(4): 600-606Wang S, Liu H, Zhu X X. An algorithm for rapid slicing of STL model based on sorting by triangle adjacency in layers[J]. Journal of Computer-Aided Design & Computer Graphics, 2011, 23(4): 600-606 (in Chinese) [8] Wang Y X, Gu Z Q, Song L, et al. Speeding up 3D printing using multi-head slicing algorithms[C]//Proceedings of the 5th International Conference on Enterprise Systems. Beijing, China: IEEE, 2017. [9] Chen K W, Yao C Y, Lai Y C, et al. Parallel 3D printing based on skeletal remeshing[C]//Proceedings of 2016 ACM SIGGRAPH. Anaheim, CA: ACM, 2016: 1-2. [10] Liu J, Fan Y B, Lu Q H, et al. Design of extendable tool path generation software for 3D printing[C]//Proceedings of 2014 International Conference on Manipulation, Manufacturing and Measurement on the Nanoscale. Taipei, Taiwan: IEEE, 2015. [11] 马旭龙, 林峰. 基于OpenMP的快速并行分层算法[J]. 计算机辅助设计与图形学学报, 2015,(4): 747-753Ma X L, Lin F. A parallel slicing algorithm based on OpenMP for additive manufacturing[J]. Journal of Computer-Aided Design & Computer Graphics, 2015,(4): 747-753 (in Chinese) [12] 马旭龙, 林峰. STL流水线并行分层算法[C]//第16届全国特种加工学术会议论文集. 厦门: 中国机械工程学会, 2015.Ma X L, Lin F. STL pipeline parallel layering algorithm[C]//Proceedings of the 16th National Conference on Special Processing. Xiamen: Chinese Mechanical Engineering Society, 2015 (in Chinese) [13] NVIDIA CUDA C Programming Guide Version 10.1[EB/OL]. [2019-03-10]. https://docs.nvidia.com/cuda/archive/10.1/cuda-c-programming-guide/index.html [14] Zhang X P, Xiong G, Shen Z, et al. A GPU-based parallel slicer for 3D printing[C]//Proceedings of the 13th IEEE Conference on Automation Science and Engineering. Xi'an, China: IEEE, 2018.