A printing track smoothing processing method, device, equipment and storage medium

By generating rotation angle curves and applying B-spline optimization technology, the problems of printing trajectory jitter and abrupt changes in five-axis 3D printing were solved, achieving higher quality printing results.

CN122143341APending Publication Date: 2026-06-05JIHUA LAB

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIHUA LAB
Filing Date
2024-12-03
Publication Date
2026-06-05

Smart Images

  • Figure CN122143341A_ABST
    Figure CN122143341A_ABST
Patent Text Reader

Abstract

The present application relates to the field of additive manufacturing, and discloses a printing track smoothing processing method, device, equipment and storage medium, type information is acquired according to the type of the used rotary table, and then a target transformation equation and a rotation matrix are determined;Then, the model to be printed is curved surface slicing, surface path points are acquired and normal vector information is calculated;The normal vector is rotationally transformed through the target transformation equation, a rotation angle value is obtained, and a three-dimensional path point is created according to the rotation angle value, and a rotation angle curve is generated;The rotation angle curve is optimized by using B-spline, and sampling processing is performed to obtain smooth rotation angle values;Finally, the smooth angle is matrix transformed by using the target rotation matrix, nozzle path points are obtained, and printing tracks are generated;The printing process is effectively reduced, and the surface quality and overall printing effect of the printed part are significantly improved, which brings significant improvement to the field of three-dimensional printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of additive manufacturing, and in particular to a method, apparatus, device, and storage medium for smoothing printing paths. Background Technology

[0002] Five-axis 3D printing technology controls the nozzle movement via three upper axes and the rotation of the printing platform via two rotating axes of the turntable. This control method enables curved surface printing, overcoming the limitations of traditional 3D printing technology which is limited to planar printing. It allows the printing path to be dynamically adjusted according to the surface shape characteristics of the printed part, achieving conformal printing. After the printed model undergoes surface layering and path planning, surface path data is obtained. The surface path is formed by a series of three-dimensional coordinate points, representing the filling path of the printing filament on the curved surface slice.

[0003] However, in five-axis 3D printing, when converting surface paths into printing trajectories, the normal vectors need to be rotated to align with the Z-axis to reduce the effects of gravity. This often leads to severe jitter in the converted printing trajectory. This jitter not only affects the stability of the printing process but can also cause a decrease in the surface quality of the printed part, posing a serious threat to print quality. Therefore, a method to smooth the printing trajectory is urgently needed. Summary of the Invention

[0004] In order to overcome the shortcomings of the prior art, the present invention aims to provide a method, apparatus, device and storage medium for printing trajectory smoothing, which significantly improves the smoothness of the printing trajectory by generating a rotation angle curve and applying B-spline optimization technology, effectively reducing jitter and abrupt changes during the printing process, thereby ensuring the surface quality of the printed parts and the overall printing effect.

[0005] The first aspect of this invention provides a method for smoothing printing trajectories, comprising: obtaining the type of turntable used, extracting type information from the turntable type, and obtaining a target transformation equation and a target rotation matrix based on the type information; obtaining the model to be printed, and performing surface slicing on the model to obtain surface path points, and calculating normal vector information based on the surface path points; performing a rotation transformation on the normal vector information through the target transformation equation to obtain a rotation angle value; creating three-dimensional path points based on the rotation angle value, and generating a rotation angle curve based on all three-dimensional path points; performing B-spline optimization on the rotation angle curve, and sampling processing on the optimized rotation angle curve to obtain a smoothed rotation angle value; performing a matrix transformation on the smoothed rotation angle through the target rotation matrix to obtain nozzle path points, and generating a printing trajectory based on all nozzle path points.

[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of obtaining the type of turntable used, extracting type information from the turntable type, and obtaining the target transformation equation and the target rotation matrix based on the type information includes: the type information includes AB type, AC type and BC type;

[0007] If the type information is AB, then the target transformation equation is:

[0008]

[0009] Where α and β are the rotation angles of the A-axis and B-axis, respectively, representing the platform's rotation about the X-axis by α degrees and its rotation about the Y-axis by β degrees, and n x n y and n z These are the x, y, and z component values ​​of the normal vector of the current vertex, respectively.

[0010] If the type information is AC, then the target transformation equation is:

[0011] α=cos -1 (n p ·z)

[0012]

[0013] Where α and γ are the rotation angles of the A-axis and C-axis, respectively, representing the platform's rotation about the X-axis by α degrees and its rotation about the Z-axis by γ degrees, and n p It is the normal vector of the current vertex, and x and z are the unit vectors of the X-axis and Z-axis, respectively;

[0014] If the type information is BC, then the target transformation equation is:

[0015] β=cos -1 (n p ·z)

[0016]

[0017] Where β and γ are the rotation angles of the B-axis and C-axis, respectively, representing the platform's rotation about the Y-axis by β degrees and its rotation about the Z-axis by γ degrees, and n p It is the normal vector of the current vertex, and y and z are the unit vectors of the Y-axis and Z-axis, respectively;

[0018] If the type information is AB, then the target rotation matrix is:

[0019]

[0020] Among them, R AB (α,β) represents the rotation matrix that rotates first around axis B and then around axis A, where α and β are the rotation angles around axis A and axis B, respectively.

[0021] If the type information is AC, then the target rotation matrix is:

[0022]

[0023] Among them, R AC (α,γ) represents the rotation matrix that rotates first around the C-axis and then around the A-axis, where α and γ are the rotation angles around the A-axis and the C-axis, respectively.

[0024] If the type information is BC, then the target rotation matrix is:

[0025]

[0026] Among them, R BC (α,γ) represents a rotation matrix that rotates first around the C-axis and then around the B-axis, where α and γ are the rotation angles around the B-axis and the C-axis, respectively.

[0027] Optionally, in a second implementation of the first aspect of the present invention, the step of obtaining the model to be printed, performing surface slicing on the model to obtain surface path points, and calculating normal vector information based on the surface path points includes: obtaining the model to be printed, and using a surface slicing algorithm to slice the model according to a preset slice layer thickness to obtain multiple slice layers; performing printing trajectory planning on all slice layers to obtain path curves; converting the path curves into a discrete set of points that can be used to control printing to obtain surface path points; and calculating the normal vector of each surface path point to obtain normal vector information.

[0028] Optionally, in a third implementation of the first aspect of the present invention, the step of creating three-dimensional path points based on rotation angle values ​​and generating rotation angle curves based on all three-dimensional path points includes: presetting a maximum allowable value; determining whether the rotation angle value is greater than the maximum allowable value; if the rotation angle value is greater than the maximum allowable value, then replacing the rotation angle value with the maximum allowable value to obtain an adjusted rotation angle value; dividing the adjusted rotation angle value into multiple groups of sub-rotation angle values; presetting a counting variable and setting the initial value of the counting variable to 0; the counting variable being used to represent the Z component of the three-dimensional coordinate points; using each group of sub-rotation angle values ​​as the X and Y components of the three-dimensional coordinate points, and using the counting variable as the Z component of the three-dimensional coordinate points, constructing multiple three-dimensional coordinate points, and incrementing the value of the counting variable by 1 for each three-dimensional coordinate point constructed; sorting the three-dimensional coordinate points from smallest to largest according to the value of the counting variable, and sequentially connecting each three-dimensional coordinate point to obtain the rotation angle curve.

[0029] Optionally, in the fourth implementation of the first aspect of the present invention, the step of performing B-spline optimization on the rotation angle curve and sampling the optimized rotation angle curve to obtain a smooth rotation angle value includes: smoothing the rotation angle curve based on the B-spline curve to obtain a smooth rotation angle path; performing interpolation sampling on the smooth rotation angle path to obtain sampling points; and extracting the X and Y components of the sampling points to obtain a smooth rotation angle value.

[0030] Optionally, in a fifth implementation of the first aspect of the present invention, the step of performing matrix transformation on the smooth rotation angle according to the target rotation matrix to obtain nozzle path points, and generating a printing trajectory based on all nozzle path points, includes: substituting the smooth rotation angle value into the target rotation matrix to obtain nozzle path points; generating a nozzle motion trajectory based on all nozzle path points; performing set processing on the smooth rotation angle values ​​corresponding to each nozzle path point to obtain a turntable rotation trajectory; and generating a printing trajectory based on the nozzle motion trajectory and the turntable rotation trajectory.

[0031] Optionally, in a sixth implementation of the first aspect of the present invention, the step of generating a printing trajectory based on the nozzle movement trajectory and the turntable rotation trajectory includes: performing time synchronization and spatial synchronization on the nozzle movement trajectory and the turntable rotation trajectory to obtain a synchronized nozzle movement trajectory and a synchronized turntable rotation trajectory; and generating a printing trajectory based on the synchronized nozzle movement trajectory and the synchronized turntable rotation trajectory.

[0032] A second aspect of the present invention provides a printing trajectory smoothing device, comprising: an acquisition module for acquiring the type of turntable used, extracting type information from the turntable type, and obtaining a target transformation equation and a target rotation matrix based on the type information; a slicing module for performing surface slicing processing on the model to obtain surface path points, and calculating normal vector information based on the surface path points; a rotation module for performing rotation transformation on the normal vector information according to the target transformation equation to obtain a rotation angle value; a curve generation module for creating three-dimensional path points based on the rotation angle value, and generating a rotation angle curve based on all three-dimensional path points; an optimization module for performing B-spline optimization on the rotation angle curve, and resampling the optimized rotation angle curve to obtain a smoothed rotation angle value; and a trajectory reconstruction module for performing matrix transformation on the smoothed rotation angle based on the target rotation matrix to obtain nozzle path points, and generating a printing trajectory based on all nozzle path points.

[0033] A third aspect of the present invention provides a print trajectory smoothing processing apparatus, the print trajectory smoothing processing apparatus comprising: a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the print trajectory smoothing processing apparatus to perform the various steps of the print trajectory smoothing processing method described in any of the preceding claims.

[0034] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the printing trajectory smoothing method described in any of the preceding claims.

[0035] In the technical solution of this invention, by accurately obtaining the turntable type and setting the transformation equation and rotation matrix accordingly, the model to be printed is subjected to surface slicing and the normal vector is calculated. Then, the rotation angle value is obtained through rotation transformation, and a three-dimensional path point is created to generate a rotation angle curve. After the curve is processed by B-spline optimization technology, a smooth rotation angle value is obtained by sampling, and then the nozzle path points are obtained through matrix transformation. Finally, a smooth and high-quality printing trajectory is generated, which effectively reduces jitter and abrupt changes during the printing process and significantly improves the surface quality and overall printing effect of the printed parts. Attached Figure Description

[0036] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0037] Figure 1 This is a first flowchart of a printing trajectory smoothing method provided in an embodiment of the present invention;

[0038] Figure 2 This is a second flowchart of the printing trajectory smoothing method provided in an embodiment of the present invention;

[0039] Figure 3 This is a third flowchart of the printing trajectory smoothing method provided in the embodiments of the present invention;

[0040] Figure 4 This is a fourth flowchart of the printing trajectory smoothing method provided in the embodiments of the present invention;

[0041] Figure 5 A fifth flowchart of the printing trajectory smoothing method provided in the embodiments of the present invention;

[0042] Figure 6 The sixth flowchart of the printing trajectory smoothing method provided in the embodiments of the present invention;

[0043] Figure 7 This is a schematic diagram of the printing trajectory smoothing device provided in an embodiment of the present invention;

[0044] Figure 8 This is a schematic diagram of the printing trajectory smoothing device provided in an embodiment of the present invention. Detailed Implementation

[0045] This invention provides a method, apparatus, device, and storage medium for smoothing print paths. The invention accurately obtains the turntable type and sets the transformation equation and rotation matrix accordingly. It then performs surface slicing on the model to be printed and calculates the normal vector. Subsequently, it obtains the rotation angle value through rotation transformation, and uses this value to create a 3D path point to generate a rotation angle curve. This curve is then processed using B-spline optimization technology, and smoothed rotation angle values ​​are obtained through sampling. Finally, a matrix transformation is performed to obtain the nozzle path points, ultimately generating a smooth and high-quality print path. This effectively reduces jitter and abrupt changes during the printing process, significantly improving the surface quality and overall printing effect of the printed parts.

[0046] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0047] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the printing trajectory smoothing method in this invention includes:

[0048] 101. Obtain the type of turntable used, extract the type information from the turntable type, and obtain the target transformation equation and target rotation matrix based on the type information;

[0049] In this embodiment, the type of turntable used is first obtained. In five-axis printing, the rotation axes of the turntable rotate around the X, Y, and Z axes, respectively, corresponding to the A, B, and C axes. Based on different configurations of the selected rotation axes, the turntable is mainly divided into AB-type turntables, AC-type turntables, and BC-type turntables. Type information is extracted from the turntable type. Different type information corresponds to different target transformation equations and target rotation matrices. The target transformation equation is used to perform rotation transformation on the normal vector information. Substituting the normal vector information into the target transformation equation yields the rotation angle value. The target rotation matrix is ​​used to perform rotation transformation on the rotation angle value. Substituting the rotation angle value into the target rotation matrix yields the coordinate value of the surface path point.

[0050] It should be noted that the type information includes AB, AC, and BC types;

[0051] If the type information is AB, then the target transformation equation is:

[0052]

[0053]

[0054] Where α and β are the rotation angles of the A-axis and B-axis, respectively, representing the platform's rotation about the X-axis by α degrees and its rotation about the Y-axis by β degrees, and n x n y and n z These are the x, y, and z component values ​​of the normal vector of the current vertex, respectively.

[0055] If the type information is AC, then the target transformation equation is:

[0056] α=cos -1 (n p ·z)

[0057]

[0058] Where α and γ are the rotation angles of the A-axis and C-axis, respectively, representing the platform's rotation about the X-axis by α degrees and its rotation about the Z-axis by γ degrees, and n p It is the normal vector of the current vertex, and x and z are the unit vectors of the X-axis and Z-axis, respectively;

[0059] If the type information is BC, then the target transformation equation is:

[0060] β=cos -1 (n p ·z)

[0061]

[0062] Where β and γ are the rotation angles of the B-axis and C-axis, respectively, representing the platform's rotation about the Y-axis by β degrees and its rotation about the Z-axis by γ degrees, and n p It is the normal vector of the current vertex, and y and z are the unit vectors of the Y-axis and Z-axis, respectively;

[0063] If the type information is AB, then the target rotation matrix is:

[0064]

[0065] Among them, R AB (α,β) represents the rotation matrix that rotates first around axis B and then around axis A, where α and β are the rotation angles around axis A and axis B, respectively.

[0066] If the type information is AC, then the target rotation matrix is:

[0067]

[0068] Among them, R AC (α,γ) represents the rotation matrix that rotates first around the C-axis and then around the A-axis, where α and γ are the rotation angles around the A-axis and the C-axis, respectively.

[0069] If the type information is BC, then the target rotation matrix is:

[0070]

[0071] Among them, R BC (α,γ) represents a rotation matrix that rotates first around the C-axis and then around the B-axis, where α and γ are the rotation angles around the B-axis and the C-axis, respectively.

[0072] 102. Obtain the model to be printed, and perform surface slicing on the model to obtain surface path points. Calculate the normal vector information based on the surface path points.

[0073] In this embodiment, the model to be printed is first obtained, and then the model is sliced ​​using a surface slicing algorithm to obtain multiple slice layers. The working path of the nozzle can be planned based on all slice layers. This working path is discretized into multiple points to obtain surface path points. Then, the normal vector information of the surface path points is calculated. The normal vector information represents the direction that the nozzle should face when working at each surface path point.

[0074] 103. Rotate the normal vector information using the target transformation equation to obtain the rotation angle value;

[0075] In this embodiment, the normal vector information of all surface path points is substituted into the target transformation equation to obtain the rotation angle value corresponding to all surface path points. In five-axis 3D printing, the turntable needs to rotate a certain angle to cooperate with the nozzle for printing. The rotation angle value represents the precise angle that the turntable needs to rotate to cooperate when the nozzle moves to different surface path points.

[0076] 104. Create 3D path points based on rotation angle values, and generate rotation angle curves based on all 3D path points;

[0077] In this embodiment, each rotation angle value corresponds to a specific three-dimensional spatial position, and these positions together constitute the path of the turntable during rotation. Three-dimensional path points are created based on the rotation angle values, and all three-dimensional path points are connected to obtain a rotation angle curve. The rotation angle curve describes the rotational motion of the turntable in three-dimensional space.

[0078] 105. Perform B-spline optimization on the rotation angle curve, and then sample the optimized rotation angle curve to obtain a smoothed rotation angle value;

[0079] B-spline optimization is a technique commonly used for curve smoothing and shape adjustment. In this embodiment, B-spline optimization is performed on the rotation angle curve to remove or reduce jitter, abrupt changes, or discontinuities in the curve, thereby obtaining a smoother and more continuous rotation angle curve. Based on the optimized rotation angle curve, sampling processing is performed to extract a series of smooth rotation angle values.

[0080] 106. Perform matrix transformation on the smooth rotation angle using the target rotation matrix to obtain the nozzle path points, and generate the printing trajectory based on all nozzle path points;

[0081] In this embodiment, the smooth rotation angle is transformed using the target rotation matrix, converting the rotation angle into the actual position of the nozzle in three-dimensional space. These position points constitute the path points of the nozzle during the printing process, i.e., the nozzle path points. Connecting all the nozzle path points yields the nozzle motion trajectory, which guides the movement of the nozzle during the printing process. Integrating the rotation angle values ​​corresponding to all the nozzle path points yields the turntable rotation trajectory. Integrating the nozzle motion trajectory and the turntable rotation trajectory yields the printing trajectory. The printing trajectory guides the printer in performing 3D printing.

[0082] In this embodiment of the invention, the type of turntable used is first identified, and type information is extracted. Based on the type information, the target transformation equation and target rotation matrix applicable to the turntable are determined. Next, the 3D model to be printed is obtained, and the model is processed by surface slicing to obtain a series of surface path points. Based on these surface path points, the normal vector information at each point is further calculated. The normal vector information is rotated using the target transformation equation to obtain rotation angle values. Based on these rotation angle values, corresponding three-dimensional path points are created, and a rotation angle curve is generated based on these three-dimensional path points. To improve the smoothness of the rotation angle curve, B-spline optimization is performed on it. The optimized rotation angle curve is sampled to extract smooth rotation angle values. Finally, the smooth rotation angle is matrix transformed using the target rotation matrix to obtain the nozzle path points in three-dimensional space. Based on these nozzle path points, the system generates the final smooth printing trajectory.

[0083] This invention utilizes B-spline optimization and sampling to effectively reduce jitter and abrupt changes in the rotation angle curve, resulting in a smoother printing trajectory. Compared to methods that require parametric smoothing of the surface path, this invention generates a rotation angle curve to apply the B-spline smoothing algorithm, which can control the range of rotation angles without changing the vertex positions of the surface path, thus avoiding any impact on printing accuracy. Furthermore, this invention can adaptively adjust to different turntable types, thus exhibiting strong versatility and flexibility.

[0084] Please see Figure 2 The second embodiment of the printing trajectory smoothing method in this invention includes:

[0085] 201. Obtain the model to be printed, and use the surface slicing algorithm to slice the model according to the preset slice layer thickness to obtain multiple slice layers;

[0086] In this embodiment, the model to be printed is first obtained, and the slice layer thickness is set. According to the preset slice layer thickness, the model is divided into multiple slice layers using a surface slicing algorithm. After slicing is completed, the software will generate a file containing all slice layer information, such as a G-code file. The slice layers will serve as the basis for subsequent printing steps.

[0087] 202. Perform print trajectory planning on all slice layers to obtain the path curve;

[0088] In this embodiment, based on the contour information of the slice layers, the software uses a filling algorithm to plan path curves on all slice layers; the path curves are used to guide the movement of the nozzles during the printing process.

[0089] 203. Convert the path curve into a discrete set of points that can be used to control printing to obtain surface path points;

[0090] In this embodiment, the path curve is first discretized. The discretization process is based on sampling the path curve and further subdividing the path curve into smaller point sets. Each point represents the position of the nozzle at a specific moment. All points are integrated to obtain the surface path points.

[0091] 204. Calculate the normal vector of each surface path point to obtain the normal vector information;

[0092] In this embodiment, the normal vector of each surface path point is determined by calculating the geometric relationship between adjacent slice layers or adjacent path points within the same layer. The technique utilizes the cross product operation of vectors. The normal vector data of all surface path points are integrated to obtain normal vector information. It should be noted that the normal vector is a vector perpendicular to a point on the model surface, which determines the orientation of the nozzle at that point. That is, the normal vector information is used to guide the orientation of the nozzle during the printing process.

[0093] Please see Figure 3 The third embodiment of the printing trajectory smoothing method in this invention includes:

[0094] 301. Preset maximum allowed value;

[0095] In this embodiment, a maximum allowable value needs to be preset based on the limitations of the equipment or technology. The maximum allowable value represents the upper limit of the turntable's rotation angle. Exceeding this value may cause damage to the equipment. When setting the maximum allowable value, a certain safety margin needs to be considered to cope with uncertainties or errors in actual operation.

[0096] 302. Determine whether the rotation angle value is greater than the maximum allowable value. If the rotation angle value is greater than the maximum allowable value, replace the rotation angle value with the maximum allowable value to obtain the adjusted rotation angle value. Divide the adjusted rotation angle value into multiple groups of sub-rotation angle values.

[0097] In this embodiment, the obtained rotation angle value is compared with a preset maximum allowable value. If the rotation angle value is greater than the maximum allowable value, adjustment is required; otherwise, it is replaced with the maximum allowable value. This ensures that the rotation angle does not exceed the device's limit. The adjusted rotation angle value is divided into multiple sub-rotation angle values ​​as needed, and each sub-rotation angle value has two components.

[0098] 303. Preset a counting variable and set its initial value to 0; the counting variable is used to represent the Z component of the three-dimensional coordinate point;

[0099] In this embodiment, a counter variable is defined to represent the Z component of the 3D coordinate points. This variable will be used to record the order and number of generated 3D coordinate points; the initial value of the counter variable is set to 0.

[0100] 304. Using the rotation angle value of each group as the X and Y components of the three-dimensional coordinate point, and the count variable as the Z component of the three-dimensional coordinate point, construct multiple three-dimensional coordinate points, and increment the value of the count variable by 1 for each three-dimensional coordinate point constructed.

[0101] In this embodiment, two components are obtained from the grouped sub-rotation angle values, which are respectively used as the X and Y components of the three-dimensional coordinate point; the current value of the counter variable is used as the Z component of the three-dimensional coordinate point; a three-dimensional coordinate point is constructed based on the above X, Y, and Z component values; after each three-dimensional coordinate point is constructed, the value of the counter variable is incremented by 1 so as to assign the correct Z component to the next three-dimensional coordinate point; it should be noted that when the first three-dimensional coordinate point is constructed, the value of the counter variable is 0.

[0102] 305. Sort the three-dimensional coordinate points from smallest to largest according to the value of the counting variable, and connect each three-dimensional coordinate point in turn to obtain the rotation angle curve.

[0103] In this embodiment, the generated three-dimensional coordinate points are sorted according to the value of the counting variable from smallest to largest. This ensures that the generated rotation angle curve is continuous in the Z-axis direction. The sorted three-dimensional coordinate points are connected in sequence to form a continuous curve, which is the rotation angle curve. The rotation angle curve represents the path of the turntable's rotation angle as it changes with the Z-axis, and is used to guide the rotation of the turntable during the printing process.

[0104] Please see Figure 4 The fourth embodiment of the printing trajectory smoothing method in this invention includes:

[0105] 401. Smooth the rotation angle curve based on the B-spline curve to obtain a smooth rotation angle path;

[0106] In this embodiment, the set of three-dimensional coordinate points is used as the control points of the B-spline curve. Optimization algorithms, such as gradient descent, conjugate gradient, and particle swarm optimization, are used to adjust the position of the control points. The B-spline curve is generated based on the set of control points and used as the path for smoothing the rotation angle.

[0107] 402. Perform interpolation sampling on the smooth rotation angle path to obtain sampling points;

[0108] In this embodiment, interpolation sampling is performed on the smooth rotation angle path. A position parameter is set, with an initial value of 0. Interpolation is performed on the curve based on the position parameter, which is incremented by 1 from 0, to calculate a series of sampling points. The number of sampling points is the same as the number of surface path points. The position parameter can control the uniform distribution of sampling points on the smooth rotation angle path.

[0109] 403. Extract the X and Y components of the sampling points to obtain the smooth rotation angle value;

[0110] In this embodiment, the X and Y components in the coordinates of the sampling point are the smooth rotation angle values; the smooth rotation angle values ​​of all sampling points are extracted and will be used for subsequent matrix transformations.

[0111] Please see Figure 5 The fifth embodiment of the printing trajectory smoothing method in this invention includes:

[0112] 501. Substitute the smoothed rotation angle value into the target rotation matrix to obtain the nozzle path point;

[0113] In this embodiment, by substituting these smooth rotation angle values ​​into the target rotation matrix, the position and direction that the nozzle should be at each time point can be calculated, thereby obtaining a series of nozzle path points.

[0114] 502. Generate the nozzle motion trajectory based on all nozzle path points;

[0115] In this embodiment, all nozzle path points are connected to form a continuous curve, which is used to guide the movement of the nozzle during the printing process.

[0116] 503. Combine the smooth rotation angle values ​​corresponding to each nozzle path point to obtain the turntable rotation trajectory.

[0117] In this embodiment, in five-axis 3D printing, the turntable needs to rotate simultaneously to meet the printing requirements of the nozzles; therefore, after obtaining the nozzle path points, the smooth rotation angle values ​​corresponding to each nozzle path point are aggregated to obtain the rotation trajectory that the turntable should follow throughout the printing process, i.e., the turntable rotation trajectory.

[0118] 504. Generate the printing trajectory based on the nozzle movement trajectory and the turntable rotation trajectory;

[0119] In this embodiment, the nozzle movement trajectory is combined with the turntable rotation trajectory to generate the final large printing trajectory. The printing trajectory is a complete printing scheme that integrates nozzle movement and platform rotation. It describes how the nozzle and platform should work together throughout the printing process. The printing trajectory is recorded in a Gcode file to guide the printer in 3D printing.

[0120] Please see Figure 6 The sixth embodiment of the printing trajectory smoothing method in this invention includes:

[0121] 5041. Synchronize the nozzle motion trajectory and the turntable rotation trajectory in time and space to obtain synchronized nozzle motion trajectory and synchronized turntable rotation trajectory;

[0122] In this embodiment, before generating the printing trajectory, we need to ensure that the nozzle movement trajectory and the platform rotation trajectory are synchronized in time and space. First, a timestamp is assigned to each point on the nozzle movement trajectory and the turntable rotation trajectory. The timestamps are based on the same timing system, so that the nozzle movement trajectory and the turntable movement trajectory are synchronized in time. Then, the positional relationship between the nozzle movement trajectory and the turntable rotation trajectory in three-dimensional space is checked to ensure that their starting positions in space are consistent, ensuring that they have the same reference point at the start of printing. The positional differences between the two at the same point in time can be compared. If the positional differences are too large, the nozzle movement trajectory and the turntable rotation trajectory need to be replanned. Through time synchronization and spatial synchronization, synchronized nozzle movement trajectory and synchronized turntable rotation trajectory are obtained.

[0123] 5042. Generate the printing trajectory based on the synchronous nozzle movement trajectory and the synchronous turntable rotation trajectory;

[0124] In this embodiment, the synchronized nozzle movement trajectory and the synchronized turntable rotation trajectory are integrated to generate the final printing trajectory. The data of the printing trajectory is converted into an instruction format that the printer can understand and recorded in the Gcode file to guide the printer on how to move the nozzle and rotate the turntable during the printing process.

[0125] The above describes the printing trajectory smoothing method in the embodiments of the present invention. The following describes the printing trajectory smoothing apparatus in the embodiments of the present invention. Please refer to [link / reference]. Figure 7 One embodiment of the printing trajectory smoothing processing device in this invention includes:

[0126] The acquisition module 601 is used to acquire the type of turntable used, extract type information from the turntable type, and obtain the target transformation equation and target rotation matrix based on the type information.

[0127] The slicing module 602 is used to perform surface slicing on the model to obtain surface path points, and calculate the normal vector information based on the surface path points;

[0128] The rotation module 603 is used to perform a rotation transformation on the normal vector information according to the target transformation equation to obtain the rotation angle value;

[0129] The curve generation module 604 is used to create three-dimensional path points based on rotation angle values ​​and generate rotation angle curves based on all three-dimensional path points.

[0130] The optimization module 605 is used to perform B-spline optimization on the rotation angle curve and resample the optimized rotation angle curve to obtain a smooth rotation angle value.

[0131] The trajectory reconstruction module 606 is used to perform matrix transformation on the smooth rotation angle according to the target rotation matrix to obtain the nozzle path points, and generate the printing trajectory based on all nozzle path points.

[0132] In this embodiment, the acquisition module 601 is responsible for identifying and acquiring the type of turntable currently in use, and determining the target transformation equation and target rotation matrix applicable to the turntable. Next, the slicing module 602 performs surface slicing processing on the 3D model to obtain multiple slice layers. Based on the slice layers, the path points and normal vector information of the model surface can be obtained. The rotation module 603 receives the normal vector information from the slicing module 602 and uses the target transformation equation determined by the acquisition module 601 to perform rotation transformation on these normal vectors to generate rotation angle values. The curve generation module 604 creates 3D path points based on the rotation angle values ​​and generates a rotation angle curve based on all 3D path points. The optimization module 604 performs B-spline optimization on the rotation angle curve to obtain a smooth rotation angle value. Finally, the trajectory reconstruction module 606 uses the target rotation matrix provided by the acquisition module 601 to perform matrix transformation on the optimized smooth rotation angle to obtain nozzle path points and generate a printing trajectory based on the nozzle path points.

[0133] The print trajectory smoothing device in this embodiment effectively reduces jitter and abrupt changes in the rotation angle curve by utilizing B-spline optimization and sampling processing, resulting in a smoother print trajectory. Compared to methods that require parametric smoothing of the surface path, the print trajectory smoothing device generates a rotation angle curve to apply the B-spline smoothing algorithm, which can control the range of rotation angles without changing the vertex position of the surface path, thus avoiding any impact on printing accuracy. At the same time, the print trajectory smoothing device can adaptively adjust according to different turntable types, thus possessing strong versatility and flexibility.

[0134] above Figure 7 The print trajectory smoothing processing device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The print trajectory smoothing processing device in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0135] Figure 8This is a schematic diagram of a print trajectory smoothing device 700 provided in an embodiment of the present invention. The print trajectory smoothing device 700 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 710 (e.g., one or more processors) and a memory 720, and one or more storage media 730 (e.g., one or more mass storage devices) storing application programs 733 or data 732. The memory 720 and storage media 730 can be temporary or persistent storage. The program stored in the storage media 730 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the print trajectory smoothing device 700. Furthermore, the processor 710 may be configured to communicate with the storage media 730 and execute the series of instruction operations in the storage media 730 on the print trajectory smoothing device 700 to implement the steps of the print trajectory smoothing method provided in the above-described method embodiments.

[0136] The print path smoothing device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input / output interfaces 760, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 8 The illustrated print trajectory smoothing device structure does not constitute a limitation on print trajectory smoothing devices and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0137] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a print trajectory smoothing method.

[0138] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0139] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for smoothing printing trajectories, characterized in that, include: Obtain the type of turntable used, extract type information from the turntable type, and obtain the target transformation equation and target rotation matrix based on the type information; Obtain the model to be printed, and perform surface slicing on the model to obtain surface path points. Calculate the normal vector information based on the surface path points. The rotation angle value is obtained by rotating the normal vector information through the target transformation equation; Create 3D path points based on rotation angle values, and generate rotation angle curves based on all 3D path points; The rotation angle curve is optimized using B-spline, and the optimized rotation angle curve is sampled to obtain a smoothed rotation angle value. The smooth rotation angle is transformed by the target rotation matrix to obtain the nozzle path points, and the printing trajectory is generated based on all the nozzle path points.

2. The printing trajectory smoothing method according to claim 1, characterized in that, The process of obtaining the type of turntable used, extracting type information from the turntable type, and obtaining the target transformation equation and target rotation matrix based on the type information includes: The type information includes AB type, AC type and BC type; If the type information is AB, then the target transformation equation is: Where α and β are the rotation angles of the A-axis and B-axis, respectively, representing the platform's rotation about the X-axis by α degrees and its rotation about the Y-axis by β degrees, and n x n y and n z These are the x, y, and z component values ​​of the normal vector of the current vertex, respectively. If the type information is AC, then the target transformation equation is: α=cos -1 (n p ·With) Where α and γ are the rotation angles of the A-axis and C-axis, respectively, representing the platform's rotation about the X-axis by α degrees and its rotation about the Z-axis by γ degrees, and n p It is the normal vector of the current vertex, and x and z are the unit vectors of the X-axis and Z-axis, respectively; If the type information is BC, then the target transformation equation is: β=cos -1 (n p ·With) Where β and γ are the rotation angles of the B-axis and C-axis, respectively, representing the platform's rotation about the Y-axis by β degrees and its rotation about the Z-axis by γ degrees, and n p It is the normal vector of the current vertex, and y and z are the unit vectors of the Y-axis and Z-axis, respectively; If the type information is AB, then the target rotation matrix is: Among them, R AB (α,β) represents the rotation matrix that rotates first around axis B and then around axis A, where α and β are the rotation angles around axis A and axis B, respectively. If the type information is AC, then the target rotation matrix is: Among them, R AC (α,γ) represents the rotation matrix that rotates first around the C-axis and then around the A-axis, where α and γ are the rotation angles around the A-axis and the C-axis, respectively. If the type information is BC, then the target rotation matrix is: Among them, R BC (α,γ) represents a rotation matrix that rotates first around the C-axis and then around the B-axis, where α and γ are the rotation angles around the B-axis and the C-axis, respectively.

3. The printing trajectory smoothing method according to claim 1, characterized in that, The process of obtaining the model to be printed, performing surface slicing on the model to obtain surface path points, and calculating normal vector information based on the surface path points includes: Obtain the model to be printed, and use the surface slicing algorithm to slice the model according to the preset slice layer thickness to obtain multiple slice layers; Print trajectory planning is performed on all slice layers to obtain the path curve; The path curve is converted into a discrete set of points that can be used to control printing, thus obtaining surface path points; Calculate the normal vector for each surface path point to obtain normal vector information.

4. The printing trajectory smoothing method according to claim 1, characterized in that, The step of creating 3D path points based on rotation angle values ​​and generating rotation angle curves based on all 3D path points includes: Preset maximum allowed value; Determine if the rotation angle value is greater than the maximum allowable value. If the rotation angle value is greater than the maximum allowable value, replace the rotation angle value with the maximum allowable value to obtain the adjusted rotation angle value. Divide the adjusted rotation angle value into multiple groups of sub-rotation angle values. A pre-defined counting variable is set to an initial value of 0; the counting variable is used to represent the Z component of a three-dimensional coordinate point. Multiple three-dimensional coordinate points are constructed by using the rotation angle value of each group as the X and Y components of the three-dimensional coordinate point and the count variable as the Z component of the three-dimensional coordinate point. The value of the count variable is incremented by 1 for each three-dimensional coordinate point constructed. The three-dimensional coordinate points are sorted from smallest to largest according to the value of the counting variable, and then the three-dimensional coordinate points are connected in sequence to obtain the rotation angle curve.

5. The printing trajectory smoothing method according to claim 1, characterized in that, The step of performing B-spline optimization on the rotation angle curve and sampling the optimized rotation angle curve to obtain a smoothed rotation angle value includes: The rotation angle curve is smoothed based on the B-spline curve to obtain a smooth rotation angle path; interpolation sampling is performed on the smooth rotation angle path to obtain sampling points; Extract the X and Y components of the sampling points to obtain the smooth rotation angle value.

6. The printing trajectory smoothing method according to claim 1, characterized in that, The step of performing a matrix transformation on the smooth rotation angle based on the target rotation matrix to obtain the nozzle path points, and generating a printing trajectory based on all nozzle path points, includes: Substitute the smoothed rotation angle value into the target rotation matrix to obtain the nozzle path point; Generate nozzle motion trajectory based on all nozzle path points; The smooth rotation angle values ​​corresponding to each nozzle path point are combined to obtain the turntable rotation trajectory. The printing trajectory is generated based on the nozzle movement trajectory and the turntable rotation trajectory.

7. The printing trajectory smoothing method according to claim 6, characterized in that, The process of generating a printing trajectory based on the nozzle movement trajectory and the turntable rotation trajectory includes: The nozzle motion trajectory and the turntable rotation trajectory are synchronized in time and space to obtain synchronized nozzle motion trajectory and synchronized turntable rotation trajectory. The printing trajectory is generated based on the synchronous nozzle movement trajectory and the synchronous turntable rotation trajectory.

8. A printing trajectory smoothing processing device, characterized in that, include: The acquisition module is used to acquire the type of turntable used, extract type information from the turntable type, and obtain the target transformation equation and target rotation matrix based on the type information. The slicing module is used to slice the model to obtain surface path points, and calculate the normal vector information based on the surface path points; The rotation module is used to perform a rotation transformation on the normal vector information according to the target transformation equation to obtain the rotation angle value; The curve generation module is used to create 3D path points based on rotation angle values ​​and generate rotation angle curves based on all 3D path points. The optimization module is used to perform B-spline optimization on the rotation angle curve and resample the optimized rotation angle curve to obtain a smooth rotation angle value. The trajectory reconstruction module is used to perform matrix transformation on the smooth rotation angle according to the target rotation matrix to obtain the nozzle path points, and generate the printing trajectory based on all nozzle path points.

9. A printing trajectory smoothing processing device, characterized in that, The print trajectory smoothing device includes: a memory and at least one processor, the memory storing instructions; at least one processor invokes the instructions in the memory to cause the print trajectory smoothing device to perform the steps of the print trajectory smoothing method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the print trajectory smoothing method as described in any one of claims 1-7.