# Generation Algorithm of a Novel Platform Attached Support Structure for FDM-Fused Deposition Modeling

Authors: Ning Lv; Yunxu Li; Yujing Qiao
Journal: Advances in Materials Science and Engineering
 (2022)

---

## Abstract

In the process of 3D printing, the setting of the initial layer is the most important step to achieve perfect printing results, and its main function is to prevent warping in 3D printing. There are three main types of the first layer: Raft, Brim, and Skirt. The Brim is a special skirt and is usually the preferred starting layer for the printing process. In order to increase the adhesion, multiple Brim contour edges will be printed, which increases the difficulty of removal. Otherwise, poor adhesion effect will occur. By analyzing the distinction between inner and outer contours of polygons, the offset process of contour points in different cases is calculated in this paper, and a simplified processing method of contour offset line is designed by using the idea of Douglas–Peucker simplifying curve feature points. According to the functional characteristics of the Brim edge structure, a novel platform attached support structure is generated based on ray-casting algorithm and contour offset algorithm. The proposed algorithm is encapsulated into the slicing engine and compared with three common initial layer structures for conducting part printing comparison experiments. The experimental results show that the edge structure realized by the proposed generation optimization algorithm of a novel platform attached support can effectively reduce the slicing execution time, and the auxiliary structure has little impact on the forming quality. It can be easier to remove on the premise and the warpage of the printing model is small.


---

## Body

## 1. Introduction

3D printing, also known as additive manufacturing (AM), is a kind of technology based on three-dimensional (3D) model data that uses adhesive materials such as powder metal or plastic to manufacture products with multilevel structure or complex geometry [1, 2]. Among the many additive manufacturing methods, FDM-Fused Deposition Modeling is an important 3D printing process with relatively low cost, less material waste, and low technical threshold [3–5]. Therefore, it is widely used in the field of model molds, biomedicine, military aerospace, civil life, and other fields [6–10].. In order to prevent warping and deformation in the printing process and finished products, the setting of printing starting layer is the most critical step to achieve complete and accurate 3D printing. At present, there are three well-developed basic layers: Skirt, Raft, and Brim [11–13].. The Skirt generates the general outline at the starting layer of the model, which is not connected to the model surface. This leads to poor adhesion between the model and the printing platform, which is prone to warpage deformation. The Brim is a group of lines connected to the outside of the first printing layer, spreading from the base. This type of base layer can be offset at equal intervals according to the model contour, which improve the adhesion between the model and the printing platform. However, the Brim is difficult to deal with the small gap of the model, affecting the quality of parts after the Brim edge being removed. The base layer of the Raft type is to generate a thick mesh on the printing platform, and the model is printed on an extended mesh base with a larger contact surface. The model adds a complete base, and it can be done without touching the platform. The Raft provides a good solution to the warpage problem but at the cost of increased printing time, and it is difficult to be removed.Because of the different characteristics of the three kinds of printing base layer, the scope of application is different. The Skirt is suitable for making any 3D printed model. The main purpose of Skirt is to debug the extruder and detect any possible problems before starting to print the body of the model, so as to minimize the waste of time and materials caused by a failed 3D printing. When printing a thin, small, and narrow 3D model, the Brim is needed to increase the area of attachment at the bottom. When printing large 3D models that require small supports, Brim can be set up to support these supports. When printing a 3D model with a lot of small (such as legs) or thin (such as blades) parts at the bottom, setting Raft is helpful to improve the adhesion of the bottom and the overall stability. A Brim is a perimeter that goes around and attaches to the print, and a Raft is an entire base structure that is printed before and right under your print. A raft consumes a fair amount of material, especially if your print is large. For this reason, it is usually recommended to print base layers starting with Brim, and if that does not work, try Rafts again. It can be seen from the above that the digital model needs to be preprocessed and sliced when constructing the model in 3D printing processing, and the performance of slicing algorithm directly affects the accuracy and speed of printing model. The generation algorithm of the base layer is an important algorithm in the slicing algorithms, among which the generation algorithm of Skirt and Raft is relatively fixed and universal due to their usage characteristics. Whether to choose Brim in 3D printing needs to be selected according to the characteristics of the model. In fact, the existing Brim shape is dominated by contour lines. When applying the Brim, you can adjust the width of the edges or the number of lines to increase the strength of the object, but removing the edges from a print with complex shapes is more difficult.In conclusion, when FDM molding technology is used, the attachment platform is used to improve the stability of the model and reduce warpage. The superior bottom support generation algorithm should achieve the idea that the generation of support as little as possible not only saves material, but also is easier to separate from the entity, so as to improve the surface quality of parts. However, in the actual design, the support is stable, the material consumption is small and easy to remove, but they cannot have both. Therefore, it is necessary to make a balance between the two by optimizing the support generation algorithm. For the thin structure with complex contour, the bottom support structure is especially required to have both characteristics. In this paper, a novel platform attached support structure generation algorithm based on contour offset and ray casting is proposed. The basic layer of this type structure can not only increase the adhesion between the printing model and the printing platform, but also be easy to remove after printing, so as to reduce the influence of the Brim structure in current printing software on the printing quality of the model.The rest of this paper is organized as follows: in Section2, the determination and calculation method of the Brim contour is described, and the simplified method process of contour offset line point set is developed. In Section 3, the position of target point is judged based on ray-casting algorithm. In Section 4, the generation algorithm of a novel platform attached support structure is proposed, and a novel platform attached support structure is designed based on the generation algorithm. In Section 5, the novel platform attached support structure is used for 3D printing comparison, and corresponding conclusions are drawn in the experiment.


## 2. Offset Calculation and Simplification of the Polygon Contour

Before the edge of supporting structure is generated, the contour of the initial layer needs to be offset equidistance from inside to outside to determine its contour [14, 15]. According to the characteristics of FDM-3D process, the vertex representation is used to describe the contour information of polygon closed curve after slice stratification [16]. For the complex external contour curves, when the included angle of contour segments is different, the calculation process of equidistance offset at the contour points is also different [17]. Therefore, before calculating the contour offset, it is necessary to judge the angle value of the contour segment to which the contour points on the contour curve belong.


### 2.1. Equidistant Offset Calculation of Brim Contour Points

For any pointP on the polygon contour curve in Figure 1, the coordinates of three consecutive points centered on P, respectively, are A(x1, y1), P(x0, y0), and B(x2, y2), and the included angle formed by PA and PB is α(0 < α < π), and there is the following relationship:(1)cosα=PA⋅PBPAPB=x1−x0x2−x0+y1−y0y2−y0x1−x02+y1−y02×x2−x02+y2−y02.Figure 1
Contour profile point P diagram. (a) The case of 0 <α < π/2. (b) The case of π/2 < α < π.
(a)(b)In order to form the novel platform attached support structure, the contour points need to be equidistance offset. Because the included angles of different contour segments are different, the calculation process of equidistance offset is different, so it should be discussed in two cases, as shown in Figure1, namely, 0 < α < π/2 and π/2 < α < π.There are two cases for the offset position of contour points. One is that the offset pointQ is inside the contour angle α, and the other is that the offset point Q is outside the contour angle α. These offset states are discussed in the following sections.When 0 <α < π/2 (Figure 1(a)), the two cases of equidistant offset are shown in Figure 2, in which Figure 2(a) shows that the offset point Q1 is at the inside of the contour angle α, and Figure 2(b) shows the offset point Q2 is at the outside of contour.Figure 2
Contour profile point (P) in case 1. (a) The contour points are offset inward. (b) The contour points are offset outside.
(a)(b)Whenπ/2 < α < π (Figure 1(b)), the two cases of equidistant offset are shown in Figure 3, where Figure 3(a) shows the offset point Q3 is at the inside of the contour angle α, and Figure 3(b) shows the offset point Q4 is at the outside of contour.Figure 3
Contour point (P) in case 2. (a) The contour points are offset inward. (b) The contour points are offset outside.
(a)(b)The line segmentsPA and PB are offset equidistantly to the outside of the printing model along the vertical direction of the line segment, and the offset distance is d. The straight line of the translated two line segments intersects the offset point Qi (i = 1, 2, 3, 4) and intersects with line segments PA and PB at two points, a and b, respectively, and Pa⟶=Pb⟶, forming an included angle θ. As can be seen from Figures 2 and 3,(2)Pa⟶=Pb⟶=dsinθ,Pa⟶=PA⟶·xPA⟶·Pa⟶,PA⟶·yPA⟶·Pa⟶,Pb⟶=PB⟶·xPB⟶·Pb⟶,PB⟶·yPB⟶·Pb⟶,where (x, y) is the coordinate of the offset point. Figure 2(a) is taken as an example to illustrate the process of obtaining the coordinates of the offset points. As can be seen from Figure 2(a),(3)PQ⟶1=Pa⟶+Pb⟶.Substituting formula (3) and formula (2) into formula (3), the coordinate equation of the offset point can be obtained as follows:(4)Q1·x=P·x+PA⟶·xPA⟶⋅dsinθ+PB⟶·xPB⟶⋅dsinθ,Q1·y=P·y+PA⟶·yPA⟶⋅dsinθ+PB⟶·yPB⟶⋅dsinθ..Then the coordinates of offset pointQ1 are(5)x=x0+x1−x0x1−x02+y1−y02⋅dsinα+x2−x0x2−x02+y2−y02⋅dsinα,y=y0+y1−y0x1−x02+y1−y02⋅dsinα+y2−y0x2−x02+y2−y02⋅dsinα..Similarly, the coordinates of offset pointQ2 can be obtained as follows:(6)x=x0−x1−x0x1−x02+y1−y02⋅dsinα−x2−x0x2−x02+y2−y02⋅dsinα,y=y0−y1−y0x1−x02+y1−y02⋅dsinα−y2−y0x2−x02+y2−y02⋅dsinα..The coordinates of offset pointQ3 can be obtained as(7)x=x0+x1−x0x1−x02+y1−y02⋅dsinα−π/2+x2−x0x2−x02+y2−y02⋅dsinα−π/2,y=y0−y1−y0x1−x02+y1−y02⋅dsinα−π/2−y2−y0x2−x02+y2−y02⋅dsinα−π/2..The coordinates of offset pointQ4 can be obtained as(8)x=x0−x1−x0x1−x02+y1−y02⋅dsinα−π/2−x2−x0x2−x02+y2−y02⋅dsinα−π/2,y=y0−y1−y0x1−x02+y1−y02⋅dsinα−π/2−y2−y0x2−x02+y2−y02⋅dsinα−π/2..


### 2.2. Point Set Simplification of the Contour Offset Line

It can be seen from the above analysis that the offset point set of Edge can be obtained by calculating the outer contour offset of the starting layer. However, the complex shape contour has the problem of overlapping points due to small folding angles and gaps, so the point set needs to be further processed [18]. The Douglas–Peucker algorithm can reduce the number of ignorable feature points. Because of the translation and rotation invariance of the algorithm, it is widely used to simplify and deal with complex vertex set curve problems, thus simplifying the curve data composed of a series of feature points [19, 20]. When the curve and the limit are determined, the simplified result with this algorithm has good stability.The processing principle of offset line simplification based on Douglas–Peucker algorithm as follows: when the distanceL between a vertex and the last vertex is less than the given length Lmin of the shortest line segment and the height H of triangle formed by the vertex and its adjacent vertices is less than the allowable error distance Hmin, the point is discarded. As shown in Figure 4, (a) (x1, y1), B(x2, y2), and C(x3, y3) are the three adjacent vertex coordinates in the vertex set of contour offset line of slice model, and the point B is taken as an example to make choice judgment.Figure 4
Simplification of contour offset lines.From the figure, we can getAB⟶=x2−x1,y2−y1, AC⟶=x3−x1,y3−y1, and then the distance LAB between the point B and its previous vertex A can be expressed as(9)LAB=x2−x12+y2−y12.Similarly, the expression ofLAC can be obtained as follows:(10)LAC=x3−x12+y3−y12.It can be obtained that the area of triangleABC expressed by vertex coordinates is(11)SΔABC.=12x1y2−x2y1+x2y3−x3y2+x3y1−x1y3.Then, the height of triangleABC passing through the point B is(12)HB=x1y2−x2y1+x2y3−x3y2+x3y1−x1y3x3−x12+y3−y12.For the convenience of calculation,LAB2 and HB2 are used in the actual algorithm to realize the trade-off judgment of the contour points. The specific steps of simplifying processing of contour offset line point set are as follows:Step 1: given the shortest segment lengthLmin and allowable error distance, in order to facilitate data judgment and reduce the computational complexity of the slicing process, the square Lmin2 of the shortest line segment length and the square Hmin2 of the allowable error distance are taken as the actual judgment benchmark of the algorithm.Step 2: the first and last vertices in the contour offset line are reserved without trade-offs. The second vertex is namedBcurrent as the first coordinate point to be simplified, and the two adjacent points before and after the point are named Aprevious and Cnext.Step 3: calculate the square valueLAB2 of the distance between Aprevious and Bcurrent, and judge whether LAB2 is less than Lmin2. If LAB2 is less than Lmin2, continue to perform the next step; otherwise, jump to Step 6.Step 4: calculate the heights of trianglesAprevious, Bcurrent, and Cnext crossing point Bcurrent, whose square value is HB2, and determine whether HB2 is less than Hmin2. If HB2 < Hmin2, proceed to the next step; otherwise, jump to Step 6.Step 5: according to judgment, ifBcurrent satisfies the simplification condition, then this point is abandoned. If Bcurrent is the penultimate vertex in the point set of contour bias line at the beginning layer of the polygon, the simplification algorithm of contour offset line processing is finished; otherwise, the coordinate of point Aprevious remains unchanged, assign Cnext to Bcurrent, and the next adjacent vertex of Bcurrent is taken as Cnext; then, jump to Step 3.Step 6: according to the judgment, ifBcurrent does not satisfy the simplification condition, then this point is retained. If Bcurrent is the penultimate vertex in the point set of contour offset line at the beginning layer of the polygon, the simplification algorithm of contour offset line processing is finished. Otherwise, Bcurrent is assigned to Aprevious and Cnext is assigned to Bcurrent. Finally, the next adjacent vertex of Bcurrent is set as Cnext and jump to Step 3.


## 2.1. Equidistant Offset Calculation of Brim Contour Points

For any pointP on the polygon contour curve in Figure 1, the coordinates of three consecutive points centered on P, respectively, are A(x1, y1), P(x0, y0), and B(x2, y2), and the included angle formed by PA and PB is α(0 < α < π), and there is the following relationship:(1)cosα=PA⋅PBPAPB=x1−x0x2−x0+y1−y0y2−y0x1−x02+y1−y02×x2−x02+y2−y02.Figure 1
Contour profile point P diagram. (a) The case of 0 <α < π/2. (b) The case of π/2 < α < π.
(a)(b)In order to form the novel platform attached support structure, the contour points need to be equidistance offset. Because the included angles of different contour segments are different, the calculation process of equidistance offset is different, so it should be discussed in two cases, as shown in Figure1, namely, 0 < α < π/2 and π/2 < α < π.There are two cases for the offset position of contour points. One is that the offset pointQ is inside the contour angle α, and the other is that the offset point Q is outside the contour angle α. These offset states are discussed in the following sections.When 0 <α < π/2 (Figure 1(a)), the two cases of equidistant offset are shown in Figure 2, in which Figure 2(a) shows that the offset point Q1 is at the inside of the contour angle α, and Figure 2(b) shows the offset point Q2 is at the outside of contour.Figure 2
Contour profile point (P) in case 1. (a) The contour points are offset inward. (b) The contour points are offset outside.
(a)(b)Whenπ/2 < α < π (Figure 1(b)), the two cases of equidistant offset are shown in Figure 3, where Figure 3(a) shows the offset point Q3 is at the inside of the contour angle α, and Figure 3(b) shows the offset point Q4 is at the outside of contour.Figure 3
Contour point (P) in case 2. (a) The contour points are offset inward. (b) The contour points are offset outside.
(a)(b)The line segmentsPA and PB are offset equidistantly to the outside of the printing model along the vertical direction of the line segment, and the offset distance is d. The straight line of the translated two line segments intersects the offset point Qi (i = 1, 2, 3, 4) and intersects with line segments PA and PB at two points, a and b, respectively, and Pa⟶=Pb⟶, forming an included angle θ. As can be seen from Figures 2 and 3,(2)Pa⟶=Pb⟶=dsinθ,Pa⟶=PA⟶·xPA⟶·Pa⟶,PA⟶·yPA⟶·Pa⟶,Pb⟶=PB⟶·xPB⟶·Pb⟶,PB⟶·yPB⟶·Pb⟶,where (x, y) is the coordinate of the offset point. Figure 2(a) is taken as an example to illustrate the process of obtaining the coordinates of the offset points. As can be seen from Figure 2(a),(3)PQ⟶1=Pa⟶+Pb⟶.Substituting formula (3) and formula (2) into formula (3), the coordinate equation of the offset point can be obtained as follows:(4)Q1·x=P·x+PA⟶·xPA⟶⋅dsinθ+PB⟶·xPB⟶⋅dsinθ,Q1·y=P·y+PA⟶·yPA⟶⋅dsinθ+PB⟶·yPB⟶⋅dsinθ..Then the coordinates of offset pointQ1 are(5)x=x0+x1−x0x1−x02+y1−y02⋅dsinα+x2−x0x2−x02+y2−y02⋅dsinα,y=y0+y1−y0x1−x02+y1−y02⋅dsinα+y2−y0x2−x02+y2−y02⋅dsinα..Similarly, the coordinates of offset pointQ2 can be obtained as follows:(6)x=x0−x1−x0x1−x02+y1−y02⋅dsinα−x2−x0x2−x02+y2−y02⋅dsinα,y=y0−y1−y0x1−x02+y1−y02⋅dsinα−y2−y0x2−x02+y2−y02⋅dsinα..The coordinates of offset pointQ3 can be obtained as(7)x=x0+x1−x0x1−x02+y1−y02⋅dsinα−π/2+x2−x0x2−x02+y2−y02⋅dsinα−π/2,y=y0−y1−y0x1−x02+y1−y02⋅dsinα−π/2−y2−y0x2−x02+y2−y02⋅dsinα−π/2..The coordinates of offset pointQ4 can be obtained as(8)x=x0−x1−x0x1−x02+y1−y02⋅dsinα−π/2−x2−x0x2−x02+y2−y02⋅dsinα−π/2,y=y0−y1−y0x1−x02+y1−y02⋅dsinα−π/2−y2−y0x2−x02+y2−y02⋅dsinα−π/2..


## 2.2. Point Set Simplification of the Contour Offset Line

It can be seen from the above analysis that the offset point set of Edge can be obtained by calculating the outer contour offset of the starting layer. However, the complex shape contour has the problem of overlapping points due to small folding angles and gaps, so the point set needs to be further processed [18]. The Douglas–Peucker algorithm can reduce the number of ignorable feature points. Because of the translation and rotation invariance of the algorithm, it is widely used to simplify and deal with complex vertex set curve problems, thus simplifying the curve data composed of a series of feature points [19, 20]. When the curve and the limit are determined, the simplified result with this algorithm has good stability.The processing principle of offset line simplification based on Douglas–Peucker algorithm as follows: when the distanceL between a vertex and the last vertex is less than the given length Lmin of the shortest line segment and the height H of triangle formed by the vertex and its adjacent vertices is less than the allowable error distance Hmin, the point is discarded. As shown in Figure 4, (a) (x1, y1), B(x2, y2), and C(x3, y3) are the three adjacent vertex coordinates in the vertex set of contour offset line of slice model, and the point B is taken as an example to make choice judgment.Figure 4
Simplification of contour offset lines.From the figure, we can getAB⟶=x2−x1,y2−y1, AC⟶=x3−x1,y3−y1, and then the distance LAB between the point B and its previous vertex A can be expressed as(9)LAB=x2−x12+y2−y12.Similarly, the expression ofLAC can be obtained as follows:(10)LAC=x3−x12+y3−y12.It can be obtained that the area of triangleABC expressed by vertex coordinates is(11)SΔABC.=12x1y2−x2y1+x2y3−x3y2+x3y1−x1y3.Then, the height of triangleABC passing through the point B is(12)HB=x1y2−x2y1+x2y3−x3y2+x3y1−x1y3x3−x12+y3−y12.For the convenience of calculation,LAB2 and HB2 are used in the actual algorithm to realize the trade-off judgment of the contour points. The specific steps of simplifying processing of contour offset line point set are as follows:Step 1: given the shortest segment lengthLmin and allowable error distance, in order to facilitate data judgment and reduce the computational complexity of the slicing process, the square Lmin2 of the shortest line segment length and the square Hmin2 of the allowable error distance are taken as the actual judgment benchmark of the algorithm.Step 2: the first and last vertices in the contour offset line are reserved without trade-offs. The second vertex is namedBcurrent as the first coordinate point to be simplified, and the two adjacent points before and after the point are named Aprevious and Cnext.Step 3: calculate the square valueLAB2 of the distance between Aprevious and Bcurrent, and judge whether LAB2 is less than Lmin2. If LAB2 is less than Lmin2, continue to perform the next step; otherwise, jump to Step 6.Step 4: calculate the heights of trianglesAprevious, Bcurrent, and Cnext crossing point Bcurrent, whose square value is HB2, and determine whether HB2 is less than Hmin2. If HB2 < Hmin2, proceed to the next step; otherwise, jump to Step 6.Step 5: according to judgment, ifBcurrent satisfies the simplification condition, then this point is abandoned. If Bcurrent is the penultimate vertex in the point set of contour bias line at the beginning layer of the polygon, the simplification algorithm of contour offset line processing is finished; otherwise, the coordinate of point Aprevious remains unchanged, assign Cnext to Bcurrent, and the next adjacent vertex of Bcurrent is taken as Cnext; then, jump to Step 3.Step 6: according to the judgment, ifBcurrent does not satisfy the simplification condition, then this point is retained. If Bcurrent is the penultimate vertex in the point set of contour offset line at the beginning layer of the polygon, the simplification algorithm of contour offset line processing is finished. Otherwise, Bcurrent is assigned to Aprevious and Cnext is assigned to Bcurrent. Finally, the next adjacent vertex of Bcurrent is set as Cnext and jump to Step 3.


## 3. Target Point Position Judgment Based on the Ray-Casting Algorithm

The sliced single-layer polygon contour is composed of several arbitrary closed curves. According to the molding requirements of 3D printing parts, the area to be filled in the model is called the interior of the polygon contour, and the area not to be filled is called the exterior of the polygon contour.In the calculation of generating edge coordinate points, it is necessary to judge the position relationship between each coordinate point and the polygon contour of the layer, and the purpose is to distinguish whether the point is inside or outside the polygon contour [21]. Based on the PNPoly algorithm proposed by W. Randolph Franklin, this paper uses the ray-casting algorithm to judge whether a point is outside the polygon [22, 23]. Assuming that an edge of the polygon contour is represented by P1x1,y1 and P2x2,y2 and the target point Px3,y3 leads out rays horizontally to the right, as shown in Figure 5, the linear equation of the edge is shown as follows:(13)y−y1=y2−y1x2−x1x−x1.Figure 5
The target pointP intersects the edge (P)1(P)2 diagram.Under the condition thaty1≤y3≤y2 or y2≤y3≤y1 is satisfied, the coordinate of the target point P is substituted. According to the graph relationship, if the ray drawn from the target point P horizontally to the right has an intersection point with the edge P1P2, the following inequality exists:(14)x3x2−x1y3−y1y2−y1+x1.The parity of the number of intersections between the ray and the polygon contour edge is calculated by formula (14), and the positional relationship between the point and the polygon contour can be judged. If there is an odd number of intersections, the point is a filled area inside the polygon contour. If the number of intersections is even, the point is an external nonfilled area.


## 4. The Generation Algorithm of the Novel Platform Attached Support Structure

According to the conditional requirements of edge structure in 3D printing, a novel platform attached support structure is proposed and designed by using the proposed contour offset algorithm combined with target point positioning, as shown in Figure6.Figure 6
The diagram of the novel platform attached support structure.In the figure, the edgeAB is the polygonal contour of the printed model, and the edge A′B′ is the contour line segment offset outward by d distance from the original contour edge AB, where the coordinates of A′ and B′ are x1′,y1′ and x2′,y2′, respectively. Given the bottom edge distance value for d1, the adjacent distance value is d2, d1 < d2, and the line segment A′B′ is divided into N segments with the adjacent distance as d2, then the value of N is(15)N=x2′−x1′2+y2′−y1′2d2.The line segmentA′B′ in Figure 6 is divided into three segments; then the coordinates of the two endpoints A1 and B1 in the first segment are, respectively,(16)x1=x1′+x2′−x1′N⋅d2−d1d2,y1=y1′+y2′−y1′N⋅d2−d1d2,x2=x1′+x2′−x1′N,y2=y1′+y2′−y1′N..Similarly, the coordinate values ofAi and Bi of the other segments in the offset contour can be obtained sequentially by using the above method, where i = 1,2, ...., N.In the structure, the third pointCi with Ai and Bi forms an isosceles triangle structure. For the two points A1 and B1 in Figure 6, the slope of the straight line is k=y2−y1/x2−x1, where the line segment A1B1 is located. From the deformation of the isosceles triangle area formula, the coordinates of the third point C1x3,y3 can be obtained as follows:(17)x3=x1+x22±Hx2−x1/y2−y12+1,y3=y1+y22±Hy2−y1/x2−x12+1,k<0,x1+x22∓Hy2−y1/x2−x12+1,k≥0..TheH in the formula is the height of the isosceles triangle, which is generally slightly greater than the contour offset distance d.According to formula (17), the third points C1 and C1′ satisfying the structure of isosceles triangle can be obtained by using the coordinates of A1 and B1. To judge the position relationship between the two points and the contour according to the above ray-casting algorithm, omit the coordinate C1′ outside the contour of the polygon. The coordinates of all third points Cii=1,2,…,N are obtained in turn, and the path coordinates are generated in the order of A′, Ai, Ci, Bi, ... , i = 1,2, ..., N. The calculation steps of novel platform attached support structure generation are as follows:Step 1: offset the starting layer contour of the slice model outward byd distance, and set the bottom distance as d1, the adjacent distance as d2, and the offset distance of the third point as HStep 2: the edge line simplification based on Douglas–Peucker algorithm is used to simplify the contour of the offset starting layerStep 3: take the coordinatesA′x1′,y1′ and B′x2′,y2′ of the two endpoints of each side in the simplified offset initial layer profile set, calculate the length LA′B′ of line segment A′B′, and calculate the number of segments N of LA′B′ divided by adjacent distance d2Step 4: equations (16) and (17) are used to calculate the coordinates of Ai and Bi on the each segment, i = 1,2, ..., N, and calculate the value of the line slope k on which segment AiBilocates and the two third point coordinates Ci and Ci′ of each segmentStep 5: based on the ray-casting algorithm, distinguish Ci andCi′ which satisfy the coordinate points inside the polygon contour and keep them, and let the point be CiStep 6: the third pointCi of all edges in the contour set of offset starting layer is obtained through traversal, and the coordinates of each point are stored according to the printing sequence A′, Ai, Ci, Bi of the generation path, where i = 1, 2, 3, …, NThe algorithm process is shown in Figure7.Figure 7
Calculation process of generating a new platform attached support structure.


## 5. Experimental Verification of the Algorithm

In order to verify the performance of the algorithm, the effectiveness comparison experiment is carried out by using the novel platform attached support structure generated by the algorithm proposed in this paper and three common types of base layer structures: Skirt, Brim, and Raft. The experimental part model is shown in Figure8, which belongs to thin-walled structure. The polygon size of the single-layer section is 84.00 mm∗66.00 mm. From the model of the part, it can be seen that there are three forms of polygon contour point sets in the process of generating the first layer from slicing model. The simplification method of contour offset line in this paper is adopted to process the model's offset contour, and the polygon contour offset obtained by simulation after encapsulation into the slicing software is shown in Figure 9. In the figure, the blue path is the contour offset line after simplified processing, and the offset distance d = 2 mm.Figure 8
Testing model.Figure 9
Offset line of model contour.In the process of slicing, the bottom edge distance of the novel platform attached support structure is set asd1 = 3 mm, and the adjacent distance is set as d2 = 5 mm. In order to ensure the contact area between the edge structure and the initial layer of the printed part, the offset distance of the third point is set as H = 2.4 mm. After simplifying the offset contour of the starting layer, the novel platform attached support structure generation algorithm based on ray-casting algorithm and contour offset proposed in this paper is adopted to generate the edge of the model. The edge of novel platform attached support structure obtained in the slicing software is shown in Figure 10. In the figure, the blue path is the novel platform attached support structure route of the printed model.Figure 10
Model of the novel platform attached support structure edge.The algorithm is secondary encapsulated in the open-source slicing software Cura, and the exported G-code file is imported into the 3D printer control system for printing experiment by layering model slices, simplifying processing and generating edges of the novel platform attached support structure. The printing device used is shown in Figure11.Figure 11
The device of 3D printing.The traditional Brim, Skirt, and Raft and the novel platform attached support structure in this paper are used to slice the auxiliary structure for the initial layer of the test model, and the final printed parts are shown in Figure12. The printing process parameters are set as follows: the distance of Skirt is 2 mm, the minimum length of Skirt/Brim is 250 mm, the line width of the Brim is 8.0 mm, the line count of the Brim is 20, the thickness of Raft is 0.4 mm, the blank of Raft is 15 mm and the offset distance of the novel platform attached support structure is 2 mm, the bottom distance is 3 mm, and the adjacent distance is 5 mm. The third point offset distance is 2.4 mm.Figure 12
Printed actual object of test model. (a) The edge structure of the Skirt. (b) The edge structure of the Brim. (c) The edge structure of the Raft. (d) The edge structure of the novel platform attached support structure.
(a)(b)(c)(d)The four base layer structures are removed from the printed parts, and the parameters of the processed part are compared with the novel platform attached support structure algorithm proposed in this paper. The experimental results are shown in Table1. The experimental results show that, compared with other types of base layer structures, the warpage of the novel platform attached support structure proposed in this paper is significantly less than that of the Skirt structure, and the removal degree is better than that of Brim and Raft type. Moreover, after removing the edge of the starting layer, the edge quality of the printed part is also better than that of Brim and Raft.Table 1
Comparison of different Skirt structures.
Structure of the initial layerWarpage (mm)How easy is it to remove the base layerThe quality of the layer edge of the printed partNo Skirt0.18No difficultyGoodSkirt0.19Very easyGoodBrim0.07DifficultyPoorRaft0.03Very difficultyVery poorThe novel platform attached support structure of our method0.08EasyGood


## 6. Conclusions

The setting of the initial layer in the process of fused deposition 3D printing is a key step to determine the printing quality. Although the Brim and the Raft are widely used to increase the adhesion of the printing platform, they will not be easy to remove after printing when they are used for complex sheet parts. In this paper, we first calculate the process of contour offset in different cases, then introduce the simplified processing method of contour offset line, judge the position relationship between target point and polygon contour according to the ray-casting algorithm, and propose and design a novel platform attached support structure. The simulation and experiment prove that it has good feasibility.In conclusion, the main advantages of the novel 3D printing support structure proposed and designed in this paper are as follows: under the same conditions, the material consumption of the platform attached support structure designed in this paper is less than that of Brim and Raft support structure, so the execution time of slicing is effectively reduced. Although the warpage of the designed novel platform attached support structure is slightly higher than the existing initial layer generation algorithm under the same offset distance, the removal after printing is easier than the existing Brim and Raft structures, which can effectively reduce the damage to the surface of the model during the removal of the base edge of the complex chip structure.We know that there are many reasons for the warpage of the printing parts. For example, when the length width ratio of the printing structure is relatively high, the warpage will increase. Different printing materials have different warpage of printing structure, such as nylon or ABS with high warpage tendency. Therefore, in order to better reduce the amount of warpage, the later work will further study the relationship between the warpage of structural parts with different printing materials and the parameters of the new platform attachment support structure, so as to acquire better support structure parameters.



---

*Source: 1532924-2022-02-23.xml*