A five-axis 3D printing model decomposition method and device based on hybrid constraints and monte carlo tree search

CN122990101APending Publication Date: 2026-10-27XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611118860.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]针对现有技术中存在的技术问题,本发明提供了一种基于混合约束与蒙特卡洛树搜索的五轴3D打印模型分解方法及装置,以解决现有的V-HACD算法无法直接适配五轴3D打印的应用需求,且存在模型拆分精度低下,难以得到全局最优的打印方案的技术问题

Benefits of technology

本发明提供的基于混合约束与蒙特卡洛树搜索的五轴3D打印模型分解方法,通过蒙特卡洛树搜索驱动的直接平面切割与混合约束评价,实现了五轴无支撑打印的全局最优模型分解,在避免体素化离散误差的同时兼顾免支撑成型、表面质量与工艺复杂度控制;具体而言,将蒙特卡洛树搜索算法引入五轴3D打印模型分解过程,以直接平面切割策略替代传统V-HACD算法的体素化预处理,避免了离散化误差对平整分割区域的误判,显著提升了模型拆分精度;同时,蒙特卡洛树搜索的迭代扩展与反向传播机制能够系统性地探索切割序列的全局解空间,突破单步贪婪切面筛选的局部最优局限,使分解方案兼顾后续各子模型的打印姿态可达性与工艺可行性;此外,混合约束评价函数将悬垂约束、表面粗糙度约束和子模型数量约束有机融合,使分解结果直接面向五轴打印免支撑成型、表面质量保障及工艺复杂度控制的核心需求,有效规避了支撑结构带来的材料浪费、后处理损伤及精度下降问题,同时抑制了子模型过度拆分导致的拼接错位与装配干涉风险,从而实现了复杂构件五轴无支撑打印的全局最优分解规划。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990101A_ABST
    Figure CN122990101A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of additive manufacturing, and discloses a five-axis 3D printing model decomposition method and device based on mixed constraints and Monte Carlo tree search, which comprises the following steps: obtaining three-dimensional model grid data of a workpiece to be printed; performing grid preprocessing on the three-dimensional model grid data of the workpiece to be printed to obtain a closed manifold triangular network; adding the closed manifold triangular network to a processing queue; based on a Monte Carlo tree search algorithm and in combination with a direct plane cutting strategy, performing sub-model decomposition on the models in the processing queue until the processing queue is empty, outputting a target sub-model set as a model decomposition result of the workpiece to be printed; and in the process of performing sub-model decomposition on the models in the processing queue, using a pre-constructed mixed constraint evaluation function to perform constraint determination; the application realizes global optimal model decomposition of five-axis support-free printing, avoids voxelization discretization error, and takes into account support-free forming, surface quality and process complexity control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of additive manufacturing technology, and relates to model decomposition technology for five-axis 3D printing, and particularly to a method and apparatus for decomposing five-axis 3D printing models based on hybrid constraints and Monte Carlo tree search. Background Technology

[0002] FDM (Fused Deposition Modeling) 3D printing technology relies on the hot-melt extrusion of thermoplastic filaments and the subsequent layer-by-layer cooling and solidification to form parts. It has advantages such as low equipment cost, wide range of filament compatibility, and strong processing operability, and is widely used in fields such as aerospace irregular component preparation, automotive parts prototype development, medical device manufacturing, and industrial tooling processing. Currently, the mainstream FDM printing equipment in the industry is a three-axis printing machine, which can only deposit material layer by layer in a fixed printing construction direction. When forming components with large-angle overhang features, the molten filament is prone to falling into the air, and auxiliary support structures must be added to ensure the forming. Although the support structure can ensure that the material does not deposit in the air, it will bring problems such as material waste, increased printing time, post-processing difficulties, surface damage when the support is removed, and local dimensional accuracy reduction.

[0003] To overcome the shortcomings of three-axis printing technology, researchers have proposed five-axis 3D printing technology. By adding two sets of rotational degrees of freedom to the three-axis translational degrees of freedom, the relative posture of the workpiece and the nozzle can be adjusted, the material deposition angle can be optimized, and support generation can be avoided from the source. The core of five-axis printing process planning is model decomposition and printing direction selection. At present, the approximate convex decomposition preprocessing of the three-dimensional model is generally adopted to decompose the complex model into geometrically regular sub-parts without concave structures, so as to simplify the difficulty of equipment collision detection and printing path planning calculations. For example, the V-HACD (Volumetric Hierarchical Approximate Convex Decomposition) algorithm is used to process complex models based on voxelization and hierarchical decomposition strategies.

[0004] However, the existing V-HACD algorithm is mainly used in graphics rendering and physical simulation, and cannot be directly adapted to the application requirements of five-axis 3D printing. It also suffers from low model splitting accuracy, making it difficult to obtain the globally optimal printing solution. Specifically, the V-HACD algorithm's pre-voxelization process, which discretizes the continuous 3D model into a cubic mesh for calculation, will produce discretization errors and is prone to misjudging directly separable flat areas, reducing the model splitting accuracy. Secondly, the algorithm adopts a single-step greedy section selection logic, which only pursues local optimal splitting and cannot take into account the entire printing process, making it difficult to obtain the globally optimal printing solution. In addition, the algorithm was originally developed for graphics simulation and cannot adapt to the core requirements of five-axis printing such as support-free operation, surface quality, and number of sub-models. After splitting, interference and splicing misalignment are prone to occur. Summary of the Invention

[0005] To address the technical problems existing in the prior art, this invention provides a five-axis 3D printing model decomposition method and apparatus based on hybrid constraints and Monte Carlo tree search, in order to solve the technical problems that the existing V-HACD algorithm cannot be directly adapted to the application requirements of five-axis 3D printing, and that it has low model decomposition accuracy and difficulty in obtaining the globally optimal printing solution.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search, including: Obtain the 3D model mesh data of the workpiece to be printed; Mesh preprocessing is performed on the 3D model mesh data of the workpiece to be printed to obtain a closed manifold triangular network; The closed manifold triangular mesh is used as the initial model and added to the queue to be processed; Based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, the model in the processing queue is decomposed into sub-models until the processing queue is empty, and the target sub-model set is output as the model decomposition result of the workpiece to be printed. In the process of decomposing the models in the processing queue into sub-models, a pre-built hybrid constraint evaluation function is used to determine the constraints. The pre-built hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints, and sub-model number constraints.

[0007] Furthermore, based on the Monte Carlo tree search algorithm and combined with the direct plane cutting strategy, the process of decomposing the models in the processing queue into sub-models is as follows: Select the current model from the queue of pending processes; determine whether the current model satisfies the support-free hard constraint based on the triangular facet normal vectors of the current model and the candidate printing direction; If the current model does not meet the support-free hard constraint, the Monte Carlo tree search algorithm is used to determine the target cutting plane in the candidate cutting plane space; according to the target cutting plane, the current model is directly cut into planes to obtain two sub-models; the two sub-models are added to the queue to be processed. The process of constructing the candidate cutting plane space includes: using an axis-aligned discretization method to restrict the candidate cutting planes to be parallel to the coordinate axes, and sampling at equal intervals in each direction to obtain m equally spaced candidate cutting planes, which serve as the candidate cutting plane space; If the current model satisfies the unsupported hard constraint, then the pre-built hybrid constraint evaluation function is used to determine whether the current model satisfies the unsupported soft constraint; if it does, the current model is added to the result set; if it does not, the current model is added back to the processing queue. The sub-models in the result set are post-processed and merged to output the target sub-model set.

[0008] Furthermore, the Monte Carlo tree search algorithm is used to determine the target cutting plane within the candidate cutting plane space, as follows: The current decomposition state of the model is used as the node of the search tree, and the candidate cutting plane is used as the action from the parent node to the child node. During the selection phase, starting from the root node of the search tree, the most promising child node is selected for expansion. During the expansion phase, new candidate cutting planes are added as action nodes; In the default simulation phase, the default simulation strategy is used to predict the value of the hybrid constraint evaluation function corresponding to the decomposition along the current candidate cutting plane. During the feedback phase, the values ​​of the corresponding hybrid constraint evaluation functions are updated to the historical revenue values ​​of each node in the path; After the search is completed, select the child node with the highest cumulative return from the root node, and extract the first candidate cutting plane corresponding to the child node as the target cutting plane.

[0009] Furthermore, the process of directly cutting the current model using the target cutting plane is as follows: Calculate the signed distance from each vertex of the current model to the target cutting plane; based on the signed distance, determine the positional relationship between each vertex of the current model and the target cutting plane; If the two endpoints of an edge in the current model are located on opposite sides of the target cutting plane, then the intersection of the edge and the target cutting plane is calculated by linear interpolation; Connect all the intersections to form the profile of the cutting section; Perform constrained triangulation on the profile of the cut section to generate a patch triangular network of the cut section, so that the cut sub-mesh maintains a closed manifold structure.

[0010] Furthermore, the process of performing constrained triangulation on the cut section profile is as follows: Construct a polygonal boundary loop from all intersections of the cut section profile; perform triangulation within the cut plane with the polygonal boundary loop as a constraint, and check the topological quality of the patch face by the number of adjacencies of the edges.

[0011] Furthermore, the pre-constructed hybrid constraint evaluation function is as follows:

[0012]

[0013]

[0014]

[0015]

[0016] in, The evaluation function is a mixed-constraint function, and the objective is to find its minimum value. For the total set of constraint indicators, These correspond to the overhang constraint, surface roughness constraint, and number of sub-models, respectively. The constraint indicator number; For the first The weighting coefficients corresponding to the constraint indicators; The set of decomposed sub-models; For the set of sub-models The corresponding number The normalized index value of the constraint indicator; For the set of sub-models The corresponding number The original evaluation value of each constraint indicator; For the first The maximum threshold allowed by the constraint indicator.

[0017] This invention also provides a five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search, used to implement the aforementioned five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search. The system includes: The data acquisition module is used to acquire the 3D model mesh data of the workpiece to be printed; The mesh preprocessing module is used to preprocess the mesh data of the 3D model of the workpiece to be printed, and obtain a closed manifold triangular network. The queue initialization module is used to take the closed manifold triangular mesh as the initial model and add it to the queue to be processed; The model decomposition module is used to decompose the models in the processing queue into sub-models based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, until the processing queue is empty, and output the target sub-model set as the model decomposition result of the workpiece to be printed. In the process of decomposing the models in the processing queue into sub-models, a pre-built hybrid constraint evaluation function is used to determine the constraints. The pre-built hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints, and sub-model number constraints.

[0018] The present invention also provides an electronic device, comprising: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the described five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search.

[0019] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search.

[0020] The present invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the aforementioned five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search.

[0021] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides a five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search. Through direct planar cutting driven by Monte Carlo tree search and hybrid constraint evaluation, it achieves globally optimal model decomposition for five-axis supportless printing, avoiding voxelization discretization errors while simultaneously ensuring supportless forming, surface quality, and process complexity control. Specifically, the Monte Carlo tree search algorithm is introduced into the five-axis 3D printing model decomposition process, replacing the voxelization preprocessing of the traditional V-HACD algorithm with a direct planar cutting strategy. This avoids misjudging flat segmentation regions due to discretization errors, significantly improving model decomposition accuracy. Simultaneously, the iterative expansion and backpropagation mechanism of the Monte Carlo tree search... The system can systematically explore the global solution space of the cutting sequence, breaking through the local optima limitations of single-step greedy facet selection, and making the decomposition scheme take into account the printing posture reachability and process feasibility of each subsequent sub-model. In addition, the hybrid constraint evaluation function organically integrates the overhang constraint, surface roughness constraint and sub-model number constraint, so that the decomposition results directly address the core requirements of five-axis supportless printing, surface quality assurance and process complexity control. It effectively avoids the problems of material waste, post-processing damage and accuracy reduction caused by support structures, while suppressing the risk of splicing misalignment and assembly interference caused by excessive sub-model decomposition, thus realizing the globally optimal decomposition planning for five-axis supportless printing of complex components.

[0022] The five-axis 3D printing model decomposition system, electronic device, computer-readable storage medium, and computer program product based on hybrid constraints and Monte Carlo tree search provided by this invention possess all the advantages of the aforementioned five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search. Attached Figure Description

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

[0024] Figure 1 A flowchart of the five-axis 3D printing model decomposition method provided in Example 1; Figure 2 This is a schematic diagram illustrating the model decomposition based on the overhang angle in Example 1; Figure 3 This is a schematic diagram illustrating the reduction of surface roughness by planning the printing direction using a model in Example 1. Figure 4The diagram shows the triangular section of the cutting cross-section in Example 1, including various working conditions; where (a) is the working condition with two intersection points and not passing through the vertex, (b) is the working condition with two intersection points and passing through the vertex, (c) is the working condition passing through one vertex, and (d) is the working condition passing through one edge. Figure 5 This is a schematic diagram of the planar segmentation result of the three-dimensional model in Example 1; Figure 6 This is a schematic diagram showing the complete decomposition effect of the overall model of the complex workpiece in Example 1; Figure 7 This is a structural block diagram of the five-axis 3D printing model decomposition system provided in Example 2; Figure 8 This is a structural block diagram of the electronic device provided in Example 3. Detailed Implementation

[0025] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] Before describing the specific embodiments of this application, some of the technical terms involved in the embodiments of this application are explained as follows: Five-axis 3D printing refers to an additive manufacturing technology that adds two rotational axes to the traditional three-axis (X, Y, Z linear motion), allowing the printing nozzle or workpiece platform to change its posture during the printing process, thereby enabling the deposition of material along a spatial curved surface rather than just a horizontal plane.

[0027] Monte Carlo Tree Search (MCTS) is a heuristic optimal decision-making algorithm that combines random sampling simulation with tree structure traversal.

[0028] Direct planar cutting refers to a model decomposition method that uses a single flat geometric plane to divide a three-dimensional solid model into two parts. The cutting plane has no curved surfaces, steps, or bends; it only relies on the intersection of the plane and the model to split the overall model.

[0029] This invention provides a five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search, comprising the following steps: Step 100: Obtain the 3D model mesh data of the workpiece to be printed; Step 200: Perform mesh preprocessing on the 3D model mesh data of the workpiece to be printed to obtain a closed manifold triangular network; Step 300: Use the closed manifold triangular mesh as the initial model and add it to the queue to be processed; Step 400: Based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, the models in the processing queue are decomposed into sub-models until the processing queue is empty. The target sub-model set is then output as the model decomposition result of the workpiece to be printed.

[0030] It should be noted that during the process of decomposing the models in the processing queue into sub-models, a pre-built hybrid constraint evaluation function is used to determine the constraints; the pre-built hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints and sub-model number constraints.

[0031] In the above implementation, Monte Carlo tree search is used to replace the original greedy facet selection. By traversing multiple cutting combinations through a tree structure, the comprehensive impact of overhang angle, surface step effect, and number of sub-models on the overall printing quality is evaluated simultaneously during the search process, thereby avoiding local optimum traps. The introduction of a hybrid constraint evaluation function makes the selection of the cutting plane not only dependent on geometric convexity, but also quantifies the feasibility of unsupported molding, the cumulative roughness of the splicing surface, and the degree of model breakage. These three factors form a dynamic weight balance, driving the search algorithm to prioritize the output of decomposition schemes that can satisfy unsupported printing while also taking into account surface smoothness and part integrity. Compared with the original algorithm that relies on voxel discretization and single-step convexity criteria, this invention directly performs planar cutting on the triangular mesh geometry, eliminating region misjudgment caused by voxelization. Furthermore, through the forward simulation capability of the Monte Carlo tree, each decomposition decision can be traced back to the global printing condition, effectively suppressing the local over-segmentation and interference misalignment problems that frequently occur in traditional methods. Ultimately, while ensuring print manufacturability, the engineering practicality and global optimum of the decomposition results are significantly improved.

[0032] In this invention, the topology of the 3D model mesh is first regularized through mesh preprocessing to obtain a compliant closed manifold triangular mesh, eliminating the interference of defects in the original model mesh on the splitting operation. Iterative splitting is completed by coupling the Monte Carlo tree search algorithm with a direct plane cutting strategy, eradicating voxel discretization errors from the source, avoiding misjudgment of flat and divisible regions, and significantly improving the model splitting accuracy. At the same time, a hybrid constraint evaluation function that integrates overhang forming, surface roughness, and the number of sub-models is configured to constrain the entire splitting process, overcoming the shortcomings of existing algorithms that are single-step greedy sectional optimization and one-sided pursuit of local optima. It takes into account the core working conditions of five-axis 3D printing supportless forming, processing surface quality, and splitting volume, and solves the globally optimal model splitting scheme, effectively avoiding sub-model processing interference and splicing misalignment defects, accurately adapting to the characteristics of five-axis 3D printing process, effectively reducing printing material waste, compressing forming time, simplifying post-processing procedures, avoiding surface damage and dimensional deviation problems caused by support removal, and comprehensively optimizing the component printing quality.

[0033] The following specific embodiments further explain the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search provided by this invention: Example 1 As attached Figure 1 As shown, this embodiment 1 provides a five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search, including the following steps: Step 1: Obtain the 3D model mesh data of the workpiece to be printed. Explained, Step 1 involves completely reading the externally input 3D model of the workpiece to be printed, extracting all triangular mesh data that constitute the workpiece's outline, and providing the raw geometric data for subsequent steps such as mesh calculation, cutting decomposition, and constraint index calculation.

[0034] It should be noted that the storage format of the 3D model mesh data of the workpiece to be printed adopts the industry-standard fused deposition modeling 3D printing, such as STL triangular mesh format or OBJ triangular mesh format; the 3D model mesh data of the workpiece to be printed includes a set of 3D space vertex coordinates, a set of triangular facet vertex association indexes, a set of normal vector values ​​corresponding to each triangular facet, and a projected area value of a single triangular facet.

[0035] Step 2: Perform mesh preprocessing on the 3D model mesh data of the workpiece to be printed to obtain a closed manifold triangular network. Explained, Step 2 is used to repair various topological defects generated during the export and modeling process of the original 3D model mesh data. It converts the original mesh, which contains damage, discontinuities, and disordered normals, into a triangular mesh that meets the closed manifold standard, ensuring that subsequent plane cutting, overhang area calculation, and cross-sectional surface patching can be performed on a closed and definable mesh.

[0036] Specifically, the repair process involves fixing small holes inside the model, deleting duplicate and overlapping vertices, clearing completely overlapping triangular faces, unifying the orientation of all triangular face normals, eliminating non-manifold bad edges of faces existing only on one side, and cleaning up isolated vertices and faces. The repair order from basic vertices to face topology—first unifying vertex data and removing duplicate vertices, then correcting face normals, then repairing holes, and finally verifying mesh edge topology—effectively avoids creating new mesh defects after a single repair operation, ensuring a stable and reliable mesh topology after repair. Optionally, after completing all repair operations, a closed manifold verification procedure is executed to check the mesh topology edge by edge and face by face. If the verification fails, the program automatically performs a second, refined repair of the remaining defects until the mesh fully meets the closed manifold standard, outputting a closed manifold triangular network for subsequent steps.

[0037] It should be noted that the closed manifold triangular network will simultaneously construct a complete topological adjacency data table, recording all faces associated with each vertex, two faces associated with each edge, and the remaining faces adjacent to each face; optionally, after the preprocessing is completed and the closed manifold triangular network is output, a mesh repair log is generated, recording the number of repaired holes, the number of duplicate vertices, and the number of corrected normal faces, which facilitates operators to check the quality of the original model mesh and optimize the upstream 3D modeling and export process.

[0038] Step 3: Use the closed manifold triangular mesh as the initial model and add it to the queue to be processed. Explain, step 3 is used to construct a data storage container for iterative decomposition, storing the closed manifold triangular mesh as the first model to be decomposed in the queue, establishing a continuously iterative model decomposition loop logic.

[0039] Optionally, the queue to be processed adopts a first-in-first-out linear queue data structure. The queue stores all sub-models that need to be further cut and decomposed. In each loop, a single model is taken from the head of the queue to perform constraint judgment and cutting operation. The two new sub-models generated by cutting are stored in the tail of the queue again. The loop continues until there are no models to be processed in the queue, and all decomposition iterations are completed. The number of models stored in the queue to be processed is monitored in real time. When the number of models in the queue is zero, it means that all models have completed constraint judgment. All sub-models that meet the support-free soft constraint conditions are stored in the result set, and the loop decomposition process terminates.

[0040] If the model is found to not meet the supportless soft constraint during the constraint determination process, the model will be re-stored at the end of the waiting queue and wait for the next round of loop cutting. The queue mechanism supports multiple iterative cutting and is suitable for complex curved surface workpieces that require multiple rounds of planar cutting to meet all constraint conditions.

[0041] Step 4: Based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, decompose the models in the processing queue into sub-models until the processing queue is empty, and output the target sub-model set as the model decomposition result of the workpiece to be printed.

[0042] In the process of decomposing the models in the processing queue into sub-models, a pre-built hybrid constraint evaluation function is used to determine the constraints. The pre-built hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints, and sub-model number constraints.

[0043] Explanatoryly, step 4 is used to cyclically read all models in the queue to be processed, perform supportless hard constraint determination, Monte Carlo tree search to solve for the optimal cutting plane, direct planar mesh cutting, constraint soft determination, sub-model enqueueing, post-processing merging, until the queue is empty, and finally output the optimal sub-model decomposition scheme adapted to the five-axis printing process.

[0044] In this embodiment 1, the traditional V-HACD algorithm voxel discretization cutting scheme is abandoned, and a direct planar cutting strategy is adopted. The planar intersection operation is directly performed on the original triangular mesh without voxel discretization processing. This eliminates the geometric distortion error caused by voxel resolution from the root, completely preserves the small geometric details of the workpiece surface, and improves the dimensional accuracy of the decomposed model.

[0045] The Monte Carlo tree search algorithm is used to replace the traditional decomposition scheme's single-step greedy cut selection logic. It discretely samples candidate cutting planes in an infinitely continuous 3D cutting plane space, and performs global optimization in four stages: selection, expansion, simulation, and backpropagation. It predicts the comprehensive cost of mixed constraints after multiple rounds of continuous cutting and selects the first globally optimal cutting plane. This avoids the defects of large overhang areas, redundant number of sub-models, and excessive surface roughness caused by a single local optimal cutting in subsequent rounds of decomposition.

[0046] The hybrid constraint evaluation function integrates three types of process constraints in five-axis printing: overhang constraint, surface roughness constraint, and number of sub-models constraint. All three types of constraints are quantified into calculable numerical indicators. The optimization priority of the three types of indicators is balanced by weighting coefficients to achieve collaborative optimization of multiple process objectives, rather than optimizing a single support-free indicator that ignores surface quality and number of blocks.

[0047] The decomposition process adopts a hierarchical judgment logic of hard constraints and soft constraints. In the hard constraint judgment, any model with a hanging surface exceeding the self-supporting critical angle is forced to perform cutting decomposition. Only when the model fully satisfies the support-free hard constraint is the hybrid constraint evaluation function activated to perform a comprehensive judgment of soft constraints, including hanging constraints, surface roughness constraints, and sub-model number constraints, taking into account both the feasibility of printing and the processability.

[0048] The direct planar cutting strategy includes a complete closed-loop mesh processing flow, which is fully automated from vertex planar distance calculation, edge intersection linear interpolation, cutting section contour construction, and constraint triangulation and surface repair. After the cutting is completed, the two sub-models automatically maintain the closed manifold triangular mesh topology, eliminating the need for manual secondary repair of cutting section topological defects.

[0049] An empty queue means that all models have completed hard constraint verification and meet the supportless printing conditions. At this time, the result set contains a large number of sub-models that meet the hard constraints. There are redundant blocks between sub-models that are geometrically adjacent and have similar shapes. The post-processing merging operation merges redundant sub-models without breaking the three types of constraints, reducing the total number of sub-models in the final output and reducing the computational overhead of five-axis printing posture switching and path planning.

[0050] Optionally, the hybrid constraint evaluation function has built-in normalization transformation logic, which maps three indicators with completely different dimensions—overhang weighted area, roughness weighted area, and number of sub-models—to the same numerical range. This avoids the single indicator's numerical magnitude from dominating the comprehensive evaluation result and ensures that the three process constraints have a balanced evaluation weight in the cutting plane decision.

[0051] In one possible implementation, the process of decomposing the models in the processing queue into sub-models based on the Monte Carlo tree search algorithm and combined with a direct plane cutting strategy is as follows: Select the current model from the queue to be processed; determine whether the current model satisfies the supportless hard constraint based on the triangular facet normal vectors and candidate printing directions; if the current model does not satisfy the supportless hard constraint, use the Monte Carlo tree search algorithm to determine the target cutting plane in the candidate cutting plane space; perform direct planar cutting on the current model according to the target cutting plane to obtain two sub-models; add the two sub-models to the queue to be processed; if the current model satisfies the supportless hard constraint, use the pre-constructed hybrid constraint evaluation function to determine whether the current model satisfies the supportless soft constraint; if satisfied, add the current model to the result set; if not satisfied, add the current model back to the queue to be processed; perform post-processing and merging on the sub-models in the result set to output the target sub-model set.

[0052] Specifically, the process of determining whether the current model satisfies the support-free hard constraint based on the triangular facet normals of the current model and the candidate printing directions is as follows:

[0053] in, The self-supporting critical angle for the fused deposition modeling process is preset and determined by process parameters such as the printed layer thickness, nozzle diameter, and molten fluidity of the consumable. The normal vector of the triangular facet; The candidate printing direction selected for the current model.

[0054] It should be noted that in five-axis 3D printing, whether the same facet needs support is not an inherent property of the model, but is related to the current printing orientation of the model. By calculating the relationship between the facet normal vector and the candidate printing orientation of the current model, if the facet satisfies the self-support critical angle condition, the facet can be considered as directly printable under the current printing posture.

[0055] If any triangular facet in the current model does not satisfy the inequality If the current model violates the unsupported hard constraint, then cutting decomposition must be performed. The candidate printing direction refers to all feasible workpiece placement orientations within the rotation range of the five-axis printing equipment. In this embodiment 1, the logic of prioritizing hard constraint determination is adopted. Its core principle is that the basic premise of five-axis printing is that the workpiece is formed without support. If the model has a hanging area that cannot be self-supported, the optimization of other surface roughness and the number of sub-models has no practical process significance. Therefore, the model that needs to be cut is filtered first to avoid meaningless soft constraint evaluation calculations and save computing resources.

[0056] In this embodiment 1, multiple candidate printing directions are generated by axis-aligned, equally spaced discrete sampling. All orientations are traversed to verify the self-support capability of the model, and the optimal printing posture is selected for hard constraint determination. The result set refers to a read-only storage container independent of the queue to be processed. It only stores sub-models that simultaneously meet all threshold requirements of unsupported hard constraints and mixed soft constraints, and will not re-enter the cutting loop. Post-processing merging refers to traversing all sub-models within the result set after all decomposition iterations are completed, identifying sub-models that are spatially adjacent, have similar geometric shapes, and do not exceed the three constraint thresholds after merging, and performing mesh splicing and merging operations to reduce the total number of sub-models in the final output.

[0057] If the current model violates the support-free hard constraint, a Monte Carlo tree search is performed to find the optimal cutting plane. Mesh cutting is then performed to generate two sub-models. Both sub-models are stored at the end of the processing queue, waiting for the next round of iteration to re-verify the hard constraint. This achieves multi-level iterative cutting. For large-angle continuous overhanging surfaces, multiple rounds of progressive segmentation can be completed to gradually eliminate all overhanging areas.

[0058] If the current model fully satisfies the supportless hard constraint, it means that the current model can be printed without support on a five-axis device. At this time, the pre-built hybrid constraint evaluation function is called to calculate the comprehensive cost, and the preset threshold is compared to determine whether the soft constraint is satisfied. The soft constraint simultaneously implements the overhang constraint, surface roughness constraint and sub-model number constraint to prevent the model from having too many blocks and severe surface step effect even though it has no overhang.

[0059] If the hard constraints are met but the range is soft, it means that the current model is feasible to form without support, but the overhang risk, surface quality or number of blocks does not meet the process requirements. Therefore, the current model is stored back in the queue to be processed and the cutting optimization is carried out again. The roughness cost is reduced by appropriate block division until the comprehensive index meets the threshold. If both hard and soft constraints are met, the model is permanently stored in the result set and will no longer participate in the subsequent decomposition cycle.

[0060] After all queue models have been processed in a loop, the result set stores a large number of compliant sub-models. However, the partitioning interface of some adjacent sub-models is not necessary for the process. Excessive partitioning will increase the computational complexity of five-axis printing posture switching and path planning. Therefore, in this embodiment 1, redundant sub-models are integrated through post-processing merging operations without destroying all constraints, thereby further optimizing the process adaptability of the final decomposition scheme.

[0061] In this embodiment 1, a decomposition decision-making mechanism is achieved through hierarchical soft and hard constraint classification logic, which prioritizes printing feasibility, overhang risk, forming quality, and the number of segments for coordinated optimization. This differs from existing technologies that only judge overhang area and lack hierarchical constraint classification. It ensures that the workpiece can be printed without support while simultaneously optimizing the printed surface quality and the number of segments, balancing multiple process objectives. Among them, the hard constraint judgment only traverses the normal vectors of the model's triangular facets and the printing direction to complete inequality verification. The calculation speed is fast, which can quickly select the model that needs to be cut and avoid performing complex Monte Carlo tree search operations on fully self-supporting models. This significantly reduces the overall algorithm's computation time and improves the decomposition efficiency of complex workpiece models. The post-processing merging operation is only performed after all iterative decompositions are completed, without interfering with the cyclic cutting process. The merging operation verifies the mixed constraint evaluation function index throughout. If any constraint exceeds the threshold after merging, the merging is abandoned, strictly ensuring that all output sub-models meet the five-axis printing process index.

[0062] In one possible implementation, the Monte Carlo tree search algorithm is used to determine the target cutting plane in the candidate cutting plane space, as follows: The current decomposition state of the model is used as a node in the search tree, and candidate cutting planes are used as actions from parent nodes to child nodes. In the selection phase, the most promising child node is selected for expansion, triggered from the root node of the search tree. In the expansion phase, new candidate cutting planes are added as action nodes. In the default simulation phase, the default simulation strategy is used to predict the value of the hybrid constraint evaluation function corresponding to the decomposition along the current candidate cutting plane. In the backpropagation phase, the value of the corresponding hybrid constraint evaluation function is updated to the historical reward value of each node in the path. After the search is completed, the child node with the highest cumulative return is selected from the root node, and the first candidate cutting plane corresponding to the child node is extracted as the target cutting plane.

[0063] It should be noted that in this embodiment 1, Monte Carlo tree search is used to replace the one-step greedy cut selection in the traditional V-HACD. During the 3D model decomposition process, for each model that needs to be further decomposed, the Monte Carlo tree search algorithm is used to determine the optimal cutting plane as the target cutting plane. Since the possibility of cutting planes in 3D space is infinite, in this embodiment 1, the approximate convex decomposition principle of V-HACD is used as the candidate decomposition framework. An axis-aligned discretization method is adopted to restrict the candidate cutting planes to be parallel to the coordinate axes, and sampling is performed at equal intervals in each direction to obtain m equally spaced candidate cutting planes.

[0064] Specifically, Monte Carlo tree search includes four iterative stages: selection, expansion, default simulation, and backpropagation. The root node of the search tree is constructed based on the overall geometric decomposition state of the current model. Each set of discretely sampled candidate cutting planes corresponds to an action branch between tree nodes. Through multiple iterations, the historical returns and visit counts of nodes are updated to balance the exploration of the cutting space with the utilization of known high-quality cutting planes. The selection stage is used to filter the child nodes with the highest potential for current returns. The calculation process of the historical returns of nodes is as follows:

[0065] in, For the current node The stored historical revenue value is equal to the negative value of the corresponding cutting scheme's hybrid constraint evaluation function. The smaller the value, the lower the overall process cost of the cutting scheme and the higher the corresponding historical revenue. The preset exploration coefficient is used to adjust the algorithm's exploration intensity for unknown candidate cutting planes; For the current node The cumulative number of visits; Parent node of the current node The cumulative number of visits.

[0066] Interpretive search tree nodes store the overall decomposition state of the model after a single cut, containing four core data categories: current sub-model mesh data, the sequence of cut planes executed, the comprehensive benefit of corresponding hybrid constraints, and the number of node visits. The parent node refers to the original model state before cutting, and the child node refers to the model state after cutting with a set of candidate cut planes. Candidate cut planes refer to planar samples generated by discrete sampling in 3D space. Specifically, a parallel and equally spaced sampling strategy is used to uniformly sample multiple sets of planar normals and planar positions along the X, Y, and Z axes, constructing a finite set of discrete candidate cut planes, which are then used to transform the infinitely continuous 3D cut... The cutting plane space is transformed into a traversable finite sample set, reducing the computational cost of the search. The default simulation strategy refers to a lightweight and fast decomposition prediction algorithm that does not require the complete execution of the entire iterative cutting process. It only calculates the hybrid constraint evaluation function value for the two sub-models after the current candidate cutting plane is divided, and quickly predicts the comprehensive process cost of the cutting plane in subsequent rounds of decomposition. The historical benefit value refers to the cumulative benefit index stored in each search tree node. After obtaining the hybrid constraint evaluation function result in each simulation stage, the historical benefits and access counts of all parent nodes and root nodes are updated in reverse along the current search path to complete the reverse transmission of information on the merits and demerits of the cutting scheme.

[0067] It should also be noted that the selection phase balances exploration and utilization based on the upper confidence interval formula. When a candidate cutting plane yields high overall benefits after multiple simulations and the number of node visits continuously increases, this branch is prioritized for expansion. For completely new cutting plane branches with extremely low visit counts, the branch evaluation value is increased to guide the algorithm to explore unverified cutting planes and avoid missing globally optimal cutting solutions. In the expansion phase, a set of action child nodes corresponding to untraversed candidate cutting planes are added under the selected potential child nodes to expand the search tree branches and gradually cover all discrete sampled candidate cutting planes, ensuring that all feasible cutting planes are included in the evaluation scope and no potential high-quality cutting solutions are missed. By default, the simulation phase does not perform complete and accurate mesh cutting calculations, but only roughly calculates the comprehensive evaluation value of three indicators: overhang, roughness, and number of sub-models after cutting, to quickly obtain the results. The numerical values ​​of the hybrid constraint objective function corresponding to this cutting sequence significantly shorten the iteration time of a single-round tree search, adapting to the scenario of rapid decomposition of complex large-size models. In the backpropagation stage, the comprehensive evaluation value is transmitted backward from the simulation end node along the complete search path. Each node on the path synchronously updates its own cumulative historical gains and access counts, enabling the root node and parent nodes at all levels to simultaneously grasp the global advantages and disadvantages of the cutting branch. After multiple rounds of iteration, the gain data converges and stabilizes. After the search is completed in multiple rounds of four-stage iterations, all first-level child nodes under the root node store the long-term cumulative gains corresponding to the first cutting plane of each group. The first-level child node with the highest gain value is selected, and the candidate cutting plane bound to it is the target cutting plane for the current model decomposition. The multi-round cutting sequence corresponding to this plane has the lowest global comprehensive process cost, balancing the three constraints of overhang, surface roughness, and number of sub-models.

[0068] In this embodiment 1, Monte Carlo tree search multi-step global prediction is used instead of traditional single-step greedy face selection. This can predict the comprehensive effect of multiple rounds of iterative decomposition after a single cut, effectively avoiding the problem of local optima in a single cut and deterioration of overall process indicators after multiple decompositions. The output target cutting plane is adapted to the multi-constraint collaborative optimization requirements of five-axis printing. Optionally, after the search is completed, the spatial position and plane normal of the target cutting plane can be finely adjusted locally to further reduce the value of the mixed constraint evaluation function after cutting and improve the cutting accuracy of the face. The fine-tuning range is limited to within the sampling interval and will not change the overall optimal branch of the candidate face.

[0069] In one possible implementation, the process of directly cutting the current model according to the target cutting plane includes: first, calculating the signed distance from each vertex of the current model to the target cutting plane; based on the signed distance, determining the positional relationship between each vertex of the current model and the target cutting plane; if the two endpoints of an edge in the current model are located on both sides of the target cutting plane, then calculating the intersection point between the edge and the target cutting plane through linear interpolation; connecting all the obtained intersection points to form the cutting section profile; performing constrained triangulation on the cutting section profile to generate a patch triangular network of the cutting section, so that the cut sub-mesh maintains a closed manifold structure.

[0070] Specifically, the formula for calculating the signed distance from a vertex to the cutting plane is as follows:

[0071] in, Three-dimensional vertices The signed distance to the target cutting plane; The unit normal vector of the cutting plane to the target; The vertex's three-dimensional coordinate vector; This is a constant term for the cutting plane; the sign of the distance value indicates whether the vertex is located on the positive or negative side of the plane's normal direction, and the absolute value of the value represents the perpendicular distance from the vertex to the plane.

[0072] Specifically, the formula for linear interpolation calculation of cross-plane grid intersection points is as follows:

[0073] in, Representing the vertex ,vertex The coordinates of the intersection points of the formed mesh edges and the target cutting plane; , These are the signed distances between the two endpoints. A positive and a negative value indicate that the grid edge crosses the cutting plane, and the intersection point needs to be calculated.

[0074] Interpretive signed distance refers to the spatial orientation of a vertex relative to the cutting plane. A distance value greater than 0 indicates that the vertex is on the positive side of the plane's normal direction, less than 0 indicates that the vertex is on the negative side of the plane's normal direction, and equal to 0 indicates that the vertex falls on the cutting plane. This is used to classify the division and assignment of mesh patches. The cutting section profile refers to the closed polygonal boundary loop formed by connecting the intersection points of all mesh edges with the target cutting plane in spatial order. It is the constraint boundary of the cut section patch. Constrained triangulation refers to generating triangular patches to fill the section region within the target cutting plane using the closed profile polygon of the cutting section as a hard boundary constraint. The triangular patches generated by the patch are completely spliced ​​with the original cut mesh patches without cracks or overlaps. Closed manifold structure means that the two sub-model triangular meshes obtained after the cutting are all satisfied with the closed manifold topology criteria. Each mesh edge belongs to only two triangular patches, with no overhanging boundaries or holes.

[0075] In this embodiment 1, direct planar cutting is used to replace the traditional V-HACD voxel discretization cutting scheme. It directly calculates the intersection of the original triangular mesh vertex and edge geometry data with the target cutting plane, without reducing the mesh geometric resolution or introducing surface distortion errors caused by voxel discretization, thus fully preserving the original surface geometric details of the workpiece. First, the orientation of all vertices relative to the cutting plane is calculated in batches using signed distance, quickly filtering out the mesh edges that cross the cutting plane. This eliminates the need to traverse each facet to determine the segmentation relationship, significantly improving the efficiency of the cutting operation. For mesh edges whose two endpoints belong to opposite sides of the plane, linear interpolation is used to accurately solve the intersection coordinates, ensuring the geometric accuracy of the cross-sectional contour and preventing intersection offset and contour breakage problems.

[0076] Optionally, all intersection points are connected in spatial topological order to construct a closed cutting section profile. The profile serves as a rigid boundary constraint for triangulation, ensuring that the patch triangular facets strictly fit the shape of the cutting section and preventing defects such as patch faces exceeding the section boundary or voids inside the section. After the cutting section profile triangulation generates the patch triangular network, the patch facets are spliced ​​with the original mesh facets obtained from the positive and negative sides of the plane, respectively, to automatically form two sets of independent and complete closed manifold triangular meshes, i.e., the two sub-models after cutting, without the need for additional manual repair of the topological damage of the cutting section.

[0077] In this embodiment 1, it can adapt to four types of mesh cutting conditions: double intersection points not passing through vertices, double intersection points passing through vertices, single vertex intersections, and the entire edge falling on the cutting plane. For all conditions, the intersection points can be accurately calculated and a continuous closed cross-sectional profile can be constructed, adapting to the planar cutting requirements of arbitrarily complex curved surface models. Direct planar cutting does not modify the original mesh vertex and face coordinates throughout the entire process; only the cross-sectional intersection points and supplementary triangular facets are added. The original shape and curvature of the workpiece are completely preserved, without generating additional printing size errors, making it suitable for five-axis printing decomposition scenarios of high-precision parts.

[0078] In one possible implementation, the process of performing constrained triangulation on the cut cross-sectional profile is as follows: Construct a polygonal boundary loop from all intersections of the cut section profile; perform triangulation within the cut plane with the polygonal boundary loop as a constraint, and check the topological quality of the patch face by the number of adjacencies of the edges.

[0079] Specifically, the objective function for constrained triangulation optimization is as follows:

[0080] in, This is the set of all the complementary triangular facets generated within the cutting plane; It is a single-piece patch triangular facet; The quality index for triangular facet topology is as follows: elongated triangular facets have lower quality values. The algorithm minimizes the sum of the quality of all facets to generate a uniform and full triangular mesh. To ensure that all intersection lines of the cut section are retained as a forced boundary constraint for triangulation, they must be completely preserved at the boundary of the patch mesh.

[0081] Specifically, the topology quality verification index for patching is the number of mesh edge adjacencies, calculated using the following formula:

[0082] in, For any mesh edge of the cross section, The number of adjacencies; This is the set of triangular facets for all cross-sections. The standard for closed manifold meshes requires that the number of adjacencies of the internal edges of the cross-section be equal to 2, and the number of adjacencies of the external boundary edges of the cross-section be equal to 1. If the number of adjacencies is 0 or greater than 2, it is determined that there is a topological defect in the facet.

[0083] Explanatory terms, a polygonal boundary loop refers to a closed polygon formed by connecting the intersection points and line segments obtained from the intersection of all mesh edges with the cutting plane, including an outer loop and nested inner loops. It completely replicates the geometric contour of the cutting section and is a hard boundary constraint that cannot be broken by triangulation. The number of adjacencies of an edge refers to the number of triangular patches that share a single mesh edge. It is used to check whether there are topological defects such as cracks, overlapping patches, and suspended isolated edges in the patch mesh, and to quickly identify unqualified patch meshes generated by triangulation. Constrained triangulation, unlike unconstrained free triangulation, forcibly fixes the intersection line segments of the section as the mesh boundary. The triangular patches generated by triangulation must not cross the section contour and strictly fit the shape of the cutting section, ensuring that the geometric shape of the sub-model after cutting is completely consistent with the original workpiece.

[0084] It should be noted that during the process of performing constrained triangulation on the profile of the cut section, a continuous closed polygon boundary loop is first constructed based on the intersection points and line segments to lock the shape constraints of the cut section. Then, constrained triangulation is performed and the number of adjacent mesh edges is checked to ensure that the mesh of the supplementary surface meets the closed manifold topology standard, thus solving the problems of mesh cracking and topology failure after cutting.

[0085] The polygon boundary ring construction process automatically distinguishes between the outer ring of the cross section and the nested inner ring. It generates multi-layer boundary constraints for complex cut sections with holes. During triangulation, no patch faces are generated in the inner ring region, fully restoring the real void structure of the model's cut cross section and avoiding incorrect filling of internal holes that could cause geometric distortion of the workpiece. The triangulation optimization objective function minimizes the total mass of all patch triangular faces, automatically avoids narrow and elongated triangular faces, and homogenizes the cross section patch mesh size, improving the accuracy of subsequent calculations of overhang area and surface roughness. Narrow and distorted triangular faces can cause deviations in the calculation of area-weighted indices, affecting the accuracy of the hybrid constraint evaluation function.

[0086] Explanatoryly, the edge adjacency count check is the final verification standard for the topology quality of the patch surface. Traversing all the mesh edges of the patch surface, if the adjacency count is not equal to 1 or 2, it means that the triangulation has produced cracks, overlapping patches, or overhanging edges. The program automatically re-executes the constraint triangulation until the adjacency count of all mesh edges meets the closed manifold standard, ensuring that the cut submesh can stably participate in all subsequent geometric operations.

[0087] In one possible implementation, the pre-constructed hybrid constraint evaluation function is as follows:

[0088]

[0089] in, The evaluation function is a mixed-constraint function, and the objective is to find its minimum value. For the total set of constraint indicators, These correspond to the overhang constraint, surface roughness constraint, and number of sub-models, respectively. The constraint indicator number; For the first The weighting coefficients corresponding to the constraint indicators; The set of decomposed sub-models; For the set of sub-models The corresponding number The normalized index value of the constraint indicator; For the set of sub-models The corresponding number The original evaluation value of each constraint indicator; For the first The maximum threshold allowed by the constraint indicator.

[0090] Interpretive, hybrid constraint evaluation function As a comprehensive quantitative cost index for model decomposition schemes, the algorithm optimization objective is to minimize... Numerical value A smaller value indicates that the current cutting and decomposition scheme simultaneously considers three process objectives: support-free operation, surface quality, and the number of sub-models, resulting in optimal overall adaptability; normalized index Used to unify the three types of original evaluation values The dimensional scales of the overhang-weighted area, roughness-weighted area, and number of sub-models vary greatly. After normalization, all indicators are mapped to the 0-1 range to avoid any single indicator's excessively large magnitude dominating the comprehensive evaluation result; when the original evaluation value exceeds the allowable threshold... At this time, the normalized value is forcibly set to 1, amplifying the overall cost of exceeding the limit constraint and guiding the algorithm to prioritize optimizing the exceeding index; weight coefficient This refers to configurable constraint priority adjustment parameters, which can adjust the weight of the three constraints according to printing requirements. For example, for high-precision appearance parts, the surface roughness constraint weight can be increased; for simple structural parts, the sub-model quantity constraint weight can be increased; and for large overhanging workpieces, the overhang constraint weight can be increased, flexibly adapting to differentiated process requirements.

[0091] The construction principle of the hybrid constraint evaluation function is explained as follows: (1) Suspension constraint In the hybrid constraint evaluation function, the original evaluation value of the suspension constraint is introduced. The overhang constraint is represented so that the overhang risk in all sub-models is accumulated into an overall support-free evaluation value; the overhang surface with a larger area will have a greater impact, thus prompting the algorithm to prioritize the areas that truly affect the printing feasibility.

[0092] Specifically, the original evaluation value of the suspension constraint The algorithm employs a weighted summation logic based on patch area. Large-area overhanging surfaces significantly improve the evaluation value, guiding the algorithm to prioritize the cutting and processing of high-risk, large-sized overhanging areas. This reduces the need for support generation at the source, minimizing material waste and post-processing damage. The original evaluation value of the overhang constraint is... The calculation process is as follows:

[0093] in, The original evaluation value for the suspension constraint; The set of decomposed sub-models A single sub-model within; For the facets in the sub-model; The area of ​​the patch; This is the single-term penalty function for the suspension constraint, which corresponds to the suspension penalty value of a single triangular facet.

[0094] Suspension constraint single-item penalty function ,as follows:

[0095] in, The droop angle of the patch relative to the printing direction; This is the critical angle threshold for self-support.

[0096] Explanatoryly, the relationship between hard constraints and evaluation values ​​is reflected in the single-item penalty function for droop constraints. When a facet meets the support-free condition, the droop penalty value for a single triangular facet is 0. When it does not meet the condition, the penalty value is calculated based on the degree of deviation of the droop angle. Among them, the larger the area and the larger the angle, the higher the droop penalty value for a single triangular facet. That is to say, the penalty value is zero when the support-free condition is met, and it is included in the evaluation function according to the degree of deviation when it is not met. During iterative decomposition, the droop risk is checked first. If there is an area in the current component that violates the support-free requirement, the cutting is triggered to continue.

[0097] It is worth noting that support-free printing does not equate to optimal print quality; if only the elimination of overhangs is pursued, the algorithm may cut the model into many small pieces or result in a printing direction with a large surface step effect.

[0098] (2) Surface roughness constraint In the hybrid constraint evaluation function, the original evaluation value of surface roughness constraint is introduced. Characterizing surface roughness constraints allows the algorithm to consider not only whether printing is possible, but also whether the printed surface has good forming quality when evaluating the cutting results.

[0099] Specifically, the original evaluation value of surface roughness constraint The algorithm calculates the potential step effect relative to the construction direction for each facet and accumulates them using an area-weighted method. By quantifying the printing step effect, the threshold can be dynamically adjusted according to the printing layer thickness and nozzle size, adapting to all scenarios from roughing and rapid printing to high-precision appearance part printing. This avoids the algorithm generating a large number of surface defects to eliminate overhangs, balancing forming feasibility and workpiece surface processing quality. Among them, surface roughness constrains the original evaluation value. The calculation process is as follows:

[0100] in, This represents the original evaluation value for surface roughness constraints. This is a penalty function used to describe the penalty value for surface roughness exceeding the allowable roughness threshold, corresponding to the roughness penalty value of a single triangular surface. It uses the angle threshold to characterize the step effect, allowing surface quality to participate in the model decomposition decision.

[0101] A penalty function used to describe the penalty effect when a surface roughness exceeds the allowable threshold. ,as follows:

[0102] in, The angle between the surface and the printing direction represents the step effect. The larger the angle, the higher the step height on the printed surface and the greater the roughness penalty value.

[0103] The calculation process for the height of the step effect is as follows:

[0104] in, The height is the step effect height; These are process parameters related to layer thickness or path scale; The explanatory calculation process based on the step effect height shows that the roughness threshold can be changed with the printing parameters, thus this embodiment 1 can be adapted to different layer thicknesses, nozzle sizes and surface quality requirements.

[0105] (3) Constraints on the number of sub-models In the hybrid constraint evaluation function, the number of sub-models is used to constrain the original evaluation value. The constraint on the number of sub-models is represented by directly counting the total number of blocks, which limits the algorithm from cutting the sub-models into unlimited subdivisions, preventing the number of sub-models from becoming too large after decomposition, reducing the computational complexity of five-axis printing posture switching, assembly, and path planning, and improving the overall printing process efficiency.

[0106] It should be noted that during the model decomposition process, the more the model is cut, the easier it may be to reduce local overhangs and local roughness, but it will bring more cutting interfaces, more assembly or attitude switching, more path planning complexity, and potential geometric errors. Therefore, it is necessary to limit excessive decomposition and use the number of sub-models as a soft constraint in the comprehensive evaluation.

[0107] Sub-model quantity constraint original evaluation value The calculation process is as follows:

[0108] in, The original evaluation value is used to constrain the number of sub-models.

[0109] Explanatory, sub-model number constraint original evaluation value In this approach, the number of sub-models after decomposition is directly used as an evaluation term to prevent the algorithm from cutting indefinitely for local objectives and to ensure that the output results are still feasible for manufacturing.

[0110] As attached Figure 2 As shown, attached Figure 2 The attached diagram illustrates the model decomposition based on the overhang angle in Example 1; from the attached diagram... Figure 2 The diagram shows the correspondence between the schematic model before and after cutting, and gives the result of the schematic model being decomposed into multiple regions, which is used to illustrate the processing method of model decomposition based on the overhang angle.

[0111] As attached Figure 3 As shown, attached Figure 3 The attached diagram illustrates how surface roughness is reduced by planning the printing direction using a model in Example 1; from the attached diagram... Figure 3 The relationship between the print head, the layered stacking profile, and the step effect can be seen, which is used to illustrate the relationship between surface roughness and layering method during the layer-by-layer forming process.

[0112] As attached Figure 4 As shown, attached Figure 4 The attached diagram illustrates various working conditions of the triangular section division in Example 1; where (a) is the working condition with two intersection points but not passing through a vertex, (b) is the working condition with two intersection points and passing through a vertex, (c) is the working condition passing through a single vertex, and (d) is the working condition passing through one edge; from the attached diagram... Figure 4 The diagram shows the different segmentation scenarios that may occur when the cutting plane intersects with the triangular mesh, which is used to illustrate the triangular division conditions in front of the cross-section patch.

[0113] As attached Figure 5 As shown, attached Figure 5 The attached diagram shows the planar segmentation results of the 3D model in Example 1; Figure 5 The diagram shows the segmentation result formed after the cutting plane intersects with the original triangle, which is used to illustrate the local division form of the model after planar cutting.

[0114] As attached Figure 6 As shown, attached Figure 6 The attached diagram illustrates the complete decomposition effect of the overall model of the complex workpiece in Example 1; from the appendix... Figure 6 The diagram shows the original model, the model after partitioning and coloring, and multiple independent sub-models after further decomposition, illustrating the overall decomposition result of a complex model.

[0115] Example 2 This embodiment 2 provides a five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search, used to implement the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search described in embodiment 1 above; as shown in the attached figure. Figure 7 As shown, the five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search includes a data acquisition module, a mesh preprocessing module, a queue initialization module, and a model decomposition module.

[0116] The data acquisition module is used to acquire the 3D model mesh data of the workpiece to be printed.

[0117] The mesh preprocessing module is used to preprocess the mesh data of the 3D model of the workpiece to be printed, and obtain a closed manifold triangular network.

[0118] The queue initialization module is used to take the closed manifold triangular mesh as the initial model and add it to the queue to be processed.

[0119] The model decomposition module is used to decompose the models in the processing queue into sub-models based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, until the processing queue is empty, and output the target sub-model set as the model decomposition result of the workpiece to be printed.

[0120] In this embodiment 2, during the process of sub-model decomposition of the models in the processing queue, a pre-constructed hybrid constraint evaluation function is used to determine the constraints; the pre-constructed hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints and sub-model number constraints.

[0121] It should be noted that all relevant content of each step involved in the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search described in Example 1 can be referenced to the functional description of the corresponding functional module of the five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search in Example 2, and will not be repeated here.

[0122] In this embodiment 2, the division of modules is illustrative and is only a logical functional division. In actual implementation, there may be other division methods. In addition, each functional module in this embodiment 2 can be integrated into a processor, exist as a separate physical entity, or have two or more modules integrated into one module. The integrated module can be implemented in hardware or as a software functional module.

[0123] Example 3 As attached Figure 8 As shown, this embodiment 3 provides an electronic device, including: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search; or, the processor executing the computer program to implement the functions of each module in the above-mentioned five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search.

[0124] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a preset function, the instruction segments describing the execution process of the computer program in the electronic device.

[0125] The electronic device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above are examples of electronic devices and do not constitute a limitation on the electronic device. It may include more components than described above, or combine certain components, or different components. For example, the electronic device may also include a communication interface, input / output devices, network access devices, and a bus.

[0126] The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (OPGs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware models, etc. A general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center of the electronic device, connecting various parts of the electronic device via various communication interfaces and lines.

[0127] The memory can be used to store the computer program and / or module. The processor implements various functions of the electronic device by running or executing the computer program and / or module stored in the memory and by calling the data stored in the memory.

[0128] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.). The data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards, secure digital cards, flash memory cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0129] Example 4 This embodiment 4 also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search.

[0130] If the modules / units of the five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0131] Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search. This can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-mentioned five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or a preset intermediate form, etc.

[0132] The computer-readable storage medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0133] Example 5 This embodiment 5 provides a computer product, which includes a computer program stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium and executes the computer program, so that the electronic device can execute the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search described in embodiment 1, which will not be repeated here.

[0134] It should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods.

[0135] The five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search described in this invention completely reads the mesh data of the 3D model of the workpiece to be printed and performs mesh preprocessing to repair various topological defects. It can stably output closed manifold triangular meshes, providing a complete and undamaged geometric topological foundation for subsequent planar cutting, overhang area calculation, and cross-section surface repair calculations. This avoids the problems of decomposition operation interruption and cutting section topological failure caused by damage to the original model mesh. By sending the preprocessed closed manifold triangular meshes into the processing queue to build a cyclic iterative decomposition architecture, the model block iterative processing is automated, eliminating the need for manual segmentation intervention in the model cutting process and significantly reducing the manual operation cost of decomposing complex workpiece models.

[0136] Secondly, by integrating the Monte Carlo tree search algorithm with a direct planar cutting strategy to complete the iterative decomposition of the model, the traditional V-HACD voxelization discretization mode is abandoned. The planar intersection operation is directly performed on the original triangular mesh, completely eliminating the geometric discretization error caused by voxel resolution and fully preserving the original surface geometric details of the workpiece. In particular, by introducing a hybrid constraint evaluation function that simultaneously includes overhang constraints, surface roughness constraints, and sub-model number constraints throughout the decomposition process, constraint determination is completed. This enables the quantitative and unified evaluation of three core process indicators: five-axis printing supportless forming, printing surface quality, and the number of decomposed sub-models, solving the problem of other process performance degradation caused by single indicator optimization. Through the supportless hard constraint priority determination logic, models that cannot be self-supported are filtered out first and forced into the cutting process, ensuring that all output sub-models can be printed without support on the five-axis equipment, eliminating the defects of waste of support consumables and damage to the workpiece surface when support is removed from the root.

[0137] Furthermore, by employing a four-stage iterative mechanism of Monte Carlo tree search to globally optimize the target cutting plane within the candidate cutting plane space, replacing the traditional single-step greedy cutting plane selection logic, this approach can predict the comprehensive cost of global decomposition after multiple rounds of continuous cutting, avoiding the drawbacks of poor global block division caused by locally optimal cutting schemes. Through a complete direct plane cutting process involving vertex plane signed distance calculation, edge linear interpolation for intersection points, and constrained triangulation for face supplementation, a complete cross-section face supplementation triangular network is automatically generated after cutting, continuously maintaining the closed manifold topology of the sub-mesh, ensuring the normal execution of subsequent printing path planning and device collision detection. A constrained triangulation scheme, constructed with polygon boundary loops and coupled with edge adjacency count verification, effectively avoids cutting cuts. Topological defects such as narrow triangular facets, cracks, overhanging boundaries, and non-manifold edges appear on the surface, improving the topological quality of the mesh after cutting. By using a built-in normalization transformation mechanism in the hybrid constraint evaluation function, the numerical scales of three different dimensional indicators—overhanging area, roughness-weighted area, and number of sub-models—are unified. This prevents the numerical magnitude of a single indicator from being too large and suppressing the evaluation weight of the other two constraints, ensuring that the three process indicators have equal evaluation power in the comprehensive decision-making process. After decomposition, a post-processing merging operation is performed on the sub-model set to merge geometrically similar adjacent sub-models without destroying the support-free and surface quality constraints. This reduces the number of redundant blocks and lowers the computational complexity of workpiece posture switching, assembly, and path planning during five-axis printing.

[0138] The method described in this invention is fully compatible with mainstream 3D printing triangular mesh model inputs such as STL and OBJ, and can adapt to fused deposition modeling five-axis printing processes with different layer thicknesses, nozzle sizes, and surface quality requirements. It can be applied on a large scale to the pre-process model decomposition and planning scenarios of five-axis 3D printing for various workpieces with features such as large overhangs and deep concave cavities, such as aerospace irregular structural parts, medical device complex curved surface parts, and mold cavities.

[0139] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment, but also includes any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention.

Claims

1. A five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search, characterized in that, include: Obtain the 3D model mesh data of the workpiece to be printed; Mesh preprocessing is performed on the 3D model mesh data of the workpiece to be printed to obtain a closed manifold triangular network; The closed manifold triangular mesh is used as the initial model and added to the queue to be processed; Based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, the model in the processing queue is decomposed into sub-models until the processing queue is empty, and the target sub-model set is output as the model decomposition result of the workpiece to be printed. In the process of decomposing the models in the processing queue into sub-models, a pre-built hybrid constraint evaluation function is used to determine the constraints. The pre-built hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints, and sub-model number constraints.

2. The five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search according to claim 1, characterized in that, The process of decomposing the models in the processing queue into sub-models based on the Monte Carlo tree search algorithm and combined with the direct plane cutting strategy is as follows: Select the current model from the queue of pending processes; determine whether the current model satisfies the support-free hard constraint based on the triangular facet normal vectors of the current model and the candidate printing direction; If the current model does not meet the support-free hard constraint, the Monte Carlo tree search algorithm is used to determine the target cutting plane in the candidate cutting plane space; based on the target cutting plane, the current model is directly cut into planes to obtain two sub-models. Add the two sub-models to the queue to be processed; The process of constructing the candidate cutting plane space includes: using an axis-aligned discretization method to restrict the candidate cutting planes to be parallel to the coordinate axes, and sampling at equal intervals in each direction to obtain m equally spaced candidate cutting planes, which serve as the candidate cutting plane space; If the current model satisfies the unsupported hard constraint, then the pre-built hybrid constraint evaluation function is used to determine whether the current model satisfies the unsupported soft constraint; if it does, the current model is added to the result set; if it does not, the current model is added back to the processing queue. The sub-models in the result set are post-processed and merged to output the target sub-model set.

3. The five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search according to claim 2, characterized in that, The process of determining the target cutting plane in the candidate cutting plane space using the Monte Carlo tree search algorithm is as follows: The current decomposition state of the model is used as the node of the search tree, and the candidate cutting plane is used as the action from the parent node to the child node. During the selection phase, starting from the root node of the search tree, the most promising child node is selected for expansion. During the expansion phase, new candidate cutting planes are added as action nodes; In the default simulation phase, the default simulation strategy is used to predict the value of the hybrid constraint evaluation function corresponding to the decomposition along the current candidate cutting plane. During the feedback phase, the values ​​of the corresponding hybrid constraint evaluation functions are updated to the historical revenue values ​​of each node in the path; After the search is completed, select the child node with the highest cumulative return from the root node, and extract the first candidate cutting plane corresponding to the child node as the target cutting plane.

4. The five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search according to claim 2, characterized in that, The process of performing direct planar cutting on the current model based on the target cutting plane is as follows: Calculate the signed distance from each vertex of the current model to the target cutting plane; based on the signed distance, determine the positional relationship between each vertex of the current model and the target cutting plane; If the two endpoints of an edge in the current model are located on both sides of the target cutting plane, then the intersection point of the edge and the target cutting plane is calculated by linear interpolation; Connect all the intersections to form the profile of the cutting section; Perform constrained triangulation on the profile of the cut section to generate a patch triangular network of the cut section, so that the cut sub-mesh maintains a closed manifold structure.

5. The five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search according to claim 4, characterized in that, The process of performing constrained triangulation on the cut section profile is as follows: Construct a polygonal boundary loop from all intersections of the cut section profile; perform triangulation within the cut plane with the polygonal boundary loop as a constraint, and check the topological quality of the patch face by the number of adjacencies of the edges.

6. The five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search according to claim 1, characterized in that, The pre-constructed hybrid constraint evaluation function is as follows: in, The evaluation function is a mixed-constraint function, and the objective is to find its minimum value. For the total set of constraint indicators, These correspond to the overhang constraint, surface roughness constraint, and number of sub-models, respectively. The constraint indicator number; For the first The weighting coefficients corresponding to the constraint indicators; The set of sub-models after decomposition; For the set of sub-models The corresponding number The normalized index value of the constraint indicator; For the set of sub-models The corresponding number The original evaluation value of each constraint indicator; For the first The maximum threshold allowed by the constraint indicator.

7. A five-axis 3D printing model decomposition system based on hybrid constraints and Monte Carlo tree search, characterized in that, The system for implementing the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search as described in any one of claims 1-6 includes: The data acquisition module is used to acquire the 3D model mesh data of the workpiece to be printed; The mesh preprocessing module is used to preprocess the mesh data of the 3D model of the workpiece to be printed, and obtain a closed manifold triangular network. The queue initialization module is used to take the closed manifold triangular mesh as the initial model and add it to the queue to be processed; The model decomposition module is used to decompose the models in the processing queue into sub-models based on the Monte Carlo tree search algorithm and combined with the direct planar cutting strategy, until the processing queue is empty, and output the target sub-model set as the model decomposition result of the workpiece to be printed. In the process of decomposing the models in the processing queue into sub-models, a pre-built hybrid constraint evaluation function is used to determine the constraints. The pre-built hybrid constraint evaluation function introduces overhang constraints, surface roughness constraints, and sub-model number constraints.

8. An electronic device, characterized in that, include: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the five-axis 3D printing model decomposition method based on hybrid constraints and Monte Carlo tree search as described in any one of claims 1-6.