Automatic leveling method, electronic device and computer-readable storage medium

Three-dimensional point cloud data is obtained through laser light source scanning, the offset of the printing platform is calculated and automatically leveled, which solves the problem of position offset of the printing platform of 3D printing equipment and improves printing accuracy and user experience.

WO2024244681A1PCT designated stage expired Publication Date: 2024-12-05SHENZHEN CREALITY 3D TECH CO LTD

Patent Information

Application Number
PCT/CN2024/085610
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-26
Filing Date
2024-04-02
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The printing platform position of 3D printing equipment may be offset, resulting in low printing accuracy, poor user experience, and difficulty in observing the offset with the naked eye.

Method used

The laser light source scanning printing platform is used to obtain three-dimensional point cloud data, obtain the offset through plane fitting and normal vector calculation, and perform automatic leveling compensation to ensure that the plane of the printing platform is a horizontal plane and improve printing accuracy.

Benefits of technology

The printing accuracy and user experience of 3D printing equipment are improved, and the automatic leveling method is efficient and convenient to avoid the position offset of the printing platform, ensuring the flatness of the printing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024085610_05122024_PF_FP_ABST
    Figure CN2024085610_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are an automatic leveling method, an electronic device and a computer-readable storage medium, which are applied to a 3D printing device, wherein the 3D printing device comprises a laser light source, which is used for emitting line laser, and a printing platform. The method comprises: controlling a laser light source to scan a printing platform, so as to obtain three-dimensional point cloud data of the printing platform; performing plane fitting on the three-dimensional point cloud data, so as to acquire a fit normal vector of a plane where the printing platform is located; according to the fit normal vector and a unit normal vector of a horizontal plane, calculating an offset of the printing platform based on the horizontal plane; and performing leveling compensation on the three-dimensional point cloud data according to the offset, and printing a 3D model according to the three-dimensional point cloud data, which has been subjected to leveling compensation. By means of the present application, a printing platform can be automatically leveled, so as to improve the printing precision of a 3D printing device, thereby improving the usage experience of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Automatic leveling method, electronic device and computer-readable storage medium Technical Field

[0001] The present application relates to the field of 3D printing technology, and in particular to an automatic leveling method, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rise of concepts like smart manufacturing and Industry 4.0, 3D printing technology is becoming increasingly widespread. 3D printing, first appearing in the mid-1990s, is essentially a state-of-the-art rapid prototyping device utilizing technologies like photocuring and paper lamination. It operates on essentially the same principle as conventional printing: a printer is filled with "printing material" such as liquid or powder. Once connected to a computer, the computer controls the process of layering the "printing material," ultimately transforming the blueprint on the computer into a physical object. This printing technology is known as 3D printing.

[0003] In related technologies, the printing platform position of the 3D printing device may be offset relative to the initial position, but it is difficult for workers to observe the offset of the printing platform with the naked eye, resulting in low accuracy of the printed 3D model, which in turn leads to a poor user experience.

[0004] Summary of the Invention

[0005] In view of this, the present application provides an automatic leveling method, an electronic device and a computer-readable storage medium, which can automatically level the printing platform. The leveling process is efficient and easy to operate, thereby improving the printing accuracy of the 3D printing device and thus improving the user experience.

[0006] A first aspect of the present application provides an automatic leveling detection method, which is applied to a 3D printing device, wherein the 3D printing device includes a laser light source for emitting a line laser and a printing platform. The method includes: controlling the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform; performing plane fitting on the three-dimensional point cloud data to obtain a fitting normal vector of the plane where the printing platform is located; calculating an offset of the printing platform based on the horizontal plane based on the fitting normal vector and a unit normal vector of the horizontal plane; performing leveling compensation on the three-dimensional point cloud data based on the offset, and printing a 3D model to be printed based on the three-dimensional point cloud data after leveling compensation.

[0007] Compared with the related art, the embodiments of the present application have at least the following advantages: by performing plane fitting on the three-dimensional point cloud data of the printing platform to obtain the fitting normal vector of the plane where the printing platform is located, and then comparing the fitting normal vector with the unit normal vector of the horizontal plane to obtain the offset of the printing platform based on the horizontal plane, the three-dimensional point cloud data can be leveled and compensated according to the offset, that is, the printing platform can be automatically leveled to ensure that the plane where the printing platform is located is a horizontal plane. The whole process is efficient and easy to operate, avoiding the occurrence of "the position of the printing platform is offset, resulting in low printing accuracy of the 3D printing device", improving the printing accuracy of the 3D printing device, and thus improving the user experience.

[0008] In some possible implementations, controlling the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform includes: controlling the laser light source to emit a line laser according to a preset laser beam diameter, and controlling the laser light source to move back and forth to form a complete scanning surface of the printing platform to obtain the three-dimensional point cloud data.

[0009] By adopting this technical solution, a method of scanning a printing platform by emitting a laser light source of line laser to obtain three-dimensional point cloud data is realized.

[0010] In some possible implementations, performing plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located includes: performing point cloud splicing on the three-dimensional point cloud data; performing plane fitting on the spliced ​​three-dimensional point cloud data to obtain a fitting plane of the three-dimensional point cloud data, where the fitting plane is the plane where the printing platform is located; and obtaining the fitting normal vector of the fitting plane.

[0011] In some possible implementations, calculating the offset of the printing platform based on the horizontal plane based on the fitted normal vector and the unit normal vector of the horizontal plane includes: obtaining the point cloud density of the three-dimensional point cloud data; obtaining the projection vector of the fitted normal vector on the horizontal plane; calculating the angle between the projection vector and the unit normal vector; and calculating the offset based on the point cloud density and the angle.

[0012] By adopting this technical solution, the offset of the printing platform can be accurately calculated to ensure the accuracy of subsequent printing platform leveling.

[0013] In some possible implementations, calculating the offset based on the point cloud density and the angle includes: calculating the offset according to the following formula: offset = sinθ×point cloud density, where θ is the angle.

[0014] In some possible implementations, after leveling and compensating the three-dimensional point cloud data according to the offset, it also includes: controlling the laser light source to scan the printing platform again to obtain new three-dimensional point cloud data of the printing platform; obtaining a point cloud model of the printing platform according to the new three-dimensional point cloud data; obtaining the actual curvature of the point cloud model; obtaining a compensation value of the new three-dimensional point cloud data according to the actual curvature and a preset theoretical curvature, and performing deformation compensation on the point cloud model according to the compensation value.

[0015] By adopting this technical solution, the deformation of the printing platform can be compensated, and the printing accuracy of the 3D printing equipment can be further improved, thereby further improving the user experience.

[0016] In some possible implementations, obtaining the actual curvature of the point cloud model includes: obtaining multiple sampling point sets from the point cloud model according to a preset sampling interval; calculating the actual curvature of each of the sampling point sets; and obtaining the compensation value of the new three-dimensional point cloud data based on the actual curvature and a preset theoretical curvature includes: comparing the actual curvature of each of the sampling point sets with the theoretical curvature, and obtaining the compensation value corresponding to each of the sampling point sets based on the comparison result.

[0017] By adopting this technical solution, the deformation compensation effect of the printing platform can be improved, and the printing accuracy of the 3D printing equipment can be further improved.

[0018] In some possible implementations, the compensation value of each sampling point set is obtained according to the following method: obtaining a deviation value according to the difference between the theoretical curvature and the actual curvature of the sampling point set; and calculating the compensation value according to the deviation value and a preset compensation coefficient.

[0019] A second aspect of the present application discloses an electronic device, which includes a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the above-mentioned automatic leveling method.

[0020] A third aspect of the present application discloses a computer-readable storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned automatic leveling method.

[0021] It can be understood that the electronic device of the second aspect and the computer-readable storage medium of the third aspect provided above correspond to the method of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0023] FIG1 is a flow chart of an automatic leveling method provided in one embodiment of the present application.

[0024] FIG2 is a schematic diagram of a scanning and printing platform of a 3D printing device provided in an embodiment of the present application.

[0025] FIG3 is a schematic diagram of comparing normal vectors of a horizontal plane and a fitting plane provided by an embodiment of the present application.

[0026] FIG4 is a flow chart of an automatic leveling method provided in an embodiment of the present application.

[0027] FIG5 is a diagram showing an application scenario of printing platform deformation compensation provided by an embodiment of the present application.

[0028] FIG6 is a flow chart of an automatic leveling method provided in an embodiment of the present application.

[0029] FIG7 is a flow chart of an automatic leveling method provided in an embodiment of the present application.

[0030] FIG8 is a schematic structural diagram of a printing line A provided in an embodiment of the present application.

[0031] FIG9 is a flow chart of an automatic leveling method provided in an embodiment of the present application.

[0032] FIG10 is a flow chart of an automatic leveling method provided in an embodiment of the present application.

[0033] FIG11 is a diagram showing the printing effect of a 3D printing device provided in one embodiment of the present application.

[0034] FIG12 is another effect diagram of printing by the 3D printing device provided in one embodiment of the present application.

[0035] FIG13 is a working interaction diagram of a 3D printing device provided in one embodiment of the present application.

[0036] FIG14 is a schematic diagram of a scenario of line height detection of a 3D printing device provided in an embodiment of the present application.

[0037] FIG15 is an image captured by a camera of a 3D printing device in an online high-inspection scenario according to an embodiment of the present application.

[0038] FIG16 is another image captured by the camera of the 3D printing device provided in an embodiment of the present application in an online high-inspection scenario.

[0039] FIG17 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features therein can be combined with each other in the absence of conflict.

[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0043] It should be further noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0044] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural.

[0045] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0046] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given for reference.

[0047] 3D printing equipment, also known as three-dimensional printers or stereo printers, is a rapid prototyping process that typically uses digital printing technology to create materials. 3D printing equipment is often used to create models or parts in fields such as mold manufacturing and industrial design.

[0048] Please refer to FIG1 , which is a flow chart of an automatic leveling method provided in one embodiment of the present application. This embodiment is applied to a 3D printing device, wherein the 3D printing device includes a laser light source for emitting a line laser and a printing platform, and includes the following steps:

[0049] Step 101: Control the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform.

[0050] Please refer to Figure 2, which is a schematic diagram of the 3D printing device provided in an embodiment of the present application scanning the printing platform. The 3D printing device controls the laser light source to scan the printing platform back and forth line by line in a strip manner, collects the point cloud data of each line, and stitches the point clouds to generate a 3D model of the entire printing platform.

[0051] Specifically, the 3D printing device can set the diameter of the laser beam emitted by the laser light source. During the scanning process, the laser light source swings under the control of the 3D printing device to form a complete scanning surface of the printing platform, ensuring that the laser light source completely scans the outline of the printing platform. During the laser light scanning process, the 3D printing device obtains 3D point cloud data of the printing platform, and finally obtains a complete 3D point cloud data of the printing platform.

[0052] In some embodiments, the diameter of the laser beam emitted by the laser light source is not specifically limited and can be set according to actual needs.

[0053] Step 102: Perform plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

[0054] In some embodiments, the fitting normal vector can be obtained by: performing point cloud splicing on the three-dimensional point cloud data; performing plane fitting on the three-dimensional point cloud data after point cloud splicing to obtain a fitting plane of the three-dimensional point cloud data, where the fitting plane is the plane where the printing platform is located; and obtaining the fitting normal vector of the fitting plane.

[0055] Specifically, after obtaining the three-dimensional point cloud data, least square fitting is performed on the three-dimensional point cloud data to obtain a fitting plane.

[0056] In some embodiments, the point cloud data of the preset sampling points on the printing platform can be obtained in the aforementioned step 101. The point cloud data of the preset sampling points are the coordinates of the preset sampling points in the spatial rectangular coordinate system. By performing least squares fitting on the point cloud data of the preset sampling points, the fitting normal vector of the plane where the printing platform is located can also be obtained.

[0057] For ease of understanding, the following takes the coordinates of the preset sampling point as (x, y, z) as an example to specifically illustrate how to obtain the fitted normal vector in this embodiment:

[0058] (1) For the point cloud data of the preset sampling points, the fitted plane equation is set to Ax+By+Cz+D=0; where A, B, C, and D are all plane fitting parameters, and the normal vector is n(A, B, C).

[0059] (2) Normalize n(A, B, C) to obtain the unit vector V1(a, b, c) in the normal direction, where a2+b2+c2=1.

[0060] Step 103: Calculate the offset of the printing platform based on the horizontal plane according to the fitted normal vector and the unit normal vector of the horizontal plane.

[0061] In some embodiments, the offset of the printing platform based on the horizontal plane is calculated according to the following method: obtaining the point cloud density of the three-dimensional point cloud data; obtaining the projection vector of the fitted normal vector on the horizontal plane; calculating the angle between the projection vector and the unit normal vector; and calculating the offset based on the point cloud density and the angle.

[0062] For ease of understanding, the following is a specific example of how to determine the offset of the printing platform based on the horizontal plane in this embodiment with reference to FIG3 :

[0063] Please refer to FIG3 , which is a schematic diagram of comparing the normal vectors of the horizontal plane and the fitting plane provided by this embodiment.

[0064] (1) Assume that the fitting normal vector of the fitting plane is The unit normal vector of the horizontal plane is The normal vector Projected onto the horizontal plane, we get the vector Calculating vectors and The angle θ between them.

[0065] (2) Calculate the vector using the following formula and The angle θ between them: in,

[0066] (3) The offset of the printing platform based on the horizontal plane is calculated by the following formula: offset = sinθ × density of point cloud data, where θ is a vector and The angle between them, the density of point cloud data is the number of point cloud data per square meter.

[0067] In some embodiments, the density of the point cloud data is related to factors such as the acquisition range and acquisition time of the point cloud data, and the density of the point cloud data can be estimated based on actual conditions.

[0068] Step 104: Perform leveling compensation on the three-dimensional point cloud data according to the offset.

[0069] In some embodiments, after determining the offset of the print platform, a correction value for the 3D point cloud data can be obtained. Once the correction value is determined, it can be applied to the point cloud data to correct for errors during the scanning process. Specifically, the correction value can be added to the coordinate values ​​of each point in the point cloud data to ensure that these points are correctly positioned relative to the print platform. This process can be performed during post-processing of the point cloud data after acquisition, or applied immediately during scanning.

[0070] In some embodiments, after the print platform is leveled, it is also possible to verify whether the print platform has been successfully calibrated. For example, multiple laser scans can be performed on the automatically leveled print platform. If the point cloud data obtained from each scan is very similar, the print platform has been successfully calibrated. If there are significant differences in the point cloud data obtained from multiple scans, it is necessary to obtain the correction amount again to further level the print platform and ensure the printing accuracy of the 3D printing device.

[0071] Compared with the related art, the embodiments of the present application have at least the following advantages: by performing plane fitting on the three-dimensional point cloud data of the printing platform to obtain the fitting normal vector of the plane where the printing platform is located, and then comparing the fitting normal vector with the unit normal vector of the horizontal plane to obtain the offset of the printing platform based on the horizontal plane, the three-dimensional point cloud data can be leveled and compensated according to the offset, that is, the printing platform can be automatically leveled to ensure that the plane where the printing platform is located is a horizontal plane. The whole process is efficient and easy to operate, avoiding the occurrence of "the position of the printing platform is offset, resulting in low printing accuracy of the 3D printing device", improving the printing accuracy of the 3D printing device, and thus improving the user experience.

[0072] Please refer to Figure 4, which is a flow chart of the automatic leveling method provided in one embodiment of the present application. This embodiment further improves upon the previous embodiment. The main improvement is that, after leveling the 3D point cloud data based on the offset, the printing platform is further compensated for deformation. This method further ensures the flatness of the printing platform, thereby improving the print quality of the 3D printing device.

[0073] The specific process of this embodiment is shown in FIG4 , and includes the following steps:

[0074] Step 201: Control the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform.

[0075] Step 202: Perform plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

[0076] Step 203: Calculate the offset of the printing platform based on the horizontal plane according to the fitted normal vector and the unit normal vector of the horizontal plane.

[0077] Step 204: Perform leveling compensation on the three-dimensional point cloud data according to the offset.

[0078] Steps 201 to 204 of this embodiment are similar to steps 101 to 104 of the aforementioned embodiment, and are not described again here to avoid repetition.

[0079] Step 205: Control the laser light source to scan the printing platform again to obtain new three-dimensional point cloud data of the printing platform.

[0080] In some embodiments, the printing platform is scanned in the same manner as in the aforementioned step 201 to obtain new three-dimensional point cloud data.

[0081] Step 206: Obtain a point cloud model of the printing platform based on the new three-dimensional point cloud data.

[0082] In some embodiments, point cloud processing software (such as CloudCompare or MeshLab) is used to process the point cloud data of the printing platform surface to extract the printing platform surface information. Specifically, the point cloud processing software is used to filter, smooth, and perform surface extraction operations on the point cloud data of the printing platform surface to obtain a smooth point cloud model of the printing platform surface.

[0083] Step 207: Obtain the actual curvature of the point cloud model.

[0084] In some embodiments, the actual curvature of the point cloud model is obtained by: obtaining multiple sampling point sets from the point cloud model according to a preset sampling interval; and calculating the actual curvature of each sampling point set.

[0085] It is understandable that this embodiment does not impose any specific limitation on the size of the preset sampling interval, and it can be set according to actual needs, such as setting the preset sampling interval to 5 mm, 10 mm, etc.

[0086] Step 208: Obtain compensation values ​​for new three-dimensional point cloud data according to the actual curvature and the preset theoretical curvature, and perform deformation compensation on the point cloud model according to the compensation values.

[0087] Specifically, the preset theoretical curvature is the curvature of the point cloud model obtained by the 3D printing device scanning the flat printing platform.

[0088] In some embodiments, the actual curvature of each sampling point set is compared with the theoretical curvature, and the compensation value corresponding to each sampling point set is obtained according to the comparison result.

[0089] For example, the sampling point sets are the first sampling point set, the second sampling point set, and the third sampling point set. The actual curvature corresponding to the first sampling point set is S1, the actual curvature corresponding to the second sampling point set is S2, and the actual curvature corresponding to the third sampling point set is S3. Assuming a preset theoretical curvature of S0, the deviation between S1 and S0 is compared, and the compensation value for the first sampling point set is obtained based on the comparison result; the deviation between S2 and S0 is compared, and the compensation value for the second sampling point set is obtained based on the comparison result; and the deviation between S3 and S0 is compared, and the compensation value for the third sampling point set is obtained based on the comparison result.

[0090] In some embodiments, the compensation value of each sampling point set is obtained in the following manner: obtaining a deviation value according to the difference between the theoretical curvature and the actual curvature of the sampling point set; and calculating the compensation value according to the deviation value and a preset compensation coefficient.

[0091] Specifically, the compensation factor is a constant that depends on factors such as the printing process, the geometry and size of the printing platform, the printer's operating mode, and the required printing accuracy. Generally, the compensation factor ranges from 0.1 to 0.5.

[0092] In some embodiments, the compensation coefficient can be determined in the following ways: 1. Select a printing platform, use the same 3D printing equipment and printing parameters to perform multiple prints on the printing platform, and record the deviation of each print. 2. Calculate the corresponding compensation value for the deviation of each print, which can be calculated according to the above formula. 3. Fit the calculated compensation value and the actual deviation data, which can be processed using methods such as curve fitting or regression analysis. 4. Select a suitable compensation coefficient based on the fitting results so that the calculated compensation value and the actual deviation data have the best fitting effect. It should be noted that the selection of the compensation coefficient is a relatively empirical process and needs to be adjusted according to the specific situation. In addition, after determining the compensation coefficient, multiple tests are needed to verify its effectiveness and make adjustments.

[0093] For ease of understanding, the following specifically describes how to perform deformation printing compensation on a point cloud model in this embodiment in conjunction with FIG5 . FIG5 is a diagram illustrating an application scenario of deformation printing compensation for a printing platform provided in this embodiment:

[0094] (1) Assume that the printing platform is a rectangular printing platform with dimensions of 100 mm × 80 mm and a thickness of 2 mm. Use the line laser generator of the 3D printing device to scan the printing platform and obtain point cloud data of the printing platform surface.

[0095] (2) Use point cloud processing software (such as CloudCompare or MeshLab) to process the point cloud data of the printing platform surface and extract the printing platform surface information. Specifically, use the point cloud processing software to filter, smooth, and perform surface extraction operations on the point cloud data of the printing platform surface to obtain a smooth point cloud model of the printing platform surface.

[0096] (3) Determine the sampling interval to calculate the printing compensation value. As shown in FIG7 , 5 mm is selected as the sampling interval, that is, the point cloud data of the printing platform surface is sampled every 5 mm.

[0097] (4) Using point cloud processing software or programming language (such as Python or MATLAB), sampling is performed on the surface point cloud model of the printing platform obtained above at a sampling interval of 5 mm, and a total of 20 sampling point sets can be obtained.

[0098] (5) Using programming languages ​​such as Python or MATLAB, surface fitting is performed on each of the 20 sampling point sets to obtain 20 fitted sub-surfaces. The actual curvature of each sub-surface is then calculated using a surface fitting algorithm.

[0099] (6) Compare the actual curvature of the sub-surface with the theoretical curvature of the original printing platform, and calculate the compensation value of each sub-surface using the following formula:

[0100] Compensation value = compensation coefficient × deviation; deviation = theoretical curvature - actual curvature.

[0101] (7) The compensation value calculated above is used in point cloud processing software to update the point cloud model of the printing platform surface, thereby realizing printing compensation for the deformation of the point cloud model.

[0102] Compared with related technologies, the embodiments of the present application have at least the following advantages: by performing plane fitting on the three-dimensional point cloud data of the printing platform to obtain the fitted normal vector of the plane on which the printing platform is located, and then comparing the fitted normal vector with the unit normal vector of the horizontal plane to obtain the offset of the printing platform based on the horizontal plane, the three-dimensional point cloud data can be leveled and compensated according to the offset, that is, the printing platform can be automatically leveled to ensure that the plane on which the printing platform is located is a horizontal plane. The entire process is efficient and easy to operate, avoiding the situation where "the position of the printing platform is offset, resulting in low printing accuracy of the 3D printing device", improving the printing accuracy of the 3D printing device, and thus improving the user experience. In addition, by performing deformation printing compensation on the printing platform again after leveling and compensating the three-dimensional point cloud data according to the offset, the flatness of the printing platform can be further ensured, thereby improving the printing quality of the 3D printing device.

[0103] Please refer to Figure 6, which is a flow chart of the automatic leveling method provided in one embodiment of the present application. This embodiment is a further improvement based on the previous embodiment. The main improvement is that: in this embodiment, before printing the 3D model based on the three-dimensional point cloud data after leveling compensation, the distance between the nozzle assembly and the printing platform in the 3D printing device is also adjusted to ensure that the line width of the print line formed after the nozzle assembly sprays the printing material on the printing platform meets the preset line width requirement, thereby further improving the printing accuracy of the 3D printing device and further improving the user experience.

[0104] This embodiment is applied to a 3D printing device, which includes a nozzle assembly and a printing platform. The nozzle assembly is used to spray printing material onto the printing platform. The printing platform includes a formal printing area and an informal printing area, and includes the following steps:

[0105] Step 301: Control the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform.

[0106] Step 302: Perform plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

[0107] Step 303: Calculate the offset of the printing platform based on the horizontal plane according to the fitted normal vector and the unit normal vector of the horizontal plane.

[0108] Step 304: Perform leveling compensation on the three-dimensional point cloud data according to the offset.

[0109] Steps 301 to 304 of this embodiment are similar to steps 101 to 104 of the aforementioned embodiment, and are not described again here to avoid repetition.

[0110] Step 305: Control the nozzle assembly to print at least one preset line in the informal printing area.

[0111] In some embodiments, the 3D printing device is communicatively connected to the 3D printing slicing software, or the 3D printing device is provided with the 3D printing slicing software. Before controlling the nozzle assembly to print the preset line, the 3D printing slicing software receives the preset slicing parameters and printing material parameters of the 3D model to be printed input by the user. The 3D printing slicing software obtains the preset extrusion parameter value based on the preset slicing parameters and printing material parameters. The 3D printing device controls the nozzle assembly to print at least one preset line in the informal printing area based on the preset extrusion parameter value.

[0112] Specifically, the preset slicing parameters include, but are not limited to, temperature, layer height, speed, support, and retraction. Temperature refers to the nozzle temperature. When the 3D printing device has a heated bed, the temperature also includes the temperature of the heated bed. Layer height refers to the height of each layer of the 3D model to be printed. The smaller the layer height, the more layers are required for the entire print. Speed ​​generally refers to the movement speed of the print head, and can also include the printing material filling speed, wall speed, etc. Support is the structure that supports the overhanging features on the 3D model to be printed. Retraction includes retraction distance and retraction speed. Retraction determines the amount and speed of the filament being sucked back into the nozzle to prevent material from seeping out before extrusion.

[0113] Printing material parameters include but are not limited to: material type, required quantity, etc.

[0114] In some embodiments, the relative positional relationship between the formal printing area and the informal printing area is not specifically limited. For example, the central area of ​​the printing platform can be used as the formal printing area, and the peripheral area surrounding the central area can be used as the informal printing area. Other areas of the printing platform can also be used as the formal printing area according to actual needs. These will not be detailed here.

[0115] Step 306: Obtain the actual line width of the preset line.

[0116] In some embodiments, the 3D printing device includes a photographing device, which photographs an image of the preset line and then obtains the actual line width of the preset line based on the image of the preset line.

[0117] In some embodiments, the actual line width of the preset line may also be measured using tools such as a digital caliper and a microscope.

[0118] Step 307: Compare the actual line width with the preset printing line width of the 3D model to be printed, and determine an adjustment value based on the comparison result. The adjustment value is used to adjust the relative distance between the printing platform and the nozzle assembly.

[0119] In some embodiments, the 3D printing slicing software receives preset slicing parameters and printing material parameters of the 3D model to be printed input by the user, and the 3D printing slicing software obtains a preset printing line width according to the preset slicing parameters and printing material parameters.

[0120] In some embodiments, the adjustment value is determined in the following manner: when the actual line width is greater than the preset printing line width, the adjustment value is determined to increase the relative distance between the printing platform and the nozzle assembly; when the actual line width is less than the preset printing line width, the adjustment value is determined to reduce the relative distance between the printing platform and the nozzle assembly.

[0121] Specifically, if the actual line width is larger than the preset printing line width, it means that the distance between the printing platform and the nozzle assembly is too close, and the printing platform needs to be adjusted downward by a certain distance to increase the relative distance between the printing platform and the nozzle assembly; if the actual line width is smaller than the preset printing line width, it means that the distance between the printing platform and the nozzle assembly is too far, and the printing platform needs to be adjusted upward by a certain distance to reduce the relative distance between the printing platform and the nozzle assembly.

[0122] In some embodiments, the 3D printing device includes a motor, which is connected to the printing platform and is used to control the lifting and lowering of the printing platform. When the actual line width is greater than the preset printing line width, the motor controls the printing platform to descend; when the actual line width is less than the preset printing line width, the motor controls the printing platform to rise.

[0123] In some embodiments, the 3D printing device pre-sets a distance adjustment value. Taking the distance adjustment value as 5 mm as an example, when the printing platform needs to rise, the motor controls the printing platform to rise 5 mm, and then the 3D printing device controls the nozzle assembly to re-print a preset line in the informal printing area, and compares the line width of the new preset line with the preset printing line width again to determine whether it is necessary to control the printing platform to rise 5 mm again, until the difference between the actual line width of the preset line finally printed by the nozzle assembly in the informal printing area and the preset printing line width meets the printing requirements, then stop controlling the printing platform to rise 5 mm, and print the 3D model to be printed according to the relative distance between the printing platform and the nozzle assembly at this time.

[0124] Step 308: After adjusting the relative distance between the printing platform and the nozzle assembly according to the adjustment value, control the nozzle assembly to print the 3D model in the main printing area.

[0125] The steps for printing the 3D model to be printed in the formal printing area are described in detail later. To avoid repetition, they will not be repeated here.

[0126] Compared with the related art, the embodiments of the present application have at least the following advantages: by controlling the nozzle assembly to print a preset line in the informal printing area, so as to know the actual line width of the print line currently printed by the 3D printing device, and then comparing the actual line width with the preset print line width of the 3D model to be printed, and adjusting the relative distance between the printing platform and the nozzle assembly according to the comparison result, the distance between the nozzle assembly and the printing platform can be made to reach an appropriate value, thereby ensuring that the print line formed after the nozzle assembly sprays the printing material on the printing platform meets the preset print line width requirement, avoiding the occurrence of "the relative distance between the printing platform and the nozzle assembly is large or small, resulting in a smaller or larger line width of the print line formed after the nozzle assembly sprays the printing material on the printing platform", thereby improving the printing accuracy of the 3D printing device and thus improving the user experience.

[0127] Please refer to Figure 7, which is a flow chart of the automatic leveling method provided in an embodiment of the present application. This embodiment is a further improvement on the previous embodiment, and the main improvement is that: in this embodiment, different preset extrusion parameter values ​​are set for different parts of the 3D model to be printed, and the nozzle assembly is controlled to print preset lines in the informal printing area according to each preset extrusion parameter value. Finally, the average line width of each preset line is compared with the preset printing line width to obtain a more accurate adjustment value, further improving the printing accuracy of the 3D printing device, thereby further improving the user experience.

[0128] The specific process of this embodiment is shown in FIG7 , and includes the following steps:

[0129] Step 401: Control the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform.

[0130] Step 402: Perform plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

[0131] Step 403: Calculate the offset of the printing platform based on the horizontal plane according to the fitted normal vector and the unit normal vector of the horizontal plane.

[0132] Step 404: Perform leveling compensation on the three-dimensional point cloud data according to the offset.

[0133] Steps 401 to 404 of this embodiment are similar to steps 101 to 104 of the aforementioned embodiment, and are not described again here to avoid repetition.

[0134] Step 405: Obtain N preset extrusion parameter values ​​of the nozzle assembly according to the preset slicing parameters and the printing material parameters. Different parts in the 3D model correspond to at least one preset extrusion parameter value.

[0135] Specifically, N is an integer greater than 1. This embodiment does not impose any specific limitation on the value of N, and it can be set according to actual needs.

[0136] In some embodiments, the portion of the 3D model to be printed includes an inner wall, an outer wall, a filling area, etc. The preset extrusion parameter values ​​include, but are not limited to, extrusion speed, extrusion temperature, layer height, and the like.

[0137] Step 406: Control the nozzle assembly to print N preset lines in the informal printing area according to N preset extrusion parameter values, wherein one preset extrusion parameter value corresponds to one preset line.

[0138] In some embodiments, each preset extrusion parameter value corresponds to a part of the 3D model to be printed. For ease of understanding, the following uses the example of the 3D model to be printed including part 1, part 2, and part 3; the preset extrusion parameter values ​​including a first preset extrusion parameter value, a second preset extrusion parameter value, and a third preset extrusion parameter value; and the preset lines including a first preset line, a second preset line, and a third preset line to specifically explain how to control the nozzle assembly to print the preset lines in the informal printing area in this embodiment:

[0139] The first preset extrusion parameter value corresponds to part 1, the second preset extrusion parameter value corresponds to part 2, and the third preset extrusion parameter value corresponds to part 3. The 3D printing device controls the nozzle assembly to print the first preset line according to the first preset extrusion parameter value, controls the nozzle assembly to print the second preset line according to the second preset extrusion parameter value, and controls the nozzle assembly to print the third preset line according to the third preset extrusion parameter value.

[0140] It can be understood that the first preset line, the second preset line and the third preset line can be connected end to end, that is, the first preset line, the second preset line and the third preset line are a printing line as a whole; the first preset line, the second preset line and the third preset line can also be unconnected to each other, that is, the first preset line, the second preset line and the third preset line are independent printing lines.

[0141] Please refer to Figure 8, which is a schematic diagram of the structure of the print line A provided in this embodiment. The first preset line, the second preset line, and the third preset line are connected end to end. The 3D printing device prints a continuous print line A in the informal printing area according to the first preset extrusion parameter value, the second preset extrusion parameter value, and the third preset extrusion parameter value. The print line A can be divided into three parts, each corresponding to a preset extrusion parameter value.

[0142] Step 407: Obtain N actual line widths of the N preset lines.

[0143] The method of obtaining the actual line width in this embodiment is the same as the method of obtaining the actual line width in the previous embodiment, and to avoid repetition, it will not be repeated here.

[0144] Step 408: Compare the N actual line widths with the preset printing line width, and determine an adjustment value based on the comparison result.

[0145] In some embodiments, the adjustment value can be determined by comparing the N actual line widths with the preset printing line width in the following manner: calculating the average value of the N actual line widths; comparing the average value with the preset printing line width, and determining the adjustment value based on the comparison result.

[0146] Specifically, assuming that the value of N is 5, the average value P of the five actual line widths is calculated, and the average value P is compared with the preset printing line width. If the average value P is greater than the preset printing line width, it means that the distance between the printing platform and the nozzle assembly is too close, and the printing platform needs to be adjusted downward by a certain distance to increase the relative distance between the printing platform and the nozzle assembly; if the average value P is less than the preset printing line width, it means that the distance between the printing platform and the nozzle assembly is too far, and the printing platform needs to be adjusted upward by a certain distance to reduce the relative distance between the printing platform and the nozzle assembly.

[0147] In some embodiments, the median of N actual line widths may be calculated, the median may be compared with the preset printing line width, and the adjustment value may be determined based on the comparison result.

[0148] It is understandable that after obtaining N actual line widths, this embodiment does not limit the manner in which the N actual line widths are calculated. It is only necessary to ensure that the result of the calculation can reflect the overall line width of the preset line.

[0149] Step 409: Adjust the relative distance between the printing platform and the nozzle assembly according to the adjustment value.

[0150] Compared with the related art, the embodiments of the present application have at least the following advantages: by setting different preset extrusion parameter values ​​for different parts of the 3D model to be printed, and controlling the nozzle assembly to print preset lines in the informal printing area according to each preset extrusion parameter value, and finally comparing the average line width of each preset line with the preset printing line width, and adjusting the relative distance between the printing platform and the nozzle assembly according to the comparison result, the distance between the nozzle assembly and the printing platform can reach an appropriate value, thereby ensuring that the printed line formed after the nozzle assembly sprays the printing material on the printing platform meets the preset printing line width requirement, avoiding the occurrence of "the relative distance between the printing platform and the nozzle assembly is large or small, resulting in a smaller or larger line width of the printed line formed after the nozzle assembly sprays the printing material on the printing platform", thereby improving the printing accuracy of the 3D printing device and thus improving the user experience.

[0151] Please refer to Figure 9, which is a flowchart of the automatic leveling process provided in an embodiment of the present application. This embodiment is a further improvement on the previous embodiment, with the main improvement being that, in this embodiment, each part of the 3D model corresponds to at least two preset extrusion parameter values, and the optimal extrusion parameter value is selected from the preset extrusion parameter values ​​corresponding to each part, thereby further improving the printing accuracy of the 3D printing device and ensuring print quality.

[0152] The specific process of this embodiment is shown in FIG9 , and includes the following steps:

[0153] Step 501: Control the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform.

[0154] Step 502: Perform plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

[0155] Step 503: Calculate the offset of the printing platform based on the horizontal plane according to the fitted normal vector and the unit normal vector of the horizontal plane.

[0156] Step 504: Perform leveling compensation on the three-dimensional point cloud data according to the offset.

[0157] Steps 501 to 504 of this embodiment are similar to steps 101 to 104 of the aforementioned embodiment, and are not described again here to avoid repetition.

[0158] Step 505: Obtain N preset extrusion parameter values ​​of the nozzle assembly according to the preset slicing parameters and printing material parameters. The 3D model to be printed includes M different parts, and each part corresponds to at least two preset extrusion parameter values.

[0159] Specifically, M is an integer greater than 1.

[0160] In some embodiments, each part of the 3D model to be printed corresponds to the same number of preset extrusion parameter values. For example, assuming that the value of M is 6, the 3D model to be printed includes 6 different parts, and each part corresponds to 3 preset extrusion parameter values.

[0161] In some embodiments, each part of the 3D model to be printed corresponds to a different number of preset extrusion parameter values. For example, assuming that the value of M is 4, that is, the 3D model to be printed includes 4 different parts (part A, part B, part C, and part D), part A corresponds to 2 preset extrusion parameter values, part B corresponds to 3 preset extrusion parameter values, part C corresponds to 4 preset extrusion parameter values, and part D corresponds to 2 preset extrusion parameter values.

[0162] Step 506: Control the nozzle assembly to print N preset lines in the informal printing area according to N preset extrusion parameter values, where one preset extrusion parameter value corresponds to one preset line.

[0163] Step 507: Selecting the optimal preset line for each part from the preset lines corresponding to the M parts, and using the preset extrusion parameter value corresponding to the optimal preset line for each part as the final extrusion parameter value for printing the 3D model to be printed.

[0164] In some embodiments, the optimal preset line for each part can be selected from the preset lines corresponding to M parts in the following manner: the line width standard deviation of the preset line corresponding to each part is calculated, and the preset line with the smallest line width standard deviation for each part is used as the optimal preset line for that part.

[0165] Specifically, the line width standard deviation is calculated by: obtaining the line width values ​​of the preset line at multiple different positions; calculating the average line width of the preset line based on the multiple line width values; and calculating the line width standard deviation based on the average line width and the multiple line width values.

[0166] To facilitate understanding, the following is a specific example of how to select the optimal preset line for each part:

[0167] Assume that the value of M is 3, that is, the 3D model to be printed includes 3 different parts (part A, part B, and part C). Taking part A as an example, assume that part A corresponds to 3 preset lines (preset line 1, preset line 2, and preset line 3). Measure the line width values ​​at different positions of preset line 1. For example, take three measurement points at the front, middle, and back of preset line 1, measure the line width values ​​at these three points, and assume they are L1, L2, and L3. Calculate the average value of L1, L2, and L3. Then calculate the line width standard deviation of preset line 1 according to the following formula Among them, σ is the standard deviation of the line width of the preset line 1, L i is the line width value at the i-th point, is the average line width of preset line 1, and n is the number of measurement points.

[0168] It can be understood that the method for calculating the line width standard deviation of preset line 2 and preset line 3 is the same as that of preset line 1. In order to avoid repetition, it will not be repeated here.

[0169] After calculating the line width standard deviations corresponding to preset line one, preset line two, and preset line three, the sizes of the three line width standard deviations are compared, and the preset line with the smallest line width standard deviation is taken as the optimal preset line.

[0170] It can be understood that the way in which parts B and parts C obtain the optimal preset line is the same as the way in which part A obtains the optimal preset line. In order to avoid repetition, it will not be repeated here.

[0171] In some embodiments, after the final extrusion parameters are selected, the final extrusion parameters may be adjusted to further improve the printing quality of the 3D printing device.

[0172] Please refer to Figure 10, which shows the effect of a 3D printer printing on the print platform. As can be seen from Figure 10, the printed lines for the preset extrusion parameter values ​​of 0.004 to 0.096 are straight. The printed lines for the preset extrusion parameter values ​​of 0.004 to 0.036 have discontinuities at the front end and accumulation of printing material at the back end. The printed lines for the preset extrusion parameter values ​​of 0.04 to 0.056 are relatively uniform. The printed lines for the preset extrusion parameter values ​​of 0.06 to 0.096 have discontinuities at the back end and accumulation of printing material at the front end.

[0173] Specifically, a print line with a preset extrusion parameter value of 0.004 to 0.036 has a smaller extrusion parameter at the front end, resulting in a discontinuity at the front end, and a larger extrusion parameter at the back end, resulting in a buildup of printed material at the back end. By increasing the print parameter at the front end and decreasing the print parameter at the back end, a print line with a preset extrusion parameter value of 0.04 to 0.056 can be obtained. The final extrusion parameter is 0.04 to 0.056.

[0174] Please refer to Figure 11, which shows another rendering of a 3D printer on a print platform. As can be seen from Figure 11, the printed lines for the preset extrusion parameters of 0.02 to 0.08 are all broken line groups. The print quality of a 3D printer can be determined by measuring the spacing between adjacent printed lines, the printing of the line inflection points, and the printing of the starting and ending positions of the printed lines.

[0175] Specifically, before the 3D printing device controls the nozzle assembly to print the fold line, it first controls the nozzle assembly to accelerate to a preset printing speed at a rated acceleration, and then controls the nozzle assembly to print the fold line on the printing platform at the preset printing speed. It is understood that the number of print lines is the same as the number of preset extrusion parameters. That is, the number of print lines controlled by the 3D printing device is determined by the number of preset extrusion parameters to be detected.

[0176] In some embodiments, the 3D printing device controls the nozzle assembly to accelerate at an acceleration of 5000 square millimeters per second, stops accelerating after accelerating to 12000 millimeters per second, and controls the nozzle assembly to print the broken line with an angle of 45 degrees as shown in Figure 3 on the printing platform at a speed of 12000 millimeters per second.

[0177] After all the fold lines were printed, the 3D printing device captured the effect image shown in Figure 11. The human eye was then used to simulate the human eye to observe whether there were gaps or protrusions at the bends of each fold line. In other words, the uniformity of each fold line at the bend was observed. Specifically, fold lines with preset extrusion parameters of 0.02 to 0.036 had protrusions at the bends; fold lines with preset extrusion parameters of 0.04 to 0.052 had no protrusions or gaps at the bends; and fold lines with preset extrusion parameters of 0.056 to 0.08 had gaps at the bends. The final extrusion parameters were therefore 0.04 to 0.052.

[0178] Please further refer to Figure 11. Each fold line group shown in Figure 11 is formed by the same number of printed lines. The preset extrusion parameters corresponding to each fold line group are different, and the preset extrusion parameters corresponding to the printed lines within each fold line group are the same. It is understood that each fold line group can also be formed by a different number of printed lines, and this embodiment is not specifically limited to this. In some embodiments, the renderings captured by the camera device can also be input into a preset uniformity recognition model. Based on the output of the uniformity recognition model, the presence of gaps or protrusions at the bends of each fold line can be detected.

[0179] Specifically, historical image data of printed fold lines is collected and used to train a primitive model. This primitive model is then used as the uniformity recognition model. After all fold lines are printed, the 3D printing device captures the resulting image, as shown in Figure 11. This image is then fed into the uniformity recognition model, which automatically detects gaps or protrusions at the bends of each fold line.

[0180] Step 508: Obtain N actual line widths of the N preset lines.

[0181] Step 509: Compare the N actual line widths with the preset printing line width, and determine an adjustment value according to the comparison result.

[0182] Step 510: After adjusting the relative distance between the printing platform and the nozzle assembly according to the adjustment value, the nozzle assembly is controlled to print the 3D model in the main printing area according to the final extrusion parameter value.

[0183] Compared with the related art, the embodiments of the present application have at least the following advantages: by setting different preset extrusion parameter values ​​for different parts of the 3D model to be printed, and controlling the nozzle assembly to print preset lines in the informal printing area according to each preset extrusion parameter value, and finally comparing the average line width of each preset line with the preset printing line width, and adjusting the relative distance between the printing platform and the nozzle assembly according to the comparison result, the distance between the nozzle assembly and the printing platform can reach an appropriate value, thereby ensuring that the printed line formed after the nozzle assembly sprays the printing material on the printing platform meets the preset printing line width requirement, avoiding the occurrence of "the relative distance between the printing platform and the nozzle assembly is large or small, resulting in a smaller or larger line width of the printed line formed after the nozzle assembly sprays the printing material on the printing platform", thereby improving the printing accuracy of the 3D printing device and thus improving the user experience. In addition, by setting at least two preset extrusion parameter values ​​for each part of the 3D model to be printed, the optimal extrusion parameter value can be selected from the preset extrusion parameter values ​​corresponding to each part, so that the 3D printing device controls the nozzle assembly to print the 3D model to be printed according to the optimal extrusion parameter value. This enables the 3D printing device to be suitable for different application scenarios, avoiding the situation where "the 3D printing device prints 3D models of various application scenarios using the extrusion parameter values ​​set for the first time, resulting in poor printing quality or even printing failure", ensuring the printing quality of the 3D printing device in different scenarios and further improving the user experience.

[0184] Please refer to Figure 12, which is a flowchart of the automatic leveling process provided in an embodiment of the present application. This embodiment is a further improvement on the previous embodiment, with the main improvement being that, before controlling the nozzle assembly to print the 3D model to be printed in the main printing area, a first-layer print detection is performed. This allows the 3D printing device to automatically detect print quality, allowing users to promptly understand print quality issues and further improving the user experience.

[0185] The specific process of this embodiment is shown in FIG12 , and includes the following steps:

[0186] Step 601: Control the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform.

[0187] Step 602: Perform plane fitting on the three-dimensional point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

[0188] Step 603: Calculate the offset of the printing platform based on the horizontal plane according to the fitted normal vector and the unit normal vector of the horizontal plane.

[0189] Step 604: Perform leveling compensation on the three-dimensional point cloud data according to the offset.

[0190] Steps 601 to 604 of this embodiment are similar to steps 101 to 104 of the aforementioned embodiment, and are not described again here to avoid repetition.

[0191] Step 605: Control the nozzle assembly to print at least one preset line in the informal printing area.

[0192] Step 606: Obtain the actual line width of the preset line.

[0193] Step 607: Compare the actual line width with the preset printing line width of the 3D model to be printed, and determine an adjustment value based on the comparison result. The adjustment value is used to adjust the relative distance between the printing platform and the nozzle assembly.

[0194] Step 608: After adjusting the relative distance between the printing platform and the nozzle assembly according to the adjustment value, control the photographing device to photograph an initial image of the current printing platform at a preset angle and preset distance from the printing platform.

[0195] In some embodiments, the 3D printing device includes a motor connected to the camera device for controlling changes in the angle and position of the camera device.

[0196] In some embodiments, the number of initial images is not specifically limited, and multiple initial images can be taken at the same angle and the same distance from the printing platform.

[0197] In some embodiments, the number of preset angles and preset positions is not specifically limited, that is, multiple initial images can be taken at different angles and / or different distances from the printing platform.

[0198] Step 609: Obtain first-layer information from the file used to instruct the 3D printing operation, wherein the first-layer information at least includes a two-dimensional plan view of the first layer of the 3D model to be printed.

[0199] In some embodiments, the file used to command 3D printing is a gcode file. To print a 3D model from a computer using a 3D printer, the model (commonly available in .stl and .obj formats) must first be input into 3D slicing software (such as Cura) for planar slicing, which then generates a gcode file. The gcode file is then sent to the 3D printer for reading, allowing the nozzle assembly of the 3D printer to fill each layer along a planned path, stacking the layers one by one to form the final 3D model.

[0200] In some embodiments, the first-layer information also includes point cloud data of the first layer, etc., and the first-layer information in the gcode file can be read using programming languages ​​such as Python.

[0201] Step 610: Based on the first layer information, control the nozzle assembly to print the first layer of the 3D model to be printed in the main printing area.

[0202] In some embodiments, after receiving the first layer information, the 3D printing device performs first layer printing, that is, controls the nozzle assembly to print the first layer of the 3D model to be printed in the formal printing area.

[0203] Step 611: Control the camera to capture a final image of the current printing platform at a preset angle and distance from the printing platform.

[0204] In some embodiments, the number of final images is the same as the number of initial images. For example, in the aforementioned step 608, the camera captures three initial images at the first preset angle and the first preset distance from the printing platform. Then, after the first layer of printing is completed, the camera captures three final images at the first preset angle and the first preset distance from the printing platform. The camera captures one initial image at the first preset angle and the first preset distance from the printing platform, and one initial image at the second preset angle and the second preset distance from the printing platform. Then, after the first layer of printing is completed, the camera captures one final image at the first preset angle and the first preset distance from the printing platform, and one final image at the second preset angle and the second preset distance from the printing platform.

[0205] Step 612: Determine the printing quality of the 3D printing device based on the initial image and the final image.

[0206] In some embodiments, a difference image is generated based on the initial image and the final image, and then the difference image is subjected to binarization and denoising processing. The processed image is compared with the planar two-dimensional image in the first layer information to determine the printing quality of the 3D printing device.

[0207] For ease of understanding, the process of determining the print quality of the 3D printing device in this embodiment is described in detail below:

[0208] (1) Use Python or other programming languages ​​to read the first-layer information in the gcode file, where the first-layer information at least includes a two-dimensional plan view of the first layer.

[0209] (2) Before the first layer is printed, the camera is controlled to maintain a preset distance from the printing platform and a preset angle between the camera and the printing platform, and then an initial image of the printing platform is captured.

[0210] (3) The 3D printing device receives the read first layer information and performs first layer printing.

[0211] (4) After the first layer of printing is completed, the camera is controlled to capture the final image of the printing platform at the same position as the initial image.

[0212] (5) Use programming languages ​​such as Python to obtain the difference image between the initial image and the final image.

[0213] (6) Use OpenCV and other libraries to perform binary denoising on the difference image to obtain the processed image.

[0214] (7) Use programming languages ​​such as Python to compare the processed image with the first layer information in the gcode file to detect the printing quality of the 3D printing equipment.

[0215] (8) Inform users of the printing quality of the 3D printing equipment by email, text message or other means.

[0216] Compared with the related art, the embodiments of the present application have at least the following advantages: by controlling the nozzle assembly to print a preset line in the informal printing area, so as to know the actual line width of the print line currently printed by the 3D printing device, and then comparing the actual line width with the preset print line width of the 3D model to be printed, and adjusting the relative distance between the printing platform and the nozzle assembly according to the comparison result, the distance between the nozzle assembly and the printing platform can reach an appropriate value, thereby ensuring that the print line formed after the nozzle assembly sprays the printing material on the printing platform meets the preset print line width requirement, avoiding the occurrence of "the relative distance between the printing platform and the nozzle assembly is large or small, resulting in a smaller or larger line width of the print line formed after the nozzle assembly sprays the printing material on the printing platform", thereby improving the printing accuracy of the 3D printing device and thus improving the user experience; in addition, by automatically performing the first layer printing detection, the printing quality of the 3D printing device can be automatically informed to the user, avoiding the user from manually checking the printing quality of the 3D printing device, further improving the user experience.

[0217] Please refer to Figure 13, which is a diagram illustrating the working interaction of the 3D printing device provided in an embodiment of the present application. This embodiment is a further improvement on the previous embodiment, with the main improvement being that in this embodiment, anomaly detection is performed on the first-layer detection workflow of the 3D printing device to ensure the normal operation of the 3D printing device and improve the printing quality of the 3D printing device.

[0218] Specifically, the interactive diagram shown in Figure 13 illustrates the workflow for first-layer inspection of a 3D printing device. This process uses computer vision, deep learning, point cloud, and other methods to acquire and compare data to detect defects on the heated bed surface and issues with the extrusion process. The results are then evaluated and presented with prompts. It's understood that the purpose of this interactive process is to perform a pre-print self-inspection of the environment and equipment to ensure print quality and success rate, and to issue prompt alerts to the user if any anomalies occur.

[0219] In some embodiments, the deep learning model is used to detect abnormalities in the processing steps of the 3D printing device. For example, the process of detecting abnormalities in the printing platform leveling, printing platform printing compensation, and nozzle assembly flow detection in the aforementioned embodiments can be detected. Specifically, the abnormal process detection method of the 3D printing device based on the deep learning model can be divided into the following steps:

[0220] (1) Data collection: Collect data for each processing step, including normal and abnormal data. This data can be in the form of images, videos, point clouds, etc.

[0221] (2) Data preprocessing: Preprocess the collected data, such as cropping, scaling, and enhancing the image, and filtering and sampling the point cloud, to facilitate subsequent deep learning model training and testing.

[0222] (3) Model training: Using the collected data, a deep learning model is trained to detect abnormalities in each processing step. Commonly used models include convolutional neural networks, recurrent neural networks, and autoencoders.

[0223] (4) Model testing: Use the trained deep learning model to test new data to determine whether the current processing step is abnormal. Some indicators such as accuracy, recall rate, F1-score, etc. can be used to evaluate the performance of the model.

[0224] (5) Integration into the system: Integrate the trained deep learning model into the actual system, detect each processing step, and give corresponding prompts or take corresponding measures if there is any abnormality.

[0225] It is worth mentioning that data collection and preprocessing must fully consider the actual situation and cover as many possible abnormal situations as possible to improve the robustness and reliability of the model. At the same time, model training and testing must be fully verified and tuned to achieve good detection results.

[0226] Please refer to Figure 14, which is a schematic diagram of a line height detection scenario for a 3D printing device provided in an embodiment of this application. This embodiment specifically illustrates the functionality of a 3D printing device, explaining how to measure the line height of an object under test using the 3D printing device provided in this embodiment. This method automatically detects the line height of an object under test, improving the user experience.

[0227] As shown in Figure 14, the 3D printing device includes a printing platform 1, a line laser generator 2, and a camera 3. The object to be measured is placed on printing platform 1. The basic formula for line height detection is: Line Height of Object to be Measured = Projected Offset Distance / tan (angle between the laser and the horizontal plane). Projected offset distance refers to the offset distance in the image captured by camera 3 relative to the un-irradiated position after the line laser is irradiated on the object surface. Figure 15 shows an image captured by camera 3. Specifically, the white line shown in Figure 15 is the laser light emitted by laser light source 2. The object to be measured is the printed line, and the direction of the laser light extends perpendicular to the direction of the printed line. tan (angle between the laser and the horizontal plane) refers to the tangent of the angle between the line laser and the horizontal plane.

[0228] Please refer to Figure 16, which shows an image of a triangular object captured by camera 3. The white line in Figure 16 represents the laser light emitted by laser light source 2. As can be seen from Figure 16, the triangular object has a certain height, which causes the laser light irradiated on the laser object to be measured to be offset.

[0229] To facilitate understanding, the following specifically describes how to perform line height detection on the object to be measured in this embodiment:

[0230] Assuming that the distance between the object to be measured and the line laser generator 2 is L, the angle between the line laser emitted by the line laser generator 2 and the horizontal plane is α, and the projection offset distance of the line laser on the surface of the object to be measured is d, the calculation formula for the line height H of the object to be measured is:

[0231] H = d / tan(α);

[0232] The projection offset distance d of the line laser on the surface of the object to be measured is calculated as follows: the projection distance of the line laser on the horizontal plane is D1 = L × cos(α); the projection offset distance of the line laser on the physical surface in the similar triangle is D2 = D1 × d / L; it is known that d = D2 × L / D1, and substituting D1 = L × cos(α) yields d = D2 / cos(α).

[0233] For example, when the distance L between the object to be measured and the line laser generator 2 is 50 cm and the angle α between the line laser and the horizontal plane is 45 degrees, the calculated projection offset distance d is 2 mm, and thus the calculated line height H of the object to be measured is 2 mm.

[0234] Please refer to Figure 17, which is a schematic diagram of the hardware structure of an electronic device 1000 provided in an embodiment of the present application. As shown in Figure 17, electronic device 1000 may include a processor 1001 and a memory 1002. Memory 1002 is used to store one or more computer programs 1003. One or more computer programs 1003 are configured to be executed by processor 1001. The one or more computer programs 1003 include instructions, which can be used to implement the above-mentioned method in electronic device 1000.

[0235] It is understood that the structure shown in this embodiment does not constitute a specific limitation on the electronic device 1000. In other embodiments, the electronic device 1000 may include more or fewer components than shown, or combine or separate some components, or arrange the components differently.

[0236] The processor 1001 may include one or more processing units. For example, the processor 1001 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0237] Processor 1001 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 1001 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 1001. If processor 1001 needs to use the same instruction or data again, it can directly access it from this memory. This avoids duplicate accesses, reduces the waiting time of processor 1001, and thus improves system efficiency.

[0238] In some embodiments, the processor 1001 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface.

[0239] In some embodiments, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0240] This embodiment further provides a computer-readable storage medium, which stores computer instructions. When the instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.

[0241] Among them, the electronic device and computer storage medium provided in this embodiment are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0242] In practical applications, the above functions can be distributed to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0243] In the several embodiments provided in this application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are schematic. For example, the division of the modules or units is a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0244] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0245] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0246] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0247] The above description is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. An automatic leveling method, characterized in that: Applied to a 3D printing device, the 3D printing device includes a laser light source for emitting a line laser and a printing platform, and the method includes: Controlling the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform; Performing plane fitting on the three-dimensional point cloud data to obtain a fitting normal vector of the plane where the printing platform is located; Calculating an offset of the printing platform based on the horizontal plane according to the fitting normal vector and a unit normal vector of the horizontal plane; Leveling compensation is performed on the three-dimensional point cloud data according to the offset.

2. The automatic leveling method according to claim 1, characterized in that: The step of controlling the laser light source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform includes: The laser light source is controlled to emit a line laser according to a preset laser beam diameter, and the laser light source is controlled to reciprocate to form a complete scanning surface for the printing platform to obtain the three-dimensional point cloud data.

3. The automatic leveling method according to claim 2, characterized in that: The performing plane fitting on the three-dimensional point cloud data to obtain a fitting normal vector of the plane where the printing platform is located includes: Performing point cloud stitching on the three-dimensional point cloud data; Performing plane fitting on the three-dimensional point cloud data after point cloud splicing to obtain a fitting plane of the three-dimensional point cloud data, wherein the fitting plane is the plane where the printing platform is located; Obtain the fitting normal vector of the fitting plane.

4. The automatic leveling method according to claim 1, characterized in that: The step of calculating the offset of the printing platform based on the horizontal plane according to the fitting normal vector and the unit normal vector of the horizontal plane comprises: Acquire the point cloud density of the three-dimensional point cloud data; Obtaining a projection vector of the fitted normal vector on a horizontal plane; Calculating the angle between the projection vector and the unit normal vector; The offset is calculated according to the point cloud density and the angle.

5. The automatic leveling method according to claim 4, characterized in that: The calculating the offset according to the point cloud density and the angle includes: The offset is calculated according to the following formula: Offset=sinθ×point cloud density, where θ is the angle.

6. The automatic leveling method according to claim 1, characterized in that: After leveling and compensating the three-dimensional point cloud data according to the offset, the method further includes: Controlling the laser light source to scan the printing platform again to obtain new three-dimensional point cloud data of the printing platform; Acquire a point cloud model of the printing platform according to the new three-dimensional point cloud data; Obtaining the actual curvature of the point cloud model; A compensation value of the new three-dimensional point cloud data is obtained according to the actual curvature and a preset theoretical curvature, and deformation compensation is performed on the point cloud model according to the compensation value.

7. The automatic leveling method according to claim 6, characterized in that: The obtaining of the actual curvature of the point cloud model comprises: Acquire multiple sampling point sets from the point cloud model according to a preset sampling interval; Calculating the actual curvature of each of the sampling point sets; The step of obtaining the compensation value of the new three-dimensional point cloud data according to the actual curvature and the preset theoretical curvature includes: The actual curvature of each sampling point set is compared with the theoretical curvature respectively, and the compensation value corresponding to each sampling point set is obtained according to the comparison result.

8. The automatic leveling method according to claim 7, characterized in that: The compensation value of each sampling point set is obtained according to the following method: Calculating a deviation value between the theoretical curvature and the actual curvature of the sampling point set; The compensation value is calculated according to the deviation value and a preset compensation coefficient.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the automatic leveling method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The invention comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the automatic leveling method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • FDM3D printer and automatic leveling printing method and system thereof

    CN105751518A

  • Printing error determining and printing method and device, electronic equipment and storage medium

    CN111391327A

  • Leveling control method of 3D printer, 3D printer and storage medium

    CN115195117A

  • Automatic leveling method, electronic equipment and computer readable storage medium

    CN116619753A

  • Methods and systems for auto-leveling of point clouds and 3D models

    US20210027477A1

Cited By

  • Installation and construction method for heat insulation module of low-temperature storage tank

    CN120176002A

  • 3D printing platform leveling method and system based on multi-point sound analysis

    CN120422473A