Laser detection method and device for 3D printing model and 3D printing system
By using laser scanning and coordinate system transformation technology, the problem of low model detection efficiency in 3D printing has been solved, achieving efficient and accurate detection of printing defects and improving the printing success rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2026-03-31
AI Technical Summary
In existing 3D printing technologies, model detection efficiency is low, especially for the first and second layers and above, where printing defects cannot be accurately identified. Furthermore, existing methods cannot distinguish between the actual printing area and the theoretical printing area.
Using laser scanning, a printhead assembly consisting of a laser and a camera is used to scan the model on the printing platform, combining the transformation relationship between the XYZ coordinate system and the pixel coordinate system, to obtain measured and theoretical height data, which are then compared to determine printing defects.
It enables efficient and accurate detection of printing defects in any current layer, improving detection efficiency and accuracy, and can identify and alert printing defects in advance.
Smart Images

Figure CN121756599A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D printing technology, and in particular to a laser detection method, apparatus and 3D printing system for 3D printed models. Background Technology
[0002] With the iterative upgrades of 3D printing processes and technologies, additive manufacturing can print parts of increasingly larger sizes and faster speeds, placing higher demands on the system. Simultaneously, the cost of printing failures continues to rise. In fused deposition modeling (FDM) systems, proper filament adhesion is crucial for successful printing. Factors such as leveling errors, print platform wear, improper platform preheating, and nozzle filament pulling leading to poor filament output can all affect filament adhesion, resulting in partial or even complete layer loss in the model. Continuing to print under these conditions will inevitably lead to printing failure because subsequent filaments cannot adhere correctly.
[0003] In existing technologies, a laser camera is used to scan the printed model. Before printing, the printing area of the first layer on the platform needs to be scanned. After the first layer is printed, the printed result of the first layer is scanned again. Based on the difference between the two scan results, the actual printed model area is determined, and then compared with the theoretical printing area to determine whether there are any missing parts in the first layer printing. It can be seen that the key to the existing technology is to determine the actual printing area of the first layer by the difference between the two scans before and after printing the first layer, which is inefficient.
[0004] The detection of two or more layers presents the following problems. Taking the second layer as an example, to identify whether there are printing defects in the second layer, it is necessary to compare the scan results after the first layer is printed with the scan results after the second layer is printed. However, this method is difficult to distinguish whether there are actual printing defects in the second layer or whether the theoretical printing area of the second layer is smaller than that of the first layer. Therefore, existing model detection methods require two scans, can only identify the first layer using relative coordinates, which is inefficient and cannot accurately detect models with two or more layers. Summary of the Invention
[0005] The purpose of this application is to provide a laser inspection method, device, and 3D printing system for 3D printed models, which can detect printing defects in any current layer by laser scanning, with high efficiency and high detection accuracy.
[0006] In a first aspect, this application provides a laser inspection method for 3D printed models, applied to a 3D printing system. The 3D printing system includes a print head assembly equipped with a laser and a camera, and a printing platform disposed below the print head assembly. The 3D printing system is configured with a transformation relationship between the XYZ coordinate system and the pixel coordinate system. The method includes: acquiring model printing information corresponding to the current layer; determining the laser scanning path of the current layer and printing the model based on the model printing information; controlling the laser to scan the model on the printing platform according to the laser scanning path, and acquiring model scanning images under multiple laser lines in the laser scanning path through the camera; for each laser line, determining the theoretical height data corresponding to the laser line based on the model printing information corresponding to the current layer; determining the measured height data corresponding to the laser line based on the model scanning image under the laser line and the transformation relationship; comparing the theoretical height data with the measured height data to determine the model printing error; and determining whether to stop printing based on the model printing errors corresponding to the multiple laser lines, and outputting a prompt message indicating that the current layer has defects.
[0007] Secondly, this application also provides a laser inspection device for 3D printed models, which is applied to a 3D printing system. The 3D printing system includes: a print head assembly equipped with a laser and a camera, and a printing platform disposed below the print head assembly; the 3D printing system is configured with a transformation relationship between the XYZ coordinate system and the pixel coordinate system; the device includes: an information acquisition module for acquiring model printing information corresponding to the current layer; a printing module for determining the laser scanning path of the current layer and printing the model according to the model printing information; a scanning acquisition module for controlling the laser to scan the model on the printing platform according to the laser scanning path, and acquiring model scanning images under multiple laser lines in the laser scanning path through the camera; an error calculation module for determining the theoretical height data corresponding to each laser line based on the model printing information corresponding to the current layer; determining the measured height data corresponding to the laser line based on the model scanning image under the laser line and the transformation relationship; comparing the theoretical height data with the measured height data to determine the model printing error; and a judgment module for determining whether to stop printing based on the model printing errors corresponding to the multiple laser lines, and outputting a prompt message indicating that there is a defect in the current layer.
[0008] Thirdly, this application also provides a 3D printing system, which includes: a print head assembly configured with a laser and a camera, and a printing platform disposed below the print head assembly; the 3D printing system is configured with a transformation relationship between the XYZ coordinate system and the pixel coordinate system; the 3D printing system is used to perform the laser detection method for the 3D printed model as described in the first aspect.
[0009] The laser detection method, device, and 3D printing system for 3D printed models provided in this application determine the theoretical height data and measured height data of the current layer model under multiple laser lines by combining laser scanning with a calculation process. Then, the printing error of the current layer model is determined by using the two types of data, thereby further determining whether there are printing defects in the current layer, so as to provide a reminder. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of a 3D printing system according to an embodiment of this application;
[0011] Figure 2 This is a flowchart illustrating a laser detection method for a 3D printed model according to an embodiment of this application;
[0012] Figure 3 This is a schematic diagram of a scanning path planning according to an embodiment of this application;
[0013] Figure 4 This is a schematic diagram illustrating the scanning effect of a model according to an embodiment of this application;
[0014] Figure 5 This is a schematic diagram of the laser position in a pixel coordinate system according to an embodiment of this application;
[0015] Figure 6 This is a schematic diagram comparing laser positions in a pixel coordinate system according to an embodiment of this application;
[0016] Figure 7 This is a schematic diagram of a sticker model according to an embodiment of this application;
[0017] Figure 8 This is a schematic diagram of the offset between the nozzle and the pixel coordinate center according to an embodiment of this application;
[0018] Figure 9 This is a schematic diagram of a nozzle-pixel coordinate center offset detection and a first rule model according to an embodiment of this application;
[0019] Figure 10 This is a schematic diagram of another nozzle-pixel coordinate center offset according to an embodiment of this application;
[0020] Figure 11 This is a schematic diagram of a nozzle and pixel coordinate center offset detection and a second rule model according to an embodiment of this application;
[0021] Figure 12 This is a schematic diagram of another scanning path planning according to an embodiment of this application;
[0022] Figure 13 This is a schematic diagram of a matrix scanning process according to an embodiment of this application;
[0023] Figure 14 This is a schematic diagram illustrating the calculation of pixel differences at detection points according to an embodiment of this application.
[0024] Figure 15 This is a schematic diagram of an interpolation processing area according to an embodiment of this application;
[0025] Figure 16 This is a schematic diagram illustrating curve compensation comparison according to an embodiment of this application;
[0026] Figure 17 This is a flowchart illustrating the processing steps of a laser detection method for a 3D printed model according to an embodiment of this application.
[0027] Figure 18 This is a flowchart illustrating the processing procedure of another laser detection method for a 3D printed model according to an embodiment of this application. Detailed Implementation
[0028] The technical solutions of this application will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] To address the shortcomings of existing technologies that require two scans and rely solely on relative coordinates for initial model identification, resulting in low time efficiency, this application provides a laser detection method, apparatus, and 3D printing system for 3D printed models. This system requires only one scan to complete initial layer identification, offering high time efficiency and applicability to subsequent printing layers. To facilitate understanding of this embodiment, a detailed description of the laser detection method for 3D printed models disclosed in this application is provided below.
[0030] This application provides a laser detection method for 3D printed models, which is applied to a 3D printing system; see also Figure 1 As shown, the 3D printing system includes: a print head assembly 13 with a laser 11 and a camera 12 fixedly configured, and a printing platform 14 disposed below the print head assembly 13; the 3D printing system is also configured with a transformation relationship between the XYZ coordinate system and the pixel coordinate system; the specific determination process of the transformation relationship will be described in detail later.
[0031] See Figure 2 As shown, the laser detection method for the above-mentioned 3D printed model includes the following steps:
[0032] Step S202: Obtain the model printing information corresponding to the current layer; the model's print job file is stored in the system's internal storage medium or an external storage medium. During the model printing process, the system obtains the model printing information corresponding to the current layer from the model print job file.
[0033] Step S204: Based on the model printing information, determine the laser scanning path for the current layer and perform model printing; based on the model printing information corresponding to the current layer, calculate the maximum and minimum coordinate values of the current layer in the positive and negative XY coordinate directions (this corresponds to the case where the coordinate system of the printing platform surface is an XY coordinate system), and plan the scanning path of the model based on the effective detection width value of the laser detection system composed of laser cameras. (See below) Figure 3 As shown, the rectangle represents the current layer of the printed model on the printing platform, the outer frame of the rectangle represents the printing platform, and the dashed line on the rectangle represents the range of the scanning path. The gray lines represent laser lines, and the black dots represent the pixels at the center of the laser in the pixel coordinate system; the effect after path planning is shown in the image. Figure 3 As shown in the diagram. The scanning path starts at `start`, proceeds from bottom to top, and from left to right while maintaining a certain scanning interval, exiting the scanning path at `end`. Of course, other directions are also possible; no specific limitations are made here. The system controls the movement of the print head assembly based on the acquired current layer printing information, printing the current layer model on the printing platform until the current layer printing is complete.
[0034] Step S206: Control the laser to scan the model on the printing platform according to the laser scanning path, and use a camera to capture the model scanning image under multiple laser lines in the laser scanning path;
[0035] After the current layer model is printed, the system moves the laser camera assembly (moving with the print head assembly) at set intervals according to the planned path. Each time a line is scanned, a local image is captured and saved to the system's storage medium. The system's scanning effect for the current layer is as follows: Figure 4 As shown.
[0036] Step S208: For each laser line, determine the theoretical height data corresponding to the laser line based on the model printing information of the current layer; determine the measured height data based on the model scan image under the laser line and the conversion relationship; compare the theoretical height data with the measured height data to determine the model printing error.
[0037] In practical applications, directly comparing theoretical and measured height data yields significant discrepancies because the measured height data incorporates platform deviation information, making accurate comparison impossible. Therefore, in this step, when platform deviation is substantial, compensation needs to be applied to one of the two sets of data based on the platform deviation. After compensation, the two sets of data become comparable. The two compensated data are then compared to determine the model printing error under each laser line.
[0038] That is, before comparing the theoretical height data with the measured height data to determine the model printing error, the method further includes: performing platform deviation compensation on the theoretical height data or the measured height data to obtain compensated height data; and comparing the compensated height data with another uncompensated height data to determine the model printing error.
[0039] If the platform is perfectly flat, no compensation is needed. The theoretical height data refers to the height position data of an ideal model assuming the laser line shines on a perfectly flat printing platform.
[0040] Step S210: Based on the printing errors corresponding to the multiple laser lines, determine whether to stop printing and output a prompt message indicating a defect in the current layer. Specifically, count the number of consecutive laser lines whose printing errors all exceed a set threshold. When the number of consecutive laser lines exceeds the set value, determine whether to stop printing and output a prompt message indicating a defect in the current layer.
[0041] The laser detection method for 3D printed models provided in this application determines the measured height data of the current layer model under multiple laser lines through laser scanning. It then calculates the theoretical height data of the model under these laser lines using the current layer's printing information. The method compares the theoretical and measured height data corresponding to each laser line. In cases of platform deviation, compensation is performed before comparison to determine the printing error of the current layer model. This further determines whether there are printing defects in the current layer, allowing for timely alerts. This detection method, through laser scanning, can detect printing defects in any current layer, exhibiting high efficiency and accuracy.
[0042] In another embodiment, the calibration process for the transformation relationship between the XYZ coordinate system and the pixel coordinate system is first described in detail:
[0043] See Figure 1As shown, the 3D printing system is configured with an XYZ coordinate system; the print head assembly and the printing platform work together to complete printing in the three XYZ directions. This includes various implementation methods, such as the print head assembly moving on one of the X, Y, and Z coordinate axes, and the printing platform moving on the other two coordinate axes; or the print head assembly moving on two coordinate axes, and the platform moving on another coordinate axis; or both the print head assembly and the printing platform can move on all three coordinate axes; or the print head assembly filling the X or Y axis so that the axis does not move, and the print head assembly and the printing platform moving on the other two coordinate axes, etc.
[0044] The printhead assembly 13 includes a printing material 131 composed of filaments or powder / granules, an extruder 132, a nozzle 133, and an XY-axis assembly (not shown in the figure) for controlling the movement of the printhead assembly. A sensor 15 (such as a strain gauge) is also provided on the printing platform 14. A laser 11 and a camera 12 are fixedly connected to the printhead assembly 13. As the nozzle 133 of the printhead assembly 13 moves, the laser 11 and camera 12 also move accordingly. In this embodiment, the printhead assembly 13 can reciprocate along the XY-axis of the system; the printing platform 14 can reciprocate along the Z-axis of the system. Therefore, the free movement along the XYZ axes constitutes the XYZ coordinate system of the system. In fact, the XY coordinate values of the system refer to the XY coordinate values of the nozzle 133 on the printhead assembly 13.
[0045] The aforementioned laser 11, camera 12, or additional lighting, constitute a laser measurement system. Laser 11 emits a laser beam onto the printing platform 14; camera 12 captures an image of the printing platform 14 under laser illumination, thereby determining the position of the laser line in the image; during camera 12 calibration, if the lighting is insufficient, supplementary lighting can be provided using an additional lighting lamp. The image captured by camera 12 is composed of a matrix of pixel coordinates, corresponding to a pixel coordinate system; the first coordinate axis of the pixel coordinate system corresponds to the Z-axis in the XYZ coordinate system, and the second coordinate axis corresponds to either the Y-axis or X-axis in the XYZ coordinate system; the first and second coordinate axes can be the horizontal and vertical axes of the pixel coordinate system, or they can be the vertical and horizontal axes, respectively.
[0046] Laser 11 must be installed parallel to the X-axis or Y-axis. Figure 1 The image shows the case where laser 11 is parallel to the Y-axis, and the camera 12 is mounted at a different angle. Figure 1 When the laser position remains unchanged after a 90° rotation, the horizontal and vertical axes of the pixel coordinate system are interchanged. At this point, the horizontal axis corresponds to the Z-axis of the XYZ coordinate system, and the vertical axis corresponds to the Y-axis. When laser 11 is compared to... Figure 1When the installation position is rotated 90° while the camera position remains unchanged, the laser line is parallel to the X-axis, the horizontal axis still corresponds to the Z-axis of the XYZ coordinate system, and the vertical axis corresponds to the X-axis of the XYZ coordinate system. Combined with... Figure 1 The dark gray vertical bars represent the effective travel of the printing platform in the Z direction of the XYZ coordinate system. The light gray vertical bars represent the effective range of the laser measurement system in the XYZ coordinate system. The system can calibrate the camera's pixel coordinate system with the Y-axis (or X-axis) and Z-axis of the XYZ coordinate system and establish a transformation relationship between the two coordinate systems. The specific process is as follows.
[0047] (1) Calibrate the position in the pixel coordinate system and the XYZ coordinate system where Z equals a specified value:
[0048] Specifically, taking a specified value of 0 as an example, the printing platform is controlled to move upward along the Z-axis in the XYZ coordinate system, or the printhead assembly is controlled to move downward along the Z-axis, until the printing platform and the nozzle of the printhead assembly are detected to be in contact, and the current coordinate value on the Z-axis in the XYZ coordinate system is recorded as 0. The printing platform / printhead assembly is then controlled to continue moving downward / upward along the Z-axis in the XYZ coordinate system by a scan height Hc, determining the coordinate position of the laser on the first coordinate axis (i.e., the Z-axis) in the pixel coordinate system of the image currently captured by the camera, corresponding to the position in the XYZ coordinate system where Z equals 0 + Hc. The specified value can also be any position such as ±1, ±2, etc.
[0049] For specific implementation, please refer to Figure 5 As shown, the system selects a point at any location on the printing platform and controls the printhead assembly to move to that point via the XY axis assembly. The mechanical XY coordinates of this point are determined. Then, the printing platform is moved until the Z-coordinate of the XYZ coordinate system reaches a position where Z equals 0. During this movement, when the nozzle surface impacts the printing platform surface, the two surfaces make physical contact. At this point, a sensor fixed to the printing platform can detect this "impact" trigger signal. Upon detecting this "impact" trigger signal, the system immediately stops the Z-axis movement and records the current Z-axis coordinate value. The system considers this value to be the coordinate value where Z equals 0 (in fact, the system redefines the position where Z equals 0; that is, the position where the nozzle surface and the printing platform surface make physical contact is the position where Z equals 0). Based on the current position where Z equals 0, upward movement of the printing platform's Z-coordinate is considered a negative value in the Z-coordinate system, and downward movement is considered a positive value.
[0050] In practical applications, the Z-coordinate of the printing platform needs to be adjusted downwards again to the specific scanning height Hc for laser camera scanning (to avoid interference between the nozzle surface and the platform surface when the nozzle moves in the XY direction, the nozzle surface needs to be a certain distance Hc higher than the printing platform surface when the laser camera scans). After this adjustment, the laser will appear at the center of the pixel coordinates. At this point, it is necessary to read and record the position of the laser line in the pixel coordinate system as it illuminates the printing platform (e.g., ...). Figure 5 The gray "laser" indicates the location. At this point, each pixel containing the laser line represents the XYZ coordinate system Z = 0 + Hc. This completes the location calibration process.
[0051] (2) Calibrate the first transformation coefficient in the first coordinate axis direction of the pixel coordinate system:
[0052] Increase the distance between the printing platform and the printhead assembly by one unit (e.g., 1 mm), and acquire a first image captured by the camera before the distance increase and a second image captured by the camera after the distance increase; detect the pixel change value corresponding to the position of the laser line on the first coordinate axis in the first and second images; determine the pixel change value as the first transformation coefficient in the direction of the first coordinate axis in the pixel coordinate system.
[0053] In practice, if the printing platform is positioned in the XYZ coordinate system where Z equals the specified value plus the scan height, and the pixel coordinate system has already been calibrated to the position where Z equals the specified value plus the scan height, then adjusting the printing platform to increase or decrease the Z coordinate value will cause the laser's position in the pixel coordinate system to move up or down. This upward or downward movement is the deviation from the calibrated position where "Z equals the specified value plus the scan height". By adding this deviation value to the specified Z value in the XYZ coordinate system, the absolute coordinate value of each pixel corresponding to the laser in the XYZ coordinate system can be obtained.
[0054] Taking the first conversion factor as an example with the number of pixels per millimeter, the specific calibration process is as follows: See Figure 6As shown, keeping the printing platform at the laser camera scanning height in the XYZ coordinate system Z = 0 + Hc, for example, adjusting the printing platform downwards by 1mm and recording the pixel difference before and after the movement, i.e., the number of pixels; after the printing platform moves downwards by 1mm, the pixel difference of the laser image before and after the two operations is 6 pixels. Given that the movement distance is 1mm, the number of pixels per millimeter in the Z-axis direction is KZ = 6 ÷ 1 = 6; KZ means that if the pixel difference between the vertical coordinate position relative to the specified Z value and the current depth position after the movement is 6 pixels, then this movement produces a downward position of 1mm in the XYZ coordinate system. At this time, the position of the XYZ coordinate system output by the laser measurement system is Z = (0 + Hc) + 1 - Hc = 1. That is to say, as long as there is a deviation of 6 pixels in each column of the vertical coordinate, it means that the current printing platform has moved downwards by 1mm, i.e., the output mechanical coordinate Z = (0 + Hc) + 1 - Hc = 1. Because it is easy to interfere with the model during scanning, it is necessary to offset by a scanning height. The actual output coordinate is obtained by subtracting the scanning height.
[0055] The laser measurement system uses the mechanical coordinate Z as a reference, which equals a specified value plus the scanning height, to detect the height in the Z direction. The system outputs the coordinates of the Z direction in the XYZ coordinate system. Within the effective measurement range (ML), the depth measurement is performed and superimposed on the XYZ coordinate system. The formula for the measurement range of the Z axis of the output XYZ coordinate system is: Z = 0 + Hc ± 0.5 * ML.
[0056] It should be noted that the calibration process described above, besides moving the printing platform to induce one or more displacements, can also be achieved by illuminating a contour block with a laser or by taking a picture of the calibration label. When the printing platform moves to a certain height along the Z-axis, the laser measurement system can maintain the same height for imaging, or it can lower the printing platform to take a picture. This section mainly explains the method of taking pictures at the same height. In practical applications, it is necessary to lower the printing platform to take pictures. That is to say, the Z-axis height for laser imaging must be higher than the surface of the printing platform. The purpose of this is to prevent the nozzle from interfering with the measured object on the surface of the printing platform during laser camera positioning. Therefore, the nozzle surface must be higher than the surface of the measured object during imaging.
[0057] (3) Calibrate the second transformation coefficient in the second coordinate axis direction of the pixel coordinate system:
[0058] The camera captures images of a specified model on the printing platform; the specified model includes at least two points along the second coordinate axis; the captured images are identified to determine the pixel values between the centers of the two points; the pixel values are divided by the distance between the centers of the two points to obtain the second transformation coefficient along the second coordinate axis in the pixel coordinate system.
[0059] The following explanation uses the calibration of the number of pixels per millimeter along the Y-axis in the pixel coordinate system as an example: In practice, the horizontal coordinate of the laser measurement system's pixel coordinate system is calibrated, that is, the correspondence between the length of the laser's horizontal coordinate in the pixel coordinate system and its actual length in the Y-direction of the XYZ coordinate system is determined. Based on this correspondence, the pixel reference point position, and the offset on the horizontal coordinate in the pixel coordinate system, the pixel coordinate system can be converted into the XYZ coordinate system, thereby enabling the system to output absolute coordinates.
[0060] The specific calibration process is as follows: The system uses a camera to capture images, either photographing or scanning the outer contour of a target at a known fixed distance at a scanning height, such as... Figure 7 The sticker shown is affixed to a printing platform. For example, the horizontal or vertical center distance between any two dots in the image is 5mm. A camera photographs the sticker to obtain an image. By identifying the dots in the image, the pixel difference between the centers of any two horizontally arranged dots is calculated. For example, if the calculated pixel difference is 30, and the distance between the horizontally arranged center difference and the actual center is 5mm, then the number of pixels per millimeter in the Y-axis direction is KY = 30 ÷ 5 = 6. KY means that if the measured object has a pixel difference of 6 pixels in the horizontal direction of the pixel coordinate system, then the measured object has a length of 1mm in the Y-direction of the XYZ coordinate system. This achieves the function of converting pixel difference into actual length.
[0061] (4) Calibrate the first offset of the pixel reference point in the pixel coordinate system from the nozzle of the printhead assembly in the Y-axis direction:
[0062] A first regular model is printed on the printing platform through the nozzle of the printhead assembly. The first regular model can be a model of various shapes such as rectangle, trapezoid, and rhombus. The Y coordinate of the nozzle center is adjusted so that the Y coordinate of the nozzle center corresponds to the center position of the first regular model, and the first Y coordinate corresponding to the nozzle center is obtained. The X coordinate of the nozzle center is adjusted so that the X coordinate of the laser line position in the image captured by the camera is aligned with the horizontal center point of the first regular model, and the second Y coordinate corresponding to the laser center is recorded. The difference between the first Y coordinate and the second Y coordinate is calculated to obtain the first offset of the pixel reference point in the pixel coordinate system and the nozzle of the printhead assembly in the Y-axis direction.
[0063] In practice, since the laser measurement system is mounted and fixed on the printhead assembly, it is inevitable that the nozzle and pixel coordinate center positions on the printhead assembly will deviate in the Y direction. This deviation is called manufacturing deviation. Figure 8As shown, the gray line on the left of the image represents the laser line, and the black dot at the center of the line corresponds to the black dot on the right, representing the pixel center position. The left side of the image shows the offset ΔY of the nozzle center and the pixel coordinate center in the Y direction of the XYZ coordinate system.
[0064] In this embodiment, the pixel coordinate center is used as the pixel reference point. Taking a rectangular model as an example, the specific calibration process is as follows:
[0065] ① The system prints a rectangular model of a specified height using a nozzle; ② Then, it adjusts the Y-coordinate of the nozzle center so that the nozzle's Y-coordinate is exactly at half the length L of the rectangular model; ③ Then, it adjusts the X-axis coordinate so that the X-coordinate of the laser line position in the image captured by the camera is aligned with the horizontal center point of the rectangular model, such as... Figure 9 As shown, the laser line divides the model into two symmetrical halves. The right side of the figure shows the effect of the laser illuminating the rectangular model. ④ Calculate half the distance L between the centers of the two contours of the laser illuminating the model, and subtract half the total laser length L1. The difference between these two values gives the offset ΔY between the nozzle center and the pixel coordinate center.
[0066] By calculating ΔY using calibration methods, the nozzle center in the XYZ coordinate system can be aligned with the pixel coordinate center. This allows for direct coordinate system transformation. If the nozzle center is slightly above the pixel coordinate center in the horizontal direction, it indicates a positive offset in the Y direction (ΔY). Conversely, it indicates a negative offset in the Y direction (ΔY).
[0067] (5) Calibrate the second offset of the pixel reference point in the pixel coordinate system and the nozzle of the printhead assembly in the X-axis direction: Print a second regular model on the printing platform using the printhead assembly; the second regular model can be a centrally symmetrical pattern with the largest diameter at its center point along the scanning direction, such as a rhombus, ellipse, or circle. Adjust the Y-axis coordinate of the printhead assembly to offset the current Y-axis by a first offset; adjust the X-axis coordinate of the printhead assembly according to a preset distance, and capture images of the laser scanning second regular model after each adjustment using a camera; find the target image from multiple images where the laser line passes through the center point of the second regular model; determine the first X-axis coordinate corresponding to the laser line and the second X-axis coordinate corresponding to the nozzle center from the target image; calculate the difference between the first X-axis coordinate and the second X-axis coordinate to obtain the second offset of the pixel reference point in the pixel coordinate system and the nozzle of the printhead assembly in the X-axis direction.
[0068] The following explanation uses the pixel coordinate center as the pixel reference point and a circular model with a known diameter as an example: In practice, since the laser measurement system is mounted and fixed on the printhead assembly, it is inevitable that the nozzle on the printhead assembly will deviate from the pixel coordinate center in the X direction. This deviation is the manufacturing deviation. Figure 10 As shown in the figure, the distance indicated by the double arrows is the offset ΔX between the nozzle and the center position of the pixel coordinates; for example, in engineering, this deviation will produce a deviation of 10mm±2mm under assembly deviation, and fluctuate within this range.
[0069] like Figure 11 As shown, the calibration process is as follows: ① The system prints a circular model of known diameter with a height using a nozzle, for example, a diameter of 15mm; ② Adjust the XY coordinate values of the print head and offset the Y coordinate by a calibration value of ΔY (as in step (4) above, so that the horizontal coordinate of the camera pixel coincides with the center of the circle), so that the nozzle moves to the center coordinate of the model and records the current coordinate; ③ Then start the camera and laser and move the print head assembly in the X direction by a fixed distance D, combined with the above ΔX fluctuating within the range of 10mm±2mm, for example, each movement D=0.1mm, then a total of 10 / 0.1=100 movements are required. The laser and camera scan the printed circular model. A laser image is taken once for each movement, for a total of 100 images, and the images are numbered; ④ Calculate the diameter value of the model illuminated by the laser in each image. When the model diameter is detected to be 15mm-14.6mm, the system considers the coordinates corresponding to the current image number to coincide with the center of the pixel coordinates. The offset of the pixel coordinate center from the center of the nozzle ΔX=current image number*0.1mm.
[0070] It should be noted that the pixel coordinate center mentioned above is the same as the pixel center point corresponding to the laser line in the image. Figure 11 In the diagram, black circles represent the printed circular model, dashed circles represent the trajectory of the nozzle moving to the left at a certain distance, such as 0.1mm, and vertical lines represent the trajectory of the laser line. The trajectories are numbered from right to left in ascending order. Due to space limitations, not all trajectories can be drawn; they are only used here to more clearly illustrate the specific movement process.
[0071] (6) Based on the calibration position where Z equals the specified value, the first transformation coefficient, the second transformation coefficient, the first offset, and the second offset, determine the transformation relationship between the XYZ coordinate system and the pixel coordinate system:
[0072] In practice, the transformation relationship between the nozzle XY coordinates and the pixel reference point XY coordinates can be determined based on the first offset and the second offset. Based on the calibration position where Z equals a specified value, the first transformation coefficient, and the second transformation coefficient, the transformation relationship between the YZ / XZ coordinates of any laser point in the camera image and the YZ / XZ coordinates of the pixel reference point can be determined. Therefore, based on the above transformation relationship between the nozzle XY coordinates and the pixel reference point XY coordinates, and the transformation relationship between the YZ / XZ coordinates of any laser point in the camera image and the YZ / XZ coordinates of the pixel reference point, the transformation relationship between the XYZ coordinate system and the pixel coordinate system can be determined.
[0073] The following details a method for determining a scanning path provided by an embodiment of this application: namely, step S204 above, which involves determining the laser scanning path of the current layer based on the model printing information, including:
[0074] Based on the model printing information of the current layer, determine the model's outer wall; offset the model's outer wall outward by half its width to obtain the model's outer contour, calculate the bounding box of the outer contour, and extend it outward by a certain distance; based on the preset laser scanning range and the overlap of adjacent scans, determine at least one scan pass corresponding to the expanded bounding box; the length of the scan pass is equal to the length of the laser scanning range; for each scan pass, scan sequentially according to the laser scanning range and the preset laser scanning interval in a specified order to obtain the laser scanning path.
[0075] In practice, the current layer's exterior wall data and the exterior wall line width d are read from the print job file. The polygons constituting the exterior wall are offset outward by d / 2 to obtain the outer contour of the current layer of the model, such as... Figure 12 The image shows a rectangle with a thick solid line. Figure 12 The rectangular outline (thick black line) and the three hexagonal holes are filled with model material, while the holes inside the hexagons are not filled with model material. Due to the limited laser scanning range, the entire model cannot be scanned in one pass; it needs to be divided into multiple scan passes as needed. Therefore, the bounding box of the model's outer contour (the same as the outer contour itself) is first calculated, and then expanded by 'e'. Based on the laser scanning range (scanWidth) and the overlap between adjacent passes (which is 0 here), the number of scan passes for the laser path is planned, as follows: Figure 12 The diagram shows a three-pass scanning path, with each pass corresponding to a rectangular area represented by a dashed line. The width of this rectangular area is scanWidth. The first pass's scan path starts at r1s and ends at r1e; the second pass's scan path starts at r2s and ends at r2e; and the third pass's scan path starts at r3s and ends at r3e (the actual laser start and end coordinates also need to be superimposed with the XY offset of the laser head relative to the print head).
[0076] After planning the scanning path, the model is printed, and the model scanning image corresponding to each scanning line is acquired by a laser detection system composed of laser cameras. Furthermore, the theoretical height data corresponding to the laser line is determined in the following way (i.e., the sub-steps in the aforementioned step S208 are explained):
[0077] The model region enclosed by the outer contour of the model is filled by the fill line corresponding to the laser line; the bounding box of the model region is calculated and expanded appropriately to determine how many scan passes are needed to cover the expanded bounding box; the intersection of the fill line and the region formed by the scan passes is obtained to get the initial curve; the initial curve is extended along the upper and lower boundaries of the region formed by the scan passes and raised by a preset layer height at the model to obtain the theoretical height data corresponding to the laser line.
[0078] In practice, fill with vertical lines. Figure 12 The area represented by the thick black solid line has a fill line spacing equal to the scan line spacing (scanInterval). The fill pattern intersects with the rectangular area corresponding to each scan pass to obtain the scan line (corresponding to the initial curve) on the model for each pass. Then, it is expanded within the rectangular area of the corresponding pass to obtain data containing layer height information. Figure 12 For example, the vertical line AB (at 15% of the model's x-direction) intersects the model's outer contour at points P1, P2, P3, and P4. The line segment falling within the first pass rectangular region is P1P2, the line segment falling within the second pass rectangular region is P3N, and the line segment falling within the third pass rectangular region is NP4. After expansion, P1P2 expands to AP1P1'P2'P2M, P3N expands to MP3P3'N', and NP4 expands to N'P4'P4B. Where point P... i With P i 'The projections on the xy plane coincide, P i 'In the z-direction than P i One floor height t higher. P1P2, P3P4 correspond to a portion of the initial curve.
[0079] Each actual scan line corresponds to a theoretical height curve. The corresponding theoretical height curve can be found based on the actual scan line. Scan the 1st, 2nd, and 3rd channels in sequence. For each channel, the first scan line starts from the leftmost side and scans along the +y or -y direction. After completing a scan line, the laser steps the scanInterval distance along the +x direction and starts scanning the next line (only a part of the scan lines along the +y direction are shown in the figure) until the rectangular area of that channel is filled.
[0080] Referring to the aforementioned coordinate system transformation, the first coordinate axis of the pixel coordinate system corresponds to the Z-axis in the XYZ coordinate system, and the second coordinate axis corresponds to the Y-axis or X-axis in the XYZ coordinate system. The transformation relationship includes: the first offset of the pixel reference point in the pixel coordinate system and the nozzle of the print head assembly in the Y-axis direction, and the second offset of the pixel reference point and the nozzle of the print head assembly in the X-axis direction; the first transformation coefficient in the first coordinate axis direction of the pixel coordinate system; and the second transformation coefficient in the second coordinate axis direction. The sub-step of step S208, which determines the measured height data corresponding to the laser line based on the model scan image and the transformation relationship, includes:
[0081] Based on the XYZ coordinates of the nozzle during laser line scanning, as well as the first offset and the second offset, the XYZ coordinates corresponding to the pixel reference points in the model scan image are determined; based on the deviation of the model border sampling points in the model scan image from the pixel reference points, as well as the first conversion coefficient and the second conversion coefficient, the height Z coordinate corresponding to each sampling point is determined; by connecting the height Z coordinates corresponding to multiple sampling points, the measured height curve is obtained.
[0082] Furthermore, the system is configured with platform deviation data, which includes the absolute XYZ coordinates of multiple points on the measured laser line determined by scanning the printing platform with a laser, and the Z-direction deviation value of the printing platform. The step of compensating for the platform deviation of the theoretical height data or the measured height data to obtain compensation data includes:
[0083] For any first target point in the theoretical height data or measured height data, the following steps are performed: Based on the absolute XYZ coordinates of multiple points on the measured laser line, check whether a first target point exists in the platform deviation data; if so, determine the Z-direction deviation value of the printing platform corresponding to the first target point in the platform deviation data as the target platform deviation value; if not, find a specified number of points adjacent to the first target point in the platform deviation data; find the Z-direction deviation values of the printing platform corresponding to the specified number of points, perform linear interpolation based on the Z-direction deviation values of the printing platform corresponding to the specified number of points, and determine the target platform deviation value corresponding to the first target point; compensate the Z-axis position of the printing platform based on the target platform deviation value corresponding to the first target point.
[0084] The specific process for determining the above platform deviation data is as follows:
[0085] (1) The laser generated by the laser is used to illuminate one or more positions of the printing platform, and the image of the measured laser line at each corresponding position is captured by the camera.
[0086] In practice, a movable printhead assembly, equipped with a camera and laser, illuminates the printing platform with a laser. In this embodiment, a laser line parallel to the Y-axis is used, following the... Figure 13 The path shown in the right figure is used for moving illumination, targeting the moving process ( Figure 13 Each laser line in the left figure can be identified by capturing images from a camera, thus determining the corresponding measured laser line in the image, which is the measured laser line in the pixel coordinate system. Figure 13 The gray lines represent the laser lines illuminating the printing platform. The black dots within the gray lines represent the center positions in the corresponding pixel coordinate system. The dashed lines in the right image represent the movement path of the laser lines. It can be seen that this movement path starts from the "start" position and scans from left to right and from bottom to top (but is not limited to this movement method), ending at the "end" position. The pixel coordinate center (black dot) positions on each row or column of the laser in the image correspond to the same Y-axis or X-axis coordinates. Therefore, based on the parallel or perpendicular relationship between the laser and the X and Y axes, the X and Y coordinate data of these laser lines based on the pixel coordinate center positions are stored in the system.
[0087] (2) For each measured laser line image, determine the pixel difference corresponding to one or more detection points on the measured laser line according to the measured laser line and the pre-set reference line;
[0088] For any detection point on the measured laser line, determine the second target point corresponding to the detection point on a pre-set reference line in the direction of the first coordinate axis; determine the pixel difference between the detection point and the second target point in the direction of the first coordinate axis (Z axis), and the pixel difference between the detection point and the pixel reference point on the pre-set reference line in the direction of the second coordinate axis (X axis or Y axis).
[0089] The distribution of the selected detection points on the printing platform corresponding to each laser line in the movement path is as follows: Figure 14 As shown in the left figure. Figure 14 As shown in the right-middle figure, the upper laser line is a pre-defined reference line (corresponding to an ideal planar curve); the lower laser line is a measured laser line in the moving path (corresponding to the actual platform plane); the XY coordinates of the pixel center positions (shown as black dots in the figure) in the reference line and the measured laser line are consistent. The XY coordinates of other positions in the measured laser line can be calculated using the transformation relationship between the XYZ coordinate system and the pixel coordinate system. By comparing the two lines on the first coordinate axis (Z-axis) of the pixel coordinate system, the pixel difference in the Z direction corresponding to any detection point in each laser line can be determined.
[0090] The pre-defined reference line can be a measured laser line at any specified location, with known XYZ coordinates. However, this requires a high degree of precision in the installation of the measured laser line, which must be as parallel as possible to the axis requiring parallelism. The pre-defined reference line can also be obtained using the following method:
[0091] 1) The laser emitted by the laser is used to scan the reference area on the printing platform at least once, and at least one scan image is acquired during the laser scanning process using a camera; 2) The region image corresponding to the scan reference area in at least one first scan image is identified, and the corresponding laser line segment in each region image is detected; 3) A pre-defined reference line is obtained by fitting based on at least one detected laser line segment. If only one laser line segment is detected, the pre-defined reference line is determined by fitting based on the laser line segment; if multiple laser line segments are detected, the multiple laser line segments are sequentially spliced according to the scanning direction to obtain the pre-defined reference line.
[0092] (3) Based on the pixel difference corresponding to one or more detection points on each measured laser line and the transformation relationship between the XYZ coordinate system and the pixel coordinate system, the XYZ absolute coordinate transformation of the detection points is performed to form the printing platform deviation data.
[0093] For example, when collecting the current measured laser line, the position coordinates of the nozzle on the platform are (X1, Y1, Z1). Further, based on the first offset △Y1 and the second offset △X1 in the coordinate system transformation relationship, the coordinates of the pixel reference point (generally the center of the laser pixel) on the pre-set reference line can be determined as (X2 = X1 + △X1, Y2 = Y1 + △Y1, Z1). Further, based on the pixel difference between the detection point and the pixel reference point on the pre-set reference line on the second coordinate axis (taking the Y axis as an example, it can also be the X axis), and the second transformation coefficient of the second coordinate axis in the coordinate system transformation relationship, the absolute coordinates (X2, Y3, Z1) corresponding to the detection point can be determined. In addition to storing the XYZ coordinates corresponding to the detection point, the platform deviation data also stores the Z-direction deviation value of the printing platform corresponding to that point. The Z-direction deviation value of the printing platform can be either the Z-axis pixel deviation or the Z-axis absolute coordinate deviation. The Z-axis absolute coordinate deviation can be obtained by converting the Z-axis pixel deviation and the coordinate system. In this way, the platform deviation value corresponding to each current point can be determined by data lookup or interpolation fitting.
[0094] For points that can be directly located, the printing platform can be leveled directly based on the Z-direction deviation value of the corresponding point. For points that cannot be directly located, the deviation data of nearby points can be fitted to obtain the corresponding Z-direction deviation value of the printing platform, and then the platform can be leveled using the method described above. The specific process is as follows:
[0095] In the previous step, the Z-axis pixel difference values corresponding to multiple detection points on each measured laser line were determined. Since the matrix scanning has a certain spacing D, such as... Figure 15 As shown, it's impossible to calculate and store all pixel differences on the same scan line, as this would consume a lot of memory. Therefore, in this embodiment, for points not stored in the netlist, their corresponding pixel differences are determined by linear interpolation using the pixel differences of multiple nearby points, such as... Figure 15 As shown, for a point in the blank area in the X and Y directions, the coordinates and pixel difference of its four nearest neighbors can be obtained. Then, the pixel difference corresponding to the point in the blank area can be determined by linear interpolation.
[0096] In another implementation, the pixel differences corresponding to multiple detection points in the blank area can be determined in advance by linear interpolation, and these values can also be saved in the platform deviation netlist. This can reduce the number of calculation steps when determining the target platform deviation of the first target point, thereby improving efficiency.
[0097] Furthermore, the step of comparing the compensated height data with another uncompensated height data to determine the model printing error includes: determining multiple sampling points at equal intervals within the intersection range of the Y-coordinates or X-coordinates corresponding to the compensated height data and the uncompensated height data; detecting non-error-affected points among the multiple sampling points; determining the local error corresponding to the target sampling points after removing the non-error-affected points; and summing the local errors corresponding to the multiple target sampling points to obtain the model printing error.
[0098] Further, the steps for detecting non-error-affected points among multiple sampling points include: for the second target point of the theoretical height data corresponding to each sampling point, obtaining the marker corresponding to the second target point; the marker indicating whether a model exists at the second target point; if the marker of the sampling point indicates that no model exists, and the measured Z-coordinate of the sampling point is less than the compensated Z-coordinate + a preset value, the second target point is determined to be a non-error-affected point; if the marker of the second target point indicates that a model exists, and the measured Z-coordinate of the second target point is greater than the compensated Z-coordinate, or less than the minimum theoretical Z-coordinate of the corresponding scan line, the second target point is determined to be a non-error-affected point; if the actual Z-coordinate of the second target point is greater than the maximum theoretical Z-coordinate of the corresponding scan line, the second target point is determined to be a non-error-affected point. Platform deviation data can be added to the theoretical height data or the measured height data; in this embodiment, it is added to the theoretical height data.
[0099] In specific implementation, such as Figure 16 for Figure 12The diagram shows the projection of the schematic cross-section onto the yz plane, where 1 is the expanded theoretical height curve and 3 is the measured height curve. The theoretical and measured height curves differ significantly due to the unevenness of the printing platform. Therefore, platform deviation compensation is needed for either curve 1 or 3. In this embodiment, compensation is performed on the theoretical height curve, i.e. Figure 16 The thick solid line 2 in the figure represents the curve obtained after compensating for the theoretical height curve; (at the same time, a Boolean variable (equivalent to the aforementioned marker) is used to record whether each point on the curve is high or low, and a high value indicates that the point is on the current printing layer). After compensation, it is relatively close to the actual height curve.
[0100] For any scan line, let the expression for the theoretical height curve 2 after platform height compensation be z = f(y), and the expression for the measured height curve 3 be z = g(y). Calculate the error of this scan line using the following function:
[0101] The range of the definite integral is [y L ,y H The area enclosed by the two curves is the intersection of their y-direction ranges. The error is the area enclosed by the two curves; when the two curves coincide, the error is zero.
[0102] In actual implementation, the error is obtained by discretely accumulating the area within the local influence range of each scanning point, and the following provisions are made: (1) When the theoretical Z value (after platform height compensation) corresponding to a point is low (judged by the aforementioned Boolean variable), it indicates that the point is not on the model. If the actual Z value of the point is less than the theoretical Z value + 0.15 mm, the point is ignored and the area error affected by the point is not included; (2) When the theoretical Z value (after platform height compensation) corresponding to a point is high, it indicates that the point should be on the model. If the actual Z value of the point is greater than the theoretical Z value, or less than the minimum theoretical Z value of the scanning line, the area error affected by the point is not included; (3) When the actual Z value of a point is greater than the maximum theoretical Z value of the scanning line, the area error affected by the point is not included. Among them, the third condition is used to ignore the influence of pre-firing in the first layer scan (pre-firing is higher than one layer height). If there is no pre-firing in the layers after the first layer, the condition is ignored.
[0103] Further, step S210 above: determining whether to stop printing and outputting a prompt message indicating a defect in the current layer based on the model printing errors corresponding to the multiple laser lines, includes: counting the number of consecutive scan lines whose model printing errors exceed a preset error threshold; determining whether the maximum number exceeds a preset number threshold; if so, stopping printing and outputting a prompt message indicating a defect in the current layer; or, sequentially calculating the model printing error corresponding to each scan line, and stopping printing and outputting a prompt message indicating a defect in the current layer when the number of consecutive scan lines whose model printing errors exceed a preset error threshold is detected to exceed the preset number threshold.
[0104] See Figure 17 The process flow of a laser inspection method for a 3D printed model is shown below. After the program starts, the X, Y, and Z axes are first zeroed, then the laser camera is calibrated to determine the offset XY of the laser camera relative to the print head (see the explanation in process 1). Then, the laser camera is used for leveling (see the explanation in process 2) to obtain the platform height compensation value {C}. ij}, where the subscript ij indicates that this is a rectangular grid array, C ij This is the height compensation value at any point on the grid array. The last two steps are optional. If the laser camera calibration has been completed beforehand and the height compensation value has been obtained through laser camera leveling, these two steps can be omitted, and the previous data can be used directly.
[0105] When printing the k-th layer of the model, the outer contour of the k-th layer model is calculated based on the current print layer file information. Taking into account its own offset XY relative to the print head, the scanning path {P} of the laser camera is determined. i |i=1,2,…,np} (np is the total number of scan lines), abbreviated as {P i The rest of the sets are similar. Meanwhile, the corresponding theoretical height curve {T} is calculated based on the scan lines. i After the k-th layer is completed, the laser camera follows the path {P}. i} Perform a scan to obtain the actual height curve {H} of each scan line in that layer. i}, for the actual height curve {H i For any point p in the graph, based on its position in the platform deviation netlist compensation grid array, the compensation value is bilinearly interpolated using the surrounding four grid points. This value is then added to the z-component of point p, thereby realizing the height curve {H}. i The compensation of} yields a new set of curves {H}. i '}. For {H i Any curve H in '} i ', from {T i Find the theoretical height curve T at the corresponding location. i Compare H i 'with Ti The difference is used to obtain H i ' with respect to T i The error E i , which is stored in the set {E i}. According to the error set {E i}, the number of consecutive scan lines N with an error exceeding the threshold Th1 is counted i (For N consecutive i scan lines, all are out of tolerance). Take the maximum value in {N i} and denote it as Nmax. When Nmax >= Th2, stop printing and pop up a prompt "There are defects in the current layer", otherwise continue to print the next layer. The execution process of each subsequent layer is similar. If no defects are detected in each layer, the model printing is successful.
[0106] Refer to Figure 18 the processing flow of another laser detection method for 3D printing models shown in the figure. First, initialize the count value c to 0. Then, for each scanned line, calculate the error of this line relative to its theoretical height curve. When the error is greater than the threshold Th1, increment c by 1; otherwise, c = 0. When c < Th2, continue to scan the next line. On the contrary, when c >= Th2, it means that there are Th2 or more consecutive scan lines out of tolerance. Stop the subsequent scan, stop printing, and pop up a prompt "There are defects in the current layer". Therefore, when the program detects a defect, the printing will be terminated in advance, and the预定的扫描过程也将提前结束,从而免除后续无效工作。但当c值始终小于Th2时,打印、扫描、检测的流程持续进行,最终模型打印成功。
[0107] The laser detection method for 3D printing models provided by the embodiments of this application scans the model on the printing platform in an XY matrix using a laser and obtains the measured height curve and theoretical height curve corresponding to each scanned line of the current layer model. Then, after platform deviation compensation, the two curves are compared to determine the model printing error. Further, according to the error magnitude, it is determined whether there is a printing defect, so as to implement the multi-layer printing quality detection function of model printing, and the printing quality of each layer or the first layer in the model printing process can be identified; for each printing layer, it only needs to be scanned once, that is, it works in the order of printing one layer, scanning one layer, and identifying one layer. It should be noted that there is an unclear expression "预定的扫描过程也将提前结束" in the original text. I have translated it as literally as possible. You may need to check and correct it according to the actual situation.
Claims
1. A method of laser detection of a 3D printed model, characterized in that, The method is applied to a 3D printing system; the 3D printing system comprises a print head assembly configured with a laser and a camera, and a print platform arranged below the print head assembly; the 3D printing system is configured with a conversion relationship between an XYZ coordinate system and a pixel coordinate system; the method comprises: acquiring model printing information corresponding to a current layer; determining a laser scanning path of the current layer according to the model printing information and performing model printing; controlling the laser to scan a model on the print platform according to the laser scanning path, and collecting model scanning images under a plurality of laser lines in the laser scanning path through the camera; for each laser line, determining theoretical height data corresponding to the laser line through the model printing information corresponding to the current layer; determining measured height data corresponding to the laser line according to the model scanning images under the laser line and the conversion relationship; comparing the theoretical height data with the measured height data to determine a model printing error; judging whether to stop printing according to the model printing errors corresponding to the plurality of laser lines, and outputting prompt information that the current layer has defects.
2. The method of claim 1, wherein, Before comparing the theoretical height data with the measured height data to determine the model printing error, the method further comprises: performing platform deviation compensation on the theoretical height data or the measured height data to obtain compensated height data; comparing the compensated height data with the other height data which is not compensated to determine the model printing error.
3. The method of claim 1, wherein, The step of determining the laser scanning path of the current layer according to the model printing information comprises: determining a model outer wall of the current layer according to the model printing information of the current layer; offsetting the model outer wall outward by half of the outer wall width to obtain an outer contour of the model, and calculating a bounding box of the outer contour and extending the bounding box outward by a distance; determining at least one scanning pass corresponding to the bounding box after the extension according to a preset laser scanning range and an adjacent pass overlap amount; the length of the scanning pass is equal to the length of the laser scanning range; for each scanning pass, sequentially scanning according to a specified order with the laser scanning range and a preset laser scanning pitch to obtain a laser scanning path.
4. The method of claim 3, wherein, The step of determining the theoretical height data corresponding to the laser line comprises: filling a model region surrounded by the model outer contour with a filling line corresponding to the laser line; calculating a bounding box of the model region and appropriately extending the bounding box outward to determine how many scanning passes are needed to cover the extended bounding box; calculating an intersection of the filling line and a region formed by the scanning pass to obtain an initial curve; extending the initial curve upward and downward to the upper and lower boundaries of the region formed by the scanning pass and raising the initial curve by a preset layer height at the model to obtain the theoretical height data corresponding to the laser line.
5. The method of claim 1, wherein, The calibration process of the conversion relationship between the XYZ coordinate system and the pixel coordinate system is as follows: calibrating positions with a specified value of Z in the pixel coordinate system and the XYZ coordinate system; Calibrate a first conversion coefficient of a first coordinate axis direction and a second conversion coefficient of a second coordinate axis direction in the pixel coordinate system; wherein the conversion coefficients are used to represent the number of pixels corresponding to a unit distance or the distance corresponding to a single pixel; Calibrate a first offset of a pixel reference point in the pixel coordinate system and a nozzle of the print head assembly in the Y-axis direction, and a second offset of the pixel reference point and the nozzle of the print head assembly in the X-axis direction; Based on the calibration position where Z is equal to a specified value, the first conversion coefficient, the second conversion coefficient, the first offset, and the second offset, determine the conversion relationship between the XYZ coordinate system and the pixel coordinate system.
6. The method of claim 5, wherein, According to the model scan image and the conversion relationship, the step of determining the measured height data comprises: According to the XYZ coordinates of the nozzle during the laser line scanning, and the first offset and the second offset, determine the XYZ coordinates corresponding to the pixel reference point in the model scan image; According to the deviation of the model frame sampling points in the model scan image relative to the pixel reference point, and the first conversion coefficient and the second conversion coefficient, determine the height XYZ coordinates corresponding to each sampling point; Connect the height XYZ coordinates corresponding to each sampling point to obtain the measured height data.
7. The method of claim 2, wherein, The system is configured with platform deviation data determined by scanning the printing platform with a laser, which comprises the XYZ absolute coordinates corresponding to a plurality of points on the measured laser line and the Z direction deviation value of the printing platform; the forming process of the platform deviation data is as follows: Irradiate one or more positions of the printing platform with the laser generated by the laser, and collect the image of the measured laser line of each corresponding position with the camera; for each measured laser line image, determine the pixel difference value corresponding to one or more points on the measured laser line according to the measured laser line and the pre-set reference line; Based on the pixel difference value corresponding to one or more points on each measured laser line and the conversion relationship between the XYZ coordinate system and the pixel coordinate system, perform XYZ absolute coordinate conversion to form the printing platform deviation data; The pre-set reference line is the measured laser line at any specified position; or the pre-set reference line is obtained by the following process: Scan the scanning reference area on the printing platform with the laser emitted by the laser at least once, and collect at least one scanning image during the laser scanning process with the camera; wherein the scanning reference area is a pre-set area centered on the contact point between the nozzle in the print head assembly and the printing platform; identify the area image corresponding to the scanning reference area in at least one scanning image, and detect the corresponding laser sub-segment in each area image; based on the detected at least one laser sub-segment, fit to obtain the pre-set reference line; The steps of compensating the theoretical height data or the measured height data for platform deviation to obtain compensation data comprise: For any first target point in the theoretical height data or the measured height data, the following steps are performed: According to the XYZ absolute coordinates corresponding to the plurality of points on the measured laser line, it is determined from the platform deviation data whether the first target point exists; If yes, a printing platform Z-direction deviation value corresponding to the first target point in the platform deviation data is determined as a target platform deviation value; If no, a specified number of points adjacent to the first target point are found from the platform deviation data, and printing platform Z-direction deviation values corresponding to the specified number of points are found, and a target platform deviation value corresponding to the first target point is determined by linear interpolation processing of the printing platform Z-direction deviation values corresponding to the specified number of points; According to the target platform deviation value corresponding to the first target point, the Z-axis position of the printing platform is compensated.
8. The method of claim 2, wherein, The step of comparing the compensated height data with another un-compensated height data to determine the model printing error comprises: Within the intersection range of Y coordinates or X coordinates corresponding to the compensated height data and the un-compensated height data, a plurality of sampling points are determined according to equal intervals; Non-error-affected points in the plurality of sampling points are detected; Local errors corresponding to other target sampling points except the non-error-affected points are determined; The local errors corresponding to the plurality of target sampling points are summed to obtain the model printing error.
9. The method of claim 8, wherein, The step of detecting non-error-affected points in the plurality of sampling points comprises: For a second target point corresponding to the theoretical height data of each sampling point, a mark corresponding to the second target point is obtained; the mark represents whether a model exists at the second target point; If the mark of the second target point represents that no model exists, and the measured Z coordinate of the second target point is less than the compensated Z coordinate plus a preset value, the second target point is determined as a non-error-affected point; If the mark of the second target point represents that a model exists, and the measured Z coordinate of the second target point is greater than the compensated Z coordinate or less than the minimum theoretical Z coordinate of the corresponding scanning line, the sampling point is determined as a non-error-affected point; If the actual Z coordinate of the second target point is greater than the maximum theoretical Z coordinate of the corresponding scanning line, the second target point is determined as a non-error-affected point.
10. The method of claim 1, wherein, According to the model printing error corresponding to the plurality of scanning lines, it is determined whether to stop printing, and the step of outputting prompt information that the current layer has defects comprises: The number of continuous scanning lines whose model printing error exceeds a preset error threshold is counted; It is determined whether the maximum number exceeds a preset number threshold, and if yes, printing is stopped, and prompt information that the current layer has defects is outputted; Alternatively, the model printing error corresponding to each scanning line is calculated in sequence, and when it is detected that the number of continuous scanning lines whose model printing error exceeds a preset error threshold exceeds a preset number threshold, printing is stopped, and prompt information that the current layer has defects is outputted.
11. A laser detection device for a 3D printed model, characterized in that, The device is applied to a 3D printing system; the 3D printing system comprises a printing head assembly configured with a laser and a camera, and a printing platform arranged below the printing head assembly; the 3D printing system is configured with a conversion relationship between an XYZ mechanical coordinate system and a pixel coordinate system; the device comprises: An information acquisition module is configured to acquire model printing information corresponding to a current layer; A printing module is configured to determine a laser scanning path of the current layer and perform model printing according to the model printing information; A scanning acquisition module is configured to control the laser to scan a model on the printing platform according to the laser scanning path and acquire model scanning images under a plurality of laser lines in the laser scanning path through the camera; An error calculation module is configured to determine, for each laser line, theoretical height data corresponding to the laser line through the model printing information corresponding to the current layer, determine measured height data corresponding to the laser line according to the model scanning images under the laser line and the conversion relationship, and compare the theoretical height data with the measured height data to determine a model printing error; A judgment module is configured to determine whether to stop printing according to the model printing errors respectively corresponding to the plurality of laser lines and output prompt information indicating that the current layer has defects.
12. A 3D printing system, characterized by The 3D printing system includes a printing head assembly configured with a laser and a camera and a printing platform arranged below the printing head assembly; the 3D printing system is configured with a conversion relationship between an XYZ coordinate system and a pixel coordinate system; and the 3D printing system is configured to perform the laser detection method for the 3D printed model according to any one of claims 1 to 10.