Method and device for detecting printing quality of 3D printer, and 3D printer
Through depth sensors measuring and comparing the local depth map sequence of the first layer of the 3D printer, a global depth map is generated, which solves the problem of the lack of first-layer printing quality detection of existing 3D printers, and achieves high-precision monitoring and correction of 3D printing quality.
Patent Information
- Application Number
- CN202210435067.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-04-24
AI Technical Summary
Existing 3D printers lack the first-layer printing quality detection function, which leads to the inability to perceive and correct printing defects in time, affecting the quality of the final molded object.
Use a depth sensor (such as a laser profiler) to measure the distance between the hot bed and the print head. By generating and comparing the local depth map sequence of the first layer, the printing height difference value is calculated, and the global depth map is generated, and the printing quality results are determined based on this. .
It realizes high-precision detection of the first-layer printing quality of 3D printers, can promptly detect and correct printing defects, and improve the quality of the final molded object.
Smart Images

Figure CN114770946B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of 3D printing, and in particular to a method for detecting the printing quality of a 3D printer, an apparatus for detecting the printing quality of a 3D printer, a 3D printer, a computer-readable storage medium, and a computer program product. Background Art
[0002] 3D printing technology, also known as additive manufacturing technology, is a technology that uses digital model files as the basis, uses adhesive materials, and constructs objects by printing layer by layer. 3D printing is usually achieved using a 3D printer. 3D printers, also known as three-dimensional printers and stereo printers, are a type of rapid prototyping process equipment. 3D printers are often used to manufacture models or parts in the fields of mold manufacturing, industrial design, etc. A typical 3D printing technology is fused deposition modeling (FDM), which constructs objects by selectively depositing molten materials in a predetermined path layer by layer. The materials used are thermoplastic polymers in the form of filaments. At present, the printing quality of 3D printers still has a lot of room for improvement.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides a method for detecting the printing quality of a 3D printer, an apparatus for detecting the printing quality of a 3D printer, a 3D printer, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of the present disclosure, a method for detecting the printing quality of a 3D printer is provided. The 3D printer includes: a heated bed; a print head, movable relative to the heated bed; a depth sensor, arranged on the print head, for measuring the distance of a portion of the heated bed relative to the depth sensor; and at least one processor, for obtaining a local depth map of the portion of the heated bed according to the measurement result of the depth sensor, and for controlling the print head to move relative to the heated bed based on a control code generated by slicing software to print a 3D model layer by layer. The method comprises: obtaining a model reference map, wherein the model reference map is generated by parsing control information generated by the slicing software, and the model reference map represents an occupied area of at least a part of the first layer of the 3D model on the hot bed; generating a scanning path based on the model reference map, wherein the scanning path is generated so that when the depth sensor moves along the scanning path as the print head moves relative to the hot bed, the depth sensor sequentially measures distances of multiple different positions of the occupied area relative to the depth sensor; causing the depth sensor to move along the scanning path under the support of the print head, and obtaining a first local depth map sequence based on the measurements of the multiple different positions by the depth sensor during the movement, wherein the first local depth map sequence indicates corresponding distances of the multiple different positions relative to the depth sensor; causing the print head to print the first layer of the 3D model on the hot bed; causing the depth sensor to move along the scanning path under the support of the print head, and obtaining a first local depth map sequence based on the measurements of the multiple different positions by the depth sensor during the movement, wherein the first local depth map sequence indicates corresponding distances of the multiple different positions relative to the depth sensor; causing the print head to print the first layer of the 3D model on the hot bed; causing the depth sensor to move along the scanning path under the support of the print head, and obtaining a first local depth map sequence based on the measurements of the multiple different positions by the depth sensor during the movement, and ... The device moves along the scanning path, and obtains a second local depth map sequence based on the measurement of the multiple different positions by the depth sensor during the movement, wherein the second local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor after the first layer of the 3D model is printed on the hot bed; obtains the corresponding heights of the first layer of the 3D model at the multiple different positions by determining the difference between each local depth map in the first local depth map sequence and the corresponding local depth map in the second local depth map sequence; generates a global depth map corresponding to the model reference map, wherein the global depth map is filled with the values of the corresponding heights at multiple coordinates corresponding to the multiple different positions; and determines a printing quality result based on the model reference map, the printing height set by the slicing software for the first layer of the 3D model, and the global depth map, wherein the printing quality result indicates the printing quality of at least a portion of the first layer of the 3D model.
[0006] According to another aspect of the present disclosure, a device for detecting the printing quality of a 3D printer is provided. The 3D printer includes: a heated bed; a print head, movable relative to the heated bed; a depth sensor, arranged on the print head, for measuring the distance of a portion of the heated bed relative to the depth sensor; and at least one processor, for obtaining a local depth map of the portion of the heated bed according to the measurement result of the depth sensor, and for controlling the print head to move relative to the heated bed based on a control code generated by slicing software to print a 3D model layer by layer. The device comprises: a first module for acquiring a model reference map, wherein the model reference map is generated by parsing the control information generated by the slicing software, and the model reference map represents the occupied area of at least a part of the first layer of the 3D model on the hot bed; a second module for generating a scanning path based on the model reference map, wherein the scanning path is generated so that when the depth sensor moves along the scanning path as the print head moves relative to the hot bed, the depth sensor sequentially measures the distances of multiple different positions of the occupied area relative to the depth sensor; a third module for causing the depth sensor to move along the scanning path under the support of the print head, and deriving a first local depth map sequence based on the measurements of the multiple different positions by the depth sensor during the movement, wherein the first local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor; a fourth module for causing the print head to print the first layer of the 3D model on the hot bed; a fifth module for causing the depth sensor to move along the scanning path under the support of the print head, and deriving a first local depth map sequence based on the measurements of the multiple different positions by the depth sensor during the movement, wherein the first local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor; The print head moves along the scanning path under the support, and obtains a second local depth map sequence based on the measurement of the multiple different positions by the depth sensor during the movement, wherein the second local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor after the first layer of the 3D model is printed on the hot bed; a sixth module is used to obtain the corresponding heights of the first layer of the 3D model at the multiple different positions by determining the difference between each local depth map in the first local depth map sequence and the corresponding local depth map in the second local depth map sequence; a seventh module is used to generate a global depth map corresponding to the model reference map, wherein the global depth map is filled with the values of the corresponding heights at multiple coordinates corresponding to the multiple different positions; and an eighth module is used to determine a printing quality result based on the model reference map, the printing height set by the slicing software for the first layer of the 3D model, and the global depth map, wherein the printing quality result indicates the printing quality of at least a portion of the first layer of the 3D model.
[0007] According to another aspect of the present disclosure, a 3D printer is provided, comprising: a heated bed; a print head movable relative to the heated bed; a depth sensor arranged on the print head for measuring a distance of a portion of the heated bed relative to the depth sensor; and at least one processor configured to derive a local depth map of the portion of the heated bed according to a measurement result of the depth sensor, and to control the movement of the print head relative to the heated bed to print a 3D model layer by layer based on a control code generated by slicing software, wherein the at least one processor is further configured to execute instructions to implement the method as described above.
[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing instructions is provided, wherein the instructions, when executed by the at least one processor of the 3D printer as described above, implement the method as described above.
[0009] According to another aspect of the present disclosure, a computer program product is provided, comprising instructions, which, when executed by the at least one processor of the 3D printer as described above, implement the method as described above.
[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0012] Figure 1 shows a schematic diagram of a 3D printer according to an example embodiment;
[0013] Figure 2 Shows Figure 1 The working principle of the laser profiler composed of a laser projector and a camera in a 3D printer;
[0014] Figure 3 A flow chart showing a method for detecting the printing quality of a 3D printer according to an example embodiment is shown;
[0015] Figure 4 An example graphical representation showing a first layer of a 3D model on a heated bed;
[0016] Figure 5 Shown with Figure 4 Model reference diagram corresponding to the example;
[0017] Figure 6 Shown for Figure 5 An example of a scan path of a model reference diagram;
[0018] Figure 7 An example of a first local depth map and a second local depth map at a corresponding position is shown;
[0019] Figure 8 An example of a global depth map is shown; and
[0020] Fig. 9 A structural block diagram of an apparatus for detecting the printing quality of a 3D printer according to an example embodiment is shown. DETAILED DESCRIPTION
[0021] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0022] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0023] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations. The term "based on" should be interpreted as "based at least in part on".
[0024] 3D printing technology constructs objects by printing layer by layer. When printing 3D, the printing quality of the first layer of the 3D model is the key to whether the printing is successful. If the printing quality of the first layer is not good, it will seriously affect the quality of the final 3D model. Therefore, it is very important to detect the printing quality of the first layer, so that users can stop printing in time when there is a problem with the first layer. Current 3D printers do not have the function of detecting the quality of the first layer, so they cannot detect the quality problems of the first layer.
[0025] The inventors have realized that the depth detection technology can be used to detect the print quality of the first layer. Moreover, compared with other quality detection technologies (for example, using an optical camera to detect whether there are print holes), the depth detection technology has higher detection accuracy and applicability to more types of printed materials.
[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0027] Figure 1 FIG. 1 shows a schematic diagram of a 3D printer 100 according to an embodiment of the present disclosure. Figure 1 As shown, the 3D printer 100 includes a heated bed 110, a print head 120 movable relative to the heated bed 110, and a depth sensor 132 arranged on the print head 120 for measuring the distance of a portion of the heated bed 110 relative to the depth sensor 132. Here, the phrase "print head movable relative to the heated bed" may refer to any of the following situations: (1) the heated bed remains stationary and the print head moves; (2) the heated bed moves and the print head remains stationary; (3) both the heated bed and the print head move. Examples of the depth sensor 130 include but are not limited to a laser rangefinder, a depth camera based on time of flight (TOF), a depth camera based on a binocular camera, a depth camera based on structured light, and a laser profiler. Figure 1 In the example of FIG. 1 , the depth sensor 130 is shown as a laser profiler including a laser projector 132 and a camera 134. Herein, for the convenience of description, such a laser profiler is taken as an example to illustrate the embodiments of the present disclosure, but the present disclosure is not limited in this regard.
[0028] The laser projector 132 can be a line laser or a surface laser (e.g., a vertical cavity surface emitting laser (VCSEL)). In the case of a line laser, the 3D printer 100 can include more than one line laser. For example, the 3D printer 100 can include two line lasers, and the laser lines emitted by the two line lasers cross each other on the hot bed 110, so as to adapt to the print quality inspection of 3D models with different orientations. The camera 134 is generally a 2D optical camera. The laser projector 132 and the camera 134 are arranged at a certain angle to each other. Common arrangements are as follows: (1) The laser projector 132 is arranged at an angle relative to the horizontal plane, and the laser is projected obliquely toward the object to be measured, while the camera 134 is arranged directly below; (2) The laser projector 132 is arranged directly below, and the camera 134 is arranged at an angle relative to the horizontal plane; (3) Both the laser projector 132 and the camera 134 are arranged at an angle relative to the horizontal plane. With the aid of a laser profiler consisting of a laser projector 132 and a camera 134 , the distance between the heated bed 110 and the camera 134 can be measured, which will be further described later.
[0029] The 3D printer 100 further includes at least one processor (not shown). The at least one processor is used to control the movement of the print head 120 relative to the hot bed 110 based on the control code generated by the slicing software to print the 3D model layer by layer. Figure 1 As shown, at least one processor can drive a motor (not shown), and then drive the extrusion wheel 150 to feed the printing material 170 on the material tray 160 into the print head 120. During the movement of the print head 120, the printing material is extruded from the print head 120 and deposited on the hot bed 110. Typically, the slicing software runs on a computing device that is connected to the 3D printer 100 in communication, and operates to generate control information for controlling the printing process. For example, the slicing software can provide a graphical user interface (GUI) to allow a user to select or adjust layout information representing the position and orientation of the 3D model on the hot bed 110. The slicing software can slice the 3D graphical representation of the 3D model to generate slicing data (e.g., the number of slices, the height of each layer of slices, etc.), and then convert the slicing data into a control code for controlling the print head 120 of the 3D printer 100 to move along the printing path to print each layer of slices. Such control code is usually in the form of gcode. The control code is downloaded to the 3D printer 100 for execution by at least one processor. To this end, the 3D printer 100 may further include at least one memory (not shown) for storing programs and / or data.
[0030] The at least one processor is further configured to derive a local depth map of the portion of the heated bed 110 according to the measurement result of the depth sensor 130. In the case where the depth sensor 130 is a combination of a laser projector 132 and a camera 134, the laser projector 132 projects a laser onto the heated bed 110, and the at least one processor derives a local depth map of the portion of the heated bed 110 illuminated by the laser according to an optical image of the laser projected onto the heated bed 110 captured by the camera 134. Figure 2 The working principle of the laser profiler composed of a laser projector 132 and a camera 134 is shown. Figure 2 In the example, the laser projector 132 is a line laser and is arranged at an angle relative to the horizontal plane, while the camera 134 is arranged facing directly downward. The laser projector 132 projects a laser line to form a laser plane in three-dimensional space. The laser plane intersects with the object to be measured (a curved protrusion in this example) to form a curve. After the curve is captured by the camera 134, the coordinates of each point on the curve in the camera coordinate system of the camera 134 can be obtained through the principle of triangulation, including the distance of the point from the camera 134 (also called depth), thereby obtaining a local depth map corresponding to the laser line. It will be understood that Figure 2The arrangement is illustrative and not restrictive. In other embodiments, other arrangements may be used. For example, a surface laser may be used, and the laser surface projected onto the object to be measured may be regarded as a collection of multiple laser lines, and thus the distance from the point on the multiple laser lines to the camera 134 may be measured. The measurement may also be based on the triangulation principle. The triangulation principle itself is a known technology and will not be described in detail here in order not to obscure the subject matter of the present disclosure.
[0031] At least one processor is also used to implement various functions described below. In an example, the processor includes a microcontroller or computer that executes instructions stored in firmware and / or software (not shown). The processor can be programmable to perform the functions described herein. As used herein, the term computer is not limited to these integrated circuits referred to as computers in the art, but broadly refers to computers, processors, microcontrollers, microcomputers, programmable logic controllers, application specific integrated circuits and other programmable circuits, and these terms are used interchangeably in this article. The computer and / or processor discussed herein can each adopt a computer-readable medium or a machine-readable medium, which refers to any medium that participates in providing instructions to the processor for execution. The memory discussed above constitutes a computer-readable medium. Such a medium can take many forms, including but not limited to non-volatile media, volatile media and transmission media.
[0032] It will be understood that example embodiments of the present disclosure are described below in conjunction with an FDM printer, but the present disclosure is not limited to an FDM printer. In an embodiment, the print head 120 can be configured to extrude any material suitable for 3D printing, including, for example, thermoplastics, alloys, metal powders, ceramic materials, ceramic powders, polymers, etc.
[0033] Figure 3 is a flow chart illustrating a method 300 for detecting the print quality of a 3D printer according to an example embodiment. Figure 1 The method 300 is described with reference to the 3D printer 100 shown. In an example, the method 300 may be implemented by at least one processor in the 3D printer 100.
[0034] In step 310 , a model reference map is obtained. The model reference map represents an occupied area of at least a portion of the first layer of the 3D model on the hot bed 110 .
[0035] Combine the following Figure 4 and Figure 5 To illustrate the model reference diagram. Figure 4 An example graphical representation of the first layer of the 3D model on the hot bed 410 is shown, and Figure 5 Shown with Figure 4In this example, the first layer of the 3D model occupies an area on the hot bed 410 including four discrete areas 440a, 440b, 440c, and 440d. These areas can be formed by the same printing material or different printing materials. Figure 4 , but this is illustrative only; in other examples, the occupied area of the first layer of the 3D model may have other shapes or configurations (e.g., a single connected area), and the present disclosure is not limited in this regard. Figure 4 Corresponding to the graphical representation of , the model reference image 510 includes four pixel regions 540a, 540b, 540c and 540d, as shown in Figure 5 Generally, the model reference image 510 can be in the hot bed coordinate system oxyz( Figure 4 ), and the coordinates of pixel regions 540a, 540b, 540c and 540d in the model reference map 510 correspond one-to-one with the coordinates of discrete regions 440a, 440b, 440c and 440d on the hot bed 410. It will be understood that although the model reference map 510 is Figure 5 is shown as having Figure 4 The model reference map 510 may have dimensions corresponding to the dimensions of the hot bed 410, but this is not required. In other examples, the model reference map 510 may only have dimensions corresponding to the dimensions of the occupied area ( Figure 4 In the example, the size of the bounding box of the discrete regions 440a, 440b, 440c and 440d as a whole corresponds to that of the bounding box, thereby saving storage space.
[0036] It will also be understood that the model reference image does not necessarily need to represent the entire first layer of the 3D model, but may only represent a portion of the first layer of the 3D model. This is because in some cases, it may be necessary to detect the print quality of only a portion of the first layer of the 3D model. For example, since the temperature distribution of the hot bed may be uneven, the temperature is higher in some hot bed areas, while the temperature is lower in other hot bed areas. In the hot bed areas with lower temperatures, the printed material may not be formed normally and thus printing defects may occur. In this case, the print quality can be detected only for the hot bed areas with lower temperatures, thereby improving the detection efficiency.
[0037] The model reference map can be generated by parsing the control information generated by the slicing software. In some embodiments, the control information generated by the slicing software includes a control code (e.g., gcode) for printing the first layer of the 3D model. In such an embodiment, obtaining the model reference map (step 310) may include: receiving the model reference map from a computing device that is communicatively connected to the 3D printer 100. The model reference map is generated by the slicing software when it is running on the computing device by parsing the control code for printing the first layer of the 3D model. Alternatively, obtaining the model reference map (step 310) may include: reading the model reference map locally from the 3D printer 100. The model reference map is generated by at least one processor by parsing the control code for printing the first layer of the 3D model. Since the control code specifies the movement path of the print head, the occupied area of the first layer of the 3D model on the hot bed can be recovered therefrom.
[0038] In some embodiments, the control information generated by the slicing software includes layout information indicating the position and orientation of the 3D model on the hot bed 110. In such an embodiment, obtaining a model reference map (step 310) may include: receiving a model reference map from a computing device that is in communication with the 3D printer 100. The model reference map is generated by the slicing software when it is running on the computing device by parsing the layout information. Since the layout information defines the position and orientation of the 3D model on the hot bed, the occupied area of the first layer of the 3D model on the hot bed can be recovered from it.
[0039] Return to reference Figure 3 At step 320, a scanning path is generated based on the model reference map. The scanning path is generated so that when the depth sensor 130 moves along the scanning path as the print head 120 moves relative to the heat bed 110, the depth sensor 130 sequentially measures the distances of multiple different positions of the occupied area relative to the depth sensor 130.
[0040] Figure 6 Shown for Figure 5 In some embodiments, the occupied area includes at least one discrete area spaced apart from each other, the model reference map includes at least one pixel area representing at least one discrete area respectively, and generating the scan path (step 320) may include the following operations:
[0041] (1a) determining the bounding box of each of the at least one pixel region to obtain at least one bounding box corresponding to each of the at least one pixel region. Figure 6 In the example of FIG. 5 , the bounding boxes of the pixel regions 540 a , 540 b , 540 c , and 540 d can be determined, thereby obtaining four bounding boxes.
[0042] (1b) determining a scanning path in the model reference image, along which a virtual box representing the field of view (FOV) of the depth sensor moves to cover a portion of the at least one bounding box as a whole each time, and eventually traverse the entire area of the at least one bounding box. Figure 6 In the example of , a virtual box representing the FOV of the camera 134 is shown, and the determined scanning path is shown with hollow arrows. In this example, the scanning path is a Zig-Zag path, but this is illustrative and not limiting.
[0043] It will be understood that the operation of generating a bounding box is not necessary. In some embodiments, the scanning path can be generated for the original shape of the pixel area representing the occupied area of the first layer of the 3D model on the hot bed in the model reference image. In other embodiments, the scanning path can also be generated in any other suitable manner, as long as the depth sensor can measure multiple target positions of the occupied area of the first layer of the 3D model on the hot bed.
[0044] In some embodiments, the occupied area includes at least one discrete area spaced apart from each other, the model reference map includes at least one pixel area respectively representing at least one discrete area, and generating the scan path (step 320) may include the following operations:
[0045] (2a) determining the connected domain of each of the at least one pixel region to obtain at least one connected domain corresponding to each of the at least one pixel region. Figure 6 In the example of FIG. 5 , the connected domains of the pixel regions 540 a , 540 b , 540 c , and 540 d can be determined, thereby obtaining four connected domains.
[0046] (2b) For each connected domain, a moving path is determined in the model reference graph, and the virtual frame representing the field of view of the depth sensor moves along the moving path to cover a portion of the connected domain each time, and finally traverse the entire area of the connected domain. This can be similar to the operation (1b) described above, and will not be repeated here.
[0047] (2c) Merging the moving paths for all connected domains into a merged path as the scanning path. By generating a separate scanning path for each discrete area of the occupied area and merging each separate scanning path into a final scanning path, the scanning paths for non-target areas (e.g., Figure 6 The blank area in the image is scanned to improve the detection efficiency.
[0048] It will be understood that in an embodiment, the scanning path is generated for the field of view of the depth sensor 130 (e.g., the field of view of the camera 134), and the scanning path of the depth sensor 130 does not necessarily coincide with the moving path of the print head 120, because there may be a rotation and / or translation between the orientation of the depth sensor 130 and the orientation of the print head 120. The rotation and / or translation of the print head 120 and the depth sensor 130 in a three-dimensional coordinate system (e.g., a hot bed coordinate system) can be pre-calibrated by external parameter calibration, and the scanning path for the depth sensor 130 is converted into a moving path for the print head 120, and a corresponding control code is generated to control the movement of the print head 120, so that the depth sensor 130 moves along the scanning path under the support of the print head 120. External parameter calibration is a known technology, and in order not to obscure the subject matter of the present disclosure, it will not be described in detail here.
[0049] Return to reference Figure 3 In step 330, the depth sensor 130 is moved along the scanning path under the support of the print head 120, and a first local depth map sequence is obtained according to the measurement of the multiple different positions on the thermal bed 110 by the depth sensor 130 during the movement. The first local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor 130.
[0050] In some implementations, each first local depth map in the sequence of first local depth maps is numbered and stored in the memory according to the physical coordinates of the print head 120 in the hot bed coordinate system when the camera 134 captures each optical image on the scanning path. The purpose of numbering is to make each first local depth map correspond to the multiple different positions on the hot bed 110. It will be understood that the first local depth map can be stored in the camera coordinate system or converted to the image coordinate system for storage. The following takes the storage in the camera coordinate system as an example.
[0051] In step 340 , the print head 120 prints the first layer of the 3D model on the heated bed 110 .
[0052] In step 350, the depth sensor 130 is moved along the scanning path under the support of the print head 120, and a second local depth map sequence is obtained according to the measurement of the multiple different positions on the heated bed 110 by the depth sensor 130 during the movement. The second local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor 130 after the first layer of the 3D model is printed on the heated bed 110. This step enables the depth sensor 130 to scan again according to the same scanning path as in step 330.
[0053] Similarly, in some implementations, each second local depth map in the second local depth map sequence may be numbered according to the physical coordinates of the print head 120 in the hot bed coordinate system when the camera 134 captures each optical image on the scanning path, and stored in the memory in the camera coordinate system. This allows each second local depth map to correspond to the multiple different positions on the hot bed 110, and therefore also corresponds to each first local depth map stored in step 330.
[0054] In step 360, the corresponding heights of the first layer of the 3D model at multiple different positions are obtained by determining the difference between each local depth map in the first local depth map sequence and the corresponding local depth map in the second local depth map sequence.
[0055] Figure 7 An example of a first local depth map Lb and a second local depth map Lm at a corresponding position is shown. Figure 7 In the example of , by determining the difference between the first local depth map Lb and the second local depth map Lm, the height of the first layer of the 3D model at the position can be obtained. It will be understood that Figure 7 is just a visual representation of the depth map; the depth map itself can be a point cloud of 3D coordinates, and each point in the point cloud can be considered a pixel of the depth map.
[0056] Return to reference Figure 3 In step 370 , a global depth map corresponding to the model reference map 510 is generated. The global depth map is filled with corresponding height values at a plurality of coordinates corresponding to the plurality of different positions on the heat bed 110 . Figure 8 An example 800 of a global depth map is shown.
[0057] In some embodiments, generating a global depth map corresponding to the model reference map (step 370) may include the following operations:
[0058] (3a) Convert the multiple first coordinates representing the multiple different positions in the first local depth map sequence or the second local depth map sequence into multiple second coordinates in the coordinate system where the model reference image is located. Continuing with the previous example (the first local depth map and the second local depth map are stored in the camera coordinate system), the coordinates of the first local depth map sequence or the second local depth map sequence in the camera coordinate system can be converted into coordinates in the coordinate system where the model reference image is located (for example, the hot bed coordinate system). The coordinate system conversion matrix can be obtained by intrinsic parameter calibration. Intrinsic parameter calibration is a known technology and is not described in detail here in order not to obscure the subject matter of the present disclosure.
[0059] (3b) Generate a blank depth map in the coordinate system where the model reference map is located. In the example where the model reference map is located in the hot bed coordinate system, a blank depth map can be generated in the hot bed coordinate system. As mentioned above, the depth map can be a point cloud of three-dimensional coordinates (for example, in the form of a three-dimensional matrix), and each point can have three dimensions of x, y and z, where x and y represent the plane coordinates on the xy plane in the hot bed coordinate system, and z represents the height value in the z direction in the hot bed coordinate system. It can be understood that in the blank depth map, there is no data in the z dimension (or it can be filled with 0).
[0060] (3c) Fill the corresponding height values at the plurality of second coordinates in the blank depth map respectively to obtain a global depth map. This can be considered as stitching the local depths obtained in step 360 into a global depth map 800.
[0061] Return to reference Figure 3 In step 380, a print quality result is determined based on the model reference map, the print height set by the slicing software for the first layer of the 3D model, and the global depth map. The print quality result indicates the print quality of the at least a portion of the first layer of the 3D model.
[0062] It should be understood that the model reference map 510 and the print height set by the slicing software indicate the target print heights at the multiple different positions on the hot bed 110, while the global depth map 800 indicates the actual print heights at the multiple different positions. Therefore, it is possible to detect whether there is a printing defect or the severity of the printing defect based on the error between the target value and the actual value of the printing height. In some embodiments, determining the print quality result (step 380) includes the following operations:
[0063] (4a) comparing the target printing heights at the multiple different positions with the actual printing heights at corresponding positions among the multiple different positions.
[0064] (4b) determining a print quality result based on the comparison.
[0065] It will also be understood that the error between such a target value and the actual value can be measured in various possible ways, and the print quality result can be determined accordingly. In the following, some illustrative implementations are provided, which should not be considered as limiting.
[0066] In some embodiments, the comparison operation (4a) may include:
[0067] (5a) Determine the normal height range of the first layer of the 3D model, the upper and lower limits of the normal height range are related to the set printing height. Because different printing materials have different characteristics, assuming that the set first layer height is 0.2 mm, the actual measured height may not be 0.2 mm (usually a little lower), so it is necessary to determine the normal height range. In some implementations, operation (5a) may include:
[0068] (5a-1) Based on the set printing height, determine a default height range, wherein the upper and lower bounds of the default height range are functions of the set printing height. In the example, the set printing height is h, and the default height range is [h0, h1], wherein the lower bound h0=0.3h and the upper bound h1=2h. Of course, such a default height range is illustrative and not restrictive. In other implementations, the upper and lower bounds h0 and h1 of the default height range [h0, h1] may be other appropriate functions of the set printing height h.
[0069] (5a-2) Determine a set of pixels in the global depth map, which includes all pixels whose height values are within a default height range [h0, h1].
[0070] (5a-3) Calculate the average height value of this group of pixels
[0071] (5a-4) By averaging the height values Substituting h into the function (in the example of 5a-1, h0=0.3h, upper bound h1=2h) updates the upper and lower bounds h0 and h1. The default height range with the updated upper and lower bounds h0 and h1 is the normal height range.
[0072] In some implementations, when the printing material is pre-calibrated (for example, the ratio range of the measured height of the printing material to the printing height is pre-calibrated), the normal height range can be directly determined using the calibration information of the printing material. In such an implementation, operation (5a) includes: determining the normal height range according to the set printing height and the calibration information of the printing material, the calibration information of the printing material specifying the functional relationship between the upper and lower limits of the normal height range and the set printing height. It will be understood that different printing materials may have different calibration information, and thus may have different normal height ranges for the same set printing height.
[0073] In some embodiments, the global depth map can be interpolated to increase the number of pixels with height values. In some cases, the original global depth map is relatively sparse, for example, due to the large intervals between the measurement positions of the depth sensor on the scanning path, and / or the presence of holes in the measurement data of the depth sensor. This is not conducive to the defect detection algorithm, so the original global depth map can be interpolated. Here, a variety of interpolation methods can be used, the simplest of which is linear interpolation. In the example, for the global depth map obtained by scanning in the column direction, all rows of the global depth map can be traversed. If a pixel D(x) in the global depth map has no height value, and there are valid pixels D(x0) and D(x1) with height values within a certain range to its left and right (for example, 30 pixels), then the estimated value of D(x) is:
[0074] D(x)=((x-x0)D(x1)+(x1-x)D(x0)) / (x1-x0)
[0075] It will be understood that interpolation is not necessary. For example, in the case of using an area laser in a depth sensor, the effective pixels in the global depth map are relatively dense, so interpolation may not be required.
[0076] (5b) By comparing the height value of each pixel in the global depth map with the normal height range, the pixels in the global depth map are divided into normal pixels and abnormal pixels. The height value of the normal pixel is within the normal height range, and the height value of the abnormal pixel is outside the normal height range. Abnormal pixels can be further divided into low pixels (the height value of the pixel is lower than the lower limit of the normal height range) and high pixels (the height value of the pixel is higher than the upper limit of the normal height range).
[0077] (5c) Determine at least one pixel region in the model reference image that represents the occupied area. Each pixel region is usually in the form of a connected domain, and each pixel in the connected domain indicates that the corresponding position on the hot bed is occupied by the first layer of the 3D model. It should be understood that different pixel regions representing the occupied area may have different areas. For the purpose of detection efficiency, only a portion of the pixel regions with a larger area (for example, greater than the threshold T1) may be detected instead of all the pixel regions.
[0078] (5d) for at least one of the at least one pixel region:
[0079] (5d-1) Count the number of normal pixels and abnormal pixels in each pixel corresponding to the pixel area in the global depth map. For example, for each connected domain C with an area greater than the threshold T1, count the number of normal pixels, low pixels, and high pixels at the coordinates corresponding to the connected domain C in the global depth map. g ,n b,n r .
[0080] (5d-2) Comparing the number of normal pixels and the number of abnormal pixels with corresponding thresholds respectively, and / or comparing the relative quantity relationship between normal pixels and abnormal pixels with the corresponding threshold.
[0081] As mentioned above, the error between the target value and the actual value of the print height can be measured in various possible ways. Here, the number of normal pixels, the number of abnormal pixels, and the relative number relationship between normal pixels and abnormal pixels are all measurement criteria reflecting the error between the target value and the actual value of the print height. In an example, according to the number of normal pixels, low pixels, and high pixels, n g ,n b ,n r , the error level l can be defined as follows:
[0082]
[0083] Among them, T nb1 , T nr1 , T ng , T nb2 , T nb3 , T nr2 , T nr3 are thresholds, and NC is the number of pixels in the connected domain C. These thresholds may be pre-set or adaptive. For example, as a function of the number of pixels in the connected domain C, these thresholds may be adaptively varied with the number of pixels in the connected domain C. In this example, the error level l may be 0, 1, or 2. It will be understood that such error levels are illustrative and non-restrictive.
[0084] Based on the comparison result in operation (4a), the print quality result can be determined in operation (4b). Continuing with the above example about error level l, the following decision logic can be defined:
[0085] If any connected domain C has an error level equal to 2, the print quality result is judged to be "error" and the final error level 2 is output.
[0086] Otherwise, if there are more than 2 connected domains with an error level of 1, and the total number of abnormal pixels (n in all connected domains) is b +n r ) is greater than threshold T4 or the abnormal pixel ratio is greater than threshold T5, the print quality result is also determined to be "error" and the final error level 2 is output.
[0087] Otherwise, if there are more than or equal to one connected domain with an error level of 1, the print quality result is determined to be "warning" and the final error level 1 is output.
[0088] Otherwise, the print quality result is judged as "normal" and the final error level is 0.
[0089] It will be understood that such judgment logic is only illustrative and not restrictive. In other embodiments, other judgment logics may be applied. For example, the print quality result may be determined based on the accumulated absolute value of the error between the target value and the actual value of the print height. It should be understood that if the error between the target value and the actual value of the print height is known, various possible judgment criteria may be designed to detect the print quality. The present disclosure may not exhaust all judgment criteria, but this does not affect the fact that these other judgment criteria also fall within the scope of the present disclosure.
[0090] In some embodiments, the print quality result may include a confidence level indicating how reliable the detection is. The confidence level is a function of the number of pixels with height values in the global depth map and the total number of pixels in the model reference map. In an example, the confidence level is a ratio of the number of pixels with height values in the global depth map to the total number of pixels in the model reference map. In other examples, the confidence level may be other suitable functions of the number of pixels with height values in the global depth map and the total number of pixels in the model reference map.
[0091] Affected by various system errors, the first layer pattern actually printed is not necessarily strictly aligned with the first layer pattern of the model reference image, so it is also necessary to align the model reference image and the global depth map to find the error at the best matching position. In some embodiments, before operation (5d) (i.e., for at least one of the at least one pixel area, counting the number of normal pixels and the number of abnormal pixels in each pixel corresponding to the pixel area in the global depth map), the global depth map can be aligned with the model reference image so that the global depth map and the model reference image are aligned according to the alignment criteria.
[0092] In embodiments, various registration methods may be used, such as:
[0093] (1) Grayscale-based template matching algorithm: Based on a known template image, a sub-image similar to the template image is searched in another image. For example, the global depth map and the model reference image are binarized, and template matching is performed on the binarized global depth map and the model reference image.
[0094] (2) Feature-based matching algorithm: First, extract the features of the image, then generate feature descriptors, and finally match the features of the two images based on the similarity of the descriptors. Image features can include points, lines (edges), regions (surfaces), etc., and can also be divided into local features and global features.
[0095] (3) Relationship-based matching algorithm: Use machine learning algorithms to match images.
[0096] In one example, a brute force search method can be used to find the best matching position between the global depth map and the model reference map, and then the error is calculated at the best matching position. Specifically, the global depth map is moved in both the x and y directions, and the error is calculated at the new position. If the number of abnormal pixels at the new position is less than the number of abnormal pixels at the best position recorded previously, the new position is updated to the best matching position. In order to reduce the amount of calculation, the search range can be limited to a window range (such as 20 pixels, corresponding to 2mm in physical coordinates). In addition, if the number of abnormal pixels at the new position is much larger than the number of abnormal pixels at the previous position (such as 20% more), stop searching in the current direction.
[0097] As previously described, the error between this target value and the actual value can be measured in various possible ways, and the print quality result can be determined thereby. In some embodiments, determining the print quality result may include: inputting the model reference map, the print height set by the slicing software, and the global depth map into a trained machine learning algorithm (e.g., a classification neural network) to obtain the print quality result output by the trained machine learning algorithm. As previously described, the model reference map and the print height set by the slicing software indicate the target print height at multiple different positions on the hot bed, and the global depth map indicates the actual print height at the multiple different positions. The machine learning algorithm can be applicable to the application scenario of determining the error between the target value and the actual value of the print height. In the presence of a large number of training samples, the machine learning algorithm can be trained to detect whether there are printing defects.
[0098] Fig. 9 1 shows a block diagram of a device 900 for detecting the print quality of a 3D printer according to an exemplary embodiment. The device 900 includes a first module 910, a second module 920, a third module 930, a fourth module 940, a fifth module 950, a sixth module 960, a seventh module 970, and an eighth module 980. For the purpose of discussion, the following is combined with Figure 1 The 3D printer 100 is described with reference to apparatus 900 .
[0099] The first module 910 is used to obtain a model reference map. The model reference map represents an occupied area of at least a part of the first layer of the 3D model on the hot bed 110.
[0100] The second module 920 is used to generate a scanning path based on the model reference map. The scanning path is generated so that when the depth sensor 130 moves along the scanning path as the print head 120 moves relative to the heat bed 110, the depth sensor 130 sequentially measures the distances of multiple different positions of the occupied area relative to the depth sensor 130.
[0101] The third module 930 is used to move the depth sensor 130 along the scanning path under the support of the print head 120, and obtain a first local depth map sequence according to the measurement of the multiple different positions on the thermal bed 110 by the depth sensor 130 during the movement. The first local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor 130.
[0102] The fourth module 940 is used to enable the print head 120 to print the first layer of the 3D model on the heated bed 110 .
[0103] The fifth module 950 is used to move the depth sensor 130 along the scanning path under the support of the print head 120, and obtain a second local depth map sequence according to the measurement of the multiple different positions on the heated bed 110 by the depth sensor 130 during the movement. The second local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor 130 after the first layer of the 3D model is printed on the heated bed 110.
[0104] The sixth module 960 is used to obtain corresponding heights of the first layer of the 3D model at multiple different positions by determining the difference between each local depth map in the first local depth map sequence and the corresponding local depth map in the second local depth map sequence.
[0105] The seventh module 970 is used to generate a global depth map corresponding to the model reference map 510. The global depth map is filled with corresponding height values at a plurality of coordinates corresponding to the plurality of different positions on the heat bed 110, respectively.
[0106] The eighth module 980 is used to determine a print quality result based on the model reference map, the print height set by the slicing software for the first layer of the 3D model, and the global depth map. The print quality result indicates the print quality of the at least a portion of the first layer of the 3D model.
[0107] It should be understood that Fig. 9 The various modules of the apparatus 900 shown in FIG. Figure 3 The steps in the method 300 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 300 are also applicable to the apparatus 900 and the modules included therein. For the sake of brevity, some operations, features and advantages are not described in detail here.
[0108] Although specific functions are discussed above with reference to specific modules, it should be noted that the functions of the various modules discussed herein may be divided into multiple modules, and / or at least some functions of multiple modules may be combined into a single module. The specific module discussed herein performing an action includes the specific module itself performing the action, or alternatively the specific module calling or otherwise accessing another component or module that performs the action (or performs the action in conjunction with the specific module). Therefore, the specific module that performs an action may include the specific module itself that performs the action and / or another module that the specific module calls or otherwise accesses to perform the action.
[0109] It should also be understood that various techniques may be described herein in the general context of software hardware elements or program modules. Fig. 9 The various modules described can be implemented in hardware or in hardware in combination with software and / or firmware. For example, these modules can be implemented as computer program code / instructions, which are configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, these modules can be implemented as hardware logic / circuits. For example, in some embodiments, one or more of these modules can be implemented together in a system on a chip (SoC). SoC may include an integrated circuit chip (which includes a processor (e.g., a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (DSP)), a memory, one or more communication interfaces, and / or one or more components in other circuits), and may optionally execute the received program code and / or include embedded firmware to perform functions.
[0110] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing instructions is further provided, where the instructions are used to enable the 3D printer 100 as described above to execute the method described in any embodiment of the present disclosure.
[0111] According to an embodiment of the present disclosure, a computer program product is further provided, comprising instructions for causing the 3D printer 100 as described above to execute the method as described in any embodiment of the present disclosure.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0113] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present disclosure is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that with the evolution of technology, many of the elements described herein may be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A method for detecting the printing quality of a 3D printer, wherein: The 3D printer comprises: a heated bed; a print head movable relative to the heated bed; a depth sensor arranged on the print head for measuring a distance of a portion of the heated bed relative to the depth sensor; and at least one processor for obtaining a local depth map of the portion of the heated bed according to a measurement result of the depth sensor, and for controlling the print head to move relative to the heated bed based on a control code generated by a slicing software to print a 3D model layer by layer, the method comprising: Acquire a model reference map, wherein the model reference map is generated by parsing the control information generated by the slicing software, and the model reference map represents an occupied area of at least a part of the first layer of the 3D model on the hot bed; generating a scanning path based on the model reference map, wherein the scanning path is generated so that when the depth sensor moves along the scanning path as the print head moves relative to the heated bed, the depth sensor sequentially measures distances of a plurality of different positions of the occupied area relative to the depth sensor, and wherein the scanning path is different from a printing path of the print head printing a first layer of the 3D model; Move the depth sensor along the scanning path under the support of the print head, and obtain a first local depth map sequence based on the measurements of the multiple different positions by the depth sensor during the movement, wherein the first local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor; Allowing the print head to print a first layer of the 3D model on the heated bed; The depth sensor is moved along the scanning path under the support of the print head, and a second local depth map sequence is obtained according to the measurement of the multiple different positions by the depth sensor during the movement, wherein the second local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor after the first layer of the 3D model is printed on the heated bed; Determining the difference between each local depth map in the first local depth map sequence and the corresponding local depth map in the second local depth map sequence, obtaining corresponding heights of the first layer of the 3D model at the multiple different positions; generating a global depth map corresponding to the model reference map, wherein the global depth map is filled with the values of the corresponding heights at a plurality of coordinates corresponding to the plurality of different positions; and Based on the model reference map, the print height set by the slicing software for the first layer of the 3D model, and the global depth map, a print quality result is determined, the print quality result indicating the print quality of the at least a portion of the first layer of the 3D model, wherein the model reference map and the set print height indicate target print heights at the multiple different positions, and the global depth map indicates actual print heights at the multiple different positions, and the determining the print quality result includes: Comparing the target printing heights at the multiple different positions with the actual printing heights at corresponding positions among the multiple different positions, the comparison comprising: Determining a normal height range of the first layer of the 3D model, wherein the upper and lower limits of the normal height range are related to the set printing height; By comparing the height value at each pixel in the global depth map with the normal height range, the pixels in the global depth map are divided into normal pixels and abnormal pixels, wherein the height value at the normal pixel is within the normal height range, and the height value at the abnormal pixel is outside the normal height range; determining at least one pixel region in the model reference map representing the occupied area; For at least one of the at least one pixel region: Counting the number of normal pixels and the number of abnormal pixels in each pixel corresponding to the pixel area in the global depth map; and Comparing the number of normal pixels and the number of abnormal pixels with corresponding thresholds respectively, and / or comparing the relative number relationship between the normal pixels and the abnormal pixels with the corresponding threshold; and The print quality result is determined based on the comparison.
2. The method of claim 1, wherein: The generating of a global depth map corresponding to the model reference map comprises: Converting a plurality of first coordinates representing the plurality of different positions in the first local depth map sequence or the second local depth map sequence into a plurality of second coordinates in the coordinate system of the model reference map; Generate a blank depth map in the coordinate system of the model reference map; and The values of the corresponding heights are filled in at the plurality of second coordinates in the blank depth map respectively to obtain the global depth map.
3. The method of claim 1, wherein: Determining the normal height range of the first layer of the 3D model includes: Based on the set printing height, determining a default height range, wherein upper and lower bounds of the default height range are functions of the set printing height; Determine a set of pixels in the global depth map, the set of pixels including all pixels with height values within the default height range; Calculate the average height value of the group of pixels; and The upper and lower bounds are updated by substituting the average value of the height values into the function, and the default height range with the updated upper and lower bounds is the normal height range.
4. The method of claim 1, wherein: Determining the normal height range of the first layer of the 3D model includes: The normal height range is determined according to the set printing height and calibration information of the printing material, and the calibration information of the printing material specifies the functional relationship between the upper and lower limits of the normal height range and the set printing height.
5. The method of claim 1 , further comprising, before classifying the pixels in the global depth map into normal pixels and abnormal pixels: The global depth map is interpolated to increase the number of pixels having height values.
6. The method of claim 1, wherein: The print quality result includes a confidence level indicating how reliable the detection is, the confidence level being a function of the number of pixels having height values in the global depth map and the total number of pixels in the model reference map.
7. The method of claim 1 further comprises, before counting the number of normal pixels and the number of abnormal pixels in each pixel corresponding to the pixel area in the global depth map for at least one of the at least one pixel area: The global depth map is registered with the model reference map such that the global depth map and the model reference map are aligned according to a registration criterion.
8. The method of claim 1, wherein: The determining of the print quality result comprises: The model reference image, the set printing height, and the global depth map are input into a trained machine learning algorithm to obtain the printing quality result output by the trained machine learning algorithm.
9. The method according to any one of claims 1 to 8, wherein: The control information generated by the slicing software includes a control code for printing a first layer of the 3D model, and wherein obtaining a model reference diagram includes: receiving the model reference image from a computing device in communication with the 3D printer, the model reference image being generated by the slicing software when running on the computing device by parsing the control code for printing the first layer of the 3D model, or The model reference image is read locally from the 3D printer, where the model reference image is generated by the at least one processor by parsing the control code for printing the first layer of the 3D model.
10. The method according to any one of claims 1 to 8, wherein: The control information generated by the slicing software includes layout information indicating the position and orientation of the 3D model on the hot bed, and wherein obtaining the model reference diagram includes: The model reference image is received from a computing device that is communicatively connected to the 3D printer, where the model reference image is generated by parsing the layout information when the slicing software is running on the computing device.
11. The method according to any one of claims 1 to 8, wherein: The occupied area includes at least one discrete area spaced apart from each other, the model reference map includes at least one pixel area respectively representing the at least one discrete area, and wherein generating the scan path includes: Determining a respective bounding box of the at least one pixel region to obtain at least one bounding box corresponding to the at least one pixel region; and The scanning path is determined in the model reference map, and a virtual box representing the field of view of the depth sensor is moved along the scanning path to cover a portion of the at least one bounding box as a whole each time and eventually traverse the entire area of the at least one bounding box.
12. The method according to any one of claims 1 to 8, wherein: The occupied area includes at least one discrete area spaced apart from each other, the model reference map includes at least one pixel area respectively representing the at least one discrete area, and wherein generating the scan path includes: Determine a connected domain of each of the at least one pixel region to obtain at least one connected domain corresponding to each of the at least one pixel region; For each connected domain, a moving path is determined in the model reference graph, and a virtual frame representing the field of view of the depth sensor moves along the moving path to cover a portion of the connected domain each time and eventually traverse the entire area of the connected domain; and The moving paths for all connected domains are merged into a merged path to serve as the scanning path.
13. A device for detecting the printing quality of a 3D printer, wherein: The 3D printer comprises: a heated bed; a print head movable relative to the heated bed; a depth sensor arranged on the print head for measuring a distance of a portion of the heated bed relative to the depth sensor; and at least one processor for obtaining a local depth map of the portion of the heated bed according to the measurement result of the depth sensor, and for controlling the print head to move relative to the heated bed based on a control code generated by a slicing software to print a 3D model layer by layer, the device comprising: A first module is used to obtain a model reference map, wherein the model reference map is generated by parsing the control information generated by the slicing software, and the model reference map represents an occupied area of at least a part of the first layer of the 3D model on the hot bed; a second module, for generating a scanning path based on the model reference map, wherein the scanning path is generated so that when the depth sensor moves along the scanning path as the print head moves relative to the heated bed, the depth sensor sequentially measures distances of a plurality of different positions of the occupied area relative to the depth sensor, and wherein the scanning path is different from a printing path of the print head for printing a first layer of the 3D model; a third module, configured to move the depth sensor along the scanning path under the support of the print head, and obtain a first local depth map sequence according to the measurement of the multiple different positions by the depth sensor during the movement, wherein the first local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor; A fourth module is used to enable the print head to print the first layer of the 3D model on the hot bed; a fifth module, configured to move the depth sensor along the scanning path under the support of the print head, and obtain a second local depth map sequence according to the measurement of the multiple different positions by the depth sensor during the movement, wherein the second local depth map sequence indicates the corresponding distances of the multiple different positions relative to the depth sensor after the first layer of the 3D model is printed on the hot bed; A sixth module is used to obtain corresponding heights of the first layer of the 3D model at the multiple different positions by determining the difference between each local depth map in the first local depth map sequence and the corresponding local depth map in the second local depth map sequence; A seventh module is configured to generate a global depth map corresponding to the model reference map, wherein the global depth map is filled with the corresponding height values at the plurality of coordinates corresponding to the plurality of different positions; and An eighth module is used to determine a print quality result based on the model reference map, the print height set by the slicing software for the first layer of the 3D model, and the global depth map, wherein the print quality result indicates the print quality of at least a portion of the first layer of the 3D model, wherein the model reference map and the set print height indicate the target print heights at the multiple different positions, and the global depth map indicates the actual print heights at the multiple different positions, and the determining of the print quality result includes: comparing the target print heights at the multiple different positions with the actual print heights at corresponding positions in the multiple different positions, and the comparison includes: determining a normal height range for the first layer of the 3D model, the upper and lower limits of the normal height range being related to the set print height; by dividing the global depth map by The method comprises the steps of: comparing the height value at each pixel in the global depth map with the normal height range, dividing the pixels in the global depth map into normal pixels and abnormal pixels, wherein the height value at the normal pixel is within the normal height range, and the height value at the abnormal pixel is outside the normal height range; determining at least one pixel area in the model reference map representing the occupied area; for at least one of the at least one pixel area: counting the number of normal pixels and the number of abnormal pixels in each pixel corresponding to the pixel area in the global depth map; and comparing the number of normal pixels and the number of abnormal pixels with corresponding thresholds, respectively, and / or comparing the relative quantity relationship between the normal pixels and the abnormal pixels with the corresponding threshold; and determining the printing quality result based on the comparison.
14. A 3D printer, comprising: Hot bed; a print head, movable relative to the heated bed; a depth sensor disposed on the print head for measuring a distance of a portion of the heated bed relative to the depth sensor; as well as at least one processor configured to obtain a local depth map of the portion of the heated bed according to the measurement result of the depth sensor, and to control the movement of the print head relative to the heated bed to print the 3D model layer by layer based on the control code generated by the slicing software, The at least one processor is further configured to execute instructions to implement the method as claimed in any one of claims 1 to 12.
15. A non-transitory computer-readable storage medium storing instructions, wherein: When the instructions are executed by the at least one processor of the 3D printer according to claim 14, the method according to any one of claims 1 to 12 is implemented.
16. A computer program product comprising instructions which, when executed by the at least one processor of the 3D printer according to claim 14, implement the method according to any one of claims 1 to 12.
