Article
Slicing Algorithm and Partition Scanning Strategy for 3D
Printing Based on GPU Parallel Computing
Xuhui Lai and Zhengying Wei *
Citation: Lai, X.; Wei, Z. Slicing
Algorithm and Partition Scanning
Strategy for 3D Printing Based on
GPU Parallel Computing. Materials
2021, 14, 4297. https://doi.org/
10.3390/ma14154297
Academic Editor: Arkadiusz Gola
Received: 17 June 2021
Accepted: 24 July 2021
Published: 31 July 2021
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2021 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
State Key Laboratory for Manufacturing System Engineering, Xi’an Jiaotong University, Xi’an 710049, China;
laikeyo@stu.xjtu.edu.cn
* Correspondence: zywei@mail.xjtu.edu.cn
Abstract:
Aiming at the problems of over stacking, warping deformation and rapid adjustment
of layer thickness in electron beam additive manufacturing, the 3D printing slicing algorithm and
partition scanning strategy for numerical control systems are studied. The GPU (graphics processing
unit) is used to slice the 3D model, and the STL (stereolithography) file is calculated in parallel
according to the normal vector and the vertex coordinates. The voxel information of the specified
layer is dynamically obtained by adjusting the projection matrix to the slice height. The MS (marching
squares) algorithm is used to extract the coordinate sequence of the binary image, and the ordered
contour coordinates are output. In order to avoid shaking of the electron gun when the numerical
control system is forming the microsegment straight line, and reduce metal overcrowding in the
continuous curve C
0
, the NURBS (non-uniform rational b-splines) basis function is used to per-
form curve interpolation on the contour data. Aiming at the deformation problem of large block
components in the forming process, a hexagonal partition and parallel line variable angle scanning
technology is adopted, and an effective temperature and deformation control strategy is formed
according to the European-distance planning scan order of each partition. The results show that the
NURBS segmentation fits closer to the original polysurface cut line, and the error is reduced by 34.2%
compared with the STL file slice data. As the number of triangular patches increases, the algorithm
exhibits higher efficiency, STL files with 1,483,132 facets can be cut into 4488 layers in 89 s. The slicing
algorithm involved in this research can be used as a general data processing algorithm for additive
manufacturing technology to reduce the waiting time of the contour extraction process. Combined
with the partition strategy, it can provide new ideas for the dynamic adjustment of layer thickness
and deformation control in the forming process of large parts.
Keywords:
GPU slice; MS algorithm; curve interpolation; partition; additive manufacturing;
scan order
1. Introduction
Electron beam additive manufacturing (EBAM) uses metal wires or strips as raw
materials to rapidly form metal components with mechanical properties equivalent to
castings, and is widely used in the rapid manufacturing of precision blanks for large parts,
such as aerospace, automobile manufacturing, etc. [
1
–
7
]. However, with the increase of
the area of the forming area, the temperature gradient at both ends of the scanning line
increases sharply [
8
–
14
]. When the layer-by-layer accumulated thermal stress exceeds
the yield strength of the formed material, it will cause local warpage and deformation
of the workpiece. Moreover, the large deformation is not conducive to positioning and
cutting in the postprocessing process. Therefore, research on efficient, reliable and stable
slicing methods and partition scanning strategies is of great significance to reduce part
deformation and improve shape and position accuracy.
Currently, in order to improve the efficiency of data processing and molding accuracy,
a large number of research studies on Slicing Algorithm and scanning strategy have
emerged. Jaiswal et al. [
15
] sliced the model along the vertical direction before slicing,
Materials 2021, 14, 4297. https://doi.org/10.3390/ma14154297 https://www.mdpi.com/journal/materials