An automatic leveling method, an electronic device, and a computer-readable storage medium

By using a laser light source to scan and acquire 3D point cloud data in a 3D printing device, performing plane fitting and offset calculation, and combining deformation compensation and nozzle assembly adjustment, the problem of printing platform position offset is solved, improving printing accuracy and user experience.

CN116619753BActive Publication Date: 2026-03-06SHENZHEN CREALITY 3D TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Offset of the printing platform in 3D printing equipment results in low printing accuracy and a poor user experience.

Method used

The printing platform acquires 3D point cloud data by scanning the printing platform with a laser light source, performs plane fitting, calculates the offset and performs leveling compensation, and combines deformation compensation and nozzle assembly adjustment to ensure the flatness of the printing platform.

Benefits of technology

It improves the printing accuracy of 3D printing equipment and the user experience, avoids the decrease in accuracy caused by the positional deviation of the printing platform, and ensures the printing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116619753B_ABST
    Figure CN116619753B_ABST
Patent Text Reader

Abstract

This application provides an automatic leveling method, electronic device, and computer-readable storage medium, applied to a 3D printing device. The 3D printing device includes a laser source for emitting a line laser and a printing platform. The method includes: controlling the laser source to scan the printing platform to obtain three-dimensional point cloud data of the printing platform; performing planar fitting on the three-dimensional point cloud data to obtain the fitted normal vector of the plane where the printing platform is located; calculating 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; performing leveling compensation on the three-dimensional point cloud data according to the offset; and printing a 3D model based on the leveled and compensated three-dimensional point cloud data. This application can automatically level the printing platform, improve the printing accuracy of the 3D printing device, and thus improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D printing technology, and more particularly to an automatic leveling method, electronic device, and computer-readable storage medium. Background Technology

[0002] With the popularization of concepts such as intelligent manufacturing engineering and Industry 4.0, 3D printing technology is becoming increasingly widespread. 3D printing technology first appeared in the mid-1990s and is essentially a new rapid prototyping device utilizing techniques such as photopolymerization and paper lamination. Its working principle is basically the same as ordinary printing; the printer contains liquid or powder "printing materials," and after being connected to a computer, the computer controls the layering of these "printing materials" to ultimately transform the blueprint on the computer into a physical object. This printing technology is called 3D stereolithography.

[0003] In related technologies, the printing platform of a 3D printing device may shift relative to its initial position, but it is difficult for staff to observe the shift with the naked eye, resulting in low accuracy of the printed 3D model and a poor user experience. Summary of the Invention

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

[0005] The first aspect of this application provides an automatic leveling detection method applied to a 3D printing device. The 3D printing device includes a laser source for emitting a line laser and a printing platform. The method includes: controlling the laser 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 the fitting normal vector of the plane where the printing platform is located; 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; performing leveling compensation on the three-dimensional point cloud data according to the offset; and printing a 3D model to be printed according to the leveled and compensated three-dimensional point cloud data.

[0006] Compared with related technologies, the embodiments of this application have at least the following advantages: by performing planar fitting on the three-dimensional point cloud data of the printing platform to obtain the fitting normal vector of the plane on which 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 on which the printing platform is located is a horizontal plane. The whole process is efficient and easy to operate, avoiding the situation that "the position of the printing platform is offset, resulting in low printing accuracy of the 3D printing equipment", improving the printing accuracy of the 3D printing equipment, thereby improving the user experience.

[0007] 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 reciprocate to form a complete scanning surface of the printing platform, thereby obtaining the three-dimensional point cloud data.

[0008] By adopting this technical solution, a method for obtaining three-dimensional point cloud data has been realized by using a laser light source that emits line lasers to scan and print a platform.

[0009] In some possible implementations, the step of performing plane fitting on the 3D point cloud data to obtain the fitting normal vector of the plane where the printing platform is located includes: stitching the 3D point cloud data together; performing plane fitting on the stitched 3D point cloud data to obtain a fitting plane for the 3D point cloud data, wherein the fitting plane is the plane where the printing platform is located; and obtaining the fitting normal vector of the fitting plane.

[0010] In some possible implementations, calculating 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 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.

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

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

[0013] In some possible implementations, after leveling and compensating the 3D 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 3D point cloud data of the printing platform; obtaining a point cloud model of the printing platform based on the new 3D point cloud data; obtaining the actual curvature of the point cloud model; obtaining a compensation value for the new 3D point cloud data based on the actual curvature and a preset theoretical curvature; and performing deformation compensation on the point cloud model based on the compensation value.

[0014] By adopting this technical solution, deformation compensation can be performed on the printing platform, further improving the printing accuracy of 3D printing equipment, thereby further enhancing the user experience.

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

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

[0017] In some possible implementations, the compensation value for each set of sampling points is obtained by: obtaining a deviation value based on the difference between the theoretical curvature and the actual curvature of the set of sampling points; and calculating the compensation value based on the deviation value and a preset compensation coefficient.

[0018] A second aspect of this application discloses an electronic device, which includes a processor and a memory. The memory is used to store instructions, and the processor is used to call the instructions in the memory to cause the electronic device to execute the above-described automatic leveling method.

[0019] A third aspect of this application discloses a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the aforementioned automatic leveling method.

[0020] Understandably, 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 they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart of an automatic leveling method provided in an embodiment of this application.

[0023] Figure 2 This is a schematic diagram of a 3D printing device scanning printing platform provided in an embodiment of this application.

[0024] Figure 3 This is a schematic diagram illustrating the comparison of the normal vectors of the horizontal plane and the fitted plane according to an embodiment of this application.

[0025] Figure 4 This is a flowchart of an automatic leveling method provided in an embodiment of this application.

[0026] Figure 5 This is an application scenario diagram of the printing platform deformation printing compensation provided in an embodiment of this application.

[0027] Figure 6 This is a flowchart of an automatic leveling method provided in an embodiment of this application.

[0028] Figure 7 This is a flowchart of an automatic leveling method provided in an embodiment of this application.

[0029] Figure 8 This is a schematic diagram of the structure of a printing line A provided in an embodiment of this application.

[0030] Figure 9 This is a flowchart of an automatic leveling method provided in an embodiment of this application.

[0031] Figure 10 This is a flowchart of an automatic leveling method provided in an embodiment of this application.

[0032] Figure 11 An image showing the effect of printing using a 3D printing device provided in an embodiment of this application.

[0033] Figure 12 Another rendering of a 3D printing device provided in an embodiment of this application.

[0034] Figure 13 This is a diagram illustrating the working interaction of a 3D printing device provided in one embodiment of this application.

[0035] Figure 14This is a schematic diagram of a scenario for line height detection in a 3D printing device provided in an embodiment of this application.

[0036] Figure 15 Images captured by the camera of a 3D printing device provided in an embodiment of this application during an online high-detection scene.

[0037] Figure 16 Another image captured by the camera of the 3D printing device provided in an embodiment of this application in an online high-detection scene.

[0038] Figure 17 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0039] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0040] The following description sets forth many specific details to provide a full understanding of this application. The described embodiments are only some, not all, of the embodiments of this application.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0042] It should be further noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0043] 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 there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural.

[0044] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0045] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example for reference.

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

[0047] Please refer to Figure 1 This is a flowchart of an automatic leveling method provided in an embodiment of this application. This embodiment is applied to a 3D printing device, which includes a laser source for emitting line lasers and a printing platform, and includes the following steps:

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

[0049] Please refer to Figure 2 This is a schematic diagram of the 3D printing equipment scanning the printing platform provided in the embodiment of this application. The 3D printing equipment controls the laser light source to scan the printing platform line by line in a strip manner, collects the point cloud data of each line, and performs point cloud stitching to generate a 3D model of the entire printing platform.

[0050] Specifically, 3D printing equipment can set the diameter of the laser beam emitted by the laser source. During the scanning process, the laser source oscillates under the control of the 3D printing equipment, forming a complete scanning surface on the printing platform to ensure that the laser source completely scans the contour of the printing platform. During the scanning process of the laser source, the 3D printing equipment acquires the three-dimensional point cloud data of the printing platform, thus obtaining the complete three-dimensional point cloud data of the printing platform at the end.

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

[0052] Step 102: Perform plane fitting on the 3D point cloud data to obtain the fitting normal vector of the plane where the printing platform is located.

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

[0054] Specifically, after obtaining the 3D point cloud data, the least squares fitting is performed on the 3D point cloud data to obtain the fitting plane.

[0055] In some embodiments, in step 101, point cloud data of preset sampling points on the printing platform can be obtained. The point cloud data of the preset sampling points is the coordinates of the preset sampling points in a 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.

[0056] To facilitate understanding, the following example uses the coordinates of a preset sampling point as (x, y, z) to illustrate how the fitted normal vector is obtained in this embodiment:

[0057] (1) For the point cloud data of the obtained preset sampling points, let the fitted plane equation be 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).

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

[0059] 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.

[0060] In some embodiments, the offset of the printing platform based on the horizontal plane is calculated as follows: obtaining the point cloud density of the three-dimensional point cloud data; obtaining the projection vector of the fitted normal vector onto 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.

[0061] To facilitate understanding, the following will be combined with... Figure 3 This embodiment provides a specific example illustrating how the offset of the printing platform based on the horizontal plane is determined:

[0062] Please refer to Figure 3 This is a schematic diagram illustrating the comparison of the normal vectors of the horizontal plane and the fitted plane provided in this embodiment.

[0063] (1) Assume the fitting normal vector of the fitting plane is The unit normal vector of the horizontal plane is normal vector Projecting it onto a horizontal plane yields a vector. Calculate vectors and The included angle θ between them.

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

[0065]

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

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

[0068] Step 104: Level and compensate the 3D point cloud data based on the offset.

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

[0070] In some embodiments, after leveling the printing platform, it can be verified whether the printing platform has been successfully calibrated. For example, the automatically leveled printing platform can be laser-scanned multiple times. If the point cloud data obtained from each scan is very similar, it indicates that the printing platform has been successfully calibrated. If there are significant differences in the point cloud data obtained from multiple scans, the calibration values ​​need to be obtained again to further level the printing platform and ensure the printing accuracy of the 3D printing equipment.

[0071] Compared with related technologies, the embodiments of this application have at least the following advantages: by performing planar fitting on the three-dimensional point cloud data of the printing platform to obtain the fitting normal vector of the plane on which 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 on which the printing platform is located is a horizontal plane. The whole process is efficient and easy to operate, avoiding the situation that "the position of the printing platform is offset, resulting in low printing accuracy of the 3D printing equipment", improving the printing accuracy of the 3D printing equipment, thereby improving the user experience.

[0072] Please refer to Figure 4 This is a flowchart of an automatic leveling method provided in one embodiment of this application. This embodiment is a further improvement on the foregoing embodiment. The main improvement is that, in this embodiment, after leveling and compensating the 3D point cloud data according to the offset, the printing platform is further compensated for deformation during printing. This method further ensures the flatness of the printing platform, thereby improving the printing quality of the 3D printing equipment.

[0073] The specific process of this embodiment is as follows: Figure 4 As shown, it includes the following steps:

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

[0075] Step 202: Perform plane fitting on the 3D 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: Level and compensate the 3D point cloud data based on the offset.

[0078] Steps 201 to 204 in this embodiment are similar to steps 101 to 104 in the previous embodiment. To avoid repetition, they will not be described again here.

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

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

[0081] Step 206: Obtain the point cloud model of the printing platform based on the new 3D 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 surface information. Specifically, the point cloud processing software performs filtering, smoothing, and 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 understood that this embodiment does not specifically limit the size of the preset sampling interval, which can be set according to actual needs, such as setting the preset sampling interval to 5 mm, 10 mm, etc.

[0086] Step 208: Obtain the compensation value of the new three-dimensional point cloud data based on the actual curvature and the preset theoretical curvature, and perform deformation compensation on the point cloud model based on the compensation value.

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

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

[0089] For example, let the sampling point sets be a first sampling point set, a second sampling point set, and a 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 the preset theoretical curvature is 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; 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 for each set of sampling points is obtained by: obtaining a deviation value based on the difference between the theoretical curvature and the actual curvature of the sampling point set; and calculating a compensation value based on the deviation value and a preset compensation coefficient.

[0091] Specifically, the compensation coefficient is a constant, and it is related to factors such as the printing and processing procedures, the geometry and size of the printing platform, the printer's operating mode, and the required printing precision. Generally, the compensation coefficient ranges from 0.1 to 0.5.

[0092] In some embodiments, the compensation coefficient can be determined as follows: 1. Select a printing platform, and use the same 3D printing equipment and printing parameters to print multiple times on the platform, recording the deviation of each print. 2. Calculate the corresponding compensation value for each print deviation, which can be done according to the formula above. 3. Fit the calculated compensation value to the actual deviation data, using methods such as curve fitting or regression analysis. 4. Select a suitable compensation coefficient based on the fitting result, so that the calculated compensation value best fits the actual deviation data. It should be noted that the selection of the compensation coefficient is a relatively empirical process and needs to be adjusted according to specific circumstances. Furthermore, after determining the compensation coefficient, multiple experiments are needed to verify its effectiveness and make adjustments.

[0093] To facilitate understanding, the following will be combined with... Figure 5 For a detailed explanation of how this embodiment performs deformation printing compensation on the point cloud model, please refer to [link to relevant documentation]. Figure 5 The following is an application scenario diagram of the printing platform deformation compensation provided in this embodiment:

[0094] (1) Assume 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 equipment 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 surface information of the printing platform. Specifically, use point cloud processing software to perform filtering, smoothing and 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 print compensation value, such as Figure 7 As shown, a sampling interval of 5 mm is selected, that is, the point cloud data of the printing platform surface is sampled once every 5 mm.

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

[0098] (5) Use programming languages ​​such as Python or MATLAB to perform surface fitting on the 20 sampling point sets to obtain 20 fitted sub-surfaces, and then use the surface fitting algorithm to calculate the actual curvature of each sub-surface.

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

[0100] Compensation value = Compensation coefficient × Deviation; Deviation = Theoretical curvature - Actual curvature.

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

[0102] Compared with related technologies, the embodiments of this application have at least the following advantages: By performing planar fitting on the 3D 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 3D 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 whole 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 equipment", thus improving the printing accuracy of the 3D printing equipment and improving the user experience. In addition, after leveling and compensating the 3D point cloud data according to the offset, the printing platform is also subjected to deformation printing compensation again, which can further ensure the flatness of the printing platform and thus improve the printing quality of the 3D printing equipment.

[0103] Please refer to Figure 6 This is a flowchart of an automatic leveling method provided in an embodiment of this application. This embodiment is a further improvement on the aforementioned embodiment. The main improvement is that, in this embodiment, before printing the 3D model based on the leveled and compensated 3D point cloud data, the distance between the nozzle assembly and the printing platform in the 3D printing equipment is adjusted to ensure that the line width of the printed line formed after the nozzle assembly sprays printing material on the printing platform meets the preset line width requirements, thereby further improving the printing accuracy of the 3D printing equipment and thus improving the user experience.

[0104] This embodiment applies 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, which includes a formal printing area and a informal printing area. The embodiment includes the following steps:

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

[0106] Step 302: Perform plane fitting on the 3D 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: Level and compensate the 3D point cloud data according to the offset.

[0109] Steps 301 to 304 in this embodiment are similar to steps 101 to 104 in the previous embodiment. To avoid repetition, they will not be described again here.

[0110] Step 305: Control the printhead 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 3D printing slicing software, or the 3D printing device is equipped with 3D printing slicing software. Before controlling the nozzle assembly to print a preset line, the 3D printing slicing software receives preset slicing parameters and printing material parameters of the 3D model to be printed input by the user. The 3D printing slicing software obtains preset extrusion parameter values ​​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 values.

[0112] Specifically, 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 equipment has a heated bed, the temperature also includes the temperature of the heated bed. Layer height is 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 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 number and speed at which the filament is drawn back into the nozzle to prevent material from seeping out before extrusion.

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

[0114] In some embodiments, the relative positional relationship between the formal printing area and the informal printing area is not specifically defined. For example, the central area of ​​the printing platform can be used as the formal printing area, and the surrounding area around the central area can be used as the informal printing area. Alternatively, other areas of the printing platform can be used as the formal printing area according to actual needs. These will not be elaborated on here.

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

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

[0117] In some embodiments, the actual line width of the preset line can also be measured using tools such as digital calipers and microscopes.

[0118] Step 307: Compare the actual line width with the preset printing line width of the 3D model to be printed, and determine the 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 obtains the preset printing linewidth based on the preset slicing parameters and printing material parameters.

[0120] In some embodiments, the adjustment value is determined as follows: when the actual line width is greater than the preset print line width, the adjustment value is determined to increase the relative distance between the print platform and the printhead assembly; when the actual line width is less than the preset print line width, the adjustment value is determined to decrease the relative distance between the print platform and the printhead assembly.

[0121] Specifically, if the actual line width is greater than the preset print line width, it means that the distance between the printing platform and the printhead assembly is too close. The printing platform needs to be adjusted downwards by a certain distance to increase the relative distance between the printing platform and the printhead assembly. If the actual line width is less than the preset print line width, it means that the distance between the printing platform and the printhead assembly is too far. The printing platform needs to be adjusted upwards by a certain distance to reduce the relative distance between the printing platform and the printhead assembly.

[0122] In some embodiments, the 3D printing equipment includes a motor connected to the printing platform for controlling 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 equipment is preset with a distance adjustment value. Taking a distance adjustment value of 5 mm as an example, when the printing platform needs to rise, the motor controls the printing platform to rise by 5 mm. Then, the 3D printing equipment controls the nozzle assembly to reprint a preset line in the informal printing area. The width of the new preset line is compared with the preset printing line width to determine whether it is necessary to control the printing platform to rise by 5 mm again. This process continues until the difference between the actual width of the preset line printed by the nozzle assembly in the informal printing area and the preset printing line width meets the printing requirements. Then, the control of the printing platform to rise by 5 mm is stopped, and the 3D model to be printed is 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 printhead assembly according to the adjustment value, control the printhead assembly to print the 3D model in the actual printing area.

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

[0126] Compared with related technologies, the embodiments of this application have at least the following advantages: By controlling the nozzle assembly to print a preset line in the informal printing area, the actual line width of the printed line currently being printed by the 3D printing equipment can be known. Then, the actual line width is compared with the preset line width of the 3D model to be printed, and the relative distance between the printing platform and the nozzle assembly is adjusted according to the comparison result. This ensures that the distance between the nozzle assembly and the printing platform reaches a suitable value, thereby ensuring that the printed line formed after the nozzle assembly sprays printing material on the printing platform meets the preset line width requirements. This avoids the situation where "the relative distance between the printing platform and the nozzle assembly is too large or too small, resulting in the line width of the printed line formed after the nozzle assembly sprays printing material on the printing platform being too small or too large," thus improving the printing accuracy of the 3D printing equipment and improving the user experience.

[0127] Please refer to Figure 7 This is a flowchart of the automatic leveling method provided in this application embodiment. This embodiment is a further improvement on the foregoing embodiment. 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 equipment, thereby further improving the user experience.

[0128] The specific process of this embodiment is as follows: Figure 7 As shown, it includes the following steps:

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

[0130] Step 402: Perform plane fitting on the 3D 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: Level and compensate the 3D point cloud data based on the offset.

[0133] Steps 401 to 404 in this embodiment are similar to steps 101 to 104 in the previous embodiment. To avoid repetition, they will not be described again here.

[0134] Step 405: Obtain N preset extrusion parameter values ​​for the nozzle assembly based on the preset slicing parameters and 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 specific limitations on the value of N, and it can be set according to actual needs.

[0136] In some embodiments, the parts of the 3D model to be printed include internal walls, external walls, and infill areas. Preset extrusion parameter values ​​include, but are not limited to, extrusion speed, extrusion temperature, and layer height.

[0137] Step 406: 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.

[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 example illustrates how the nozzle assembly controls the printing of preset lines in the informal printing area, using the following scenario: the 3D model to be printed includes part 1, part 2, and part 3; the preset extrusion parameter values ​​include a first preset extrusion parameter value, a second preset extrusion parameter value, and a third preset extrusion parameter value; and the preset lines include a first preset line, a second preset line, and a third preset line.

[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 equipment controls the nozzle assembly to print the first preset line according to the first preset extrusion parameter value, the second preset line according to the second preset extrusion parameter value, and the third preset line according to the third preset extrusion parameter value.

[0140] It is understandable 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 can be viewed as a single printed line; or the first preset line, the second preset line, and the third preset line can be unconnected, that is, the first preset line, the second preset line, and the third preset line can be independent printed lines.

[0141] Please refer to Figure 8This is a schematic diagram of the structure of the printing 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 equipment prints a continuous printing 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 printing line A can be divided into three parts, each of which corresponds to a preset extrusion parameter value.

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

[0143] The method for obtaining the actual line width in this embodiment is the same as that in the previous embodiment. To avoid repetition, it will not be described again here.

[0144] Step 408: Compare the size of N actual line widths with the preset printed line widths, and determine the adjustment value based on the comparison results.

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

[0146] Specifically, assuming N is 5, calculate the average P of the 5 actual line widths, and compare the average P with the preset print line width. If the average P is greater than the preset print line width, it means that the distance between the printing platform and the printhead assembly is too close, and the printing platform needs to be adjusted downwards by a certain distance to increase the relative distance between the printing platform and the printhead assembly. If the average P is less than the preset print line width, it means that the distance between the printing platform and the printhead assembly is too far, and the printing platform needs to be adjusted upwards by a certain distance to decrease the relative distance between the printing platform and the printhead assembly.

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

[0148] It is understandable that after obtaining N actual line widths, this embodiment does not limit the method of calculating the N actual line widths, but only needs 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 printhead assembly according to the adjustment value.

[0150] Compared with related technologies, the embodiments of this 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 be made to reach a suitable value, thereby ensuring that the printing lines formed after the nozzle assembly sprays printing material on the printing platform meet the preset printing line width requirements. This avoids the situation where "the relative distance between the printing platform and the nozzle assembly is too large or too small, resulting in the printing line width being too small or too large after the nozzle assembly sprays printing material on the printing platform," thus improving the printing accuracy of the 3D printing equipment and improving the user experience.

[0151] Please refer to Figure 9 This is a flowchart of automatic leveling provided in an embodiment of this application. This embodiment is a further improvement on the foregoing embodiments. The main improvement is that in this embodiment, each part of the 3D model corresponds to at least two preset extrusion parameter values. 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 equipment and ensuring printing quality.

[0152] The specific process of this embodiment is as follows: Figure 9 As shown, it includes the following steps:

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

[0154] Step 502: Perform plane fitting on the 3D 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: Level and compensate the 3D point cloud data based on the offset.

[0157] Steps 501 to 504 in this embodiment are similar to steps 101 to 104 in the previous embodiment. To avoid repetition, they will not be described again here.

[0158] Step 505: Obtain N preset extrusion parameter values ​​for the nozzle assembly based on 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, the number of preset extrusion parameter values ​​is the same for each part of the 3D model to be printed. For example, assuming that 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, the number of preset extrusion parameter values ​​corresponding to each part of the 3D model to be printed is not the same. For example, assuming that M is 4, that is, the 3D model to be printed includes 4 different parts (part A, part B, part C, and part D respectively), 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, with one preset extrusion parameter value corresponding to one preset line.

[0163] Step 507: Select the optimal preset line for each part from the preset lines corresponding to the M parts, and use 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 of the M preset lines can be selected from the preset lines corresponding to the M parts in the following manner: calculate the standard deviation of the line width of the preset line corresponding to each part, and take the preset line with the smallest standard deviation of the line width of each part as the optimal preset line for that part.

[0165] Specifically, the line width standard deviation is calculated as follows: 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 make it easier to understand, the following examples illustrate how to select the optimal preset line for each part:

[0167] Assuming M is 3, meaning the 3D model to be printed includes 3 different parts (part A, part B, and part C), taking part A as an example, and assuming part A corresponds to 3 preset lines (preset line 1, preset line 2, and preset line 3), measure the line width at different positions on preset line 1. For example, take three measurement points at the front, middle, and rear of preset line 1, and measure the line width at these three points, let's call them L1, L2, and L3. Calculate the average value of L1, L2, and L3. Then, calculate the standard deviation of the line width of the preset line one according to the following formula. Where σ is the standard deviation of the line width of the preset line one, and L iLet i be the line width value at the i-th point. The average line width of the preset line 1 is n, where n is the number of measurement points.

[0168] It is understandable that the method for calculating the standard deviation of line width for preset line two and preset line three is the same as that for preset line one. To avoid repetition, it will not be repeated here.

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

[0170] It is understandable that the methods for obtaining the optimal preset line for parts B and C are the same as those for obtaining the optimal preset line for part A. To avoid repetition, they will not be described again here.

[0171] In some embodiments, after selecting the final extrusion parameters, the final extrusion parameters can be adjusted to further improve the printing quality of the 3D printing equipment.

[0172] Please refer to Figure 10 This is an image showing the effect of a 3D printer printing on a printing platform. From... Figure 10 As can be seen, the printed lines with preset extrusion parameters ranging from 0.004 to 0.096 are all straight. The printed lines with preset extrusion parameters ranging from 0.004 to 0.036 exhibit discontinuity at the leading edge and material accumulation at the trailing edge. The printed lines with preset extrusion parameters ranging from 0.04 to 0.056 are relatively uniform. The printed lines with preset extrusion parameters ranging from 0.06 to 0.096 exhibit discontinuity at the trailing edge and material accumulation at the leading edge.

[0173] Specifically, a print line with preset extrusion parameters of 0.004 to 0.036 has a smaller extrusion parameter at the front end, resulting in a break in the material at the front. Conversely, a print line with a larger extrusion parameter at the rear end results in material accumulation. By increasing the print parameters at the front end and decreasing the print parameters at the rear end, a print line with preset extrusion parameters of 0.04 to 0.056 can be obtained. The final extrusion parameters are 0.04 to 0.056.

[0174] Please refer to Figure 11 This is another rendering of a 3D printer printing on a printing platform. From Figure 11 As can be seen, the printed lines with preset extrusion parameters from 0.02 to 0.08 are all broken line groups. By detecting the spacing between adjacent printed lines, the printing condition of the inflection points of the printed lines, and the printing condition of the start and end positions of the printed lines, the printing quality of the 3D printing equipment can be determined.

[0175] Specifically, before the 3D printing equipment controls the nozzle assembly to print folds, it first controls the nozzle assembly to accelerate to the preset printing speed at a rated acceleration, and then controls the nozzle assembly to print folds on the printing platform at the preset printing speed. It can be understood that the number of printed folds is the same as the number of preset extrusion parameters; that is, the number of printed folds controlled by the 3D printing equipment depends on how many preset extrusion parameters need to be detected.

[0176] In some embodiments, the 3D printing equipment controls the nozzle assembly to accelerate at a rate of 5000 mm / s, stops accelerating after reaching 12000 mm / s, and controls the nozzle assembly to print on the printing platform at a speed of 12000 mm / s. Figure 3 The broken line shown has an included angle of 45 degrees.

[0177] After all the fold lines are printed, images are taken using the imaging device of the 3D printing equipment, such as... Figure 11 The resulting image is then examined using a simulated human eye method to observe whether there are gaps or protrusions at the bends of each zigzag line, i.e., to observe the uniformity of each zigzag line at the bends. Specifically, zigzag lines with preset extrusion parameters of 0.02 to 0.036 have protrusions at the bends; zigzag lines with preset extrusion parameters of 0.04 to 0.052 have neither protrusions nor gaps at the bends; and zigzag lines with preset extrusion parameters of 0.056 to 0.08 have gaps at the bends. Therefore, the final extrusion parameters are 0.04 to 0.052.

[0178] Please see further. Figure 11 , Figure 11 Each group of fold lines shown is formed by the same number of printed lines. The preset extrusion parameters for each group of fold lines are different, but the preset extrusion parameters for the printed lines within each group are the same. It is understood that each group of fold lines can also be formed by a different number of printed lines; this embodiment does not specifically limit this. In some embodiments, the effect image captured by the imaging device can be input into a preset uniformity recognition model, and the output of the uniformity recognition model can be used to detect whether there are gaps or protrusions at the bends of each fold line.

[0179] Specifically, historical image data of the printed polylines is collected, and then a primitive model is trained using this historical image data. This trained primitive model is then used as the uniformity recognition model. After all the polylines are printed, images are taken using the imaging device of the 3D printing equipment. Figure 11 The effect shown is then input into the uniformity recognition model, which can automatically detect whether there are gaps or protrusions at the bends of each line.

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

[0181] Step 509: Compare the size of N actual line widths with the preset printed line widths, and determine the adjustment value based on the comparison results.

[0182] Step 510: 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 formal printing area according to the final extrusion parameter value.

[0183] Compared with related technologies, the embodiments of this 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 be made to reach a suitable value, thereby ensuring that the printing lines formed after the nozzle assembly sprays printing material on the printing platform meet the preset printing line width requirements. This avoids the situation where "the relative distance between the printing platform and the nozzle assembly is too large or too small, resulting in the printing line width being too small or too large after the nozzle assembly sprays printing material on the printing platform," thus improving the printing accuracy of the 3D printing equipment and improving the user experience. Furthermore, 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. This allows the 3D printing equipment to control the nozzle assembly to print the 3D model according to the optimal extrusion parameter value. This enables the 3D printing equipment to be applicable to different application scenarios and avoids the situation where "the 3D printing equipment prints 3D models for various application scenarios using the initially set extrusion parameter values, resulting in poor printing quality or even printing failure." This ensures the printing quality of the 3D printing equipment in different scenarios and further improves the user experience.

[0184] Please refer to Figure 12 This is a flowchart of the automatic leveling process provided in this application embodiment. This embodiment is a further improvement on the foregoing embodiment. The main improvement is that, in this embodiment, before controlling the nozzle assembly to print the 3D model to be printed in the formal printing area, a first-layer printing detection is also performed. In this way, the 3D printing equipment can automatically detect the printing quality, so that the user can understand the printing quality problems in a timely manner, further improving the user experience.

[0185] The specific process of this embodiment is as follows: Figure 12 As shown, it includes the following steps:

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

[0187] Step 602: Perform plane fitting on the 3D 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: Level and compensate the 3D point cloud data based on the offset.

[0190] Steps 601 to 604 in this embodiment are similar to steps 101 to 104 in the previous embodiment. To avoid repetition, they will not be described again here.

[0191] Step 605: Control the printhead 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 the 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 printhead assembly according to the adjustment value, control the imaging device to capture the 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 equipment includes a motor connected to an imaging device for controlling changes in the angle and position of the imaging 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 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 the first layer information from the file used to command the 3D printing operation, wherein the first layer information includes at least a two-dimensional planar view of the first layer of the 3D model to be printed.

[0199] In some embodiments, the file used to command the 3D printing process is a gcode file. The gcode file is used to instruct the 3D printing process. To print a 3D model from a computer using a 3D printer, the model (commonly in .stl and .obj formats) first needs to be imported into 3D slicing software (such as Cura) for planar slicing, and then a gcode file is generated. The gcode file is then sent to the 3D printer for reading. The nozzle assembly of the 3D printer then fills each layer according to the planned path, stacking them layer by layer to finally form the 3D model.

[0200] In some embodiments, the first-layer information also includes point cloud data of the first layer, 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 formal 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 shooting device to capture the final image of the current printing platform at a preset angle and preset 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, if the imaging device takes three initial images at a first preset angle and a first preset distance from the printing platform in step 608, then after the first layer is printed, the imaging device takes three final images at the first preset angle and a first preset distance from the printing platform. Alternatively, if the imaging device takes one initial image at the first preset angle and a first preset distance from the printing platform, and another initial image at a second preset angle and a second preset distance from the printing platform, then after the first layer is printed, the imaging device takes one final image at the first preset angle and a first preset distance from the printing platform, and another final image at the second preset angle and a second preset distance from the printing platform.

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

[0206] In some embodiments, a difference image is generated based on the initial image and the final image, and then the difference image is binarized and denoised. 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] To facilitate understanding, the process of determining the printing quality of the 3D printing equipment in this embodiment will be explained in detail below:

[0208] (1) Use programming languages ​​such as Python to read the first-level information in the gcode file. The first-level information includes at least the first-level two-dimensional planar graph.

[0209] (2) Before printing the first layer, control the shooting device to be at a preset distance from the printing platform and the angle between the shooting device and the printing platform to be a preset angle, and then take an initial image of the printing platform.

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

[0211] (4) After the first layer is printed, control the shooting device to take 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 libraries such as OpenCV to perform binarization and 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 via email, SMS or other means.

[0216] Compared with related technologies, the embodiments of this application have at least the following advantages: By controlling the nozzle assembly to print preset lines in the informal printing area, the actual line width of the printed lines currently being printed by the 3D printing equipment can be determined. The actual line width is then compared with the preset line width of the 3D model to be printed, and the relative distance between the printing platform and the nozzle assembly is adjusted based on the comparison result. This ensures that the distance between the nozzle assembly and the printing platform reaches a suitable value, thereby guaranteeing that the printed lines formed after the nozzle assembly sprays printing material on the printing platform meet the preset line width requirements. This avoids situations where "the relative distance between the printing platform and the nozzle assembly is too large or too small, resulting in a line width that is too small or too large after the nozzle assembly sprays printing material on the printing platform," thus improving the printing accuracy of the 3D printing equipment and enhancing the user experience. Furthermore, by automatically performing first-layer printing detection, the printing quality of the 3D printing equipment can be automatically communicated to the user, eliminating the need for manual inspection of the printing quality and further improving the user experience.

[0217] Please refer to Figure 13 This is a diagram illustrating the operational interaction of a 3D printing device provided in this embodiment. This embodiment is a further improvement upon the foregoing embodiments, primarily in that: in this embodiment, anomaly detection is performed on the first-layer detection workflow of the 3D printing device to ensure its normal operation and improve printing quality.

[0218] Specifically, Figure 13 The interactive diagram shown illustrates the workflow of a 3D printing device during the initial layer inspection. This process utilizes computer vision, deep learning, and point cloud methods for data acquisition and comparison to detect defects on the heated bed surface and problems with nozzle extrusion printing. The results are then analyzed and alerted. Essentially, the purpose of this interactive workflow is to perform a self-check of the environment and equipment before printing, ensuring print quality and success rate, and promptly alerting the user in case of any anomalies.

[0219] In some embodiments, a deep learning model may also be used to detect whether the processing steps of the 3D printing equipment are abnormal. For example, it may be used to detect whether the processes such as printing platform leveling, printing platform printing compensation, and nozzle assembly flow detection in the aforementioned embodiments are abnormal.

[0220] Specifically, the abnormal process detection method for 3D printing equipment based on deep learning models can be divided into the following steps:

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

[0222] (2) Data preprocessing: The collected data is preprocessed, such as cropping, scaling and enhancing the images, and filtering and sampling the point clouds, so as to facilitate the subsequent training and testing of the deep learning model.

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

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

[0225] (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 are any abnormalities.

[0226] It is worth mentioning that data collection and preprocessing need to fully consider the actual situation and cover as many possible anomalies as possible to improve the robustness and reliability of the model. At the same time, model training and testing need to undergo thorough validation and tuning to achieve good detection results.

[0227] Please refer to Figure 14 This is a schematic diagram illustrating a scenario for line height detection using a 3D printing device provided in this embodiment. This embodiment specifically describes the functions of the 3D printing device and explains how to measure the line height of an object under test using the 3D printing device provided in this embodiment. This method enables automatic detection of the line height of the object under test, improving the user experience.

[0228] like Figure 14 As shown, the 3D printing equipment includes a printing platform 1, a line laser generator 2, and a camera 3. The object to be measured is placed on the printing platform 1. The basic formula for line height detection is: Line height of the object = Projected offset distance / tan(angle between the laser and the horizontal plane); where the projected offset distance refers to the offset distance on the image captured by the camera 3 after the line laser irradiates the surface of the object, relative to its unirradiated position. Figure 15 The image shown is taken by camera 3. Specifically, Figure 15 The white line shown is the laser emitted by laser source 2, the object being measured is the printed line, and the extension direction of the laser is perpendicular to the extension direction of the printed line; tan (angle between the laser and the horizontal plane) refers to the tangent of the angle between the laser and the horizontal plane.

[0229] Please see Figure 16 , is an image taken by camera 3 when the object being measured is a triangular object. Figure 16 The white line shown is the laser light emitted from laser source 2, from... Figure 16 As can be seen, the triangular object has a certain height, causing the laser beam illuminating the object to be measured to deflect.

[0230] To facilitate understanding, the following is a detailed explanation of how the line height of the object under test is detected in this embodiment:

[0231] Assuming 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, then the formula for calculating the height H of the line laser on the object to be measured is:

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

[0233] 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 D1=L×cos(α); the projection offset distance of the line laser on the physical surface in similar triangles D2=D1×d / L; we know that d=D2×L / D1, and substituting into D1=L×cos(α), we get d=D2 / cos(α).

[0234] 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 line height H of the object to be measured is 2 mm.

[0235] Please refer to Figure 17 This is a schematic diagram of the hardware structure of the electronic device 1000 provided in an embodiment of this application. Figure 17 As shown, the electronic device 1000 may include a processor 1001 and a memory 1002. The memory 1002 is used to store one or more computer programs 1003. The one or more computer programs 1003 are configured to be executed by the processor 1001. The one or more computer programs 1003 include instructions that can be used to implement the methods described above in the electronic device 1000.

[0236] It is understood that the structure illustrated 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 illustrated, or combine some components, or split some components, or have different component arrangements.

[0237] Processor 1001 may include one or more processing units, such as application processors (APs), modems, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0238] The processor 1001 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 1001 is a cache memory. This memory can store instructions or data that the processor 1001 has just used or that are used repeatedly. If the processor 1001 needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces the waiting time of the processor 1001, and thus improves the efficiency of the system.

[0239] In some embodiments, the processor 1001 may include one or more interfaces. 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, etc.

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

[0241] This embodiment also provides a computer-readable storage medium storing computer instructions. When the instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the methods described in the above embodiments.

[0242] In this embodiment, the electronic device and computer storage medium are used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0243] In practical applications, the above functions can be assigned 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.

[0244] In the several embodiments provided in this application, the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are illustrative. For instance, the division of modules or units is a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0245] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.

[0246] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0247] If the integrated unit is implemented as 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 solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0248] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.

Claims

1. A method of automatic levelling, characterised in that, Applied to a 3D printing device, the 3D printing device comprising a laser light source for emitting linear laser light and a printing platform, the method comprising: 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 a plane where the printing platform is located; calculating an offset of the printing platform based on a horizontal plane according to the fitting normal vector and a unit normal vector of the horizontal plane; performing leveling compensation on the three-dimensional point cloud data according to the offset; 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 an 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.

2. The automatic leveling method of claim 1, wherein, The controlling the laser light source to scan the printing platform to obtain three-dimensional point cloud data comprises: controlling the laser light source to emit linear laser light according to a preset laser beam diameter, and controlling the laser light source to reciprocate to form a complete scanning surface of the printing platform to obtain the three-dimensional point cloud data.

3. The method of automatically leveling of claim 2, wherein, The performing plane fitting on the three-dimensional point cloud data to obtain a fitting normal vector of a plane where the printing platform is located comprises: 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, the fitting plane being the plane where the printing platform is located; obtaining the fitting normal vector of the fitting plane.

4. The method of automatically leveling of claim 1, wherein, The calculating an offset of the printing platform based on a horizontal plane according to the fitting normal vector and a unit normal vector of the horizontal plane comprises: obtaining a point cloud density of the three-dimensional point cloud data; obtaining a projection vector of the fitting normal vector on the horizontal plane; calculating an included angle between the projection vector and the unit normal vector; calculating the offset according to the point cloud density and the included angle.

5. The method of automatically leveling of claim 4, wherein, The calculating the offset according to the point cloud density and the included angle comprises: calculating the offset according to the following formula: Offset = × point cloud density, where θ is the included angle.

6. The method of automatically leveling of claim 1, wherein, The obtaining an actual curvature of the point cloud model comprises: obtaining a plurality of sampling point sets from the point cloud model according to a preset sampling interval; calculating an actual curvature of each sampling point set; The obtaining a compensation value of the new three-dimensional point cloud data according to the actual curvature and a preset theoretical curvature comprises: comparing the actual curvature of each sampling point set with the theoretical curvature respectively to obtain a compensation value corresponding to each sampling point set according to a comparison result.

7. The method of automatically leveling of claim 6, wherein, The compensation value of each sampling point set is obtained according to the following manner: calculating a deviation value of the theoretical curvature and the actual curvature of the sampling point set; calculating the compensation value according to the deviation value and a preset compensation coefficient.

8. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory being used to store instructions, and the processor being used to call the instructions in the memory to enable the electronic device to perform the automatic leveling method in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of automatically leveling as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Three-dimensional copying device and working method thereof

    CN115256950A

  • Computing device and method for measuring flatness of object

    US20150066425A1