A four-axis 3D printing path planning method and system based on curved surface mapping

CN122606881APending Publication Date: 2026-08-21ZHEJIANG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610779392.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

这些算法计算量巨大,且往往对输入模型的拓扑质量要求极高,难以像通用平面切片软件那样实现“一键自动化处理”,操作复杂,通用性较差

Benefits of technology

1.消除台阶效应,实现高精度曲面成型:本发明通过构建参数化的空间导引曲线模型,并利用高精度的逆向参数搜索算法,将离散的二维平面切片路径精确映射至连续的三维曲面上,从根本上消除了传统平面切片工艺造成的“台阶效应”。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122606881A_ABST
    Figure CN122606881A_ABST
Patent Text Reader

Abstract

The application provides a four-axis 3D printing path planning method and system based on curved surface mapping, and relates to the technical field of additive manufacturing. The application firstly constructs a space guide curve model, maps two-dimensional plane slice path data to a target curved surface, solves physical longitudinal coordinates, tangent vectors and target rotation axis angles, and performs reverse kinematics transformation based on mechanical rotation center coordinates to generate four-axis linkage control instructions and a four-axis 3D printing G code file, so that the four-axis equipment can realize conformal support-free curved surface forming.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of additive manufacturing technology, and in particular to a four-axis 3D printing path planning method and system based on surface mapping. Background Technology

[0002] Fused deposition modeling (FDM) is one of the most widely used 3D printing technologies. Traditional FDM printers mostly use a three-axis Cartesian coordinate system, and their core path planning strategy is "planar slicing." That is, the slicing software discretizes the 3D digital model along the Z-axis into a series of two-dimensional planes with fixed layer heights and generates the filling path for each layer. Although this manufacturing method based on 2.5-axis thinking has mature algorithms and low equipment costs, it has fundamental technical limitations when manufacturing components with complex curvature, overhang features, or non-flat surfaces.

[0003] Surface forming quality is limited, exhibiting a significant "step effect." Because traditional processes approximate three-dimensional curved surfaces through layer-by-layer stacking, step-like textures form between adjacent layers when the tangent slope of the model surface is small. This not only severely reduces the surface finish of the part, often requiring tedious post-processing grinding, but also results in a large approximation error between the formed geometric contour and the design model, making it difficult to meet the requirements of precision fit applications. Significant anisotropy exists in mechanical properties. In planar layering processes, the bonding strength of the part in the Z-axis direction mainly depends on interlayer thermal fusion bonding, which is usually much lower than the tensile strength of the material within the layer. For curved thin-walled components with complex stress states, planar slicing causes the molecular orientation or fiber direction of the material to be unable to distribute along the actual stress contour of the part, making the part highly susceptible to interlayer cracking under non-axial loads, significantly reducing structural strength. Over-reliance on support structures increases manufacturing complexity. To form overhanging structures or large-angle curved surfaces, traditional triaxial processes must add numerous support structures to prevent material collapse. Adding support material not only significantly increases printing time and material costs, but also easily leaves scars on the surface of the part when removing the support, and may even damage the fine features of the part during the removal process. This is especially disadvantageous for high-performance materials that are difficult to process.

[0004] To address these issues, non-planar printing technologies based on multi-degree-of-freedom (such as five-axis or six-axis robotic arms) have emerged in the industry, using conformal slicing to ensure the printing path fits the model surface. However, existing multi-axis path planning technologies still face many challenges in practical applications: The hardware costs are high and the technical barriers are steep. Existing non-planar printing solutions mostly rely on expensive industrial-grade five-axis CNC machine tools or dedicated robotic arms, and typically require the control system to have hardware-level tool tip tracking capabilities. This results in extremely high equipment costs and large sizes, making it difficult to popularize in desktop or light industrial applications. Path planning algorithms are also highly complex. Existing surface slicing algorithms usually require complex differential geometry operations, voxelization mesh processing, or distance field solutions. These algorithms are computationally intensive and often have extremely high requirements for the topological quality of the input model, making it difficult to achieve "one-click automated processing" like general-purpose planar slicing software. They are complex to operate and have poor versatility. Furthermore, for low-cost four-axis printers with added rotation axes, there is a lack of mature path planning software on the market, which means that such hardware can often only perform simple rotational printing and cannot realize its potential to handle complex surfaces. Summary of the Invention

[0005] To overcome the shortcomings of the prior art, the purpose of this invention is to provide a four-axis 3D printing path planning method and system based on surface mapping, which can achieve high-precision unsupported surface forming on low-cost four-axis equipment through efficient surface mapping and software-level kinematic compensation.

[0006] To achieve the above objectives, the present invention provides the following solution: A path planning method for quadaxial 3D printing based on surface mapping, comprising: Obtain the 3D contour data and 2D planar slice path data of the model to be printed. Construct a spatial guide curve model describing the geometric features of the target surface based on the 3D contour data. The 2D planar slice path data includes multiple planar path nodes. Using the abscissa of the planar path node as the target value, perform a reverse parameter search on the spatial guidance curve model to obtain the corresponding curve parameters; Calculate the physical ordinate and tangent vector of the planar path node on the spatial guide curve model based on the curve parameters, and obtain the target rotation axis angle based on the tangent vector; Obtain the mechanical rotation center coordinates of the four-axis printing device. Based on the mechanical rotation center coordinates and the target rotation axis angle, perform inverse kinematic transformation on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates. Based on the linear axis mechanical coordinates, the planar ordinates of the planar path nodes, and the target rotation axis angle, four-axis linkage control commands are generated, and four-axis 3D printing G-code files are generated based on the four-axis linkage control commands.

[0007] Preferably, a spatial guide curve model describing the geometric features of the target surface is constructed based on the three-dimensional contour data, including: Extract the contour point cloud perpendicular to the axis of rotation; A cubic B-spline interpolation algorithm is used to smoothly fit the contour point cloud, generating a parameterized curve equation with second-order continuous differentiability. ;in, For normalization parameters, This represents the x-coordinate on the spatial guidance curve model corresponding to the normalized parameters. This represents the physical ordinate on the spatial guidance curve model corresponding to the normalized parameters. The parameterized curve equation is used as a spatial guiding curve model.

[0008] Preferably, the methods for obtaining two-dimensional planar slice path data include: Extract the 3D mesh skeleton of the model to be printed, and project the 3D mesh skeleton onto a preset reference plane along the rotation axis to generate a 2D projection profile; Along a direction perpendicular to the reference plane, the two-dimensional projected contour is stretched to a preset height to generate a pseudo-solid model with manifold characteristics; The pseudo-entity model is sliced ​​using a slicing engine to generate initial G-code containing planar motion trajectories; Parse the initial G code, extract the coordinate sequence of the planar path nodes, and use the planar path node coordinate sequence as two-dimensional planar slice path data.

[0009] Preferably, using the planar abscissa of the planar path node as the target value, a reverse parameter search is performed on the spatial guidance curve model to obtain the corresponding curve parameters, including: Use the x-coordinate of the planar path node as the target value; Set the guessing parameters, substitute the guessing parameters into the spatial guidance curve model, and obtain the horizontal coordinates corresponding to the guessing parameters; Calculate the positional residual between the x-axis and the target value; Determine whether the absolute value of the position residual is less than the preset convergence threshold; if so, use the guessed parameters that meet the convergence condition as curve parameters; if not, update the guessed parameters according to the first derivative of the spatial guidance curve model with respect to the horizontal coordinate, and restrict the updated guessed parameters within the domain until the convergence condition is met.

[0010] Preferably, the update formula for the guessed parameters is: in, For the first The guessed parameters for the next iteration. For the first The parameters are guessed in +1 iterations. For the first The horizontal coordinates are obtained by substituting the guessed parameters from the next iteration into the spatial guidance curve model. For the spatial guidance curve model in the first The first derivative of the guessed parameters with respect to the x-coordinate in the next iteration. The x-coordinate of the planar path node.

[0011] Preferably, the physical ordinate and tangent vector of the planar path node on the spatial guide curve model are calculated based on the curve parameters, and the target rotation axis angle is obtained based on the tangent vector, including: Substitute the curve parameters into the spatial guidance curve model to obtain the physical ordinates of the planar path nodes; Calculate the tangent vector of the spatial guiding curve model at the curve parameters; The geometric tangent angle is obtained based on the magnitude of the tangent vector and the angle between the normalized tangent vector and the reference axis in the coordinate system of the four-axis printing device. Based on the coordinate system definition of the four-axis printing equipment, the geometric tangent angle is transformed to obtain the target rotation axis angle.

[0012] Preferably, the formula for calculating the target rotation axis angle is: in, For the target rotation axis angle, Let x be the component of the tangent vector along the x-axis. Let be the component of the tangent vector along the physical vertical axis. Let be the magnitude of the tangent vector.

[0013] Preferably, based on the coordinates of the mechanical rotation center and the target rotation axis angle, an inverse kinematic transformation is performed on the planar abscissa and physical ordinate corresponding to the planar path nodes to obtain the linear axis mechanical coordinates, including: Let x and z be the abscissa and ordinate of the physical coordinates of the planar path nodes, respectively, and let z be the coordinates of the mechanical rotation center. ; Based on the plane abscissa, physical ordinate, and coordinates of the machine's rotation center, calculate the relative position vector, satisfying: , ; Convert the target rotation axis angle to radian angles and construct a two-dimensional rotation transformation matrix based on the radian angles; The relative position vectors are rotated using a two-dimensional rotation transformation matrix to obtain the compensated relative coordinates. Calculate the mechanical coordinates of the linear axis based on the compensated relative coordinates and the coordinates of the machine rotation center.

[0014] Preferably, the formula for calculating the linear axis mechanical coordinates is: in, Angles are measured in radians. and It is a relative position vector. and The relative coordinates after compensation. and These are the coordinate components in a linear axis mechanical coordinate system.

[0015] A four-axis 3D printing path planning system based on surface mapping includes: The spatial guide curve model construction unit is used to acquire the 3D contour data and 2D planar slice path data of the model to be printed, and to construct a spatial guide curve model describing the geometric features of the target surface based on the 3D contour data; the 2D planar slice path data includes multiple planar path nodes. The curve parameter inverse search unit is used to perform an inverse parameter search on the spatial guide curve model with the planar abscissa of the planar path node as the target value, and obtain the corresponding curve parameters. The surface mapping attitude calculation unit is used to calculate the physical ordinate and tangent vector of the planar path node on the spatial guidance curve model based on the curve parameters, and to obtain the target rotation axis angle based on the tangent vector; The inverse kinematics compensation unit is used to obtain the mechanical rotation center coordinates of the four-axis printing device. Based on the mechanical rotation center coordinates and the target rotation axis angle, it performs inverse kinematic transformation on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates. The four-axis linkage command generation unit is used to generate four-axis linkage control commands based on the linear axis mechanical coordinates, the planar longitudinal coordinates of the planar path nodes, and the target rotation axis angle, and to generate four-axis 3D printing G-code files based on the four-axis linkage control commands.

[0016] The present invention discloses the following beneficial effects: 1. Eliminating the step effect and achieving high-precision surface forming: This invention constructs a parameterized spatial guide curve model and uses a high-precision inverse parameter search algorithm to accurately map discrete two-dimensional planar slicing paths onto continuous three-dimensional surfaces, fundamentally eliminating the "step effect" caused by traditional planar slicing processes.

[0017] 2. Reduce equipment costs and overcome hardware limitations: This invention innovatively introduces kinematic compensation technology based on a two-dimensional rotation matrix, enabling ordinary low-cost four-axis printers to achieve industrial-grade blade tip tracking control without being equipped with expensive hardware RTCP controllers.

[0018] 3. Strong compatibility and efficient process flow: This invention utilizes a "pseudo-entity model" slicing strategy, combining the path planning capabilities of general slicing software with the dimensionality enhancement capabilities of post-processing algorithms.

[0019] 4. Improve printing quality and success rate: By integrating process optimization strategies such as early material stop and speed smoothing, common defects such as material accumulation at seams, stringing, and machine vibration are effectively solved. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart of the method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating the overall process of a four-axis 3D printing path planning method based on surface mapping provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the data flow for acquiring a three-dimensional digital model of a part to be manufactured and performing data preprocessing, provided in an embodiment of the present invention. Figure 4 This is a sub-flowchart for single-layer path planning and process parameter optimization provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of an example model of the model to be printed provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the feature model of the model to be printed provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the extraction of the upper surface contour lines of the model to be printed provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of obtaining a contour point cloud from the upper surface contour line, provided in an embodiment of the present invention. Figure 9 This is a schematic diagram of projecting a contour point cloud onto the xz plane, provided in an embodiment of the present invention. Figure 10 This is a schematic diagram of point cloud error fitting for the projected contour point cloud provided in an embodiment of the present invention; Figure 11 This is a schematic diagram illustrating the extraction of point information based on the fitted contour point cloud provided in an embodiment of the present invention; Figure 12 This is a schematic diagram of the surface features of the model to be printed provided in an embodiment of the present invention; Figure 13This is a schematic diagram of a planar pseudo-solid model generated from model surface features, provided in an embodiment of the present invention. Figure 14 This is a schematic diagram of a planar slice path generated based on a planar pseudo-entity model, provided in an embodiment of the present invention. Figure 15 This is a schematic diagram of the actual printing path generated based on surface mapping, provided for an embodiment of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] The purpose of this invention is to provide a four-axis 3D printing path planning method and system based on surface mapping. By mapping two-dimensional planar slice path data to a spatial guide curve model describing the geometric features of the target surface, and combining the target rotation axis angle calculation and the inverse kinematic transformation based on the coordinates of the mechanical rotation center, a four-axis linkage control command that conforms to the target surface can be generated on a four-axis 3D printing device, thereby improving the path conforming accuracy and forming quality of complex surface structures.

[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Figure 1 The method flowchart provided in the embodiments of the present invention is as follows: Figure 1 As shown, this invention provides a four-axis 3D printing path planning method based on surface mapping, including: Step 100: Obtain the 3D contour data and 2D planar slice path data of the model to be printed. Construct a spatial guide curve model describing the geometric features of the target surface based on the 3D contour data. The 2D planar slice path data includes multiple planar path nodes. Step 200: Using the abscissa of the planar path node as the target value, perform a reverse parameter search on the spatial guidance curve model to obtain the corresponding curve parameters; Step 300: Calculate the physical ordinate and tangent vector of the planar path node on the spatial guide curve model based on the curve parameters, and obtain the target rotation axis angle based on the tangent vector; Step 400: Obtain the mechanical rotation center coordinates of the four-axis printing device. Based on the mechanical rotation center coordinates and the target rotation axis angle, perform inverse kinematic transformation on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates. Step 500: Generate four-axis linkage control commands based on the linear axis mechanical coordinates, the planar ordinates of the planar path nodes, and the target rotation axis angle, and generate a four-axis 3D printing G-code file based on the four-axis linkage control commands.

[0026] like Figure 2 As shown, this embodiment provides a quadcopter 3D printing path planning method based on surface mapping. The method includes a data preprocessing and code input preparation stage, and a data loading and core algorithm execution stage. The data preprocessing and code input preparation stage generates a spatial guidance curve model and two-dimensional planar slice path data. The data loading and core algorithm execution stage performs surface mapping, attitude calculation, kinematic compensation, and quadcopter 3D printing G-code file generation on the two-dimensional planar slice path data based on the spatial guidance curve model.

[0027] In the data preprocessing and code input preparation stage, the spatial guidance curve model is first constructed. For example... Figure 5 and Figure 6 As shown, the model to be printed includes an example model and a feature model extracted from the example model. Three-dimensional contour data representing the geometric features of the target surface are extracted from the model to be printed, and contour point clouds perpendicular to the axis of rotation are extracted from the three-dimensional contour data.

[0028] like Figure 7 and Figure 8 As shown, the upper surface contour line is first extracted from the model to be printed, and then the contour point cloud is obtained based on the upper surface contour line. The contour point cloud is used to characterize the curvature variation features of the model to be printed in the direction of the target surface, and serves as the geometric basis for subsequent path surface mapping.

[0029] like Figures 9 to 11 As shown, the contour point cloud is projected onto the xz plane, and error fitting and point location information extraction are performed on the projected contour point cloud. The path planning program uses a cubic B-spline interpolation function to smoothly fit the discrete contour point cloud, obtaining a continuous parametric curve equation: in, The parameterized curve equation serves as a spatial guidance curve model. For curve parameters; The x-coordinate on the spatial guidance curve model corresponding to the curve parameters; This refers to the physical ordinate on the spatial guidance curve model corresponding to the curve parameters. The spatial guidance curve model is used to query the spatial coordinates and tangent vectors corresponding to any curve parameter during subsequent path mapping.

[0030] After completing the spatial guidance curve model construction, obtain the two-dimensional planar slice path data of the model to be printed. For example... Figure 3 As shown, the acquisition of 2D planar slice path data is performed simultaneously with the data preprocessing of the model to be printed. Figures 12 to 14 As shown, the surface features of the model are first obtained based on the model to be printed, then a planar pseudo-entity model is generated from the surface features of the model, and a planar slice path is generated based on the planar pseudo-entity model.

[0031] Specifically, the 3D skeleton of the model to be printed is projected and extruded into a planar pseudo-solid model. This planar pseudo-solid model is then imported into a general slicing engine to generate an initial G-code file containing planar motion trajectories. A path planning program reads this initial G-code file and parses each line of instructions using regular expressions to extract planar path nodes. Each planar path node includes a planar x-coordinate, a planar y-coordinate, and an extrusion amount parameter. The planar path node is represented as... ,in, The x-coordinate of the plane, The vertical coordinate of the plane, This refers to the extrusion quantity parameter. The path planning program stores the extracted planar path nodes into a path node list, denoted as PathList, according to the path execution order. At this point, the planar path nodes in PathList only contain planar path information and do not yet include the physical ordinate and target rotation axis angle used for conformal surface printing.

[0032] Before performing the inverse parameter search on the 2D planar slice path data, path resampling can be performed. Specifically, the path planning program calculates the Euclidean distance between adjacent planar path nodes; when the Euclidean distance is greater than a preset interpolation threshold, linear interpolation is performed between adjacent planar path nodes to insert intermediate nodes, and the extrusion parameters of the intermediate nodes are linearly allocated according to the interpolation ratio. The 2D planar slice path data after path resampling then enters the subsequent inverse parameter search process of the spatial guidance curve model.

[0033] During the data loading and core algorithm execution phase, data iterative mapping and spatial coordinate calculation are performed first. For example... Figure 4 As shown, the path planning program enters the single-layer path planning and process parameter optimization process. The path planning program starts the main loop and traverses each planar path node in the PathList. For the current planar path node, its planar x-coordinate is extracted. As the target value, a reverse parameter search is performed on the spatial guidance curve model to obtain the curve parameters corresponding to the current plane path node.

[0034] In this embodiment, the inverse parameter search adopts the Newton-Raphson iterative solution method, and the iterative formula is: in, For the first The guessed parameters for the next iteration. For the first The guessed parameters for the next iteration. For the first The horizontal coordinates are obtained by substituting the guessed parameters from the next iteration into the spatial guidance curve model. For the space guidance curve model in the first... The first derivative of the guessed parameters with respect to the x-coordinate in the next iteration. Let be the abscissa of the current planar path node. The path planning program iteratively calculates the error between the abscissa and the planar abscissa to satisfy the convergence condition, and records the curve parameters that satisfy the convergence condition as . .

[0035] After obtaining the curve parameters, the path planning program calculates the physical ordinate and tangent vector of the current planar path node on the spatial guidance curve model based on the curve parameters. Specifically, it will... Substituting the spatial guidance curve model, we obtain the corresponding physical ordinate. And calculate the tangent vector at the curve parameters. The path planning program writes the calculated physical ordinate into the attributes of the current planar path node, thus changing the current planar path node's position. Expanded to This completes the mapping from planar path nodes to curved space nodes.

[0036] In one optional implementation, when calculating the physical ordinate and target rotation axis angle, the path planning program performs a normal offset on the spatial guide curve model based on the current print layer height or nozzle offset distance to obtain an offset curve corresponding to the current print layer, and uses the offset curve as the mapping reference for the current print layer. For the current planar path node, the path planning program uses the planar abscissa... As input for the query, the corresponding physical ordinate is obtained from the spatial guidance curve model or the offset curve. And calculate the first derivative at the query position. The first derivative represents the local slope of the target surface at the query position, denoted as . In one implementation, the local tilt angle satisfy: in, For local tilt angle, This refers to the first derivative of the spatial guidance curve model or the offset curve at the query location. The path planning program converts the local tilt angle into the target rotation axis angle based on the coordinate system definition of the four-axis printing device. Therefore, each planar path node is assigned a corresponding physical ordinate. and the target rotation axis angle This allows the printing path to follow the posture of the target surface as its local height and slope change.

[0037] During the spatial coordinate calculation process, the path planning program simultaneously performs the normal following angle calculation. Specifically, based on the tangent vector... The geometric tangent angle is obtained by taking the modulus and the angle between the normalized tangent vector and the reference axis in the coordinate system of the four-axis printing device. Then, according to the coordinate system definition of the four-axis printing device, the geometric tangent angle is transformed to obtain the target rotation axis angle A. In one embodiment, the target rotation axis angle A satisfies: in, Let x be the component of the tangent vector in the x-axis direction. Let be the component of the tangent vector along the physical vertical axis. The modulus of the tangent vector is defined as follows. The target rotation axis angle A is written into the data item corresponding to the current planar path node in PathList, thereby expanding the planar path node into a four-axis path node containing the planar horizontal coordinate, planar vertical coordinate, physical vertical coordinate, target rotation axis angle, and extrusion quantity parameter, thus completing the conversion from three-axis path data to four-axis path data.

[0038] After calculating the target rotation axis angle, a kinematic compensation calculation based on the rotation matrix is ​​performed. The path planning program reads the pre-stored coordinates of the mechanical rotation center of the four-axis printer. For each quadrilateral path node in the PathList, the planar x-coordinate and the physical y-coordinate are respectively denoted as... and And calculate the relative position vector based on the coordinates of the mechanical rotation center, satisfying: in, and This represents the relative position vector components of the current four-axis path node relative to the machine rotation center.

[0039] Convert the target rotation axis angle A into radians. And based on the radian angle Construct a two-dimensional rotation transformation matrix. The path planning program performs a rotation transformation on the relative position vector based on the two-dimensional rotation transformation matrix to obtain the compensated relative coordinates, satisfying: in, and The relative coordinates are the compensated values. Then, based on the compensated relative coordinates and the coordinates of the machine rotation center, the linear axis machine coordinates are calculated, satisfying: in, and These are the coordinate components in the linear axis mechanical coordinate system. At this point, each path node in the PathList has been converted into the coordinate data required for the actual execution by the four-axis printing device. This coordinate data includes... , , Y, A, and E; where Y is the ordinate of the plane ordinate. Correspondingly, E is related to the extrusion rate parameter. correspond.

[0040] After obtaining the four-axis path nodes containing linear axis mechanical coordinates, planar ordinates, target rotation axis angles, and extrusion quantity parameters, the path planning program can recalculate the extrusion quantity parameters based on the three-dimensional spatial path length between adjacent four-axis path nodes. Specifically, the path planning program calculates the coordinate differences between adjacent four-axis path nodes in the X, Y, and Z axes, and calculates the three-dimensional Euclidean distance of the current path segment based on these coordinate differences. When the current path segment is an extrusion segment, the path planning program calculates the updated extrusion quantity parameters based on the three-dimensional Euclidean distance, a preset unit length flow coefficient, and an attitude correction factor corresponding to the target rotation axis angle; wherein, the preset unit length flow coefficient is determined based on the printing material, nozzle diameter, and layer height parameters, and the attitude correction factor is determined based on the material flow calibration results of the four-axis printing equipment at different target rotation axis angles. When the current path segment is a non-extrusion moving segment, the extrusion quantity parameters are set to zero. The above processing can compensate for the extrusion quantity deviation caused by the actual path length change after the two-dimensional planar slice path data is mapped to the curved surface space, reducing under-extrusion or over-extrusion phenomena in curved surface printing.

[0041] After obtaining the linear axis mechanical coordinates, the four-axis linkage control command generation and process optimization are performed. The path planning program generates four-axis linkage control commands based on the linear axis mechanical coordinates, the planar ordinates of the planar path nodes, and the target rotation axis angle. Subsequently, the path planning program scans the processed PathList again and identifies the endpoint of the continuous printing path segment; it calculates the cumulative path length backward from the endpoint along the continuous printing path segment. When the cumulative path length reaches a preset shut-off distance threshold, the corresponding position is marked as a stop point, and the extrusion quantity parameter of the path nodes between the stop point and the endpoint is reset to zero. After the above early stop processing, the material extrusion at the end of the continuous printing path segment is stopped in advance to reduce the risk of material accumulation and fiber pulling at the end of the path.

[0042] During process optimization, the path planning program also performs speed smoothing on short path segments. Specifically, the path planning program determines the length of the current path segment based on the Euclidean distance between adjacent path nodes and distinguishes between non-extrusion idle segments and extrusion segments based on the extrusion quantity parameters of the current path segment. When the length of the non-extrusion idle segment is less than a preset short path threshold, the feed speed of the non-extrusion idle segment is adjusted to a preset speed that matches the adjacent extrusion segment; when the length of the extrusion segment is less than the preset short path threshold, the speed variation between the extrusion segment and adjacent path segments is reduced, or the feed speed of adjacent path segments is continuously adjusted. The above speed smoothing process is used to reduce mechanical vibration, motion shock, and extrusion instability caused by frequent start-stop operations over short distances.

[0043] Before generating the quadcopter 3D printing G-code file, the path planning program can perform travel and attitude feasibility checks on the processed path node list. Specifically, the path planning program calculates the maximum and minimum lateral coordinates, minimum height coordinates, maximum rotation angle change between adjacent path nodes, and minimum rotation axis angle in the path node list, and compares the statistical results with the linear axis travel range, rotation axis achievable angle range, and allowable single-segment attitude change threshold of the quadcopter. When the statistical results exceed the corresponding preset range, the path planning program generates an out-of-bounds marker or attitude change marker, and re-executes speed adjustment, angle smoothing, or path interpolation processing on the corresponding path segment. The aforementioned travel and attitude feasibility checks are used to reduce the risks of equipment travel exceeding limits, local angle changes, and potential interference.

[0044] Finally, the path planning program serializes the processed PathList according to the G-code syntax specification, generating the final executable four-axis 3D printing G-code file. The four-axis linkage control instructions in the four-axis 3D printing G-code file can be represented as motion control instructions including X-axis coordinates, Y-axis coordinates, Z-axis coordinates, rotation axis angle A, and extrusion amount E, for example... .like Figure 15 As shown, Figure 15 This is a schematic diagram of the actual printing path generated based on surface mapping in an embodiment of the present invention. Through the above processing, the two-dimensional planar slice path data is mapped into an actual printing path that conforms to the target surface, enabling the four-axis printing device to perform conformal printing according to the spatial shape of the target surface.

[0045] Corresponding to the above method, this embodiment also provides a four-axis 3D printing path planning system based on surface mapping, including: The spatial guide curve model construction unit is used to acquire the 3D contour data and 2D planar slice path data of the model to be printed, and to construct a spatial guide curve model describing the geometric features of the target surface based on the 3D contour data; the 2D planar slice path data includes multiple planar path nodes. The curve parameter inverse search unit is used to perform an inverse parameter search on the spatial guide curve model with the planar abscissa of the planar path node as the target value, and obtain the corresponding curve parameters. The surface mapping attitude calculation unit is used to calculate the physical ordinate and tangent vector of the planar path node on the spatial guidance curve model based on the curve parameters, and to obtain the target rotation axis angle based on the tangent vector; The inverse kinematics compensation unit is used to obtain the mechanical rotation center coordinates of the four-axis printing device. Based on the mechanical rotation center coordinates and the target rotation axis angle, it performs inverse kinematic transformation on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates. The four-axis linkage command generation unit is used to generate four-axis linkage control commands based on the linear axis mechanical coordinates, the planar longitudinal coordinates of the planar path nodes, and the target rotation axis angle, and to generate four-axis 3D printing G-code files based on the four-axis linkage control commands.

[0046] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0047] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A path planning method for four-axis 3D printing based on surface mapping, characterized in that, include: Obtain the three-dimensional contour data and two-dimensional planar slice path data of the model to be printed, and construct a spatial guide curve model describing the geometric features of the target surface based on the three-dimensional contour data; The two-dimensional planar slice path data includes multiple planar path nodes; Using the abscissa of the planar path node as the target value, perform a reverse parameter search on the spatial guidance curve model to obtain the corresponding curve parameters; Calculate the physical ordinate and tangent vector of the planar path node on the spatial guide curve model based on the curve parameters, and obtain the target rotation axis angle based on the tangent vector; Obtain the mechanical rotation center coordinates of the four-axis printing device. Based on the mechanical rotation center coordinates and the target rotation axis angle, perform inverse kinematic transformation on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates. Based on the linear axis mechanical coordinates, the planar ordinates of the planar path nodes, and the target rotation axis angle, a four-axis linkage control command is generated, and a four-axis 3D printing G-code file is generated based on the four-axis linkage control command.

2. The four-axis 3D printing path planning method based on surface mapping according to claim 1, characterized in that, Based on the three-dimensional contour data, a spatial guide curve model describing the geometric features of the target surface is constructed, including: Extract the contour point cloud perpendicular to the axis of rotation; The contour point cloud is smoothly fitted using a cubic B-spline interpolation algorithm to generate a parameterized curve equation with second-order continuous differentiability. ;in, For normalization parameters, The x-coordinate on the spatial guidance curve model corresponding to the normalized parameter is... The physical ordinate on the space guidance curve model corresponding to the normalized parameter; The parameterized curve equation is used as the spatial guidance curve model.

3. The four-axis 3D printing path planning method based on surface mapping according to claim 1, characterized in that, The methods for obtaining the two-dimensional plane slice path data include: Extract the three-dimensional mesh skeleton of the model to be printed, and project the three-dimensional mesh skeleton onto a preset reference plane along the rotation axis to generate a two-dimensional projection profile; Along a direction perpendicular to the reference plane, the two-dimensional projected contour is stretched to a preset height to generate a pseudo-solid model with manifold features; The pseudo-entity model is sliced ​​using a slicing engine to generate initial G-code containing planar motion trajectories; The initial G-code is parsed, the coordinate sequence of the planar path nodes is extracted, and the coordinate sequence of the planar path nodes is used as the two-dimensional planar slice path data.

4. The four-axis 3D printing path planning method based on surface mapping according to claim 1, characterized in that, Using the planar abscissa of the planar path node as the target value, a reverse parameter search is performed on the spatial guidance curve model to obtain the corresponding curve parameters, including: Use the abscissa of the plane path node as the target value; Set guessing parameters, substitute the guessing parameters into the spatial guidance curve model, and obtain the horizontal coordinate corresponding to the guessing parameters; Calculate the positional residual between the x-coordinate and the target value; Determine whether the absolute value of the position residual is less than a preset convergence threshold; if so, use the guessed parameter that meets the convergence condition as the curve parameter; if not, update the guessed parameter according to the first derivative of the spatial guidance curve model with respect to the horizontal coordinate, and restrict the updated guessed parameter to the domain until the convergence condition is met.

5. The four-axis 3D printing path planning method based on surface mapping according to claim 4, characterized in that, The update formula for the guessed parameters is: in, For the first The guessed parameters for the next iteration. For the first The parameters are guessed in +1 iterations. For the first The horizontal coordinates are obtained by substituting the guessed parameters from the next iteration into the spatial guidance curve model. For the space guidance curve model in the first... The first derivative of the guessed parameters with respect to the x-coordinate in the next iteration. Let x be the abscissa of the plane path node.

6. The four-axis 3D printing path planning method based on surface mapping according to claim 1, characterized in that, Calculate the physical ordinate and tangent vector of the planar path node on the spatial guide curve model based on the curve parameters, and obtain the target rotation axis angle based on the tangent vector, including: Substitute the curve parameters into the spatial guidance curve model to obtain the physical ordinate of the plane path node; Calculate the tangent vector of the spatial guiding curve model at the curve parameters; The geometric tangent angle is obtained based on the magnitude of the tangent vector and the angle between the normalized tangent vector and the reference axis in the coordinate system of the four-axis printing device. Based on the coordinate system definition of the four-axis printing equipment, the geometric tangent angle is transformed to obtain the target rotation axis angle.

7. The four-axis 3D printing path planning method based on surface mapping according to claim 6, characterized in that, The formula for calculating the target rotation axis angle is: in, The target rotation axis angle, Let x be the component of the tangent vector in the x-axis direction. Let be the component of the tangent vector along the physical vertical axis. Let be the magnitude of the tangent vector.

8. The four-axis 3D printing path planning method based on surface mapping according to claim 1, characterized in that, Based on the coordinates of the mechanical rotation center and the angle of the target rotation axis, an inverse kinematic transformation is performed on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates, including: Let x and z be the abscissa and ordinate of the physical coordinates corresponding to the planar path nodes, respectively, and let z be the coordinates of the mechanical rotation center. ; Based on the plane abscissa, the physical ordinate, and the coordinates of the machine rotation center, calculate the relative position vector, satisfying: , ; The target rotation axis angle is converted into radian angle, and a two-dimensional rotation transformation matrix is ​​constructed based on the radian angle; The relative position vector is rotated and transformed according to the two-dimensional rotation transformation matrix to obtain the compensated relative coordinates. The mechanical coordinates of the linear axis are calculated based on the compensated relative coordinates and the coordinates of the mechanical rotation center.

9. The four-axis 3D printing path planning method based on surface mapping according to claim 8, characterized in that, The formula for calculating the linear axis mechanical coordinates is: in, Angles are measured in radians. and Let be the relative position vector. and Here are the compensated relative coordinates. and These are the coordinate components in the linear axis mechanical coordinate system.

10. A four-axis 3D printing path planning system based on surface mapping, characterized in that, include: The spatial guide curve model construction unit is used to acquire the three-dimensional contour data and two-dimensional planar slice path data of the model to be printed, and to construct a spatial guide curve model describing the geometric features of the target surface based on the three-dimensional contour data; the two-dimensional planar slice path data includes multiple planar path nodes; The curve parameter reverse search unit is used to perform a reverse parameter search on the spatial guide curve model with the planar abscissa of the planar path node as the target value to obtain the corresponding curve parameters; The surface mapping attitude calculation unit is used to calculate the physical ordinate and tangent vector of the planar path node on the spatial guide curve model according to the curve parameters, and to obtain the target rotation axis angle according to the tangent vector; The inverse kinematics compensation unit is used to obtain the mechanical rotation center coordinates of the four-axis printing device, and based on the mechanical rotation center coordinates and the target rotation axis angle, performs inverse kinematic transformation on the planar abscissa and physical ordinate corresponding to the planar path node to obtain the linear axis mechanical coordinates. The four-axis linkage command generation unit is used to generate four-axis linkage control commands based on the linear axis mechanical coordinates, the planar ordinates of the planar path nodes, and the target rotation axis angle, and to generate a four-axis 3D printing G-code file based on the four-axis linkage control commands.