Plane continuous printing path generation method and device and storage medium
Through dynamic geometric subdivision algorithm and stress tensor mapping technology, a printing path matching the main stress direction is generated, which solves the problem of interface layering and low shear strength in FDM technology that fiber reinforced printing technology is prone to occur under non-axial loads, and realizes the efficient load-bearing and stable reinforcement effect of fiber reinforced components.
Patent Information
- Application Number
- CN202510442298.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-06-13
AI Technical Summary
In FDM technology, continuous fiber reinforced printing technology is prone to problems of interface layering and low shear strength under non-axial loads, and fiber orientation offset and edge enrichment lead to unstable reinforcement effect.
The 2D tangent plane is divided into a polygonal mesh through a dynamic geometric subdivision algorithm, mapped into a tetrahedral mesh, obtaining stress tensors, determining the combined main stress field, generating a preset tree structure, and dynamically generating a print path matching the direction of the main stress.
The consistency between the fiber orientation and the main stress direction is achieved, the load-bearing efficiency of the fiber reinforced members and the quality of the interlayer interface are significantly improved, and the local weakening problem caused by mismatch between the printing path and the stress field in traditional processes is solved.
Smart Images

Figure CN120134613A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of additive manufacturing, and particularly relates to a method for generating a planar continuous printing path, a computer device, and a computer-readable storage medium. Background Art
[0002] The Fused Deposition Modeling (FDM) technology occupies an important position in the field of additive manufacturing due to its unique manufacturing characteristics. Based on the principle of layer-by-layer stacking of thermoplastic materials, this technology conveys polymer wire to a heating nozzle through precise control of a wire feeding mechanism, and completes the construction of a three-dimensional entity after melting and extrusion. Compared with other additive manufacturing methods, the FDM technology has the characteristics of low equipment purchase cost, easy transportation and installation, mature consumable preparation process, and significant cost advantage, making it widely used in the fields of rapid prototyping and personalized customization.
[0003] However, the mechanical properties of FDM formed parts are restricted by the multi-physical field coupling mechanism, specifically manifested as the significant influence of the coupling effect between process parameter combinations and forming paths on the strength of products. To break through this bottleneck, the continuous fiber reinforced printing technology has emerged. The continuous fiber reinforced printing technology significantly improves the longitudinal strength of components through the directional arrangement of fibers. However, due to the mechanical properties of continuous fibers showing orthotropic anisotropy: the fiber orientation along the extrusion direction makes the longitudinal strength far exceed the transverse strength, but it is prone to interface delamination under non-axial loads; there are weak bonding areas between interlayer fibers, resulting in low interlayer shear strength; at the same time, during the dynamic extrusion process, the fibers are affected by process parameter fluctuations, prone to orientation deviation and edge enrichment phenomena, causing local stress concentration and resulting in unstable reinforcement effects. In view of the above problems, the optimization strategy of controlling the path along the stress direction is crucial - by precisely matching the printing path with the actual stress direction of the component, the consistency between the fiber orientation and the principal stress direction can be maximized, thereby significantly improving the load-bearing efficiency and suppressing the delamination risk. Therefore, it is urgent to combine intelligent monitoring and real-time control technologies to dynamically correct the printing path guided by the stress field to achieve precise control of fiber orientation and interface quality.
[0004] The foregoing description is for the purpose of providing general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] Based on this, in view of the above problems, a method for generating a planar continuous printing path, a computer device, and a computer-readable storage medium are proposed, which can improve the strength of printed parts.
[0006] The technical problems solved by this application are realized by adopting the following technical solutions: The present application provides a method for generating a planar continuous printing path, including: slicing a 3D model of an object to be printed according to a preset layer height to obtain multiple 2D cutting planes and the tetrahedral meshes corresponding to the 2D cutting planes; performing polygon mesh division on the 2D cutting planes through a dynamic geometric subdivision algorithm to obtain multiple unit meshes; mapping the unit meshes into the tetrahedral meshes to obtain the stress tensors corresponding to the unit meshes; determining the combined principal stress field of the 2D cutting planes according to the mapping relationship between the unit meshes and the tetrahedral meshes and the stress tensors; generating a preset tree structure according to the combined principal stress field; generating a closed path inside the unit meshes; and successively connecting the closed paths according to the preset tree structure to obtain a printing path.
[0007] In an optional embodiment of the present application, mapping the unit meshes into the tetrahedral meshes includes: determining the unit mesh located at the center of the 2D cutting plane and marking it as the central node; mapping the center point of the central node into the tetrahedral mesh; determining the combined principal stress field of the 2D cutting plane according to the mapping relationship between the unit meshes and the tetrahedral meshes and the stress tensors includes: obtaining the stress tensors of the unit meshes of each node of the tetrahedral mesh and marking them as the calculated stress tensors; calculating with the volume coordinates of the tetrahedral mesh as the coefficients for interpolating the calculated stress tensors to obtain the combined principal stress tensor of the unit of the central node; and projecting all the combined principal stress tensors onto the grid center nodes of the 2D cutting plane to determine the combined principal stress field of the 2D cutting plane.
[0008] In an optional embodiment of the present application, calculating with the volume coordinates of the tetrahedral mesh as the coefficients for interpolating the calculated stress tensors includes: performing interpolation processing on the calculated stress tensors to obtain the combined principal stress tensors of the units; projecting all the combined principal stress tensors onto the grid center nodes of the 2D cutting plane to determine the combined principal stress field of the 2D cutting plane includes: summarizing all the combined principal stress tensors to obtain the reference principal stress, and the reference principal stress is represented by the xyz coordinate system; deleting the z coordinate of the reference principal stress to obtain the combined principal stress field, and the combined principal stress field is represented by the xoy coordinate system.
[0009] In an optional embodiment of the present application, generating a preset tree structure according to the combined principal stress field includes: obtaining the reference direction of the combined principal stress field; connecting the center points of the unit meshes in the direction pointed by the reference direction, and modifying the connected unit meshes according to a preset generation principle to obtain the most preset tree structure, and the preset tree structure is represented in the form of a minimum spanning tree; the generation principle includes: constructing based on the adjacency relationship between the center points of the unit meshes, and establishing a connection only when there is a shared edge between two adjacent unit meshes; calculating the edge weights of the shared edges of the unit meshes, and connecting the adjacent unit meshes according to the magnitude of the edge weights. When connecting two adjacent unit meshes, ensure that the connection direction of the minimum spanning tree is consistent with the reference direction; when the shared edge of two adjacent unit meshes is their respective shortest edge, do not connect through the shortest edge.
[0010] In an optional embodiment of the present application, generating a closed path inside a unit grid includes: connecting the vertices of the unit grid to the center point to divide the unit grid into multiple triangles; calculating the incenter positions of each triangle, and connecting the incenter positions in a predetermined direction to obtain an initial path; and performing a smoothing process on the initial path to obtain a closed path.
[0011] In an optional embodiment of the present application, sequentially connecting the closed paths according to a preset tree structure includes: starting from the root node of the preset tree structure, performing a depth-first search to determine the parent-child node relationship between unit grids; determining whether there is a common edge between the unit grid corresponding to the parent node to be connected and the unit grid corresponding to the child node; if not, regenerating the preset tree structure; if so, connecting the closed paths of each child node to the closed path of the corresponding parent node in sequence according to the child-parent node relationship.
[0012] In an optional embodiment of the present application, connecting the closed paths of each child node to the closed path of the corresponding parent node in sequence includes marking the closed path on a preset side of the two closed paths to be connected as path1, and marking the other closed path as path2; determining a reference point according to the positional relationship between path1, path2, and the two unit grids to be connected, where the reference point includes at least one of a center point, a connection point, and an interruption point; sequentially connecting the reference points in a preset order to obtain a connection path between the parent and child nodes to be connected; and traversing the entire preset tree structure and summarizing all connection paths to obtain a printing path.
[0013] In an optional embodiment of the present application, sequentially connecting the closed paths according to a preset tree structure to obtain a printing path includes: marking the path obtained after sequential connection as a path to be processed, and performing an optimization process on the path to be processed; the optimization process includes at least one of equidistant resampling optimization, noise reduction, scale normalization, Gaussian smoothing optimization, feature protection, and optimization verification; and marking the path to be processed after the optimization process as a printing path.
[0014] The present application also provides a computer device, including a processor and a memory: the processor is configured to execute a computer program stored in the memory to implement the method as described above.
[0015] The present application also provides a computer-readable storage medium storing a computer program, which implements the method as described above when executed by a processor.
[0016] Adopting the embodiments of the present application has the following beneficial effects: After slicing the part to be printed in this application, for each 2D slice, the direction of its principal stress field is used as the driving force, and the entire slice is traversed in a preset tree structure, such as the parent-child node relationship of the minimum spanning tree, to dynamically generate a deposition path that best matches the principal stress direction, realizing a multi-objective optimization filling system for additive manufacturing. The printing path and the principal stress direction are co-optimized, enabling the anisotropic strengthening characteristics of continuous fibers to precisely adapt to the load-bearing requirements. By controlling the local direction, better mechanical properties and material utilization efficiency are provided for the printed structure, effectively solving the local weakening problem caused by the mismatch between the printing path and the stress field in traditional processes, and providing a solution with both mechanical property superiority and process economy for the manufacturing of high-performance continuous fiber-reinforced components under complex working conditions.
[0017] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the following specifically gives preferred embodiments and, in conjunction with the drawings, details are described in detail. It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this application. Brief Description of the Drawings
[0018] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a schematic flow chart of a method for generating a planar continuous printing path provided for an embodiment.
[0020] Figure 2 It is a schematic diagram of a uniform slice 2D cutting plane provided for an embodiment.
[0021] Figure 3 It is a schematic diagram of obtaining multiple unit meshes after dividing the 2D cutting plane provided for an embodiment.
[0022] Figure 4 It is a schematic diagram of mapping the central node to a tetrahedral mesh in an embodiment.
[0023] Figure 5(a) is a schematic diagram of the maximum principal stress field of a 2D cutting plane in an embodiment.
[0024] Figure 5(b) is a schematic diagram of the minimum principal stress field of a 2D cutting plane in an embodiment.
[0025] FIG. 6(a) is a schematic diagram of a minimum spanning tree generated according to the direction of the maximum principal stress field in an embodiment.
[0026] FIG. 6(b) is a schematic diagram of a minimum spanning tree generated according to the direction of the minimum principal stress field in an embodiment.
[0027] Figure 7 It is a schematic diagram of the connection between closed paths in a unit grid in an embodiment.
[0028] Figure 8 It is a schematic diagram of the generation of reference points during the connection process in an embodiment.
[0029] FIG. 9(a) is a schematic diagram of a printing path on a 2D cutting plane generated based on the maximum principal stress field in an embodiment.
[0030] FIG. 9(b) is a schematic diagram of a printing path on a 2D cutting plane generated based on the direction of the minimum principal stress field in an embodiment.
[0031] Figure 10 It is a schematic block diagram of the structure of a computer device provided in an embodiment. Specific embodiments
[0032] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0033] The application potential of the traditional FDM process in the field of manufacturing functional structural parts has not been fully released. Especially in the manufacturing of engineering components subjected to dynamic loads or complex stress distributions, there are still technical bottlenecks. Therefore, the present application proposes a method for generating a planar continuous printing path to overcome the defects existing in the prior art, and changes the generation rule of the printing path by calculating stress as a guide. To clearly describe the method provided in this embodiment, please refer to Figure 1 ~FIG. 9(b), including steps S110~S130.
[0034] Step S110: Slice the 3D model of the object to be printed according to a preset layer height to obtain multiple 2D cutting planes and the tetrahedral meshes corresponding to the 2D cutting planes; perform polygon mesh division on the 2D cutting planes through a dynamic geometric subdivision algorithm to obtain multiple unit meshes.
[0035] In one embodiment, the object to be printed is usually modeled via software such as CAD and stored in a specific model data format. Therefore, 3D model data of the object to be printed, such as an STL model, can be obtained. Then, the 3D model of the object to be printed is sliced according to a preset layer height, and the size of the layer height can be preset by the user, generally 0.3 mm or 0.4 mm is selected. After slicing, multiple uniform slices are obtained, which are called 2D cutting planes. For the obtained 2D cutting planes, reference can be made to Figure 2 as shown. In addition, when slicing the 3D model, the tetrahedral mesh of each 2D cutting plane and the stress tensors of each node of the tetrahedral mesh can be obtained for subsequent calculations. The calculation process will be described in the following text and will not be elaborated here for the time being.
[0036] Furthermore, the dynamic geometric subdivision algorithm is used to perform polygon mesh division on the 2D cutting plane, and the division effect can be referred to Figure 3 as shown. The sliced 2D cutting plane is composed of multiple unit meshes, and each unit mesh is a polygon with equal area between each other. There is no limitation on the specific shape of the unit mesh.
[0037] Step S120: Map the unit mesh into the tetrahedral mesh to obtain the stress tensor corresponding to the unit mesh; determine the combined principal stress field of the 2D cutting plane according to the mapping relationship between the unit mesh and the tetrahedral mesh and the stress tensor.
[0038] In one embodiment, mapping the unit mesh into the tetrahedral mesh includes: determining the unit mesh located at the center of the 2D cutting plane and marking it as the central node; mapping the center point of the central node into the tetrahedral mesh; determining the combined principal stress field of the 2D cutting plane according to the mapping relationship between the unit mesh and the tetrahedral mesh and the stress tensor, including: obtaining the stress tensors of the unit meshes of each node of the tetrahedral mesh and marking them as the calculated stress tensors; calculating with the volume coordinates of the tetrahedral mesh as the coefficients for interpolating the calculated stress tensors to obtain the combined principal stress tensor of the unit of the central node; projecting all the combined principal stress tensors of the units onto the grid central nodes of the 2D cutting plane to determine the combined principal stress field of the 2D cutting plane.
[0039] In one embodiment, calculating with the volume coordinates of the tetrahedral mesh as the coefficients for interpolating the stress tensors includes: performing interpolation processing on the calculated stress tensors to obtain the combined principal stress tensor of the unit; projecting all the combined principal stress tensors of the units onto the grid central nodes of the 2D cutting plane to determine the combined principal stress field of the 2D cutting plane, including: summarizing all the combined principal stress tensors of the units to obtain the reference principal stress, and the reference principal stress is represented by the xyz coordinate system; deleting the z coordinate of the reference principal stress to obtain the combined principal stress field, and the combined principal stress field is represented by the xoy coordinate system.
[0040] In one embodiment, the stress tensor of the unit nodes in the finite element calculation is obtained by using general CAE software according to the actual working conditions, performing finite element analysis to obtain a post-processing file, and then parsing the post-processing file. Among them, the post-processing file includes the coordinate information and stress tensor information of the unit nodes in the finite element calculation. Step S120 is to first obtain the stress tensor and coordinates of each node in the tetrahedral mesh, then calculate the average stress tensor of the spatial unit, solve the magnitudes and directions of its principal stresses, so as to obtain the stress tensor of the central node of the unit mesh in the three-dimensional space, and project the above stress tensor onto the mesh of the 2D tangent plane, so as to obtain the combined principal stress field in the 2D tangent plane unit area.
[0041] Specifically, for each tetrahedral element on the tangent plane, as Figure 4 shown. First, determine the unit mesh located at the center of the 2D tangent plane and mark it as the central node. Map the center point of the central node to the inside of the tetrahedral mesh. Interpolate the stress tensor of the center point of the polygon mesh according to the stress tensors of each node of the tetrahedron. As Figure 4 shown, the central node P is located in the tetrahedron t, where A, B, C, and D are the four nodes of the tetrahedral finite element respectively. The point P divides the finite element into four tetrahedrons, namely tetrahedrons: PABC, PBCD, PACD, and PABD. If the point P is located inside or on the edge of the tetrahedron, the following formula is satisfied: (1) After obtaining the spatial tetrahedral element where the point P is located, use the volume fraction to construct a stress tensor difference formula. The volume fraction is the ratio of the volumes of the four tetrahedrons formed by the center point of the mesh and the vertices of the tetrahedron to the volume of the original tetrahedron. Calculate the interpolation coefficients of the center point of the mesh according to formulas (2) to (6): (2) (3) (4) (5) (6) In the three-dimensional state, the stress tensor is defined by a matrix containing 9 stress components. The matrix expression of the stress tensor refers to the following formula: (8) Where , , are the normal stresses of the unit nodes, , , is the shear stress of the unit node. In particular, when the mapping of the grid center point of the 2D cutting plane is the center point of the 3D tetrahedral grid, the arithmetic mean of the stress components of all nodes in the unit is directly taken, and the unit average stress can be calculated with reference to the following formula 、 、 、 、 、 : (9) (10) Construct a symmetric stress tensor matrix with reference to the following formula: (11) According to the above interpolation coefficients, the stress tensor at any point P within the tetrahedron can be calculated, and the calculation process is as follows: + + + (12) In one embodiment, the Approximate Nearest Neighbor (ANN) algorithm can be used to find the tetrahedral grid closest to the central node in the 3D finite element, and then search for the tetrahedral grid surrounding the central node by traversing the tetrahedral grids around the target point, which can effectively reduce the program running time and improve efficiency.
[0042] After obtaining the stress tensor which is a 3×3 symmetric matrix as above, by solving the eigenvalues and eigenvectors of the stress tensor, the magnitude and direction of the reference principal stress in space can be obtained, and the calculation process is as follows: (13) In the above formula, the three eigenvalues correspond to the magnitudes of the three principal stresses, the three eigenvectors correspond to the directions of the reference principal stresses, and the reference principal stresses are represented in the xyz coordinate system. Among them, the vector corresponding to the largest eigenvalue is the maximum principal stress, and the vector corresponding to the smallest eigenvalue is the minimum principal stress. Since the cutting plane is parallel to the xoy plane, deleting the z coordinate of the combined principal stress field of the maximum principal stress and the minimum principal stress in the space unit can obtain the projections of the maximum principal stress field and the minimum principal stress field on the 2D cutting plane, that is, the combined principal stress field corresponding to the 2D cutting plane is determined. For the projection of the combined principal stress field into the maximum principal stress field and the minimum principal stress field, it can be specifically shown in Figure 5(a) and Figure 5(b).
[0043] Step S130: Generate a preset tree structure according to the combined principal stress field; generate a closed path inside the element mesh; successively connect the closed paths according to the preset tree structure to obtain a printing path.
[0044] In one embodiment, generating a preset tree structure according to the combined principal stress field includes: obtaining a reference direction of the combined principal stress field; connecting the center points of the element meshes in the direction pointed by the reference direction, and modifying the connected element meshes according to a preset generation principle to obtain a preset tree structure, and the preset tree structure is represented in the form of a minimum spanning tree; the generation principle includes: constructing based on the adjacency relationship between the center points of the element meshes, and establishing a connection if and only if two adjacent element meshes have a shared edge; calculating the edge weights of the shared edges of the element meshes, and connecting adjacent element meshes according to the magnitudes of the edge weights, and ensuring that the connection direction of the minimum spanning tree is consistent with the reference direction when connecting two adjacent element meshes; when the shared edge of two adjacent element meshes is their respective shortest edge, do not connect through the shortest edge.
[0045] In one embodiment, the key point of the invention of this application is to adopt stress as a guide to change the generation rule to guide the generation of the printing path. This rule is the preset tree structure. In the preferred embodiment of this application, the preset tree structure is represented in the form of a minimum spanning tree. Additionally, it can also be the tree structure corresponding to other spanning trees, and other tree structures or approximate solutions are all included in the protection scope of this application. The execution process of determining the preset tree structure according to stress will be described later. Obtain the reference direction of the combined principal stress field. The reference direction is also the solution obtained by projecting the combined principal stress field shown in Figures (a) and 5(b) into the maximum principal stress field and the minimum principal stress field. For the maximum principal stress direction, due to calculation errors, most of the directions of the maximum principal stress are consistent with the model loading direction, but there are also maximum principal stress directions that are completely opposite to the loading direction. The direction difference is generated during the calculation process. Therefore, it is necessary to unify the maximum principal stress direction of the obtained 2D cut plane to obtain the correct maximum principal stress field. Then, according to the perpendicular relationship between the minimum principal stress and the maximum principal stress, the corresponding minimum principal stress field is obtained. The reference direction is determined by the maximum principal stress field and the minimum principal stress field respectively.
[0046] Connect the element meshes according to the principle of similar directions, and obtain a preset tree structure in the corresponding reference direction according to the preset tree structure generation principle.
[0047] In the preferred embodiment of the present application, the preset tree structure is represented in the form of a minimum spanning tree. Thus, the minimum spanning tree structures corresponding to the maximum principal stress field and the minimum principal stress field can be referred to Figure 6(a) and Figure 6(b). Among them, Figure 6(a) is a reference diagram of the minimum spanning tree generated according to the direction of the maximum principal stress field; Figure 6(b) is a reference diagram of the minimum spanning tree generated according to the direction of the minimum principal stress field.
[0048] Among them, the generation principles include the following: 1. The centers of the unit meshes are constructed based on the adjacency relationship. Connections are established if and only if two adjacent unit meshes have a shared edge.
[0049] 2. Calculate the edge weights of the shared edges of the unit meshes. When connecting two adjacent unit meshes, ensure that the direction of the minimum spanning tree connection is consistent with the reference direction according to the magnitude of the edge weights. The calculation method of the edge weights refers to the following formula: Edge weight = Shared edge length + Angle deviation penalty (14) In the above formula, it is constructed based on the direction of the combined principal stress field assigned, and the composite weight is optimized. Among them, the greater the angle deviation from the direction of the combined stress field, the greater the penalty value, so that the direction of the minimum spanning tree connection tends to be consistent with the combined stress field, realizing the local direction control of the combined stress field direction.
[0050] 3. When the shared edge of two adjacent unit meshes is their respective shortest edge, do not connect through the shortest edge.
[0051] In addition, during the generation process, the Prim algorithm can also be used to gradually expand. Starting from any node, gradually connect the edge with the smallest weight among the current tree and external nodes; adopt a greedy strategy, and select the edge with the smallest available weight at each step to ensure connectivity. The finally generated tree must connect all nodes, follow the assigned direction, not form a loop, and have the smallest total weight to generate a tree structure with the smallest global weight. Through the minimum spanning tree, local direction control based on the stress field direction is realized.
[0052] In one embodiment, generating a closed path inside the unit mesh includes: connecting the vertices of the unit mesh to the center point, dividing the unit mesh into multiple triangles; calculating the incenter position of each triangle, and connecting the incenter positions in a predetermined direction to obtain an initial path; performing smoothing processing on the initial path to obtain a closed path.
[0053] In one embodiment, for each unit mesh, the process of forming a closed path is as Figure 7As shown below. First, connect the vertices of the unit grid to the center point to divide the unit grid into multiple triangles. To ensure that the generated path is inside the polygon, for each triangle, solve for the incenter position of the triangle. The solution formula is as follows: (15) (16) In the above formula, is the side length of the triangle where the incenter is located. Connect the incenter of the triangles within the same grid in a predetermined direction (e.g., clockwise) to generate a corresponding initial path inside the grid. Smoothing processing can be performed on the initial path. The specific processing process can be to determine that the path is connected in the clockwise direction and perform cubic spline interpolation on the sparse points to generate a fixed number of dense path points for smoothing, thereby obtaining a smooth closed path.
[0054] In one embodiment, connect the closed paths successively according to a preset tree structure, including: starting from the root node of the preset tree structure, perform a depth-first search to determine the parent-child node relationship between the unit grids; determine whether there is a common edge between the unit grid corresponding to the parent node to be connected and the unit grid corresponding to the child node; if not, regenerate the preset tree structure; if so, according to the child-parent node relationship, connect the closed paths of each child node to the closed path of the corresponding parent node in sequence.
[0055] In one embodiment, the minimum spanning tree is taken as the preset tree structure for illustration. Starting from the root node of the minimum spanning tree, perform a depth-first search (Depth-First Search, DFS). Based on the minimum spanning tree topology structure in step S130, adopt a bottom-up recursive strategy to achieve path optimization in a complex polygon area through a three-stage processing flow. Perform a depth-first traversal along the MST branches, and determine the node access order through a dynamic priority decision mechanism. This mechanism is based on the geometric position analysis of the central node relative to the common edge to ensure topological coherence, and determine the parent-child relationship between the nodes represented by the unit grids by comparing the depth values of adjacent nodes.
[0056] When connecting the closed paths of each child node to the closed path of the corresponding parent node in sequence according to the child-parent node relationship, determine whether there is a common edge between the unit grid corresponding to the parent node to be connected and the unit grid corresponding to the child node: if not, go back to the previous step to regenerate the minimum spanning tree. If so, according to the child-parent node relationship, connect the closed paths of each child node to the closed path of the corresponding parent node in sequence.
[0057] In one embodiment, the closed paths of each child node are sequentially connected to the closed paths of the corresponding parent node, including marking the closed path on a preset side of the two closed paths to be connected as path1, and marking the other closed path as path2; determining a reference point according to the positional relationship between path1 and path2 and the two unit meshes to be connected, where the reference point includes at least one of a center point, a connection point, and a break point; sequentially connecting the reference points in a preset order to obtain a connection path between the parent and child nodes to be connected; traversing the entire minimum spanning tree and summarizing all the connection paths to obtain a printing path.
[0058] In one embodiment, during the specific connection process, the connection method can be determined by the geometric positions of the two closed paths to be connected. First, based on the geometric positions of the two closed paths, the closed path on a preset side of the two closed paths to be connected is marked as path1, and the other closed path is marked as path2. For example, the path on the left side can be set as path1, and the path on the right side as path2 to start the connection of the closed paths.
[0059] The connection process can refer to Figure 8 as shown, where the reference point is determined according to the positional relationship between path1 and path2 and the two unit meshes to be connected. Specifically, the center points of the two polygons where the closed paths of the parent and child nodes are located can be connected to generate two new triangles, acd and abd. The incenter points of the two new triangles are solved to generate connection points. The upper center connection point center1 and the lower center connection point center2 are determined by judging the geometric position according to the y coordinate. The closest points ac1 and ac2 on path1 to center1 and center2, and the closest points bc1 and bc2 on path2 are found as break points. And they are stored according to the connection points: center1: ac1, bc1; center2: ac2, bc2.
[0060] At this time, starting from the ac1 point of path1 as the starting point of the connection path, traversing the path points, the basic principle of traversing can be: traversing in the clockwise direction, when encountering a break point on the current path, connecting to generate the connection point of this break point and the break point on the other path generated by this connection point. After the above steps are completed, continue to traverse. When encountering a break point, repeat the above steps until returning to the starting point. Therefore, taking ac1 as the starting point of the connection path, a connection path with a connection order can be generated; After the connection path is generated, the path of the parent node is updated, and the incenter closed path of the polygon is updated to the connection path. Traverse the entire minimum spanning tree and repeat the above steps to obtain multiple connection paths. Summarize all the connection paths to obtain a printing path.
[0061] In one embodiment, a closed path is successively connected according to a minimum spanning tree to obtain a printing path, including: marking the path obtained after successive connection as a path to be processed, and performing optimization processing on the path to be processed; the optimization processing includes at least one of equidistant resampling optimization processing, noise reduction processing, scale normalization processing, Gaussian smoothing optimization processing, feature protection processing, and optimization verification processing; marking the path to be processed after the optimization processing is completed as a printing path.
[0062] In one embodiment, the path obtained after successive connection is marked as a path to be processed, and optimization processing is performed on the path to be processed to improve the smoothness of the path. The optimization processing includes at least one of equidistant resampling optimization processing, noise reduction processing, scale normalization processing, Gaussian smoothing optimization processing, and optimization verification processing. Specifically: the equidistant resampling optimization processing is to uniformize the point distribution and eliminate the problem of uneven density of the original contour points. The noise reduction processing is used to reduce high-frequency noise points and reduce the subsequent calculation complexity. The scale normalization processing solves the floating-point precision problem through magnification and reduction operations. The Gaussian smoothing optimization processing is used to achieve noise suppression and eliminate the jagged boundary through Gaussian filtering. And the feature protection processing is performed to smooth the details while retaining the main curvature features. The optimization verification processing is to verify the combined optimization effect, ensure the system stability, ensure that the optimization does not introduce unexpected deviations, verify that the combined effect of multiple optimization measures is better than that of a single optimization, and judge whether the optimization measures affect each other (such as feature loss caused by smoothing). After the above optimization processing, the path to be processed after the optimization processing is completed is marked as a printing path, and the finally generated printing paths are shown in FIGS. 9(a) and 9(b).
[0063] Therefore, the solution provided by this application: 1) First, the cross-section to be printed is discretized into polygon topological units, i.e., unit meshes, by a dynamic geometric subdivision algorithm, and a partitioned mesh with mechanical characteristic responses is constructed; 2) Subsequently, the center points of the flat units are mapped to a spatial tetrahedral mesh, the stress distribution is calculated through finite element analysis, and the spatial combined principal stress field information is projected back to the two-dimensional plane to establish a coupling mapping model between the spatial stress field and the plane projection; 3) An innovative path generation architecture based on graph theory optimization is designed. By introducing a direction consistency penalty function, the connection weights between adjacent units are dynamically adjusted to guide the path direction to be consistent with the principal stress field direction, and a hierarchical path network is constructed. Combining the stress field orientation sorting algorithm, multi-objective collaborative optimization is achieved. This method realizes a multi-objective optimization filling system for continuous fiber additive manufacturing through the collaborative work of three key modules: geometric topology processing, hierarchical path planning, and mechanical orientation optimization, and can provide better mechanical properties and material utilization efficiency for fiber-reinforced printed structures through local direction control. A multi-objective optimization filling system for continuous fiber additive manufacturing is realized, which can provide better mechanical properties and material utilization efficiency for fiber-reinforced printed structures through local direction control, enhance the strength of the printed parts by the FDM process, and improve the practical performance of the entire process.
[0064] Figure 10 The internal structure diagram of a computer device in an embodiment is shown. The computer device can specifically be a terminal or a server. As Figure 10 shown, the computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and can also store a computer program. When the computer program is executed by the processor, the processor can implement the method for generating a planar continuous printing path. The internal memory can also store a computer program. When the computer program is executed by the processor, the processor can execute the method for generating a planar continuous printing path. Those skilled in the art can understand that Figure 10 the structure shown in
[0065] In one embodiment, the present application also proposes a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the processor is enabled to execute the steps of the method described in any of the foregoing embodiments.
[0066] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0067] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0068] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.
Claims
1. A method for generating a planar continuous printing path, characterized in that: The steps include: Slicing the 3D model of the printed object according to a preset layer height to obtain multiple 2D cutting planes and tetrahedral meshes corresponding to the 2D cutting planes; performing polygonal mesh division on the 2D cutting planes through a dynamic geometric subdivision algorithm to obtain multiple unit meshes; Mapping the unit grid to a tetrahedral grid to obtain a stress tensor corresponding to the unit grid; determining the resultant principal stress field of the 2D tangent plane according to a mapping relationship between the unit grid and the tetrahedral grid and the stress tensor; Generate a preset tree structure according to the resultant principal stress field; generating a closed path inside the cell grid; The closed paths are connected one by one according to the preset tree structure to obtain a printing path.
2. The method for generating a planar continuous printing path according to claim 1, characterized in that: Mapping the unit grid into a tetrahedral grid comprises: Determine a unit grid located at the center of the 2D tangent plane, mark it as a central node; map the center point of the central node to the tetrahedral grid; The determining the resultant principal stress field of the 2D tangent plane according to the mapping relationship between the unit grid and the tetrahedral grid and the stress tensor comprises: Obtain the stress tensor of the unit grid of each node of the tetrahedral grid, marked as calculated stress tensor; Using the volume coordinates of the tetrahedral grid as coefficients of the calculated stress tensor interpolation to perform calculations to obtain the unit principal stress tensor of the central node; All the unit principal stress tensors are projected onto the mesh center nodes of the 2D tangent plane to determine the principal stress field of the 2D tangent plane.
3. The method for generating a planar continuous printing path according to claim 2, wherein: The step of calculating by using the volume coordinates of the tetrahedral grid as coefficients for calculating the stress tensor interpolation comprises: Performing interpolation processing on the calculated stress tensor to obtain the unit principal stress tensor; Projecting all the unit principal stress tensors onto the mesh center node of the 2D tangent plane to determine the principal stress field of the 2D tangent plane, including: Summarizing all the principal stress tensors of the units to obtain reference principal stress, wherein the reference principal stress is represented by an xyz coordinate system; The z coordinate of the reference principal stress is deleted to obtain the resultant principal stress field, and the resultant principal stress field is represented by the xoy coordinate system.
4. The method for generating a planar continuous printing path according to claim 1, wherein: The generating a preset tree structure according to the resultant principal stress field comprises: Obtaining a reference direction of the resultant principal stress field; Connecting the center points of the unit grids in the direction pointed by the reference direction, and modifying the connected unit grids according to a preset generation principle to obtain the preset tree structure, wherein the preset tree structure is represented by a minimum spanning tree; The generation principles include: The center points of the unit grids are constructed based on an adjacency relationship, and a connection is established when and only when two adjacent unit grids have a shared edge; Calculate the edge weight of the shared edge of the unit grid, and connect the adjacent unit grids according to the size of the edge weight When connecting two adjacent unit grids, ensuring that the direction of the minimum spanning tree connection is consistent with the reference direction; When the shared edge of two adjacent unit grids is their respective shortest edges, the connection is performed without passing through the shortest edge.
5. The method for generating a planar continuous printing path according to claim 4, characterized in that: The generating a closed path inside the unit grid includes: Connecting the vertices and the center point of the unit grid to divide the unit grid into a plurality of triangles; Calculating the inner center position of each triangle, and connecting the inner center positions in a predetermined direction to obtain an initial path; The closed path is obtained by performing smoothing processing on the initial path.
6. The method for generating a planar continuous printing path according to claim 1, characterized in that: The step of sequentially connecting the closed paths according to the preset tree structure includes: Starting from the root node of the preset tree structure, a depth-first search is performed to determine the parent-child node relationship between the unit grids; Determine whether there is a common edge between the unit grid corresponding to the parent node to be connected and the unit grid corresponding to the child node; If it does not exist, regenerate the preset tree structure; If so, the closed path of each child node is sequentially connected with the closed path of the corresponding parent node according to the relationship between the child node and the parent node.
7. The method for generating a planar continuous printing path according to claim 6, wherein: The closed paths of the child nodes are sequentially connected with the closed paths of the corresponding parent nodes, including Mark the closed path on the preset side of the two closed paths to be connected as path1, and mark the other closed path as path2; Determine a reference point according to the positional relationship between the path1, the path2 and the two unit grids to be connected, wherein the reference point includes at least one of a center point, a connection point and a break point; Connecting the reference points one by one in a preset order to obtain a connection path between the parent and child nodes to be connected; The entire preset tree structure is traversed, and all the connection paths are summarized to obtain a printing path.
8. The method for generating a planar continuous printing path according to claim 1, wherein: The step of connecting the closed paths one by one according to the preset tree structure to obtain a printing path includes: Marking the paths obtained after the successive connections as paths to be processed, and performing optimization processing on the paths to be processed; the optimization processing includes at least one of equidistant resampling optimization processing, noise reduction processing, scale standardization processing, Gaussian smoothing optimization processing, feature protection processing, and optimization verification processing; The path to be processed after the optimization process is performed is marked as the printing path.
9. A computer device, characterized in that: including a processor and a memory; The processor is configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.