A trajectory planning method for 3D printing of complex building components

Through contour offset, interference processing and simulated annealing algorithms combined with third-order Bezier curve methods, the problem of trajectory intersection and insufficient smoothness in 3D printing of complex building components is solved, and non-intersecting, continuous and smooth trajectory planning is achieved. Improved print quality and mechanical properties.

CN114782654BActive Publication Date: 2024-09-06XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210333734.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-09-06
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In 3D printing of complex building components, existing trajectory planning methods have problems such as trajectory intersections, interruptions, and insufficient smoothness, which affect printing quality and mechanical properties.

Method used

It adopts the methods of contour offset, interference processing, key point acquisition, trajectory solution and trajectory smoothing, and uses the vector product method and simulated annealing algorithm to plan a non-intersecting, continuous and smooth trajectory, and uses the third-order Bezier curve to adjust parameters to meet Curvature constraints.

Benefits of technology

It achieves non-intersecting, continuous and smooth trajectory planning of single-layer printing contours of complex shapes, reduces the number of printer starts and stops, and improves printing quality and mechanical properties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782654B
    Figure CN114782654B
Patent Text Reader

Abstract

The present invention provides a method for 3D printing trajectory planning of complex building components. It mainly consists of five steps: contour offset, self-interference processing, key point acquisition, trajectory solution, and trajectory smoothing processing. Contour offset is to offset the outer contour of a single-layer printing contour inward and the inner contour outward by the vector product method. Self-interference processing is to solve the self-intersection problem after the bias of complex concave figures by decomposing the offset contour into multiple lines and finding the intersection points, judging the valid loop and reconstructing the new contour. Key point acquisition is to obtain key points evenly distributed in the filling area through different filling rates. Trajectory solution is to plan a continuous printing trajectory by traversing the key points in the filling area through the simulated annealing algorithm. Trajectory smoothing is to smooth the trajectory by adjusting the parameters of the third-order Bezier curve to meet the curvature constraint. The present invention can obtain a non-intersecting, continuous and smooth trajectory of a single layer of 3D printing of complex building components, thereby improving the printing quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of 3D printing of building components, and in particular relates to a 3D printing trajectory planning method for complex building components. Background Art

[0002] In the trajectory planning of 3D printing of complex building components, the contour offset will produce self-interference, and the conventional line filling, the trajectory has intersections and interruptions and poor smoothness. The goal of trajectory planning is to reduce trajectory intersections and interruptions, and on the basis of meeting a certain filling rate, the trajectory is continuous and smooth, improve the problem of interruption or accumulation of extruded materials, and improve the printing quality and mechanical properties. Research on trajectory planning of 3D printing of complex building components is of great significance to improving the printing quality of 3D printing in the construction industry.

[0003] At present, many scholars have conducted research on the trajectory planning of 3D printing of building components. These include: (1) planning the filling trajectory through traditional polylines, grids or contour offsets. For complex hollow sections, this method will cause multiple intersections and interruptions in the trajectory, resulting in interruption or accumulation of extruded materials, affecting the printing quality; (2) For complex shaped sections, the section is divided into multiple sub-areas, and sub-paths are planned separately, and then the sub-paths are connected. This method has a large amount of calculation and serious path redundancy, affecting the printing efficiency; (3) For complex shaped sections, a genetic algorithm or greedy search algorithm is used to plan a continuous printing trajectory. This method has a slow convergence speed, and the calculation time and the total planned path are long; (4) For complex shaped sections, a fixed curve, such as a sine curve, is used to fill. This method cannot guarantee uniform filling for complex non-uniform shapes, affecting the mechanical performance. Summary of the invention

[0004] In view of the defects of the above-mentioned existing methods, the purpose of the present invention is to provide a 3D printing trajectory planning method for complex building components, which aims to plan a non-intersecting, continuous and smooth trajectory on the basis of ensuring a certain filling rate, and to improve efficiency, reduce redundant paths, and improve printing quality.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] A method for 3D printing trajectory planning of complex building components comprises the following steps:

[0007] (1) Contour offset: The single-layer print contour of the model is offset inwards and outwards by the vector product method;

[0008] (2) Interference processing: For the offset of complex concave contours, if the offset contour has self-intersection, interference processing is performed and a new contour is reconstructed;

[0009] (3) Key point acquisition: Obtain key points evenly distributed within the filling area based on the filling rate;

[0010] (4) Trajectory solving: Traverse the key points in the filling area and solve a continuous printing trajectory;

[0011] (5) Trajectory smoothing: The minimum curvature radius is calculated by the line width of the extruded material, and the third-order Bezier curve is used to adjust the parameters for smoothing the printing trajectory to meet the curvature constraint.

[0012] In one embodiment, the specific method of the interference treatment in step (2) is:

[0013] 1) Contour decomposition: decompose the offset contour into polylines, and the horizontal and vertical coordinates of the points on the polylines increase or decrease in sequence;

[0014] 2) Find the intersection points of polylines: Polylines are judged pairwise by whether the extended rectangles overlap to determine whether they intersect. If they do intersect, find all the self-intersection points;

[0015] 3) Determination of the validity of the new ring: The intersection point of the reconstructed contour ring is P i The points before and after the intersection are P i-1 ,P i+1 , determine the direction of the ring through the vector cross product, F = P i-1 P i ×P i P i+1 If F>0, the ring is clockwise and is a valid ring. If F<0, the ring is counterclockwise and is an invalid ring.

[0016] 4) Reconstruction of the new ring: traverse all valid self-intersection points. If the new ring is valid, insert it into the contour vertex array and connect to reconstruct the new contour.

[0017] In one embodiment, the specific method for obtaining the key points in step (3) is: according to the line width L of the extruded material and the single-layer filling rate ε, the unit length of the coordinate axis is calculated as Draw a grid, make a ray through the grid point (x0, y0), and find the horizontal coordinate x of the intersection with the contour boundary. The formula is as follows:

[0018]

[0019] Among them, (x1, y1), (x2, y2) are the coordinates of the two end points of the contour boundary segment. Compare x with x0 to get the number of intersections with the contour boundary. If the number of intersections is odd, the grid point is retained within the filling area. If the number of intersections is even, the grid point is removed if it is not within the filling area.

[0020] In one embodiment, the step (4) uses a simulated annealing algorithm to solve a continuous printing trajectory that traverses all key points according to the coordinates of the key points in the filling area, so as to minimize the trajectory length; an annealing rate function constructed in an exponential form of an enhancement coefficient α and the number of iterations i is used to increase the solution rate, and the formula is as follows:

[0021]

[0022] The new solution acceptance probability function constructed using the Boltzmann constant k and the amplification coefficient μ is:

[0023]

[0024] Among them, the function is d jk is the distance between two key points j and k, x jk Mark whether the key point has been visited, s represents any solution, that is, a permutation of all key points, s′ is the new solution after iteration, n is the population size of the simulated annealing algorithm, T i is the current temperature, T i+1 is the temperature at the next moment, ΔT is the temperature difference between two iterations, and P is the probability of accepting the new solution.

[0025] In one embodiment, the step (5) uses a third-order Bezier curve to smooth the print trajectory to meet the curvature constraint at the sharp corner, and the minimum curvature radius of the print trajectory is calculated based on the line width L. The parameter adjustment range of the Bezier curve is k∈[0.2-0.8], so that the curvature at any point on the printing trajectory satisfies:

[0026]

[0027] Among them, x(t), y(t) are the parametric equations of the coordinates of any point on the printing trajectory over time t, and x′(t), y′(t) and x″(t), y″(t) are the first-order and second-order derivatives of the parametric equations, respectively.

[0028] 3D printing of building components requires that the trajectory has less intersection, is continuous and has good smoothness, so as to reduce the start and stop and interruption of the printer and ensure the printing quality and mechanical properties. Compared with the prior art, the present invention can plan a non-intersecting, continuous and smooth trajectory for a single-layer printing contour of a complex shape, meeting the printing quality and performance requirements of complex building components. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 Flow chart of the trajectory planning method of the present invention.

[0030] Figure 2 It is a simulation flow chart of the trajectory planning method of the present invention.

[0031] Figure 3 This is the schematic diagram of the contour bias vector product method.

[0032] Figure 4 This is the effect diagram of the complex hollow concave contour after self-intersection and interference processing.

[0033] Figure 5 Schematic diagram of finding the intersection point of two polylines.

[0034] Figure 6 To obtain key points of different densities in the filling area at different filling rates.

[0035] Figure 7 Comparison of the effect diagram and convergence diagram of the simulated annealing algorithm trajectory planning before and after optimization.

[0036] Figure 8 This is the trajectory smoothing effect diagram under different parameters. DETAILED DESCRIPTION

[0037] The present invention will be described in further detail below in conjunction with the accompanying drawings.

[0038] The trajectory planning method of the present invention is implemented as follows Figure 1 , mainly consists of five steps: contour offset, self-interference processing, key point acquisition, trajectory solution, and trajectory smoothing processing. The workflow of the present invention is as follows Figure 2 , including: importing the stl model layering to obtain the single-layer cross-section contour, contour offset and self-intersection interference processing, obtaining the key points in the filling area according to the filling rate, using the simulated annealing algorithm to traverse the key points to obtain a continuous trajectory, and smoothing the trajectory to eliminate sharp corners to meet the curvature constraints.

[0039] Contour offset is to use the vector product method to offset the outer contour inward and the inner contour outward of the single-layer printing contour of the model. The implementation method is: according to the known contour point set and offset distance, the vector product method is used to calculate the offset, such as Figure 3 Specifically, draw vectors along the two sides of the contour through a point in the contour point set and calculate the vector angle; calculate the length of the offset vector from the vector angle and the offset distance; determine the concavity of the contour at the point through the vector cross product; and obtain the coordinates of the offset point by summing the vectors.

[0040] For example, given any point P on the contour and the offset distance d, find the offset point P′. The specific steps are as follows:

[0041] Step 1) Calculate the vector from points P, P1, P2 and the vector angle;

[0042] Step 2) Find the vector from the angle θ and d Length

[0043] Step 3) The outer contour is offset inwards by d v ′=d v , inner contour is offset outward d v ′=-d v ;

[0044] Step 4) Determine the convexity of the sharp corner by the vector cross product. If the cross product is less than 0, it is concave. The cross product is greater than 0, which is convex.

[0045] Step 5) Find the coordinates of point P'

[0046] For the offset of complex concave contours, self-intersection may occur, such as Figure 4 (a), so it is necessary to use the decomposition and reconstruction method to perform interference processing and reconstruct a new contour. The method is as follows:

[0047] 1) Contour decomposition: decompose the offset contour into polylines, and the horizontal and vertical coordinates of the points on the polylines increase or decrease in sequence;

[0048] 2) Find the intersection points of polylines: Polylines are judged pairwise, and whether they intersect is determined by the extended rectangle. If they intersect, all self-intersection points are found;

[0049] 3) Determination of the validity of the new ring: The intersection point of the reconstructed contour ring is P i The points before and after the intersection are P i-1 ,P i+1 , through the vector P i-1 P i and P i P i+1 The cross product F = P i-1 P i ×P i P i+1 Determine the validity of the new ring. If F>0, the ring is clockwise and is a valid ring. If F<0, the ring is counterclockwise and is an invalid ring.

[0050] 4) Reconstruction of the new ring: traverse all valid self-intersection points. If the new ring is effectively inserted into the contour vertex array, connect and reconstruct to obtain a new contour.

[0051] The intersection points of polylines are as follows: Figure 5 , find the intersection of two polylines LA and LB, LA.p and LA.n represent the front and back endpoints of a line segment in LA respectively, N A is the number of vertices of the polyline LA. The specific steps are as follows:

[0052] Step 1) Determine the extended rectangles of the two polylines from the start and end point coordinates of LA and LB. If the rectangles intersect, execute Step 2).

[0053] Step 2) Set i = 1, j = 1. Let LA.p = LA[i], LA.n = LA[i + 1], LB.p = LB[j], LB.n = LB[j + 1]. Determine whether there are intersections between the line segments LA.p, LA.n and LB.p, LB.n, and find the intersections. If there are no intersections, go to Step 3).

[0054] Step 3) Determine whether the loop end condition is satisfied. If any of the following three conditions is met, terminate the loop:

[0055] i + 1 = N A , j + 1 = N B , that is, LA.n and LB.n are both the end points of the polyline;

[0056] i + 1 = N A and LA.n.x ≤ LB.n.x;

[0057] j + 1 = N B and LA.n.x ≥ LB.n.x

[0058] Step 4) Update i and j.

[0059] If LA.n.x < LB.n.x, then i++;

[0060] If LA.n.x > LB.b.x, then j++;

[0061] If LA.n.x = LB.n.x, then i++, j++, and go to Step 2) to execute.

[0062] After the offset profile interference processing, the result is as shown in Figure 4 (b).

[0063] After the profile offset, obtain the key points in the filled area from the filling rate. The method is as follows: From the line width L of the extruded material and the single-layer filling rate ε, calculate the unit length on the coordinate axis Draw a grid with this unit length as shown in Figure 6 (a).

[0064] Determine whether the grid points are within the filled area: Draw a ray through the grid point (x0, y0), and find the abscissa x of the intersection point with the profile boundary. The formula is as follows:

[0065]

[0066] Among them, (x1, y1), (x2, y2) are the coordinates of the two end points of the contour boundary segment. Compare x with x0 to get the number of intersections with the contour boundary. If the number of intersections is odd, the grid point is retained in the filling area. If the number of intersections is even, the grid point is removed if it is not in the filling area. Finally, the key points with different densities evenly distributed in the filling area are obtained, such as Figure 6 In (b) and (c), the larger the filling rate, the denser the key points.

[0067] Trajectory solving is to traverse the key points in the filling area and solve a continuous printing trajectory. Specifically, according to the coordinates of the key points in the filling area, the simulated annealing algorithm before and after optimization is used to traverse the key points in the filling area respectively, and solve a continuous trajectory passing through all key points to minimize the trajectory length. The specific steps of the optimized simulated annealing algorithm are as follows:

[0068] Step 1) Set the initial temperature T0 (sufficiently high), randomly generate N evolutionary populations, and randomly generate the initial solutions s1, s2, …s for each population. n , set the number of iterations of each loop to L;

[0069] Step 2) For each population, at the current temperature T i Next, execute steps 3)-4);

[0070] Step 3) Use a multi-population parallel mechanism to independently generate multiple random perturbations to obtain multiple solutions. Compare and select the solution with the smallest objective function among the multiple solutions, denoted as s′, and calculate the objective function increment Δs=f(s′)-f(s). When Δs<0, accept s′ as the new current solution, otherwise accept it with probability exp(-μ(f(s′)-f(s)) / kT i ) accept s′ as the new current solution;

[0071] Among them, the function is d jk is the distance between two key points j and k, x jk Mark whether the key point has been visited. s represents an arbitrary solution, that is, a permutation of all key points, s′ is the new solution after iteration, and n is the population size of the simulated annealing algorithm.

[0072] Step 4) If the termination condition is met, output the current solution s as the optimal solution s * End, the termination condition is that j consecutive new solutions are not accepted;

[0073] Step 5) T is gradually reduced, and the annealing rate function constructed in the exponential form of the enhancement coefficient α and the number of iterations i is used to increase the solution rate. The formula is as follows:

[0074]

[0075] Until T approaches 0, an iteration ends; T i is the current temperature, T i+1 is the temperature at the next moment, and ΔT is the temperature difference between two iterations.

[0076] Step 6) Finally, the global optimal solution is obtained from the optimal solutions of N populations. Specifically, the Boltzmann constant k and the amplification coefficient μ are used to construct a new solution acceptance probability function, improve the population diversity and thus improve the quality of the solution. The formula is as follows:

[0077]

[0078] Where P is the probability of accepting the new solution. α is a small constant, i is the number of iterations, k is the Boltzmann constant, and μ is the magnification factor μ∈[10,100]. Figure 7 , (a) and (d) are the trajectories in the filled area before and after the algorithm optimization, (b) and (e) are the convergence diagrams before and after the algorithm optimization. From the comparison, it can be seen that the trajectory length solved by the optimized algorithm is shorter and converges faster. (c) and (f) are the effect diagrams before and after the algorithm optimization, connecting the trajectory in the filled area and the inner and outer bias contours into a complete trajectory and bolding them.

[0079] The trajectory smoothing process is to solve the problem of sharp corners in the printing trajectory. The minimum curvature radius is calculated by the line width of the extruded material, and the third-order Bezier curve is used to adjust the parameters to smooth the printing trajectory to meet the curvature constraints at the sharp corners. Specifically, the minimum curvature radius of the printing trajectory is calculated by the line width L. The maximum curvature is The curvature constraint that the smoothed trajectory needs to satisfy is ρ≤ρ max ; The interpolation point is calculated by the third-order Bezier curve equation. The parameter adjustment range of the Bezier curve is k∈[0.2-0.8], so that the curvature at any point on the printing trajectory satisfies:

[0080]

[0081] Among them, x(t), y(t) are the parametric equations of the coordinates of any point on the printing trajectory over time t, and x′(t), y′(t) and x″(t), y″(t) are the first-order and second-order derivatives of the parametric equations, respectively.

[0082] The effect is as follows Figure 8As shown, (a) is the original printing trajectory before smoothing. The curvature parameter k is adjusted by the third-order Bezier curve to obtain trajectories with different smoothing effects. (b) is the smoothing effect when k = 0.8, and (c) is the smoothing effect when k = 0.4. It can be seen that the smaller k is, the higher the smoothness of the trajectory is, until the curvature constraint of the printing trajectory is met.

[0083] The present invention completes the trajectory planning for the single-layer contour of complex building components. The current traditional trajectory planning method has the problems of multiple intersections, interruptions and poor smoothness of the filling trajectory when processing complex building components, resulting in poor molding quality of the printed parts. In the present invention, the interference of the internal and external contour offsets is first processed, and then an uninterrupted and continuous optimal trajectory is solved by a simulated annealing algorithm, and finally a third-order Bezier curve is used for smoothing to solve the problem of material accumulation at sharp corners. The method of the present invention can obtain a non-intersecting, continuous and smooth trajectory of a single-layer printing contour, which can greatly reduce the number of printer starts and stops, improve printing quality and mechanical properties, and make the molding effect better than the traditional trajectory planning method. The method of the present invention is universal for various types of architectural 3D models.

Claims

1. A method for 3D printing trajectory planning of complex building components, characterized in that: The steps include: (1) Contour offset: The single-layer print contour of the model is offset inwards and outwards by the vector product method; (2) Interference processing: For the offset of complex concave contours, if the offset contour has self-intersection, interference processing is performed and a new contour is obtained by reconstruction; (3) Key point acquisition: Obtain key points evenly distributed within the filling area based on the filling rate; (4) Trajectory solving: Traverse the key points in the filling area and solve a continuous printing trajectory; (5) Trajectory smoothing: The minimum curvature radius is calculated by the line width of the extruded material, and the third-order Bezier curve is used to adjust the parameters for smoothing the printing trajectory to meet the curvature constraint; The specific method of interference processing in step (2) is: 1) Contour decomposition: decompose the offset contour into polylines, and the horizontal and vertical coordinates of the points on the polylines increase or decrease in sequence; 2) Find the intersection points of polylines: Polylines are judged pairwise by whether the extended rectangles overlap to determine whether they intersect. If they do intersect, find all the self-intersection points; 3) Determination of the validity of the new ring: The intersection point of the reconstructed contour ring is P i The points before and after the intersection are P i-1 ,P i+1 , determine the direction of the ring through the vector cross product, F = P i-1 P i ×P i P i+1 , if F>0, the ring is clockwise and is a valid ring, if F<0, the ring is counterclockwise and is an invalid ring; 4) Reconstruction of the new ring: traverse all valid self-intersection points. If the new ring is valid, insert it into the contour vertex array and connect to reconstruct the new contour. In the step (3), the specific method for obtaining the key points is: according to the line width L of the extruded material and the single-layer filling rate ε, the unit length of the coordinate axis is calculated as Draw a grid, make a ray through the grid point (x0, y0), and find the horizontal coordinate x of the intersection with the contour boundary. The formula is as follows: Among them, (x1, y1), (x2, y2) are the coordinates of the two end points of the contour boundary segment. Compare x with x0 to get the number of intersections with the contour boundary. If the number of intersections is odd, the grid point is retained within the filling area. If the number of intersections is even, the grid point is removed if it is not within the filling area.

2. The method for 3D printing trajectory planning of complex building components according to claim 1, characterized in that: In the step (4), according to the coordinates of the key points in the filling area, a simulated annealing algorithm is used to solve a continuous printing trajectory that traverses all key points to minimize the trajectory length; an annealing rate function constructed in an exponential form of an enhancement coefficient α and the number of iterations i is used to increase the solution rate, and the formula is as follows: The new solution acceptance probability function constructed using the Boltzmann constant k and the amplification coefficient μ is: Among them, the function is d jk is the distance between two key points j and k, x jk Mark whether the key point has been visited, s represents any solution, that is, a permutation of all key points, s ′ is the new solution after iteration, n is the population size of the simulated annealing algorithm, T i is the current temperature, T i+1 is the temperature at the next moment, ΔT is the temperature difference between two iterations, and P is the probability of accepting the new solution.

3. The method for 3D printing trajectory planning of complex building components according to claim 2, characterized in that: In the step (5), a third-order Bezier curve is used to smooth the print trajectory to meet the curvature constraint at the sharp corner, and the minimum curvature radius of the print trajectory is calculated by the line width L. The parameter adjustment range of the Bezier curve is k∈[0.2-0.8], so that the curvature at any point on the printing trajectory satisfies: Among them, x(t), y(t) are the parametric equations of the coordinates of any point on the printing trajectory over time t, x ′ (t),y ′ (t) and x″(t), y″(t) are the first and second order derivatives of the parametric equation respectively.