Additive manufacturing layer height control method, electronic device, and storage medium
By subdividing the layer layers and rounding the measured layer height, the problem of layer height error in laser metal deposition was solved, and the forming accuracy and system stability were improved without modifying the motion code.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU UNIV
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, there is a significant deviation between the measured layer height and the predicted layer height during laser metal deposition, resulting in low forming accuracy and the inability to correct the loaded motion code online, which affects the forming quality.
By decoupling the predicted layer height from the slice thickness, a slice thickness smaller than the predicted layer height is used for subdivision and layering, generating a large number of motion codes. After each layer is deposited, the ratio of the measured layer height to the slice thickness is rounded to skip the number of slice layers that need to be skipped, thus achieving accurate tracking of the measured layer height while maintaining the stability of the control system.
Without modifying the motion code, it effectively reduces layer height error, improves forming accuracy, and ensures system stability and forming quality.
Smart Images

Figure CN122164915A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of feed-type additive manufacturing technology, and in particular to an additive manufacturing layer height control method, electronic device and storage medium. Background Technology
[0002] Additive manufacturing (also known as 3D printing) is a manufacturing technology that constructs three-dimensional entities by depositing materials layer by layer based on the discrete-stacking principle. Feed-based additive manufacturing, as an important branch, specifically refers to the process where raw materials are simultaneously transported to the energy beam's action area via a specialized nozzle or feeder, melting and depositing them layer by layer to form the desired shape. Laser metal deposition is a typical example of feed-based additive manufacturing. It uses a laser as a heat source to melt synchronously transported metal powder / filament, depositing it layer by layer onto a substrate. It is widely used due to its advantages such as rapid cooling, dense structure, and excellent mechanical properties.
[0003] The typical process flow for laser metal deposition is as follows: First, in the 3D model slicing software, the predicted layer height is set as the slice thickness, and the 3D model is sliced to generate the scanning path corresponding to each slice layer. Then, the scanning path corresponding to each slice layer is compiled into motion code adapted to the processing equipment and imported into the corresponding equipment. The processing equipment can be a three-axis / five-axis CNC machine tool, a multi-axis robot supporting variable orientation processing, etc. For CNC machine tools, G-code is generated; for KUKA robots, KRL language code is generated. During processing, the processing equipment executes the motion code corresponding to each slice layer in a preset order. After completing a single layer deposition, the nozzle is raised a distance corresponding to the predicted layer height, and then the deposition of the next layer begins.
[0004] Because laser metal deposition is a multiphase coupling process involving light, powder, gas, and water, the molten pool environment is complex. Factors such as powder material, substrate size, part shape, and ambient temperature directly affect the molten pool size and temperature, leading to uncertainty in the measured layer height. This often results in a significant deviation from the predicted layer height. If this deviation is not corrected in time, it will directly affect the photo-powder coupling and defocusing distance of subsequent layers, thus affecting the forming accuracy and even causing forming failure. However, a fundamental engineering limitation lies in the fact that the motion code used to control the nozzle movement contains axial displacement commands that are fixed and cannot be modified online after generation. This is determined by the core architecture of the CNC system designed to ensure motion stability, real-time performance, and reliability. Therefore, even if the measured layer height feedback is obtained, it is impossible to directly correct the absolute height of the layer corresponding to the nozzle's operation in the loaded motion code, making it difficult to effectively apply the measured layer height in motion code-based layer height control systems. Summary of the Invention
[0005] In view of this, it is necessary to provide an additive manufacturing layer height control method, electronic device and storage medium to solve the technical problem in the prior art that it is difficult to correct the error between the measured layer height and the predicted layer height without modifying the motion code, resulting in low forming accuracy.
[0006] To address the aforementioned problems, firstly, this application provides a method for controlling the layer height in additive manufacturing, comprising: S201. Based on the preset slice thickness, slice the workpiece model to be processed, generate motion code corresponding to several slice layers, and take the first slice layer as the current slice layer, wherein the slice thickness is less than the predicted layer height. S202. After executing the motion code of the current slice layer to complete the deposition of the current layer, obtain the measured layer height of the current layer. S203. The ratio of the measured layer height to the slice thickness is rounded to determine the number of slice layers to be skipped. S204. Add the layer number of the current slice layer to the number of slice layers to be skipped to obtain the updated layer number of the current slice layer, and return to step S202 until the updated layer number of the current slice layer exceeds the total number of layers of the workpiece model to be processed.
[0007] In one implementation, the slice thickness is obtained by dividing the predicted layer height by a preset positive integer greater than 1.
[0008] In one embodiment, the slice thickness is not less than the minimum resolution of the layer height measurement sensor used to measure the measured layer height.
[0009] In one embodiment, the slice thickness is the minimum resolution of the layer height measurement sensor used to measure the measured layer height.
[0010] In one implementation, the ratio of the measured layer height to the slice thickness is rounded to determine the number of slice layers to be skipped, including: The ratio of the measured layer height to the slice thickness is rounded to the nearest integer to obtain the number of slice layers that need to be skipped.
[0011] In one implementation, the ratio of the measured layer height to the slice thickness is rounded to the nearest integer to obtain the number of slice layers to be skipped, including: Calculate the ratio of the measured layer height to the slice thickness; Add the ratio to 0.5 to obtain the intermediate value; The intermediate value is rounded down to obtain the number of slice layers that need to be skipped.
[0012] In one embodiment, the measured floor height is obtained by detection using a laser displacement sensor or a CCD camera.
[0013] In one implementation, the motion code is G-code.
[0014] Secondly, this application also provides an electronic device, including a memory and a processor; The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps of the additive manufacturing layer height control method described above.
[0015] Thirdly, this application also provides a computer-readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the additive manufacturing layer height control method described above.
[0016] The beneficial effects of this application are as follows: The additive manufacturing layer height control method provided by this application decouples the predicted layer height from the slice thickness. It uses a small layer height, much smaller than the predicted layer height, as the slice thickness. The model of the workpiece to be processed is subdivided and layered to generate motion codes covering the entire forming height of the workpiece and a large number of layers. During processing, after each layer is deposited, the number of slice layers to be skipped corresponding to the actual growth is calculated based on the ratio of the measured layer height to the slice thickness. The control system then skips the motion codes of the number of slice layers to be skipped and starts executing the next layer deposition from the motion codes after the skipped layers. No matter how the measured layer height fluctuates, it can always quantize the measured layer height to the closest integer multiple of the slice thickness. By selectively executing the pre-generated motion codes, it achieves accurate layer height following. Thus, without modifying the motion codes themselves, it realizes layer height closed-loop control based on measured layer height following, ensuring system stability while reducing layer height error and improving forming accuracy. Attached Figure Description
[0017] Figure 1 A schematic diagram of the hardware architecture for implementing the additive manufacturing layer height control method provided in this application embodiment; Figure 2 A flowchart illustrating the additive manufacturing layer height control method provided in this application embodiment. Figure 3 This is a flowchart illustrating step S203 in an embodiment of this application; Figure 4 A schematic diagram of a slicing and execution method for printing a curved structure part is provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Reference numerals: 1. CNC machine tool; 2. Nozzle; 3. Laser; 4. Powder feeder; 5. Positioner; 6. Industrial camera; 7. Industrial computer; 8. Machine tool control cabinet; 9. Programmable logic controller. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0019] It should be understood that the illustrative drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.
[0020] The terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature specified with "first" or "second" may explicitly or implicitly include at least one of those features. "And / or" describes the relationship between related objects, indicating that three relationships may exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] This application provides a method for controlling the layer height in additive manufacturing, an electronic device, and a storage medium, which are described below.
[0023] To facilitate understanding of the solution in this application, the hardware architecture for implementing the layer height control method in this application will be described first, such as... Figure 1 As shown, the hardware architecture includes an execution module and a control module. The execution module includes a CNC machine tool 1, a laser cladding nozzle 2 mounted on the motion axis of the CNC machine tool 1, a laser 3 that provides energy to the nozzle 2, a powder feeder 4 that provides metal material to the nozzle 2, a positioner 5 mounted on the CNC machine tool 1, and an industrial camera 6 whose imaging area is aligned with the workpiece station on the positioner 5. The CNC machine tool 1 drives the nozzle 2 in three-dimensional linear and rotary motion, achieving precise trajectory movement of the nozzle 2. The nozzle 2, as the light, powder, and gas coupling and deposition execution terminal, integrates a focusing lens group, a powder feeding channel, and a protective gas interface to combine laser, powder, and gas. Powder and protective gas are precisely converged at one point to form a molten pool; laser 3 is aligned with the focusing lens group inside nozzle 2 to provide a laser beam to nozzle 2; powder feeder 4 is connected to the powder feeding channel of nozzle 2 to provide metal powder to nozzle 2; positioner 5 serves as a workpiece posture adjustment mechanism, used to carry and adjust the workpiece posture in real time, rotating or tilting when processing complex curved surfaces, and is linked with the main motion of CNC machine tool 1 to ensure that the workpiece surface is at the optimal process angle during processing; industrial camera 6 serves as a layer height measurement sensor, usually using a high-resolution CCD camera, to acquire images of the cladding layer after each layer deposition to extract measured layer height information.
[0024] like Figure 1 As shown, the control module includes an industrial computer 7 serving as the central control unit, a machine tool control cabinet 8 for driving the CNC machine tool 1 and the positioner 5, and a programmable logic controller 9 responsible for process logic control. These components are interconnected via electrical and communication networks, forming a collaborative whole. The industrial computer 7, equipped with a layer height control algorithm and a vision processing algorithm for implementing the additive manufacturing layer height control method of this application, is the highest decision-making center. It receives cladding layer images captured by the industrial camera 6, extracts measured layer height information through the vision processing algorithm, and executes the additive manufacturing process based on the measured layer height information. The manufacturing layer height control method sends motion commands to the machine tool control cabinet 8 and process start / stop and parameter commands to the programmable logic controller 9. The machine tool control cabinet 8, as the core of motion axis drive control, receives and executes G-code from the industrial computer 7 to drive the CNC machine tool 1 and the positioner 5. The programmable logic controller 9, as the process synchronization and safety logic control unit, receives commands from the industrial computer 7 and directly controls the switching and power of the laser 3, the start / stop and powder feeding rate of the powder feeder 4, and the opening and closing of the protective air circuit, ensuring that these process actions are precisely synchronized with the movement of the CNC machine tool 1, and is responsible for system safety interlocking.
[0025] During processing, such as Figure 1As shown, the industrial computer 7 acts as the central controller, controlling the movement of the CNC machine tool 1 and the positioner 5 through the machine tool control cabinet 8, and coordinating process actions such as laser processing, powder feeding, and gas supply through the programmable logic controller 9. Simultaneously, it utilizes feedback information from the industrial camera 6 to achieve closed-loop control of the floor height. This hardware architecture ensures a high degree of coordination between motion, energy, material transport, and process monitoring, forming the hardware foundation for the implementation of this control method.
[0026] It should be noted that the additive manufacturing layer height control method of this application is not limited to the application field of laser metal deposition (LMD). Its core control logic can be extended to other feed-based additive manufacturing processes, such as direct energy deposition (DED) and fused filament deposition modeling (FDM). The embodiments of this application do not limit the specific process type of feed-based additive manufacturing.
[0027] Based on the above hardware architecture Figure 2 A schematic flowchart of the additive manufacturing layer height control method provided in the embodiments of this application is shown below. Figure 2 As shown, the additive manufacturing layer height control method includes: S201. Based on the preset slice thickness, slice the workpiece model to be processed, generate motion code corresponding to several slice layers, and take the first slice layer as the current slice layer.
[0028] Specifically, based on 3D model slicing software (such as Cura, Simplify3D, UG, Robotmaster, etc.), the workpiece model to be processed is sliced into layers along the normal of the workpiece's outer contour curve, generating scanning paths corresponding to each slice layer. Subsequently, the scanning paths corresponding to each slice layer are compiled into motion code adapted to the processing equipment and imported into the corresponding equipment. The Z-axis coordinate information of the starting point of the scanning path in the motion code is the absolute height value relative to the origin of the workpiece coordinate system, generated layer by layer based on a preset slice thickness. The processing equipment can be a five-axis / three-axis CNC machine tool, a multi-axis robot supporting variable orientation processing, etc. CNC machine tools generate G-code, while KUKA robots generate KRL language code. This application does not limit the type of motion code.
[0029] In some embodiments, the predicted layer height is the single-layer deposition height expected in the process design. The slice thickness is less than the predicted layer height but not less than the minimum resolution of the layer height measurement sensor used to measure the actual layer height; that is, the slice thickness is between the predicted layer height and the minimum resolution of the layer height measurement sensor. Specifically, the slice thickness can be obtained by dividing the predicted layer height by a preset positive integer greater than 1, or it can be the minimum resolution of the layer height measurement sensor. The smaller the slice thickness, the greater the calculation accuracy, but the larger the corresponding motion code file occupies in the system space. The setting of the slice thickness depends on the processor's processing speed and the system's storage space. This application embodiment does not limit the value of the slice thickness.
[0030] S202. After executing the motion code of the current layer slice to complete the deposition of the current layer, obtain the measured layer height of the current layer deposition.
[0031] In some embodiments, the floor height measurement sensor used to measure the actual floor height can be a laser displacement sensor to directly detect the actual floor height signal, or it can be a CCD camera to detect image information and then process it to obtain the required actual floor height information. This application does not limit the type of floor height measurement sensor.
[0032] S203. Round the ratio of the measured layer height to the slice thickness to determine the number of slice layers to be skipped.
[0033] Considering the fluctuations in the error between the measured and predicted floor heights (sometimes positive, sometimes negative), simply rounding up or down would lead to unidirectional error accumulation, affecting accuracy. Therefore, to minimize the average cumulative error, in some embodiments, such as... Figure 3 As shown, step S203 includes: rounding the ratio of the measured layer height to the slice thickness to obtain the number of slice layers to be skipped. By rounding, some positive and negative errors can be canceled out, effectively avoiding the one-way accumulation of errors and improving accuracy.
[0034] Furthermore, in some embodiments, such as Figure 3 As shown, the ratio of the measured layer height to the slice thickness is rounded to the nearest integer to obtain the number of slice layers that need to be skipped, including: S2031. Calculate the ratio of the measured layer height to the slice thickness; S2033. Add the ratio to 0.5 to get the median value.
[0035] S2033. Round down the intermediate value to get the number of slice layers to be skipped.
[0036] S204. Add the layer number of the current slice layer to the number of slice layers to be skipped to obtain the updated layer number of the current slice layer. Return to step S202 until the updated layer number of the current slice layer exceeds the total number of layers of the workpiece model to be processed.
[0037] Specifically, the slice thickness of the workpiece model to be processed is Δh, the total number of layers of the workpiece model to be processed is n, and the layer number of the slice layer corresponding to the current deposition layer is n. k The measured height of the current sedimentary layer is ΔH', and the update formula for the layer number of the current slice layer is: n k+1 =n k +FLOOR(△H' / △h+0.5), where n k+1 Indicates the updated layer slice number, n k This represents the layer index of the current slice layer before the update, and FLOOR indicates rounding down until the layer index n of the current slice layer is detected. k If the number of layers exceeds the total number of layers n, stop executing the motion code.
[0038] For example, such as Figure 4 As shown, the slice thickness Δh is set to 0.01 mm, the pixel accuracy of the industrial camera at this field of view. The layer number of the slice layer is represented by Arabic numerals, and the layer number of the deposition layer is represented by Roman numerals; the first layer (n) is executed. I =1) The motion code of the slice layer completes the deposition of the I sedimentary layer. The measured layer height of the I sedimentary layer is ΔH' = 0.164 mm. The number of slice layers to be skipped is FLOOR(ΔH' / Δh+0.5) = 16. After skipping 16 slice layers, the layer number n of the slice layer corresponding to the II sedimentary layer is obtained. II =n I +FLOOR(△H' / △h+0.5)=17, execute level 17 (n II =17) The motion code of the slice layer completes the deposition of the second deposition layer, and so on, n III =33, n IV =50, n V =68, n VI =72, n VII =88.
[0039] Compared with existing technologies, this application decouples the predicted layer height from the slice thickness. It uses a small layer height, much smaller than the predicted layer height, as the slice thickness. The workpiece model is then subdivided and layered to generate numerous motion codes covering the entire forming height of the workpiece. During processing, after each layer is deposited, the ratio of the measured layer height to the slice thickness is rounded down to calculate the number of slice layers to be skipped corresponding to the actual increase. The control system then skips the motion codes for those skipped slice layers and starts executing the next layer deposition from the skipped layer's motion code. Regardless of fluctuations in the measured layer height, it can always quantize the measured layer height to the closest integer multiple of the slice thickness. Precise layer height following is achieved by selectively executing pre-generated motion codes. This allows for closed-loop layer height control based on measured layer height following without modifying the motion codes themselves, ensuring system stability while reducing layer height errors and improving forming accuracy.
[0040] like Figure 5 As shown, this application also provides an electronic device. This electronic device includes at least a processor 501 and a memory 502.
[0041] Processor 501 may include one or more processing cores, such as a 5-core processor, an 8-core processor, etc. Processor 501 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 501 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0042] Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 502 is used to store at least one instruction, which is executed by processor 501 to implement the additive manufacturing layer height control method provided in the method embodiments of this application.
[0043] In some embodiments, the electronic device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 501, memory 502, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Indicatively, peripheral devices include, but are not limited to: radio frequency circuitry, a touch display screen, audio circuitry, and a power supply.
[0044] Of course, electronic devices may also include fewer or more components, and this embodiment does not limit this.
[0045] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the additive manufacturing layer height control method provided in the above-described method embodiments.
[0046] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0047] The above provides a detailed description of an additive manufacturing layer height control method provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0048] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method of additive manufacturing layer height control, characterized by, include: S201. Based on the preset slice thickness, slice the workpiece model to be processed, generate motion code corresponding to several slice layers, and take the first slice layer as the current slice layer, wherein the slice thickness is less than the predicted layer height. S202. After executing the motion code of the current slice layer to complete the deposition of the current layer, obtain the measured layer height of the current layer. S203. The ratio of the measured layer height to the slice thickness is rounded to determine the number of slice layers to be skipped. S204. Add the layer number of the current slice layer to the number of slice layers to be skipped to obtain the updated layer number of the current slice layer, and return to step S202 until the updated layer number of the current slice layer exceeds the total number of layers of the workpiece model to be processed.
2. The additive manufacturing layer height control method of claim 1, wherein, The slice thickness is obtained by dividing the predicted layer height by a preset positive integer greater than 1.
3. The additive manufacturing layer height control method according to claim 1, characterized in that, The slice thickness is not less than the minimum resolution of the layer height measurement sensor used to measure the measured layer height.
4. The additive manufacturing layer height control method according to claim 1, characterized in that, The slice thickness is the minimum resolution of the layer height measurement sensor used to measure the measured layer height.
5. The additive manufacturing layer height control method according to claim 1, characterized in that, The ratio of the measured layer height to the slice thickness is rounded to determine the number of slice layers to be skipped, including: The ratio of the measured layer height to the slice thickness is rounded to the nearest integer to obtain the number of slice layers that need to be skipped.
6. The additive manufacturing layer height control method according to claim 5, characterized in that, The ratio of the measured layer height to the slice thickness is rounded to the nearest integer to obtain the number of slice layers to be skipped, including: Calculate the ratio of the measured layer height to the slice thickness; Add the ratio to 0.5 to obtain the intermediate value; The intermediate value is rounded down to obtain the number of slice layers that need to be skipped.
7. The additive manufacturing layer height control method according to claim 1, characterized in that, The measured floor height is obtained by detection using a laser displacement sensor or a CCD camera.
8. The additive manufacturing layer height control method according to claim 1, characterized in that, The motion code is G-code.
9. An electronic device, characterized in that, Including memory and processor; The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps of the additive manufacturing layer height control method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the additive manufacturing layer height control method according to any one of claims 1 to 8.