Method and system for predicting additive and subtractive material allowance planning and code generation based on deformation stress

By predicting deformation and residual stress data to optimize the process parameters of high-temperature alloy additive and subtractive manufacturing, identifying out-of-tolerance areas and adjusting cutting parameters accordingly, and generating dynamic machining codes, the problems of inaccurate allowance planning and disconnection between process parameter optimization in existing technologies are solved, thus achieving efficient and precise additive and subtractive composite manufacturing.

CN122363049APending Publication Date: 2026-07-10SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-04-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In existing high-temperature alloy additive and subtractive composite manufacturing, the planning of subtractive allowance lacks precise quantification, the optimization of additive and subtractive process parameters is disconnected from allowance planning, and static machining codes cannot adapt to the stress state and allowance requirements of different areas of the component, resulting in insufficient allowance in stress concentration areas or excessive allowance in flat areas, material waste and reduced processing efficiency, and large fluctuations in manufacturing accuracy.

Method used

By predicting deformation and residual stress data, the process parameters and machining paths for adding or subtracting materials are dynamically optimized, out-of-tolerance areas are identified, cutting parameters are adjusted differentially, and dynamic machining codes adapted to the characteristics of the areas are generated, thereby achieving the minimization of component deformation and residual stress and improving machining accuracy.

Benefits of technology

This has improved the precision and performance of high-temperature alloy components, significantly reduced processing difficulty and risk, improved manufacturing efficiency and quality, enhanced the linkage between additive and subtractive manufacturing processes, and ensured that the dimensional accuracy and mechanical properties of the components meet the requirements of engineering applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363049A_ABST
    Figure CN122363049A_ABST
Patent Text Reader

Abstract

This invention relates to the field of high-temperature alloy additive and subtractive manufacturing technology, and more specifically to a method and system for additive and subtractive manufacturing allowance planning and code generation based on deformation stress prediction. The method includes the following steps: S1, acquiring deformation distribution data, key point deformation data, residual stress distribution data, and residual stress layer thickness data of the component during high-temperature alloy additive manufacturing; S2, setting an accuracy threshold to identify out-of-tolerance areas, and determining the removal allowance based on the stress layer thickness; S3, establishing an optimization model to minimize deformation and stress layer thickness, and solving for the dynamic sequence of additive parameters in the height direction; S4, generating a basic subtractive manufacturing path, adjusting cutting parameters, and achieving a smooth transition; S5, implementing additive and subtractive manufacturing based on the dynamic sequence and code. This invention achieves minimized control of component deformation and residual stress, and improves processing accuracy and performance by predicting deformation and residual stress data and dynamically optimizing additive and subtractive manufacturing process parameters and processing paths.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of high-temperature alloy additive and subtractive composite manufacturing technology, and more specifically to a method and system for planning and generating codes for additive and subtractive material allowances based on deformation stress prediction. Background Technology

[0002] Currently, in the field of high-temperature alloy additive and subtractive manufacturing, the technology for subtraction allowance planning and machining code generation mainly relies on experience-based planning and static code generation. Subtraction allowance planning primarily sets a fixed removal thickness based on industry-standard experience, without considering the deformation and residual stress distribution characteristics generated during the additive manufacturing process. It only relies on a single dimensional deviation to roughly define the machining area. Additive and subtractive process parameter optimization and allowance planning are independent of each other. Adjustments to process parameters during the additive manufacturing stage do not consider the difficulty of removing the subsequent subtraction allowance, and the subtraction stage does not adapt machining strategies to changes in the additive manufacturing process. Machining code generation relies on computer-aided manufacturing software to output CNC machining codes with fixed parameters. Core parameters such as cutting speed and feed rate remain consistent throughout the entire process, lacking dynamic adjustments for the stress state and allowance thickness in different areas of the component.

[0003] The existing technology system is limited to local optimization of a single link and has not yet formed a linkage mechanism of "deformation and stress prediction, margin planning, process optimization, code generation and manufacturing verification", lacking a whole-process collaborative control approach.

[0004] Existing technologies lack precise quantitative basis for subtractive manufacturing allowance planning. Fixed allowance settings can easily lead to insufficient allowance in stress concentration areas, incomplete elimination of residual stress, or excessive allowance in flat areas, resulting in material waste and reduced processing efficiency. The disconnect between additive and subtractive manufacturing process parameter optimization and allowance planning prevents the deformation control effect in the additive stage from being effectively translated into accuracy improvement in the subtractive stage, resulting in insufficient overall manufacturing process coordination. Static machining codes cannot adapt to the mechanical properties and allowance requirements of different areas of the component. Using conventional cutting parameters in stress concentration areas can easily induce machining cracks, while using fixed parameters in flat areas limits the improvement of processing efficiency. Furthermore, existing technologies lack a feedback verification mechanism for manufacturing results, making it impossible to adjust allowance planning and process parameters based on actual forming quality. This leads to large fluctuations in manufacturing accuracy, making it difficult to meet the high-precision manufacturing requirements of high-temperature alloy core components. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for planning and generating codes for material addition and subtraction margins based on deformation stress prediction. By predicting deformation and residual stress data and dynamically optimizing the process parameters and processing paths for material addition and subtraction, the invention aims to minimize the control of component deformation and residual stress and improve processing accuracy and performance.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for planning and generating code for material addition and subtraction allowances based on deformation stress prediction includes the following steps: S1. Obtain deformation and residual stress prediction data of components during high-temperature alloy additive manufacturing; wherein, the deformation and residual stress prediction data include: deformation distribution data, key point deformation data, residual stress distribution data and residual stress layer thickness data; S2. Use deformation distribution data to set deformation accuracy threshold, identify out-of-tolerance areas and define processing area boundaries; use residual stress layer thickness data to classify residual stress layers and determine the removal layer thickness of each processing area. S3. Establish an optimization model with the goal of minimizing the maximum deformation and the thickness of the residual stress layer, and use an improved particle swarm optimization algorithm to solve the optimization model to obtain a dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component. S4. Generate a basic subtractive machining path based on the planned machining area, adjust the cutting parameters according to the differences in stress characteristics and removal layer thickness of each machining area, use piecewise linear interpolation to achieve smooth transition of cutting parameters, and generate dynamic machining code that adapts to the characteristics of the area. S5. Perform additive manufacturing according to the dynamic sequence of additive process parameters and perform subtractive processing according to the dynamic processing code to complete the closed-loop verification of component accuracy and performance.

[0007] Furthermore, in step S2, the process of identifying the out-of-tolerance region and defining the boundary of the processing region specifically involves: The components in the high-temperature alloy additive manufacturing process are divided into regions, and a deformation accuracy threshold is set. Using the deformation accuracy threshold as the criterion, the out-of-tolerance area is identified by combining deformation distribution data, the range and priority of the out-of-tolerance area are determined, and the processing area boundary is defined by combining the nominal size of the component.

[0008] Furthermore, in S2, the method for determining the thickness of the removed layer in each processing area is as follows: Based on the thickness characteristics of the residual stress layer, it is classified, and differentiated removal thickness rules are formulated for different types of stress layers, with increased removal thickness in stress concentration areas.

[0009] Furthermore, S3, the process of obtaining the dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component, specifically includes: The initial particle swarm is generated using a chaotic initialization method; In the later stages of algorithm iteration, a mutation strategy is introduced, incorporating the deformation stress prediction model as a surrogate model into the optimization loop, calculating particle fitness, and obtaining a dynamic sequence of process parameters segmented along the component height direction.

[0010] Furthermore, S4, the process of adjusting the cutting parameters according to the differences in stress characteristics and removed layer thickness in each processing area, specifically includes: For areas of stress concentration, use low cutting speed and small feed rate; For flat areas, use high cutting speed and large feed rate.

[0011] Furthermore, S4, the dynamic processing code generation process includes: A code synthesizer is developed based on a programming language to parse the basic path and optimization parameters, generate dynamic machining code that conforms to the CNC system protocol, and verify the rationality and non-interference of the code.

[0012] Furthermore, the closed-loop verification process, S5, includes: Using a 3D scanner to inspect the dimensional accuracy of components; The residual stress level was detected using an X-ray diffraction residual stress analyzer. The mechanical properties of components are tested using a tensile testing machine; The detected dimensional accuracy, residual stress level, and mechanical properties are used as feedback to adjust the material reduction allowance planning and process parameter optimization of subsequent components.

[0013] This invention also provides a system for planning and generating code for adding or subtracting material allowances based on deformation stress prediction, used to implement the above-mentioned method for planning and generating code for adding or subtracting material allowances based on deformation stress prediction, including: The deformation and stress prediction data acquisition module is used to acquire deformation and residual stress prediction data of components during high-temperature alloy additive manufacturing. The deformation and residual stress prediction data includes: deformation distribution data, key point deformation data, residual stress distribution data, and residual stress layer thickness data. The subtraction allowance planning module is used to set deformation accuracy thresholds using deformation distribution data, identify out-of-tolerance areas and define processing area boundaries; it also uses residual stress layer thickness data to classify residual stress layers and determine the removal layer thickness for each processing area. The additive manufacturing process parameter optimization module is used to establish an optimization model with the goal of minimizing the maximum deformation and the thickness of the residual stress layer, and to solve the optimization model using an improved particle swarm optimization algorithm to obtain a dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component. The dynamic machining code generation module is used to generate a basic subtractive machining path based on the planned machining area. It adjusts the cutting parameters according to the differences in stress characteristics and removal layer thickness in each machining area, and uses piecewise linear interpolation to achieve a smooth transition of cutting parameters, generating dynamic machining code that adapts to the characteristics of the area. The manufacturing execution and closed-loop verification module is used to perform additive manufacturing based on the dynamic sequence of additive process parameters, perform subtractive processing based on the dynamic processing code, and complete the closed-loop verification of component accuracy and performance.

[0014] The present invention also provides an electronic device, the electronic device including a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement a method for planning and generating code for adding or subtracting material allowances based on deformation stress prediction.

[0015] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for planning and generating code for adding or subtracting material allowances based on deformation stress prediction.

[0016] According to specific embodiments provided by the present invention, the present invention has the following technical effects compared to the prior art: This invention achieves scientific prediction of the state of additively manufactured components by acquiring deformation and residual stress prediction data of high-temperature alloy components, breaking the limitations of traditional processes that rely on experience and trial and error. By setting accuracy thresholds to identify out-of-tolerance areas and classifying and determining the removal allowance based on the thickness of the residual stress layer, it achieves precise definition of the processing area and directional material removal, effectively avoiding under-processing or over-cutting problems. In particular, by establishing an optimized model to solve the dynamic sequence of additive process parameters, it can suppress deformation accumulation and residual stress concentration from the source, significantly reducing the difficulty and risk of subsequent subtractive processing. At the same time, by adjusting the cutting parameters according to the regional stress characteristics and the difference in allowance thickness and using piecewise linear interpolation to achieve a smooth transition, it effectively solves the problems of processing deformation and surface quality fluctuations caused by stress release. Finally, through the coordinated implementation of additive and subtractive processes and closed-loop verification, it achieves a dual improvement in component manufacturing accuracy and mechanical properties, significantly improving the efficiency, quality, and reliability of additive and subtractive composite manufacturing of complex high-temperature alloy components. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] The following description, in conjunction with the accompanying drawings, further illustrates the present invention's method and system for planning and generating code for material addition and subtraction margins based on deformation stress prediction. Figure 1 This is a schematic diagram of the overall process of the method for planning and generating code for adding or subtracting materials based on deformation stress prediction in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the process for adjusting cutting parameters in Embodiment 1 of the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0020] To better understand the purpose, structure, and function of this invention, the invention will be described in further detail below with reference to the accompanying drawings.

[0021] Example 1 like Figure 1 As shown, this invention provides a method for planning and generating code for material addition / reduction allowances based on deformation stress prediction, comprising the following steps: S1. Obtain deformation and residual stress prediction data of components during high-temperature alloy additive manufacturing; wherein, the deformation and residual stress prediction data include: deformation distribution data, key point deformation data, residual stress distribution data and residual stress layer thickness data; S2. Use deformation distribution data to set deformation accuracy threshold, identify out-of-tolerance areas and define processing area boundaries; use residual stress layer thickness data to classify residual stress layers and determine the removal layer thickness of each processing area. In step S2, the process of identifying out-of-tolerance areas and defining the boundaries of the processing area is as follows: The processing area of ​​the component in the high-temperature alloy additive manufacturing process is divided, and a deformation accuracy threshold is set. Based on deformation distribution, identify out-of-tolerance areas, determine the range and priority of out-of-tolerance areas, and define the processing area boundary in combination with the nominal size of the component.

[0022] In step S2, the method for determining the thickness of the removed layer in each processing area is as follows: Based on the thickness characteristics of the residual stress layer, it is classified, and differentiated removal thickness rules are formulated for different types of stress layers, with increased removal thickness in stress concentration areas.

[0023] This embodiment specifically involves: First, inputting deformation and residual stress prediction data to obtain data on the deformation distribution, key point deformation, residual stress distribution, and residual stress layer thickness of the component during high-temperature alloy additive manufacturing, serving as the core basis for allowance planning. Entering the subtractive manufacturing allowance planning stage, the processing area is first divided, a deformation accuracy threshold is set, and out-of-tolerance areas are identified based on the deformation distribution. The range and priority of these out-of-tolerance areas are determined, and the processing area boundary is defined in conjunction with the nominal dimensions of the component to ensure no processing omissions. Next, the removal layer thickness is determined, and the residual stress layer is classified according to its thickness characteristics. Differentiated removal thickness rules are formulated for different types of stress layers, with appropriate increases in removal thickness in stress concentration areas to balance the residual stress removal effect and material utilization.

[0024] S3. Establish an optimization model with the goal of minimizing the maximum deformation and the thickness of the residual stress layer, and use an improved particle swarm optimization algorithm to solve the optimization model to obtain a dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component. Specifically, this embodiment involves: taking the minimum deformation and the most uniform residual stress distribution as the core optimization objectives, optimizing laser power, scanning speed, powder feeding rate, etc., and using part model, equipment operation, and material forming threshold as constraints, conducting adaptive improvement particle swarm optimization for global optimization of additive manufacturing process parameters, relying on a trained shape prediction network, and iteratively finding the additive manufacturing process sequence with the best part shape performance.

[0025] S3, the process of obtaining the dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component, specifically includes: The initial particle swarm is generated using a chaotic initialization method; In the later stages of algorithm iteration, a mutation strategy is introduced, incorporating the deformation stress prediction model as a surrogate model into the optimization loop, calculating particle fitness, and obtaining a dynamic sequence of process parameters segmented along the component height direction.

[0026] This embodiment specifically involves: performing multi-objective optimization of additive manufacturing process parameters; establishing an optimization model with the objectives of minimizing the maximum deformation and residual stress layer thickness; determining laser power, scanning speed, and powder feeding rate as decision variables; and setting constraints related to process, forming quality, and processing efficiency. An improved particle swarm optimization algorithm is used to solve the optimization model. Chaotic initialization enhances particle diversity, and a late-stage mutation strategy is introduced to avoid local optima. A deformation stress prediction model is embedded as a surrogate model in the optimization loop to quickly calculate particle fitness and obtain a segmented dynamic sequence of process parameters along the component height direction.

[0027] S4. Generate a basic subtractive machining path based on the planned machining area, adjust the cutting parameters according to the stress characteristics and allowance thickness differences of each machining area, use piecewise linear interpolation to achieve smooth parameter transition, and generate dynamic machining code that adapts to the characteristics of the area. This embodiment specifically involves: conducting research on dynamic planning of subtractive machining allowance driven by both deformation and stress. Based on the deformation deviation areas, deviation amounts, and residual stress layer thickness distribution predicted by a deep learning model, a dual-driven subtractive machining allowance planning model is established. For deformation deviation areas, a geometric offset algorithm is used to accurately offset along the component normal, defining the precise range of subtractive machining and avoiding invalid machining. For the residual stress layer, it is divided into different levels according to stress magnitude, establishing a quantitative mapping relationship between stress level and minimum removal thickness to determine the precise removal amount for different areas, avoiding secondary deformation caused by residual stress release. Simultaneously, UG software is used to complete the allowance planning. 3D visualization modeling provides an accurate geometric model for subsequent subtractive machining. Then, a dynamic G-code generation module for subtractive machining is developed. Based on the optimized 3D model of the subtractive allowance planning, a dynamic G-code generation module adapted to additive-subtractive composite manufacturing is developed. Specifically, it parses the 3D geometric offset data of the allowance planning, automatically plans the tool path, machining step distance, and tool movement mode for subtractive machining, reserves an interface for embedding cutting process parameters, and completes the automated generation of CNC machining instructions. Simultaneously, a compatible interface with mainstream CAM software is developed to realize G-code generation, machining simulation verification, and export, forming an automated conversion chain from allowance planning to machining instructions.

[0028] S4, the process of adjusting cutting parameters according to the differences in stress characteristics and removed layer thickness in each processing area, specifically includes: For areas of stress concentration, use low cutting speed and small feed rate; For flat areas, use high cutting speed and large feed rate.

[0029] like Figure 2As shown, this embodiment specifically involves: First, conducting cutting process optimization research under different residual stress states. Based on the prediction and measurement results of residual stress distribution in additive components, an orthogonal experimental scheme is designed to conduct cutting experiments under different residual stress gradients. This reveals the influence of residual stress release on cutting force, tool wear, machining deformation, and surface integrity. Response surface methodology is used to optimize core cutting parameters such as cutting speed, feed rate, depth of cut, and radial depth of cut. A quantitative mapping model of "residual stress level - cutting parameters - machining quality" is established to form a cutting process scheme adapted to different residual stress states, suppressing secondary deformation and machining defects during the cutting process. Then, conducting cutting process optimization research considering the surface quality after additive manufacturing. Addressing the inherent characteristics of high surface roughness, unfused particles, and step effects in additively formed components, the influence of the initial surface state on the cutting process, tool life, and final machining quality is analyzed. Tool geometry parameters, cutting paths, cooling and lubrication methods, and rough-finish cutting operation allocation are optimized. A multi-objective optimization model of "initial surface roughness - cutting process parameters - final machined surface integrity" is established to achieve efficient processing from rough to fine surfaces. First, high-quality machining is achieved. Second, a cutting database for additive-subtractive composite manufacturing is constructed, integrating cutting experimental data and optimal process schemes under different residual stress states and different additive surface characteristics. A dedicated database containing core fields such as material properties, residual stress level, initial surface state, cutting process parameters, cutting force, tool life, and machined surface quality is built. At the same time, an intelligent query and parameter recommendation interface for the database is developed to achieve docking with the dynamic G-code generation module. The optimal cutting parameters can be automatically matched according to the margin planning results and component characteristics, forming a closed loop of the entire process of "margin planning - process recommendation - code generation". Finally, full-process experimental verification and model iterative optimization are carried out. Nickel-based superalloys are selected as experimental materials to conduct full-process experiments of DED additive-subtractive composite manufacturing of typical components. The full-process simulation prediction results, theoretical planning schemes and experimentally measured dimensional accuracy, residual stress, and surface quality data are compared to verify the effectiveness and engineering applicability of the prediction model, margin planning method and cutting process scheme proposed in this invention. Based on experimental data, the full-link model, algorithm and process scheme are iteratively optimized, and finally, high-precision and high-stability control of metal component additive-subtractive composite manufacturing is achieved.

[0030] The generation process of the dynamic processing code in S4 includes: A code synthesizer is developed based on a programming language to parse the basic path and optimization parameters, generate dynamic machining code that conforms to the CNC system protocol, and verify the rationality and non-interference of the code through dedicated software.

[0031] This embodiment specifically involves: generating dynamic machining code; using computer-aided manufacturing software to generate a basic subtractive machining path based on the planned machining area; embedding the optimized process parameter sequence into the basic path; and adjusting parameters such as cutting speed and feed rate according to the stress characteristics and allowance thickness of the machining area, using low cutting speed and small feed rate in stress concentration areas and high cutting speed and large feed rate in flat areas. A piecewise linear interpolation method is used to achieve a continuous transition of process parameters between adjacent areas, avoiding machining vibrations caused by abrupt parameter changes. A code synthesizer is developed based on a programming language to parse the basic path and optimized parameters, generate dynamic machining code that conforms to the CNC system protocol, and verify the rationality and non-interference nature of the code using dedicated software.

[0032] S5. Perform additive manufacturing according to the dynamic sequence of additive process parameters, perform subtractive processing according to the dynamic processing code, and complete the closed-loop verification of component accuracy and performance.

[0033] The S5 detection and verification process includes: Using a 3D scanner to inspect the dimensional accuracy of components; The residual stress level was detected using an X-ray diffraction residual stress analyzer. The mechanical properties of components are tested using a tensile testing machine; The detected dimensional accuracy, residual stress level, and mechanical properties are used as feedback to adjust the material reduction allowance planning and process parameter optimization of subsequent components.

[0034] This embodiment specifically involves: implementing and verifying additive and subtractive manufacturing processes; performing additive manufacturing of high-temperature alloy components according to an optimized dynamic sequence of process parameters; and carrying out subtractive machining based on the generated dynamic machining code. After machining, the dimensional accuracy of the components is checked using a 3D scanner, the residual stress level is detected using an X-ray diffractometer, and the mechanical properties are tested using a tensile testing machine. This verifies the effectiveness of the allowance planning and machining code generation method, ensuring that the dimensional accuracy, residual stress level, and mechanical properties of the components all meet engineering application standards.

[0035] The hardware equipment in this invention encompasses laser-directed energy deposition additive manufacturing equipment, a five-axis machining center subtractive manufacturing equipment, a 3D scanner, an X-ray diffractometer for residual stress analysis, a tensile testing machine, and high-performance computing equipment. The computing equipment must support efficient computation for algorithm optimization and code generation, while the testing equipment must meet the requirements for high-precision dimensional and mechanical property testing. The software tools include computer-aided manufacturing software, algorithm simulation software, a programming language environment, and CNC code verification software, satisfying the entire process requirements of path generation, process optimization, code synthesis, and verification. High-temperature alloy powder and substrates are used as experimental materials to ensure material compatibility and forming stability during the additive manufacturing process.

[0036] The core innovation of this invention lies in constructing a subtractive manufacturing allowance planning system based on both deformation and residual stress indicators, breaking through the traditional experience-based planning model and achieving precise quantitative delineation of the processing area and the thickness to be removed. It innovatively establishes a dynamic optimization linkage mechanism for additive and subtractive manufacturing process parameters, integrating deformation and stress prediction results into the additive manufacturing process parameter optimization process to achieve coordinated control of additive manufacturing and subtractive manufacturing allowances. It innovatively designs a dynamic processing code generation method adapted to the characteristics of the component region, solving the problem of uneven processing quality in static codes through smooth parameter transitions and differentiated adjustments. Finally, it innovatively forms a closed-loop control system for the entire additive and subtractive composite manufacturing process, encompassing "prediction-planning-optimization-processing-verification," achieving precise control of the manufacturing process.

[0037] In terms of technological advantages, the accuracy of margin planning is significantly improved, the residual stress removal rate is significantly increased, material waste is reduced, and component dimensional accuracy is controlled within a lower range. The linkage between additive and subtractive manufacturing processes is enhanced, with additive process optimization directly contributing to improved subtractive precision, resulting in a significant improvement in overall manufacturing efficiency. Dynamic machining codes adapt to the mechanical properties of different regions, reducing the incidence of defects such as cracks during machining and improving the surface quality and mechanical property stability of components. The closed-loop control system throughout the entire process makes manufacturing precision fluctuations controllable, adapting to the manufacturing needs of high-temperature alloy components of different specifications, and demonstrating significant engineering application value.

[0038] The core protection and emphasis of this invention includes a material reduction allowance planning method based on the dual indicators of deformation and residual stress, specifically: dividing the processing area according to the deformation threshold and determining the quantitative rules for the removal thickness based on the stress layer classification; The core of the improved particle swarm optimization algorithm for dynamic optimization of additive manufacturing process parameters is the algorithm improvement of chaotic initialization and late mutation strategies, as well as the embedding of the deformation stress prediction model as a surrogate model. The dynamic machining code generation technology based on regional characteristics focuses on the embedding method of differentiated cutting parameters and the parameter smooth transition mechanism achieved by piecewise linear interpolation. The closed-loop control mechanism for the entire process of additive and subtractive composite manufacturing covers the data feedback and adjustment logic of the entire process from deformation stress prediction to manufacturing result verification, ensuring a dual improvement in manufacturing accuracy and efficiency.

[0039] This invention solves the following four core technical problems in the prior art: (1) To solve the problem of blind planning of material reduction allowance, the processing area and the thickness to be removed are accurately defined based on the dual indicators of deformation and residual stress, thereby improving the scientificity and adaptability of allowance planning; (2) To solve the problem of insufficient linkage between additive and subtractive manufacturing processes, establish a linkage mechanism between process parameter optimization and margin planning, and realize the dynamic adjustment of additive manufacturing process parameters to adapt to subtractive manufacturing requirements. (3) Solve the problem of static processing code, generate dynamic processing code that adapts to the characteristics of different areas of the component, and balance processing quality and efficiency; (4) To solve the problem of missing closed-loop control in the entire manufacturing process, we will build an integrated system of "prediction-planning-optimization-processing-verification" to ensure that the dimensional accuracy and mechanical properties of high-temperature alloy additive and subtractive composite manufacturing meet the requirements of engineering applications.

[0040] Example 2 The present invention also provides a system for implementing the method for planning and generating code for adding or subtracting materials based on deformation stress prediction in Embodiment 1, comprising: The deformation and stress prediction data acquisition module is used to acquire deformation and residual stress prediction data of components during high-temperature alloy additive manufacturing. The deformation and residual stress prediction data includes: deformation distribution data, key point deformation data, residual stress distribution data, and residual stress layer thickness data. The subtraction allowance planning module is used to set deformation accuracy thresholds using deformation distribution data, identify out-of-tolerance areas and define processing area boundaries; it also uses residual stress layer thickness data to classify residual stress layers and determine the removal layer thickness for each processing area. The additive manufacturing process parameter optimization module is used to establish an optimization model with the goal of minimizing the maximum deformation and the thickness of the residual stress layer, and to solve the optimization model using an improved particle swarm optimization algorithm to obtain a dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component. The dynamic machining code generation module is used to generate a basic subtractive machining path based on the planned machining area. It adjusts the cutting parameters according to the stress characteristics and allowance thickness differences of each machining area, and uses piecewise linear interpolation to achieve smooth parameter transition, generating dynamic machining code that adapts to the characteristics of the area. The manufacturing execution and closed-loop verification module is used to perform additive manufacturing based on the dynamic sequence of additive process parameters, perform subtractive processing based on the dynamic processing code, and complete the closed-loop verification of component accuracy and performance.

[0041] The present invention also provides an electronic device, which includes a processor and a memory. The processor is used to execute a computer program stored in the memory to implement the method for planning and generating code for adding or subtracting material based on deformation stress prediction in Embodiment 1.

[0042] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for planning and generating additional or subtractive material allowances based on deformation stress prediction in Embodiment 1.

[0043] The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for planning and generating code for adding or subtracting materials based on deformation stress prediction, characterized in that, Includes the following steps: S1. Obtain deformation and residual stress prediction data of components during high-temperature alloy additive manufacturing; wherein, the deformation and residual stress prediction data include: deformation distribution data, key point deformation data, residual stress distribution data and residual stress layer thickness data; S2. Use deformation distribution data to set deformation accuracy threshold, identify out-of-tolerance areas and define processing area boundaries; use residual stress layer thickness data to classify residual stress layers and determine the removal layer thickness of each processing area. S3. Establish an optimization model with the goal of minimizing the maximum deformation and the thickness of the residual stress layer, and use an improved particle swarm optimization algorithm to solve the optimization model to obtain a dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component. S4. Generate a basic subtractive machining path based on the planned machining area, adjust the cutting parameters according to the differences in stress characteristics and removal layer thickness of each machining area, use piecewise linear interpolation to achieve smooth transition of cutting parameters, and generate dynamic machining code that adapts to the characteristics of the area. S5. Perform additive manufacturing according to the dynamic sequence of additive process parameters and perform subtractive processing according to the dynamic processing code to complete the closed-loop verification of component accuracy and performance.

2. The method for planning and generating code for adding or subtracting materials based on deformation stress prediction according to claim 1, characterized in that, In step S2, the process of identifying out-of-tolerance areas and defining the boundaries of the processing area is as follows: The components in the high-temperature alloy additive manufacturing process are divided into regions, and a deformation accuracy threshold is set. Using the deformation accuracy threshold as the criterion, the out-of-tolerance area is identified by combining deformation distribution data, the range and priority of the out-of-tolerance area are determined, and the processing area boundary is defined by combining the nominal size of the component.

3. The method for planning and generating code for adding or subtracting materials based on deformation stress prediction according to claim 1, characterized in that, In step S2, the method for determining the thickness of the removed layer in each processing area is as follows: Based on the thickness characteristics of the residual stress layer, it is classified, and differentiated removal thickness rules are formulated for different types of stress layers, with increased removal thickness in stress concentration areas.

4. The method for planning and generating code for adding or subtracting materials based on deformation stress prediction according to claim 1, characterized in that, S3, the process of obtaining the dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component, specifically includes: The initial particle swarm is generated using a chaotic initialization method; In the later stages of algorithm iteration, a mutation strategy is introduced, incorporating the deformation stress prediction model as a surrogate model into the optimization loop, calculating particle fitness, and obtaining a dynamic sequence of process parameters segmented along the component height direction.

5. The method for planning and generating code for adding or subtracting materials based on deformation stress prediction according to claim 1, characterized in that, S4, the process of adjusting cutting parameters according to the differences in stress characteristics and removed layer thickness in each processing area, specifically includes: For areas of stress concentration, use low cutting speed and small feed rate; For flat areas, use high cutting speed and large feed rate.

6. The method for planning and generating code for adding or subtracting materials based on deformation stress prediction according to claim 1, characterized in that, The generation process of the dynamic processing code in S4 includes: A code synthesizer is developed based on a programming language to parse the basic path and optimization parameters, generate dynamic machining code that conforms to the CNC system protocol, and verify the rationality and non-interference of the code.

7. The method for planning and generating code for adding or subtracting materials based on deformation stress prediction according to claim 1, characterized in that, The closed-loop verification process, S5, includes: Using a 3D scanner to inspect the dimensional accuracy of components; The residual stress level was detected using an X-ray diffraction residual stress analyzer. The mechanical properties of components are tested using a tensile testing machine; The detected dimensional accuracy, residual stress level, and mechanical properties are used as feedback to adjust the material reduction allowance planning and process parameter optimization of subsequent components.

8. A system for planning and generating code for adding or subtracting material allowances based on deformation stress prediction, used to implement the method for planning and generating code for adding or subtracting material allowances based on deformation stress prediction as described in any one of claims 1-7, characterized in that, include: The deformation and stress prediction data acquisition module is used to acquire deformation and residual stress prediction data of components during high-temperature alloy additive manufacturing. The deformation and residual stress prediction data includes: deformation distribution data, key point deformation data, residual stress distribution data, and residual stress layer thickness data. The subtraction allowance planning module is used to set deformation accuracy thresholds using deformation distribution data, identify out-of-tolerance areas and define processing area boundaries; it also uses residual stress layer thickness data to classify residual stress layers and determine the removal layer thickness for each processing area. The additive manufacturing process parameter optimization module is used to establish an optimization model with the goal of minimizing the maximum deformation and the thickness of the residual stress layer, and to solve the optimization model using an improved particle swarm optimization algorithm to obtain a dynamic sequence of additive manufacturing process parameters segmented along the height direction of the component. The dynamic machining code generation module is used to generate a basic subtractive machining path based on the planned machining area. It adjusts the cutting parameters according to the differences in stress characteristics and removal layer thickness in each machining area, and uses piecewise linear interpolation to achieve a smooth transition of cutting parameters, generating dynamic machining code that adapts to the characteristics of the area. The manufacturing execution and closed-loop verification module is used to perform additive manufacturing based on the dynamic sequence of additive process parameters, perform subtractive processing based on the dynamic processing code, and complete the closed-loop verification of component accuracy and performance.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the method for planning and generating additional or subtractive material allowances based on deformation stress prediction as described in any one of claims 1-7.

10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the method for planning and generating code based on deformation stress prediction for adding or subtracting material allowances as described in any one of claims 1-7.