Deviation determination method of tool head and 3D printer
By printing and collecting images of tool head motion trajectory on a 3D printer and automatically analyzing offsets, the problem of traditional low measurement accuracy is solved, and printing accuracy and computing efficiency is improved.
Patent Information
- Application Number
- CN202510335811.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Existing 3D printers have offsets during tool head movement, resulting in reduced printing accuracy and lower accuracy of traditional manual measurement methods.
By controlling the tool head to print two parallel and non-collinear line segments on the printing platform, and collecting corresponding images, the offset of the tool head in the perpendicular direction to the line segment is determined based on image analysis.
Improve the measurement accuracy of tool head offset, avoid errors caused by manual measurement, and improve printing accuracy and computing efficiency.
Smart Images

Figure CN120096089A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of 3D printing, and in particular to a method for determining an offset of a tool head and a 3D printer. Background Art
[0002] With the rapid development of 3D printing technology, people have higher and higher requirements for printing accuracy. The tool head of a 3D printer has a certain offset when moving. For example, when we need to move 100mm horizontally, the actual moving distance may be 100.03mm or 99.96mm. This is due to the limitation of the motion structure itself and cannot be completely eliminated. Obviously, this inaccurate movement will lead to a loss of printing accuracy. If this offset can be measured, targeted compensation can be made to improve printing accuracy.
[0003] In traditional technical solutions, 3D printers can only print specific models, and then manually measure the various features of the model. After a series of calculations, the offset of the tool head in multiple directions can be obtained, and then targeted compensation can be performed. However, the accuracy of the offset calculated by manual measurement is low. Summary of the invention
[0004] In order to solve the above-mentioned problems existing in the prior art, an embodiment of the present application provides a method for determining the offset of a tool head and a 3D printer, by controlling the tool head to print two parallel and non-collinear line segments on a printing platform, and collecting images corresponding to the two line segments, based on the images corresponding to the two line segments, the offset of the tool head in the direction perpendicular to the line segments is determined. Compared with manually measuring various features of the printed part and calculating the motion error, the offset of the tool head is determined based on the image comparison of the actual printed line segments, which can improve the measurement accuracy of the offset.
[0005] In a first aspect, an embodiment of the present application provides a method for determining an offset of a tool head, the method being applied to a controller of a 3D printer, the tool head being disposed on the 3D printer, the 3D printer comprising a printing platform and a camera connected to the tool head, the tool head and the printing platform being capable of relative movement; the method comprising:
[0006] Controlling the tool head to print a first line segment and a second line segment on the printing platform, wherein the first line segment and the second line segment are parallel and not collinear in a first direction;
[0007] The first line segment and the second line segment are captured by the camera to obtain a first image and a second image, wherein the first line segment corresponds to the first image and the second line segment corresponds to the second image;
[0008] Based on the first image and the second image, the offset of the tool head in a second direction is obtained, where the second direction is perpendicular to the first direction.
[0009] In a second aspect, an embodiment of the present application provides a controller, the controller is located in a 3D printer, the 3D printer comprises: a tool head, a printing platform and a camera, the tool head and the printing platform can move relative to each other; the controller comprises a control unit, an image acquisition unit and a processing unit;
[0010] The control unit is used to control the tool head to print a first line segment and a second line segment on the printing platform, wherein the first line segment and the second line segment are parallel and not collinear in a first direction;
[0011] The image acquisition unit is configured to acquire the first line segment and the second line segment through the camera to obtain a first image and a second image, wherein the first line segment corresponds to the first image, and the second line segment corresponds to the second image;
[0012] The processing unit is used to obtain the offset of the tool head in a second direction based on the first image and the second image, where the second direction is perpendicular to the first direction.
[0013] In a third aspect, an embodiment of the present application provides a 3D printer, comprising: a controller, a printing platform, a tool head and a camera, wherein the tool head and the printing platform can move relative to each other; the controller comprises: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the controller executes the method described in the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method described in the first aspect.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program product is operable to cause a computer to execute the method described in the first aspect.
[0016] Implementing the embodiments of the present application has the following beneficial effects:
[0017] In the embodiment of the present application, the controller of the 3D printer first controls the tool head to print the first line segment and the second line segment that are parallel and non-collinear in the first direction on the printing platform, then collects the first line segment and the second line segment through the camera, obtains the first image corresponding to the first line segment and the second image corresponding to the second line segment, and finally, based on the first image and the second image, obtains the offset of the tool head in the second direction perpendicular to the first direction. Based on this, by analyzing and processing the images corresponding to the parallel line segments actually printed by the tool head, the offset of the tool head in the direction perpendicular to the parallel line segments can be obtained. Compared with manually measuring the various features of the printed model, the implementation of the present application can realize the automatic measurement of the tool head offset, the operation is simpler, and the measurement error caused by manual measurement is avoided, and the measurement accuracy and calculation efficiency of the tool head offset are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of the structure of a 3D printer provided in an embodiment of the present application;
[0020] Figure 2 A schematic flow chart of a method for determining an offset of a tool head provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a printing pattern provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of line segment printing provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a line segment image provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of a projection intensity distribution provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of target point detection provided in an embodiment of the present application;
[0026] Figure 8 A block diagram of the functional units of a controller provided in an embodiment of the present application;
[0027] Fig. 9 A functional block diagram of a 3D printer provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0030] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0031] In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. In an example, it can be a fixed connection, or a detachable connection, or an integral connection; it can be a mechanical connection, or an electrical connection, or they can communicate with each other; it can be a direct connection, or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements.
[0032] First, see Figure 1 , Figure 1 A schematic diagram of the structure of a 3D printer provided in an embodiment of the present application. Figure 1 As shown, the 3D printer 100 may include: a controller 101 , a tool head 102 , a printing platform 103 and a camera 104 .
[0033] It should be noted that the controller 101 may include at least one of: an onboard microcontroller unit (MCU), a central processing unit (CPU), a field programmable gate array (FPGA) chip, a single chip microcomputer (SCM), etc. Among them, the controller 101 can be integrated into the 3D printer 100 to control the 3D printer 100 to print the print. Optionally, the 3D printer 100 may include controllers 101 located at multiple different positions, and the present application does not limit the number and placement of the controllers. Among them, the print is an object printed by the 3D printer on the printing platform 103, and the size, shape, and other parameters of the printing platform 103 can be synchronized to the controller 101 of the 3D printer 100 in real time. The controller 101 can divide the printing platform 103 into multiple grids and display the above multiple grids in the operating device. The operating device is used to receive the user's operation control. The user can enter the relevant parameters in the operating device and send the relevant parameters to the controller 101 of the 3D printer 100 through the operating device. Then, the controller 101 can print out the corresponding printout according to the relevant parameters input by the user in the operating device. Exemplarily, the operating device can be a terminal device including slicing software. The user can determine the printing position of the printout based on the position of each grid, so as to print out the required printout at the preset printing position on the printing platform 103. Optionally, the controller 101 can also be an electronic device independent of the 3D printer, which is used to remotely control the 3D printer.
[0034] Among them, the tool head 102 is set on the 3D printer, and the controller 101 can control the movement of the tool head 102 to move the tool head 102 to a corresponding position to print the print at this position. The tool head 102 can be connected to a feeding device, which includes consumables of various colors and can deliver consumables of various colors to the nozzle on the tool head 102. There is a heating block inside the tool head 102, which can deliver the heated and molten consumables to the nozzle. The nozzle is the end component of the print head, which is responsible for extruding the molten consumables and depositing them on the printing platform 103 to print the corresponding object. The printing platform 103 is a supporting component of the print and can be moved on the 3D printer. The camera 104 is connected to the tool head 102 and follows the movement of the tool head 102 to collect images of the print. Optionally, the camera can also be set at other parts of the 3D printer and can move relative to the printing platform to collect images of the print.
[0035] In some feasible implementations, the 3D printer 100 of the embodiment of the present application is a dual-head printer, and two nozzles are provided on the tool head 102, such as Figure 1 The first nozzle 105 and the second nozzle 106 are shown, and the first nozzle 105 and the second nozzle 106 can be switched to perform printing operations. The controller controls the tool head 102 to extrude the consumables to the printing platform through the cooperation of the two nozzles, and prints the required prints on the printing platform 103. Among them, the 3D printer 100 with two nozzles can receive consumables of multiple colors through the two nozzles, so as to print multi-color parts or parts with support materials through the two nozzles.
[0036] In the embodiment of the present application, the user can download / input the shape, color, printing position, and other parameters of the print in the operating device or slicing software, and the operating device or slicing software sends the above parameters to the 3D printer 100, and the controller 101 executes the corresponding program to control the movement of the tool head 102 of the 3D printer 100, and controls the tool head 102 to move to the printing position. Optionally, the controller 101 can also control the movement of the printing platform so that the printing platform is close to the tool head or controls the printing platform to move in a predefined xy plane. And control the feeding device to deliver the corresponding color consumables to the tool head 102. Then, the controller 101 controls the tool head 102 to extrude the consumables of different colors to the printing position of the printing platform 103 through the first nozzle 105 and the second nozzle 106, respectively, so as to print a multi-color print on the printing platform 103.
[0037] It is understandable that the embodiments of the present application are only described by taking a dual-head printer as an example, and those skilled in the art can also apply the methods of the embodiments of the present application to a single nozzle printer or a 3D printer with multiple tool heads, which is not limited here.
[0038] When the tool head 102 of the 3D printer 100 moves, due to the limitation of the motion structure itself, there is a certain offset between the movement distance of the tool head 102 and the theoretical movement distance, which will reduce the printing accuracy, and there is also an offset between the two nozzles. To this end, in the embodiment of the present application, two identical and non-overlapping preset patterns can be set on the operating device, and the two preset patterns can be printed out by the tool head 102 of the 3D printer 100, or the printing track of the preset pattern is preset in the 3D printer and triggered by the user clicking the control of the tool head offset calibration. Then, the image of the two preset patterns is taken by the camera 104, and the image is sent to the controller 101. The controller 101 can calculate the offset of the tool head by analyzing the image. In some feasible embodiments, one nozzle in the tool head 102 can be controlled to print out the two preset patterns, and the offset of the tool head can be calibrated. In addition, another nozzle in the tool head can be further controlled to print out the two preset patterns, and the offset between the two nozzles can be calibrated.
[0039] Exemplarily, in the embodiment of the present application, the controller 101 controls the tool head 102 to print a first line segment and a second line segment on the printing platform 103, wherein the first line segment and the second line segment are parallel and not collinear in a first direction;
[0040] The controller 101 collects the first line segment and the second line segment through the camera 104 to obtain a first image and a second image, wherein the first line segment corresponds to the first image and the second line segment corresponds to the second image;
[0041] The controller 101 obtains the offset of the tool head in a second direction based on the first image and the second image, where the second direction is perpendicular to the first direction.
[0042] In some feasible embodiments, the controller can control the tool head to move to the printing position corresponding to the parameters by obtaining the parameters input by the user in the operating device or slicing software, and provide the consumables corresponding to the above parameters to the tool head through the feeding device. Then, the tool head is controlled to extrude the material line through the nozzle and extrude the material onto the printing platform, thereby printing a printout corresponding to the model file on the printing platform.
[0043] Before starting printing, initializing or receiving a tool head offset calibration request initiated by the user, the tool head can be controlled to print two parallel and non-collinear line segments on the printing platform, and the image of the two line segments can be captured by the camera. Based on the image of the two line segments, the offset of the tool head in the direction perpendicular to the line segments can be analyzed, and the movement of the tool head can be compensated for by software based on the offset of the tool head, thereby improving the printing quality. The implementation of this application can solve the problem of low measurement accuracy caused by manual measurement of offset and improve the measurement accuracy of the offset.
[0044] See also Figure 2 , Figure 2 A flowchart of a method for determining the offset of a tool head provided in an embodiment of the present application. The method is applied to the controller of the above-mentioned 3D printer, the tool head is set in the 3D printer, the 3D printer includes a printing platform and a camera, and the tool head and the printing platform can move relative to each other. The method includes but is not limited to the following steps:
[0045] 201: Control the tool head to print the first line segment and the second line segment on the printing platform.
[0046] In some feasible implementations, the first line segment and the second line segment are parallel and not collinear in the first direction. The controller obtains preset parameters on the operating device of the 3D printer, and the preset parameters include the printing paths of the first line segment and the second line segment; or, the 3D printer is pre-set with the printing paths of the first line segment and the second line segment, wherein the printing paths of the first line segment and the second line segment are associated with the control of the nozzle offset calibration function of the 3D printer. Exemplarily, when the controller detects that the user clicks the control of the nozzle offset calibration, the code corresponding to printing the first line segment and the second line segment is executed.
[0047] In a specific implementation, the controller controls the tool head to move along the printing path of the first line segment to the preset printing starting point of the first line segment. Starting from the preset printing starting point of the first line segment, the controller controls the tool head to move along the first direction and extrude the consumable material onto the printing platform, thereby printing the first line segment.
[0048] Then, after the first line segment is printed, the controller controls the tool head to move to the preset printing starting point of the second line segment along the printing path of the second line segment. Starting from the preset printing starting point of the second line segment, the tool head is controlled to move along the first direction and extrude the consumable material onto the printing platform, thereby printing the second line segment.
[0049] Optionally, the first line segment and the second line segment can be printed separately by two nozzles on the tool head, that is, after printing the first line segment by one nozzle, the second line segment is printed by another nozzle. The first line segment and the second line segment can also be printed by one nozzle, which is not limited in the present application.
[0050] Optionally, a complete pattern can be printed by a 3D printer, for example, a parallelogram can be printed by a 3D printer. Figure 3 As shown, when the pattern to be printed is a rectangle, the controller obtains the parameters such as the length of the rectangle side and the position of the end points set by the user from the slicing software or the operating device, and controls the tool head to print the rectangular pattern on the printing platform based on the parameters. Optionally, the parameters of the rectangular pattern can be stored in the 3D printer in the form of Gcode code.
[0051] When line segment AB is the first line segment, line segment DC is the second line segment, and the extension direction of line segment AB or line segment DC is the first direction. At this time, the extension direction of line segment AD or line segment BC can be regarded as the second direction. Therefore, the offset of the tool head in the second direction can be obtained by the coordinate offset of the corresponding points on line segment AB and line segment DC, so as to compensate for the movement of the tool head in the second direction. Exemplarily, the offset of the tool head in the second direction refers to the offset of the nozzle in the second direction.
[0052] When line segment AD is the first line segment, line segment BC is the second line segment, and the extension direction of line segment AD or line segment BC is the first direction. In this case, the extension direction of line segment AB or line segment DC can be regarded as the second direction. Therefore, the offset of the tool head in the second direction can be obtained by offsetting the coordinates of the corresponding points on line segment AD or line segment BC, thereby compensating for the movement of the tool head in the second direction.
[0053] Exemplarily, before controlling the tool head to print the first line segment and the second line segment on the printing platform, the method may further include:
[0054] The tool head is controlled to print a bottom surface on the printing platform, and a first line segment and a second line segment are printed on the bottom surface.
[0055] During the 3D printing process, the first layer of printing is affected by various factors such as the temperature of the printing platform and the material of the printing platform, resulting in printing defects of the first layer.
[0056] Before printing the first line segment and the second line segment, the controller controls the tool head to print the bottom surface on the printing platform first, and after the bottom surface is printed, controls the tool head to print the first line segment and the second line segment on the bottom surface. Based on this, the printing defect problem easily caused by printing the first line segment and the second line segment in the first layer can be avoided, and the influence of the surface material / texture of the printing platform on the printing of the first line segment and the second line segment can be avoided, thereby ensuring the success of printing the first line segment and the second line segment. Printing the bottom surface can also ensure the stability of the flow rate output by the nozzle, thereby avoiding the flow rate fluctuation from affecting the position coordinates of the printing of the first line segment and the second line segment. The implementation of this application can improve the accuracy of the tool head offset calibration.
[0057] Optionally, the color of the consumable for printing the bottom surface is different from the color of the consumable for printing the first line segment and the second line segment, and the consumable colors of the two are obviously different, for example, one is a dark consumable color and the other is a light consumable color. In this case, the bottom surface and the first line segment and the second line segment can be clearly distinguished in the image captured by the camera, thereby simplifying the image processing steps, improving the accuracy of image processing, and further improving the accuracy of tool head offset calibration.
[0058] Optionally, the color consumables of the first line segment and the color consumables of the second line segment can be different, and the color consumables of the first line segment and the second line segment are different from the color consumables of the bottom surface. In this way, the first line segment, the second line segment and the bottom surface can be distinguished on the printing platform, so that the camera can capture a clear line segment image, and the offset of the tool head can be accurately determined based on the line segment image, thereby improving the accuracy of determining the offset.
[0059] It can be seen that by controlling the tool head to print the bottom surface on the printing platform before printing the first line segment and the second line segment, and printing the first line segment and the second line segment on the bottom surface, defects in the first layer of the printed first line segment and the second line segment can be avoided, as well as the influence of the printing platform on the first line segment and the second line segment can be avoided, and the flow rate of the consumables output by the nozzle can be stabilized, thereby printing stable and defect-free first line segment and second line segment, and by analyzing the image of the first line segment and the image of the second line segment, a more accurate tool head offset can be determined.
[0060] In some feasible implementations, the tool head includes a first nozzle and a second nozzle, and the first nozzle and the second nozzle switch to work with each other. Controlling the tool head to print the first line segment and the second line segment on the printing platform may include: controlling the tool head to print the first line segment on the printing platform with the first nozzle; after the first line segment is printed, controlling the tool head to switch to printing the second line segment on the printing platform with the second nozzle; in the embodiment of the present application, the offset of the tool head in the second direction includes the offset of the first nozzle in the second direction and the offset of the second nozzle in the second direction.
[0061] Specifically, the controller first controls the first nozzle of the tool head to discharge materials normally, switches the second nozzle to a standby state, at which time the first nozzle is closer to the printing platform than the second nozzle, and controls the tool head to move so that the first nozzle prints a first line segment on the printing platform. After the first line segment is printed, the controller controls the tool head to switch the first nozzle to a standby state, controls the second nozzle to discharge materials normally, at which time the second nozzle is closer to the printing platform than the first nozzle, and controls the tool head to move so that the second nozzle prints a second line segment on the printing platform.
[0062] Exemplarily, by controlling the tool head to print a first line segment on the printing platform with a first nozzle, and after the first line segment is printed, controlling the tool head to switch to printing a second line segment on the printing platform with a second nozzle, the line segment images printed by the two nozzles can be collected, and then the offset of the first nozzle and the second nozzle in the second direction can be determined based on the collected images, thereby realizing the offset measurement of the dual nozzles and improving the accuracy of the offset measurement.
[0063] Further, in some feasible implementations, controlling the tool head to print the first line segment and the second line segment on the printing platform includes:
[0064] Control the first nozzle to print the first bottom surface with the first color consumable, and control the tool head to switch to print the second bottom surface with the second color consumable through the second nozzle; control the first nozzle to print the first line segment on the second bottom surface with the first color consumable, and control the tool head to switch to print the second line segment on the first bottom surface with the second color consumable through the second nozzle; in this embodiment of the application, any one of the first color consumable and the second color consumable can be a dark color consumable, and the other consumable can be a light color consumable.
[0065] Specifically, the controller controls the feeding device or the external material rack to supply the first color consumable to the first nozzle, and supplies the second color consumable to the second nozzle. Then, the controller controls the first nozzle of the tool head to discharge normally, switches the second nozzle to the standby state, and controls the tool head to move to print the first bottom surface of the first color consumable. After the first bottom surface is printed, the first nozzle of the tool head is controlled to switch to the standby state, and the second nozzle is switched to normal discharge, and the second bottom surface of the second color consumable is printed by the tool head movement. Alternatively, the controller can control the tool head to switch the first nozzle and the second nozzle to print the first bottom surface and the second bottom surface. For example, after the controller controls the tool head to print the first layer of the first bottom surface with the first nozzle using the first color consumable, the tool head is controlled to print the first layer of the second bottom surface with the second nozzle using the second color consumable, and then the first nozzle is switched to print the second layer of the first bottom surface with the first color consumable, and then the tool head is controlled to print the second layer of the second bottom surface with the second nozzle using the second color consumable, and so on to complete the printing of the first bottom surface and the second bottom surface. Alternatively, after the controller controls the tool head to print the first to nth layers of the first bottom surface with the first nozzle using the first color consumable, where n is greater than 1, the controller controls the tool head to print the first to nth layers of the second bottom surface with the second nozzle using the second color consumable, and then switches to the first nozzle to print the n+1th to 2nth layers of the first bottom surface with the first color consumable, and then controls the tool head to print the n+1th to 2nth layers of the second bottom surface with the second nozzle using the second color consumable, and so on to complete the printing of the first bottom surface and the second bottom surface. There are many ways to print the bottom surface with the first nozzle and the second nozzle, and this application does not limit this.
[0066] After the first bottom surface and the second bottom surface are printed, the controller controls the first nozzle to discharge normally again, switches the second nozzle to the standby state, and controls the first nozzle to print the first line segment of the first color consumable on the second bottom surface through the tool head. After the first line segment is printed, the first nozzle is controlled to switch to the standby state, controls the second nozzle to discharge normally, and controls the second nozzle to print the second line segment of the second color consumable on the first bottom surface through the tool head.
[0067] For example, the printing effect is as follows Figure 4 As shown, Figure 4 The light-colored consumables are the first-color consumables, and the dark-colored consumables are the second-color consumables. The bottom surface printed with the first-color consumables is the first bottom surface, and the bottom surface printed with the second-color consumables is the second bottom surface. Figure 4 The line segment AB printed with the first color consumable is the first line segment, and the line segment CD printed with the second color consumable is the second line segment. The first line segment is printed on the second bottom surface, and the second line segment is printed on the first bottom surface, so that the first line segment and the second line segment can be clearly distinguished.
[0068] It can be seen that by controlling the first nozzle to print the first bottom surface with the first color consumable, and controlling the tool head to switch to printing the second bottom surface with the second color consumable through the second nozzle, and then controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable, and controlling the tool head to switch to printing the second line segment on the first bottom surface with the second color consumable through the second nozzle, the printed line segment can be unaffected by the printing platform, and by distinguishing the color consumable used for the first line segment from the color consumable used for the second bottom surface, and distinguishing the color consumable used for the second line segment from the color consumable used for the first bottom surface, the first line segment and the second line segment can be clearly distinguished, which is convenient for collecting images of the first line segment and the second line segment, thereby improving the accuracy of the determined offset.
[0069] Optionally, the color consumables used for printing the first bottom surface, the second bottom surface, the first line segment, and the second line segment may be different, so as to better distinguish the first line segment and the second line segment and facilitate the acquisition of images of the first line segment and the second line segment.
[0070] In some feasible implementations, controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable may include:
[0071] Controlling the first nozzle to continuously discharge the first color consumable from a first preset starting point, and controlling the tool head to move to print a first line segment on the second bottom surface;
[0072] After the first line segment is printed, the tool head is controlled to move so that the first nozzle stops discharging material at a first preset end point.
[0073] In the embodiment of the present application, the first preset starting point may be any point outside the first bottom surface and the second bottom surface. The first preset end point may be any point outside the first bottom surface and the second bottom surface that does not include the first preset starting point. The first line segment does not include the first preset starting point and the first preset end point.
[0074] During the 3D printing process, the state of the nozzle at the printing starting point is unstable, especially the flow rate is not stable enough. In some feasible implementations, the tool head can be controlled to stay at the starting point for a period of time, waiting for the nozzle to discharge material, to ensure that the internal flow of the nozzle is sufficient, and the printing of the line segment will not be affected by the nozzle's under-extrusion. At this time, the nozzle is in a heated state, and part of the molten consumables will flow out during the stop stage at the starting point. In order to ensure the stability of the consumable flow and line width of the printed first and second line segments, the starting point needs to be set outside the first bottom surface and the second bottom surface, that is, the first line segment or the second line segment does not include the printing starting point.
[0075] Exemplarily, the controller controls the first nozzle to continuously output the first color consumable from a first preset starting point outside the first bottom surface and outside the second bottom surface. After the flow rate of the first color consumable output stabilizes, the controller controls the tool head to move to print a first line segment on the second bottom surface. After the first line segment is printed, the tool head is continuously controlled to move so that the first nozzle moves to the first preset end point to stop discharging.
[0076] It should be noted that, when the nozzle stops discharging materials, the material flow rate gradually decreases, which also causes the line width of the printed line segment to be unstable. Therefore, after the first line segment is printed, it is necessary to control the tool head to continue to move and move the first nozzle to the first preset end point outside the first bottom surface and the second bottom surface to stop discharging materials. That is, the first line segment or the second line segment does not include the printing end point.
[0077] like Figure 4 As shown, S1 is the first preset starting point. At the first preset starting point, the first color consumable will accumulate, resulting in unstable line width. E1 is the first preset end point. At the first preset end point, the flow of the first color consumable will decrease, resulting in unstable line width. Therefore, S1 and E1 are both arranged outside the first bottom surface and outside the second bottom surface. Among them, S2 is the preset starting point corresponding to the second nozzle, and E2 is the preset end point corresponding to the second nozzle. The processing method of controlling the second nozzle to print the second line segment on the first bottom surface with the second color consumable is similar to the processing method of controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable in this application, and will not be repeated here.
[0078] It can be seen that by controlling the first nozzle to continuously discharge material with the first color consumable from the first preset starting point, and controlling the tool head to move to print the first line segment on the second bottom surface; after the first line segment is printed, controlling the tool head to move so that the first nozzle stops discharging material at the first preset end point, the line widths of the printed first and second line segments can be stabilized, thereby avoiding the influence of unstable line width on the offset measurement accuracy, thereby improving the offset measurement accuracy.
[0079] 202: Capture the first line segment and the second line segment through a camera to obtain a first image and a second image.
[0080] In the embodiment of the present application, the first line segment corresponds to the first image, and the second line segment corresponds to the second image.
[0081] Optionally, the camera may be connected to the tool head. The movement of the camera may be controlled by controlling the movement of the tool head, so as to collect a first image corresponding to the first line segment and a second image corresponding to the second line segment.
[0082] Optionally, the camera can also be independently arranged on the 3D printer and can move relative to the printing platform. After the first line segment and the second line segment are printed, the first image and the second image can be collected by controlling the camera to move to a corresponding position.
[0083] This application will be explained by taking the connection between a camera and a tool head as an example. The camera can also be independently set on a 3D printer. The processing method is similar to the embodiment of this application and will not be repeated.
[0084] Exemplarily, capturing the first line segment and the second line segment by a camera to obtain the first image and the second image may include:
[0085] Based on the first target point, a first line segment is captured by a camera to obtain a first image;
[0086] Based on the second target point, a second line segment is captured by the camera to obtain a second image.
[0087] In the embodiment of the present application, the first target point may be any point on the first line segment. The relative position of the first target point on the first line segment is the same as the relative position of the second target point on the second line segment.
[0088] It should be noted that since the relative position of the first target point on the first line segment is the same as the relative position of the second target point on the second line segment, when there is no offset of the tool head, the first image of the first line segment captured based on the first target point should be the same as the second image of the second line segment captured based on the second target point. If the first image and the second image are different, the offset of the tool head can be determined based on the first image and the second image.
[0089] Specifically, the controller controls the tool head to move to drive the camera to move above the first target point, and then collects the image of the first line segment to obtain the first image. Then, the controller controls the tool head to move a preset distance in the second direction to drive the camera to move above the second target point, and collects the image of the second line segment to obtain the second image. The preset distance is the theoretical distance between the first line segment and the second line segment in the second direction.
[0090] In some feasible implementations, the first target point cannot be close to the two end points of the first line segment, and the second target point cannot be close to the two end points of the first line segment, so as to ensure that the camera can clearly capture the first image of the entire first line segment and the second image of the entire second line segment. In the case where the tool head moves without offset, when the camera captures the image of the first line segment at the first target point and moves a preset distance in the second direction to capture the image of the second line segment, the captured first image and the second image should be exactly the same. If they are different, the coordinate difference of the target point in the first image and the second image in the second direction is the offset in the second direction.
[0091] Optionally, the first target point may be the midpoint of the first line segment. The second target point may be the midpoint of the second line segment. In this way, the captured first image may include the entire first line segment, the captured second image may include the entire second line segment, and the first line segment is symmetrically distributed in the first image, and the second line segment is symmetrically distributed in the second image, so as to facilitate the subsequent analysis of the offset in the second direction and improve the measurement accuracy of the offset.
[0092] It can be seen that based on the first target point, the first image can be obtained by capturing the first line segment through the camera, and then, based on the second target point, the second image can be obtained by capturing the second line segment through the camera. Based on the difference between the first image and the second image, the offset of the tool head movement can be determined, which improves the measurement accuracy of the offset compared to manual measurement of the offset.
[0093] Exemplarily, a fill light may be provided on the camera.
[0094] Capturing the first line segment and the second line segment by a camera to obtain the first image and the second image may include:
[0095] Illuminate the first line segment and the second line segment by using a fill light;
[0096] The illuminated first line segment and the second line segment are captured by a camera to obtain a first image and a second image.
[0097] Specifically, when capturing an image of a first line segment, the controller first controls the fill light to illuminate the first line segment, and when the first line segment is illuminated, the camera captures the image of the first line segment to obtain a first image. After the first image is captured, the fill light is controlled to illuminate the second line segment, and when the second line segment is illuminated, the camera captures the image of the second line segment to obtain a second image.
[0098] It can be seen that by illuminating the first line segment and the second line segment with a fill light and capturing the illuminated first line segment and the second line segment with a camera, a first image and a second image with higher definition can be obtained, which is convenient for analyzing the offset of the tool head movement and improving the measurement accuracy of the offset.
[0099] Optionally, the first line segment and the second line segment can be illuminated by a fill light at the same time, and then the illuminated first line segment and the second line segment can be captured by a camera to obtain a target image, wherein the target image includes an image corresponding to the first line segment and an image corresponding to the second line segment. In this way, by capturing the overall image of the first line segment and the second line segment, the operation process can be simplified and the movement offset of the tool head can be determined more efficiently.
[0100] In some feasible implementations, the first image includes a first material line corresponding to the first line segment, and the first material line is formed by the tool head printing the first line segment on the printing platform, and can be considered to be the first line segment; the second image includes a second material line corresponding to the second line segment, and the second material line is formed by the tool head printing the second line segment on the printing platform, and can be considered to be the second line segment. The direction of the first material line in the first image can be vertical or horizontal, and the direction of the second material line in the second image can be vertical or horizontal. The embodiment of the present application will be described by taking the first material line as the vertical direction and the second material line as the vertical direction as an example. The processing method for the first material line and the second material line as the horizontal direction is similar to the embodiment of the present application, and will not be repeated here. Since there may be an installation angle between the camera and the fill light, the first material line in the first image and the second material line in the second image may have a small rotation angle. The controller needs to determine the rotation angle and adjust the first material line to the vertical direction.
[0101] Exemplarily, based on the first target point, acquiring the first line segment by the camera to obtain the first image may include:
[0102] Based on the first target point, the first line segment is captured by a camera to obtain a fifth image;
[0103] Obtaining a rotation angle of the first material line in the fifth image;
[0104] Based on the rotation angle of the first material line, the first material line in the fifth image is adjusted to obtain the first image.
[0105] For example, the fifth image is Figure 5 As shown in the image 501, the image corresponding to the second line segment is as follows Figure 5As shown in the image 502 in the figure. The parallelogram line in the image 501 is the first material line, and the parallelogram line in the image 502 is the second material line. The light spots near the first material line in the image 501 are the images of the light source of the fill light on the hot bed through the first line segment, and the light spots near the second material line in the image 502 are the images of the light source of the fill light on the hot bed through the second line segment. Due to the difference in the light transmittance of the materials, the distribution of the light spots in the image may be discrete. It can be seen from the images 501 and 502 that the material line is not completely vertical in the image, and there is a small rotation angle between the material line and the vertical direction. The controller needs to obtain the rotation angle to adjust the first material line and the second material line to the vertical direction.
[0106] It should be noted that the embodiment of the present application only takes the adjustment of the first material line and the second material line to the vertical direction as an example. The processing method of adjusting the first material line and the second material line to the horizontal direction is similar to the embodiment of the present application and will not be repeated here.
[0107] Exemplarily, obtaining the rotation angle of the first material line in the fifth image may include the following steps:
[0108] Obtain multiple prediction angles within a preset interval;
[0109] Based on each predicted angle, the first material line is rotated in reverse to obtain the first predicted material line corresponding to each predicted angle;
[0110] Obtain the width of the first predicted material line corresponding to each predicted angle;
[0111] The predicted angle corresponding to the first predicted material line with the smallest width is used as the rotation angle of the first material line.
[0112] In the embodiment of the present application, the rotation angle of the first material line is within a preset interval, and optionally, the preset interval can be [-1, 1]. The controller obtains multiple predicted angles within the preset interval, and optionally, 0.1 degrees can be used as a step size to divide the preset interval [-1, 1] into 20 angles, namely: -1, -0.9, ..., -0.2, -0.1, 0.1, 0.2..., 0.9, 1. It should be noted that the embodiment of the present application is only described by taking the preset interval [-1, 1] divided into 20 angles as an example. Those skilled in the art can also set other preset intervals and divide the preset interval into other multiple predicted angles. The processing method of setting other preset intervals and dividing the preset interval into other multiple predicted angles is similar to the embodiment of the present application and will not be repeated here.
[0113] Then, based on each prediction angle, the first material line in the fifth image is reversely rotated to obtain each first prediction material line. Next, the width of each first prediction material line is detected. Optionally, the width of the line segment where each first prediction material line intersects with the upper boundary or the lower boundary of the fifth image can be detected, and the width can be used as the width of each first prediction material line. The embodiment of the present application does not limit the method for detecting the width of each first prediction material line.
[0114] Furthermore, the width of each first predicted material line is compared to obtain the first predicted material line with the smallest width, i.e., the second predicted material line. The predicted angle corresponding to the second predicted material line is used as the rotation angle of the first material line. It should be noted that the projection width of the first material line is the smallest when it is completely vertical, so the predicted angle corresponding to the first predicted material line with the smallest width can be used as the rotation angle of the first material line.
[0115] It can be seen that in the embodiment of the present application, by acquiring multiple predicted angles from a preset interval and based on the multiple predicted angles, the first material line in the fifth image is reversely rotated to obtain multiple first predicted material lines. Then, by detecting the width of each first predicted material line and taking the predicted angle corresponding to the first predicted material line with the smallest width as the rotation angle of the first material line, the first material line can be adjusted to a vertical direction based on the rotation angle, thereby simplifying the calculation of the offset of the tool head movement and improving the calculation efficiency of the offset of the tool head movement.
[0116] Optionally, in some feasible embodiments, the rotation angle of the first material line can also be directly obtained through a straight line detection method. For example, the straight line detection method may include: Hough transform straight line detection (Hough Line detection, HLD), straight line extraction algorithm (Line Segment Detector, LSD), etc., which are not limited here.
[0117] Further, based on the rotation angle of the first material line, the first material line is adjusted to a vertical direction to obtain a first image.
[0118] Therefore, based on the first target point, the first line segment can be captured by the camera to obtain the fifth image, and the first image can be obtained by obtaining the rotation angle of the first material line in the fifth image and adjusting the first material line to the vertical direction based on the rotation angle of the first material line. Therefore, the calculation of the coordinates of the corresponding points on the first material line can be simplified, thereby improving the calculation efficiency of the offset of the tool head movement.
[0119] Among them, since the rotation angle of the second material line and the rotation angle of the first material line are both related to the installation angle of the camera, the rotation angle of the second material line is equal to the rotation angle of the first material line. The rotation angle of the first material line can be directly used as the rotation angle of the second material line, and the image corresponding to the second material line is adjusted to obtain the second image.
[0120] Alternatively, based on the method of any of the above embodiments, the rotation angle of the second material line can be determined, and based on the rotation angle, the image corresponding to the second material line can be adjusted to obtain a second image, wherein the method for determining the rotation angle of the second material line is similar to the method of any of the above embodiments and will not be repeated here.
[0121] The above-mentioned method of estimating the rotation angle of a line segment and rotating it is only an example. It should be understood that there are many other possible implementation methods for estimating the rotation angle of a line segment and rotating it, which are not illustrated here one by one.
[0122] Alternatively, if the first material line and the second material line are vertical / horizontal, the first image including the first material line and the second image including the second material line can be directly used.
[0123] 203: Based on the first image and the second image, obtain the offset of the tool head in the second direction.
[0124] In the embodiment of the present application, the second direction is perpendicular to the first direction. It should be noted that since the first line segment is parallel to the second line segment in the first direction, the coordinates of the first material line in the first image and the second material line in the second image in the first direction are exactly the same. At this time, the offset of the first material line and the second material line in the second direction is the offset caused by the movement of the tool head in the second direction. Based on this, the controller can determine the offset of the tool head in the second direction based on the first image and the second image.
[0125] Exemplarily, the tool head is controlled to print the first line segment at y=y0 of the predefined xy plane, and the tool head is controlled to print the second line segment at y=y0+60mm. Theoretically, if the tool head is not offset, the camera captures the first image containing the first line segment at y=y0, and the camera moves +60mm along the y direction to capture the second image containing the second line segment. The first image and the second image should be the same, for example, the position of the first line segment in the first image is the same as the position of the second line segment in the second image. For example, the starting point and the end point of the first line segment and the second line segment have the same coordinates on the x-axis, then any point in the first line segment and the second line segment at the same x-coordinate should theoretically have a 60mm difference in y-coordinates. Since the camera is movable and moves +60mm to capture the second image, the positions of the line segments in the image should be consistent. If the position of the first line segment in the first image is different from the position of the second line segment in the second image, the y1 coordinate of any point in the first line segment in the first image can be obtained through image processing, and the y2 coordinate of a point in the second line segment in the second pixel under the same x coordinate can be obtained, and the difference between the y1 coordinate and the y2 coordinate is the offset of the tool head in the y direction. Alternatively, the mapping relationship between the position difference between the two images and the offset of the tool head can be preset, for example, the position difference between the first line segment and the second line segment in the image is 2mm, corresponding to the offset of the tool head of 1mm.
[0126] Optionally, the camera is fixed in the 3D printer, and the camera takes a photo, the photo includes the first image and the second image. If the camera is facing the printing platform, the difference between the first line segment and the second line segment in the second direction in the photo can be directly compared, and the offset of the tool head in the second direction can be obtained by transforming the pixel and the 3D printer coordinate. If the camera and the printing platform are at an inclined angle, the photo needs to be rotated and then the difference between the first line segment and the second line segment in the second direction in the photo is compared.
[0127] In some feasible implementations, obtaining the offset of the tool head in the second direction based on the first image and the second image may include the following steps:
[0128] Acquire a first projection intensity distribution of a first image;
[0129] acquiring a second projection intensity distribution of a second image;
[0130] Based on the first projection intensity distribution, obtaining coordinates of a third target point;
[0131] Based on the second projection intensity distribution, obtaining coordinates of a fourth target point;
[0132] Based on the coordinates of the third target point and the coordinates of the fourth target point, the offset of the tool head in the second direction is obtained.
[0133] The third target point may be any point on the central axis of the first material line, and the fourth target point may be a corresponding point of the third target point on the central axis of the second material line. The controller determines the coordinates of a third target point in the first image, finds the coordinates of the corresponding fourth target point in the second image, and obtains the offset of the tool head in the second direction based on the coordinates of the third target point and the coordinates of the fourth target point.
[0134] Specifically, the controller first projects the first image vertically to obtain a first projection intensity distribution, and projects the second image vertically to obtain a second projection intensity distribution. For example, the first projection intensity distribution or the second projection intensity distribution can be as follows: Figure 6 As shown, each point on the broken line in the figure is the point with the highest projection intensity in each column of the first image or the second image, the points on the broken line are distributed on both sides of a reference line, and the raised part in the middle is the first material line or the second material line.
[0135] It should be noted that in the embodiment of the present application, the first material line is in the vertical direction in the first image, and the second material line is in the vertical direction in the second image. If the first material line or the second material line is in the horizontal direction, the first image is horizontally projected to obtain the first projection intensity distribution, and the second image is horizontally projected to obtain the second projection intensity distribution. Alternatively, the horizontal material line is rotated to the vertical direction to obtain the vertical projection intensity distribution.
[0136] Further, the controller determines a third target point on the center axis of the first material line based on the first projection intensity distribution.
[0137] In some feasible implementations, obtaining the coordinates of the third target point based on the first projection intensity distribution may include, for example, the following steps:
[0138] Based on the first projection intensity distribution, a first material line is obtained;
[0139] Performing straight line fitting on the third projection intensity distribution excluding the first material line in the first projection intensity distribution to obtain a first reference line;
[0140] Obtaining the coordinates of the intersection of the first reference line and the first boundary of the first material line to obtain the coordinates of the first intersection;
[0141] Obtaining the coordinates of the first endpoint of the first material line;
[0142] Based on the coordinates of the first intersection point and the coordinates of the first endpoint, the coordinates of the third target point are obtained.
[0143] The first boundary may be any boundary of the first material line, the first endpoint may be any endpoint of the second boundary of the first material line, and the second boundary may be another boundary of the first material line except the first boundary.
[0144] Specifically, the controller detects the first projection intensity distribution, separates the convex part in the middle of the first projection intensity distribution, and obtains the first material line. Figure 7 As shown, the controller scans the first projection intensity distribution and converts the middle convex part of the first projection intensity distribution into Figure 7 The first boundary 703 and the second boundary 704 are separated, and the first boundary 703 and the second boundary 704 are two boundaries of the first material line.
[0145] Then, a straight line fitting is performed on the third projection intensity distribution excluding the first material line in the first projection intensity distribution, that is, a straight line fitting is performed on the broken line portion excluding the first material line, and a straight line closest to the broken line portion is determined, and the following is obtained: Figure 7 The first reference line 701 shown. It should be noted that the first reference line 701 determined by different methods may be different, but in the embodiment of the present application, only the central axis of the first material line needs to be determined, and the coordinate error between the central axis of the first material line and the central axis of the second material line is used as the offset of the tool head in the second direction. Therefore, the difference in the first reference line 701 does not affect the calculation of the offset in the second direction, thereby improving the accuracy of the calculation of the offset.
[0146] Further, the coordinates of the intersection of the first reference line 701 and the first boundary 703 of the first material line are obtained, and the following is obtained: Figure 7 The coordinates of the first intersection point M shown are (x1, y1). Then, the coordinates of any endpoint of the second boundary 704 of the first material line, that is, the coordinates of the first endpoint, are obtained, and the coordinates of the midpoint of the line segment connecting the first intersection point and the first endpoint are used as the coordinates of the third target point. In some feasible implementations, the convex part of the first material line can also be fitted into a straight line 702, and the intersection of the straight line 702 and the second boundary is used as the first endpoint N, and the coordinates of the first endpoint N are obtained (x2, y2). Then, the coordinates of the midpoint of the line segment MN are used as the coordinates of the third target point ((x1+x2) / 2, (y1+y2) / 2).
[0147] Thus, the first material line can be obtained based on the first projection intensity distribution, and the third projection intensity distribution excluding the first material line in the first projection intensity distribution can be linearly fitted to obtain the first reference line. Then, the coordinates of the intersection of the first reference line and the first boundary of the first material line are used as the coordinates of the first intersection to obtain the coordinates of the first endpoint of the first material line. Based on the coordinates of the first intersection and the coordinates of the first endpoint, the coordinates of the third target point can be obtained. Therefore, based on the difference between the third target point and the corresponding fourth target point on the second material line, the offset of the tool head in the second direction can be determined, thereby improving the measurement accuracy of the offset.
[0148] Further, the controller detects the second projection intensity distribution, determines the second material line and the second reference line in the second projection intensity distribution, and obtains the coordinates of the second intersection point and the coordinates of the second endpoint based on the second reference line and the second material line. Thus, the coordinates of the fourth target point are obtained based on the coordinates of the second intersection point and the coordinates of the second endpoint. It should be noted that in the embodiment of the present application, the method for obtaining the coordinates of the fourth target point based on the second projection intensity distribution is similar to the method for obtaining the coordinates of the third target point based on the first projection intensity distribution, and will not be repeated here.
[0149] It can be understood that the third target point is a point on the center axis of the first material line, and the fourth target point is a point on the center axis of the second material line corresponding to the third target point. When there is no offset in the movement of the tool head, the coordinates of the third target point are exactly the same as the coordinates of the fourth target point. When there is an offset in the movement of the tool head, the coordinate difference between the center axis of the first material line and the center axis of the second material line in the second direction is the offset of the tool head in the second direction. Based on this, by determining the difference between the coordinates of the third target point in the second direction and the coordinates of the fourth target point in the second direction, the offset of the tool head in the second direction can be obtained.
[0150] Therefore, by acquiring the first projection intensity distribution of the first image and acquiring the second projection intensity distribution of the second image, and then determining the third target point on the central axis of the first material line based on the first projection intensity distribution, and determining the fourth target point on the central axis of the second material line based on the second projection intensity distribution, based on the coordinates of the third target point and the coordinates of the fourth target point, the offset of the tool head in the second direction can be obtained, thereby improving the measurement accuracy of the offset of the tool head movement.
[0151] In one embodiment of the present application, the method may further include:
[0152] Controlling the tool head to print the third line segment and the fourth line segment on the printing platform;
[0153] The third line segment and the fourth line segment are captured by a camera to obtain a third image and a fourth image;
[0154] Based on the third image and the fourth image, the offset between the first nozzle and the second nozzle in the first direction is obtained.
[0155] The third line segment and the fourth line segment are parallel and not collinear in the second direction, the third line segment corresponds to the third image, and the fourth line segment corresponds to the fourth image.
[0156] Specifically, the controller controls the tool head to print the third line segment and the fourth line segment that are parallel and non-collinear in the second direction on the printing platform. The third line segment and the fourth line segment are collected by the camera to obtain the third image and the fourth image. It should be noted that since the second direction is perpendicular to the first direction, by collecting the third image corresponding to the third line segment and the fourth image corresponding to the fourth line segment, the offset of the first nozzle and the second nozzle in the first direction can be analyzed based on the third image and the fourth image. Among them, the processing method of controlling the tool head to print the third line segment and the fourth line segment on the printing platform is similar to the processing method of controlling the tool head to print the first line segment and the second line segment on the printing platform in any of the above embodiments, the processing method of collecting the third line segment and the fourth line segment by the camera to obtain the third image and the fourth image is similar to the processing method of collecting the first line segment and the second line segment by the camera in any of the above embodiments to obtain the first image and the second image, and the offset of the first nozzle and the second nozzle in the first direction based on the third image and the fourth image is similar to the processing method of obtaining the offset of the tool head in the second direction based on the third image and the fourth image in any of the above embodiments, which will not be repeated here.
[0157] In this way, by determining the offset of the first nozzle and the second nozzle in the first direction and the offset of the first nozzle and the second nozzle in the second direction, the movement offset of the first nozzle and the second nozzle on the plane where the printing platform is located can be determined. By calibrating the offset, the movement offset of the first nozzle and the second nozzle can be eliminated, thereby improving the printing accuracy of 3D printing.
[0158] In another embodiment of the present application, controlling the tool head to print the third line segment and the fourth line segment on the printing platform may include:
[0159] Controlling the tool head to print the first line segment and the third line segment with the first nozzle;
[0160] After the first line segment and the third line segment are printed, the tool head is controlled to switch to printing the second line segment and the fourth line segment with the second nozzle.
[0161] It should be noted that the controller can control the first nozzle to continuously print the first line segment and the third line segment that are perpendicular to each other, and then control the second nozzle to continuously print the second line segment and the fourth line segment that are perpendicular to each other, thereby determining the offset of the first nozzle and the second nozzle in the first direction and the second direction based on the first line segment, the second line segment, the third line segment and the fourth line segment.
[0162] Specifically, the controller first controls the first nozzle to discharge materials normally, and controls the second nozzle to switch to a standby state. The first line segment and the third line segment are continuously printed on the printing platform by controlling the movement of the tool head. After the first line segment and the third line segment are printed, the controller controls the first nozzle to switch to a standby state, and controls the second nozzle to discharge materials normally, and continuously prints the second line segment and the fourth line segment on the printing platform by controlling the movement of the tool head. Figure 4 As shown, the first nozzle can continuously print line segment AC and line segment AB, and the second nozzle can continuously print line segment BD and line segment CD.
[0163] In this way, the first line segment, the third line segment, the second line segment and the fourth line segment are continuously printed through the dual nozzle switching operation, and the offsets of the first nozzle and the second nozzle in the first direction and the second direction can be determined by analyzing the images of the above four line segments, without having to determine the offset in the first direction after determining the offset in the second direction. This simplifies the operation process and improves the calculation efficiency of the dual nozzle movement offset.
[0164] In one feasible embodiment, controlling the tool head to print the third line segment and the fourth line segment on the printing platform includes:
[0165] Controlling the first nozzle to print the third bottom surface with the third color consumable, and controlling the tool head to switch to printing the fourth bottom surface with the fourth color consumable through the second nozzle;
[0166] Controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable, and controlling the tool head to switch to printing the second line segment and the fourth line segment on the third bottom surface with the fourth color consumable through the second nozzle;
[0167] Wherein, any one of the third color consumable and the fourth color consumable is a dark color consumable, and the other consumable is a light color consumable. Optionally, the third color consumable can be the same as the first color consumable, and the fourth color consumable can be the same as the second color consumable.
[0168] Specifically, the controller controls the feeding device or the external material rack to supply the third color consumable to the first nozzle and the fourth color consumable to the second nozzle. Then, the controller controls the first nozzle of the tool head to discharge normally, switches the second nozzle to the standby state, and controls the tool head to move to print the third bottom surface of the third color consumable. After the third bottom surface is printed, the first nozzle of the tool head is controlled to switch to the standby state, and the second nozzle is switched to normal discharge, and the tool head is moved to print the fourth bottom surface of the fourth color consumable. Alternatively, the controller can control the tool head to switch the first nozzle and the second nozzle to print the third bottom surface and the fourth bottom surface. For example, after the controller controls the tool head to print the first layer of the third bottom surface with the third color consumable using the first nozzle, the tool head is controlled to print the first layer of the fourth bottom surface with the fourth color consumable using the second nozzle, and then the tool head is switched to print the second layer of the third bottom surface with the third color consumable using the first nozzle. After that, the tool head is controlled to print the second layer of the fourth bottom surface with the second nozzle using the fourth color consumable, and so on to complete the printing of the third bottom surface and the fourth bottom surface. Alternatively, the controller controls the tool head to use the third color consumable to print the first to nth layers of the third bottom surface with the first nozzle, where n is greater than 1, and then controls the tool head to use the fourth color consumable to print the first to nth layers of the fourth bottom surface with the second nozzle, and then switches to the first nozzle to use the third color consumable to print the n+1th to 2nth layers of the third bottom surface, and then controls the tool head to use the fourth color consumable to print the n+1th to 2nth layers of the fourth bottom surface with the second nozzle, and so on to complete the printing of the third bottom surface and the fourth bottom surface. There are many ways to print the bottom surface with the first nozzle and the second nozzle, and this application does not limit this.
[0169] After the third bottom surface and the fourth bottom surface are printed, the controller controls the first nozzle to discharge normally again, switches the second nozzle to the standby state, and controls the first nozzle to continuously print the first line segment and the third line segment of the third color consumable on the fourth bottom surface through the tool head. After the first line segment and the third line segment are printed, the first nozzle is controlled to switch to the standby state, the second nozzle is controlled to discharge normally, and the second nozzle is controlled to print the second line segment and the fourth line segment of the fourth color consumable on the third bottom surface through the tool head.
[0170] It can be seen that by controlling the first nozzle to print the third bottom surface with the third color consumable, and controlling the tool head to switch to printing the fourth bottom surface with the fourth color consumable through the second nozzle, and then controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable, and controlling the tool head to switch to printing the second line segment and the fourth line segment on the third bottom surface with the fourth color consumable through the second nozzle, the printed line segments will not be affected by the printing platform, and by distinguishing the color consumable used for the line segments from the color consumable used for the bottom surface, the first line segment, the second line segment, the third line segment and the fourth line segment can be clearly distinguished, which is convenient for collecting line segment images, and then based on the line segment images, a more accurate offset can be calculated, thereby improving the accuracy of the determined offset.
[0171] In some feasible implementations, controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable may include:
[0172] Controlling the first nozzle to continuously discharge the third color consumable material from the second preset starting point, and controlling the tool head to move to print the first line segment and the third line segment on the fourth bottom surface;
[0173] After the first line segment and the third line segment are printed, the tool head is controlled to move so that the first nozzle stops discharging material at the second preset end point.
[0174] In the embodiment of the present application, the second preset starting point can be any point outside the third bottom surface and the fourth bottom surface, and the second preset end point can be any point outside the third bottom surface and the fourth bottom surface that does not include the second preset starting point. Neither the first line segment nor the third line segment includes the second preset starting point and the second preset end point.
[0175] It is understandable that in order to avoid the state of the nozzle being unstable at the starting point of printing, especially the unstable flow rate, the tool head needs to stay at the starting point for a period of time, waiting for the nozzle to discharge material, to ensure that the internal flow rate of the nozzle is sufficient, and the printing of the line segment will not be affected by the nozzle under-extrusion. Therefore, the second preset starting point needs to be set outside the third bottom surface and the fourth bottom surface. In addition, in order to avoid the line width being unstable due to the gradual decrease in the output consumable flow rate when the nozzle stops discharging material, the tool head needs to continue to move to a position away from the line segment to stop discharging material after the printing of the line segment is completed. Therefore, the second preset end point also needs to be set outside the third bottom surface and the fourth bottom surface, and it does not overlap with the second preset starting point.
[0176] Specifically, the controller first controls the tool head to move, moves the first nozzle to the second preset starting point, and continuously discharges materials from the second preset starting point. After the consumables output by the first nozzle are stable, the tool head is controlled to move to continuously print the first line segment and the third line segment on the fourth bottom surface. After the first line segment and the third line segment are printed, the tool head is controlled to continuously move to drive the first nozzle to move to the second preset end point, and the discharge is stopped at the second preset end point.
[0177] It can be seen that by controlling the first nozzle to continuously discharge material from the second preset starting point, and printing the first line segment and the third line segment when the output consumable flow is stable, the problem of unstable line width of the first line segment and the third line segment caused by the accumulation of consumables at the starting point can be solved. After the first line segment and the third line segment are printed, the first nozzle is controlled to move to the second preset end point to stop discharging material, which can solve the problem of unstable consumable flow output by the first nozzle, thereby printing the first line segment, the second line segment, the third line segment and the fourth line segment with stable line width, and calculating the offset based on the line segment can improve the accuracy of the offset measurement.
[0178] Then, the controller controls the second nozzle to continuously discharge the fourth color consumable material from a preset starting point corresponding to the second nozzle, and controls the tool head to move to print the second line segment and the fourth line segment on the third bottom surface;
[0179] After the second line segment and the fourth line segment are printed, the tool head is controlled to move so that the second nozzle stops discharging material at a preset end point corresponding to the second nozzle.
[0180] In some feasible implementations, after determining the offset of the tool head in the first direction and the offset of the second direction, the controller may adjust the motion trajectory of the tool head based on the offset of the tool head in the first direction and the offset of the second direction, thereby calibrating the offset of the tool head in the first direction and the offset of the second direction. The embodiment of the present application does not limit the calibration method of the motion trajectory of the tool head. Optionally, after determining the offset of the tool head in the second direction, the controller may first calibrate the offset of the tool head in the second direction, and then determine the offset of the tool head in the first direction and calibrate the offset of the tool head in the first direction. The controller may also calibrate the offset of the tool head in the first direction and the offset of the second direction at the same time after determining the offset of the tool head in the first direction and the offset of the second direction.
[0181] In some feasible embodiments, in order to ensure the accuracy of the offset of the tool head in the second direction, after determining the offset of the tool head in the second direction, the controller may reselect the fifth target point of the first line segment and the sixth target point of the second line segment, and execute the method of any of the above embodiments to obtain a new offset of the tool head in the second direction, and determine the repeatability accuracy of the twice determined offsets, which can reflect the accuracy of the offset calculation.
[0182] Exemplarily, the method may include:
[0183] The first line segment and the second line segment are captured again by the camera to obtain a first repeated image and a second repeated image, wherein the first line segment corresponds to the first repeated image and the second line segment corresponds to the second repeated image;
[0184] Based on the first repeated image and the second repeated image, obtaining a repeated offset of the tool head in a second direction;
[0185] Based on the offset and the repeated offset of the tool head in the second direction, obtaining a repeatability accuracy;
[0186] The deflection of the tool head in the second direction is calibrated based on the repeatability, the deflection of the tool head in the second direction and the repeatability deflection.
[0187] Specifically, the controller selects a fifth target point on the first line segment, and the fifth target point does not overlap with the first target point. A sixth target point is selected on the second line segment, and the sixth target point does not overlap with the second target point. Then, based on the fifth target point, the image of the first line segment is captured by the camera to obtain a first repeated image. Based on the sixth target point, the image of the second line segment is captured by the camera to obtain a second repeated image. Among them, the processing method of acquiring the first line segment and the second line segment by the camera to obtain the first repeated image and the second repeated image is similar to the processing method of acquiring the first line segment and the second line segment by the camera to obtain the first image and the second image in any of the above embodiments, and will not be repeated here.
[0188] Then, the controller determines the difference between the offset of the tool head in the second direction and the offset of the tool head in the second direction, and obtains a repeated difference. Further, the image resolution of the first image and / or the second image is obtained, wherein the image resolution of the first image and the image resolution of the second image are the same. Based on the image resolution of the first image and / or the second image, a motion coefficient (pixel) can be obtained. It should be noted that when the focal length and working distance of the camera are determined, the conversion relationship between the image resolution and the motion coefficient is determined, and the embodiment of the present application does not limit the method for determining the motion coefficient.
[0189] Furthermore, the controller uses the product of the repeated difference and the motion coefficient as the repeatability accuracy between the offset and repeated offset of the tool head in the second direction. Thus, the repeatability accuracy of the offset and repeated offset of the tool head in the second direction can be determined, thereby determining whether the offset in the second direction is accurate, thereby improving the accuracy of the offset measurement of the tool head.
[0190] When the repetition accuracy of the tool head offset and repeated offset in the second direction is greater than a preset threshold, it indicates that the measurement of the tool head offset or repeated offset in the second direction is inaccurate, and the controller cannot determine an accurate offset in the second direction. Optionally, the preset threshold may be 5 microns.
[0191] Thus, the controller selects a new target point on the first line segment, and based on the new target point, controls the camera to capture an image of the new first line segment and a new image of the second line segment to obtain a new offset of the tool head in the second direction. Then, the repeatability of the offset of the new tool head in the second direction and any offset obtained previously is calculated until the repeatability of any two offsets in the second direction is less than the first threshold.
[0192] It should be noted that if the repetition accuracy of any two offsets in the second direction is less than a preset threshold, it means that the offsets in the second direction determined twice are accurate. Any one of the two offsets in the second direction can be used as the offset of the tool head in the second direction, thereby calibrating the offset of the tool head in the second direction.
[0193] It can be seen that by repeatedly selecting the target point of the first line segment and the target point of the second line segment, repeatedly calculating the offset of the tool head in the second direction, and calculating the repetition accuracy of any two offsets, until there are any two offsets whose repetition accuracy is less than the preset threshold, the offset of the tool head in the second direction is calibrated based on any one of the two offsets whose repetition accuracy is less than the preset threshold, thereby making the determined offset of the tool head in the second direction more accurate, improving the accuracy of offset measurement, and improving the accuracy of offset calibration.
[0194] Similarly, the controller can select the target points of the third line segment and the fourth line segment multiple times, repeatedly calculate the offset of the tool head in the first direction, and thus determine the repeatability of any two offsets, so as to determine the accurate offset of the tool head in the first direction based on the repeatability of the two offsets, and calibrate the offset of the tool head in the first direction. This improves the accuracy of offset measurement and the accuracy of offset calibration.
[0195] In summary, when measuring the offset of the tool head, the controller of the 3D printer first controls the tool head to print the first line segment and the second line segment that are parallel and non-collinear in the first direction on the printing platform, and then, the first line segment and the second line segment are captured by the camera to obtain the first image corresponding to the first line segment and the second image corresponding to the second line segment. Finally, based on the first image and the second image, the offset of the tool head in the second direction perpendicular to the first direction is obtained. Based on this, by analyzing and processing the images corresponding to the parallel line segments actually printed by the tool head, the offset of the tool head in the direction perpendicular to the parallel line segments can be obtained. Compared with manually measuring the various features of the printed model, the implementation of this application can realize the automatic measurement of the tool head offset, which is simpler to operate, avoids the measurement errors caused by manual measurement, and improves the measurement accuracy and calculation efficiency of the tool head offset.
[0196] See also Figure 8 , Figure 8 The functional unit composition block diagram of a controller provided in an embodiment of the present application. The controller 800 is located in a 3D printer, and the 3D printer includes: a tool head, a printing platform, and a camera, and the tool head and the printing platform can move relative to each other. The controller 800 may include the controller of the 3D printer in any of the above embodiments. Figure 8 As shown, the controller 800 includes a control unit 801 , an image acquisition unit 802 and a processing unit 803 .
[0197] The control unit 801 is used to control the tool head to print a first line segment and a second line segment on the printing platform, wherein the first line segment and the second line segment are parallel and not collinear in a first direction;
[0198] An image acquisition unit 802 is used to acquire a first line segment and a second line segment through a camera to obtain a first image and a second image, wherein the first line segment corresponds to the first image and the second line segment corresponds to the second image;
[0199] The processing unit 803 is used to obtain the offset of the tool head in a second direction based on the first image and the second image, where the second direction is perpendicular to the first direction.
[0200] In some possible implementations, a camera is connected to the tool head.
[0201] In some feasible implementations, in acquiring the first line segment and the second line segment through a camera to obtain the first image and the second image, the image acquisition unit 802 is specifically configured to:
[0202] Based on the first target point, a first line segment is captured by a camera to obtain a first image, wherein the first target point is any point on the first line segment;
[0203] Based on the second target point, the second line segment is captured by the camera to obtain a second image, and the relative position of the first target point on the first line segment is the same as the relative position of the second target point on the second line segment.
[0204] In some feasible implementations, the first target point is the midpoint of the first line segment; and the second target point is the midpoint of the second line segment.
[0205] In some feasible implementations, the image acquisition unit 802 is further configured to capture the first line segment and the second line segment again through the camera to obtain a first repeated image and a second repeated image, wherein the first line segment corresponds to the first repeated image and the second line segment corresponds to the second repeated image;
[0206] The processing unit 803 is further used to: obtain a repeated offset of the tool head in a second direction based on the first repeated image and the second repeated image;
[0207] Based on the offset and the repeated offset of the tool head in the second direction, obtaining a repeatability accuracy;
[0208] The deflection of the tool head in the second direction is calibrated based on the repeatability, the deflection of the tool head in the second direction and the repeatability deflection.
[0209] In some feasible implementations, before controlling the tool head to print the first line segment and the second line segment on the printing platform, the control unit 801 is further configured to:
[0210] The tool head is controlled to print a bottom surface on the printing platform, and a first line segment and a second line segment are printed on the bottom surface.
[0211] In some feasible embodiments, the tool head includes a first nozzle and a second nozzle, and the first nozzle and the second nozzle work in a switchable manner;
[0212] In terms of controlling the tool head to print the first line segment and the second line segment on the printing platform, the control unit 801 is specifically used to:
[0213] Controlling the tool head to print a first line segment on the printing platform with a first nozzle;
[0214] After the first line segment is printed, the tool head is controlled to switch to printing a second line segment on the printing platform with a second nozzle;
[0215] The offset of the tool head in the second direction includes the offset of the first nozzle and the second nozzle in the second direction.
[0216] In some feasible implementations, in controlling the tool head to print the first line segment and the second line segment on the printing platform, the control unit 801 is specifically configured to:
[0217] Controlling the first nozzle to print the first bottom surface with the first color consumable, and controlling the tool head to switch to printing the second bottom surface with the second color consumable through the second nozzle;
[0218] Controlling the first nozzle to print a first line segment on the second bottom surface with a first color consumable, and controlling the tool head to switch to printing a second line segment on the first bottom surface with a second color consumable through a second nozzle;
[0219] Among them, one of the first color consumable and the second color consumable is a dark color consumable, and the other consumable is a light color consumable.
[0220] In some feasible implementations, in controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable, the control unit 801 is specifically configured to:
[0221] Control the first nozzle to continuously discharge the first color consumable from a first preset starting point, and control the tool head to move to print a first line segment on the second bottom surface; wherein the first preset starting point is any point outside the first bottom surface and outside the second bottom surface;
[0222] After the first line segment is printed, the tool head is controlled to move so that the first nozzle stops discharging material at the first preset end point; the first preset end point is any point outside the first bottom surface and the second bottom surface that does not include the first preset starting point; the first line segment does not include the first preset starting point and the first preset end point.
[0223] In some feasible implementations, the control unit 801 is further used to control the tool head to print a third line segment and a fourth line segment on the printing platform, wherein the third line segment and the fourth line segment are parallel and not collinear in the second direction;
[0224] The image acquisition unit 802 is further used to acquire the third line segment and the fourth line segment through the camera to obtain the third image and the fourth image, the third line segment corresponds to the third image, and the fourth line segment corresponds to the fourth image;
[0225] The processing unit 803 is further configured to obtain an offset between the first nozzle and the second nozzle in the first direction based on the third image and the fourth image.
[0226] In some feasible implementations, in controlling the tool head to print the third line segment and the fourth line segment on the printing platform, the control unit 801 is specifically configured to:
[0227] Controlling the tool head to print the first line segment and the third line segment with the first nozzle;
[0228] After the first line segment and the third line segment are printed, the tool head is controlled to switch to printing the second line segment and the fourth line segment with the second nozzle.
[0229] In some feasible implementations, in controlling the tool head to print the third line segment and the fourth line segment on the printing platform, the control unit 801 is specifically configured to:
[0230] Controlling the first nozzle to print the third bottom surface with the third color consumable, and controlling the tool head to switch to printing the fourth bottom surface with the fourth color consumable through the second nozzle;
[0231] Controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable, and controlling the tool head to switch to printing the second line segment and the fourth line segment on the third bottom surface with the fourth color consumable through the second nozzle;
[0232] Among them, any one of the third color consumables and the fourth color consumables is a dark color consumable, and the other consumable is a light color consumable.
[0233] In some feasible implementations, in controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable, the control unit 801 is specifically configured to:
[0234] Controlling the first nozzle to continuously discharge the third color consumable from the second preset starting point, and controlling the tool head to move to print the first line segment and the third line segment on the fourth bottom surface; wherein the second preset starting point is any point outside the third bottom surface and outside the fourth bottom surface;
[0235] After the first line segment and the third line segment are printed, the tool head is controlled to move so that the first nozzle stops discharging material at the second preset end point; the second preset end point is any point outside the third bottom surface and the fourth bottom surface that does not include the second preset starting point; the first line segment and the third line segment do not include the second preset starting point and the second preset end point.
[0236] In some feasible implementations, a fill light is provided on the camera;
[0237] In acquiring the first line segment and the second line segment through the camera to obtain the first image and the second image, the image acquisition unit is specifically used to:
[0238] Illuminate the first line segment and the second line segment by using a fill light;
[0239] The illuminated first line segment and the second line segment are captured by a camera to obtain a first image and a second image.
[0240] See also Fig. 9 , Fig. 9 This is a functional block diagram of a 3D printer provided in an embodiment of the present application. Fig. 9As shown, the 3D printer 900 includes: a controller 901, a printing platform 902, a tool head 903 and a camera 904, and the tool head 903 and the printing platform 902 can move relative to each other. The controller 901 includes a transceiver 9011, a processor 9012 and a memory 9013. They are connected through a bus 9014. The memory 9013 is used to store computer programs and data, and can transmit the data stored in the memory 9013 to the processor 9012. The 3D printer 900 may include a 3D printer in any embodiment, and the controller 901 may include a controller or a controller 800 in any of the above embodiments.
[0241] The processor 9012 is used to read the computer program in the memory 9013 and perform the following operations:
[0242] Controlling the tool head to print a first line segment and a second line segment on the printing platform, wherein the first line segment and the second line segment are parallel and not collinear in a first direction;
[0243] The first line segment and the second line segment are captured by a camera to obtain a first image and a second image, wherein the first line segment corresponds to the first image and the second line segment corresponds to the second image;
[0244] Based on the first image and the second image, a displacement of the tool head in a second direction is obtained, where the second direction is perpendicular to the first direction.
[0245] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the 3D printer includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0246] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement part or all of the steps of any one of the methods described in the above method embodiments.
[0247] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods recorded in the above method embodiments.
[0248] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0249] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0250] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0251] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0252] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0253] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0254] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0255] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for determining the offset of a tool head, characterized in that: The method is applied to a controller of a 3D printer, the tool head is arranged on the 3D printer, the 3D printer comprises a printing platform and a camera, and the tool head and the printing platform can move relative to each other; the method comprises: Controlling the tool head to print a first line segment and a second line segment on the printing platform, wherein the first line segment and the second line segment are parallel and not collinear in a first direction; The first line segment and the second line segment are captured by the camera to obtain a first image and a second image, wherein the first line segment corresponds to the first image and the second line segment corresponds to the second image; Based on the first image and the second image, the offset of the tool head in a second direction is obtained, where the second direction is perpendicular to the first direction.
2. The method according to claim 1, characterized in that The camera is connected to the tool head.
3. The method according to claim 1, characterized in that The step of acquiring the first line segment and the second line segment by the camera to obtain a first image and a second image includes: Based on a first target point, the first line segment is captured by the camera to obtain the first image, wherein the first target point is any point on the first line segment; Based on the second target point, the second line segment is captured by the camera to obtain the second image, and the relative position of the first target point on the first line segment is the same as the relative position of the second target point on the second line segment.
4. The method according to claim 3, characterized in that The first target point is the midpoint of the first line segment; the second target point is the midpoint of the second line segment.
5. The method according to claim 1, characterized in that The method further comprises: The first line segment and the second line segment are captured again by the camera to obtain a first repeated image and a second repeated image, wherein the first line segment corresponds to the first repeated image and the second line segment corresponds to the second repeated image; Based on the first repeated image and the second repeated image, obtaining a repeated offset of the tool head in the second direction; obtaining a repeatability accuracy based on the offset of the tool head in the second direction and the repeatability offset; The offset of the tool head in the second direction is calibrated based on the repeatability, the offset of the tool head in the second direction, and the repeatability offset.
6. The method according to claim 1, characterized in that Before controlling the tool head to print the first line segment and the second line segment on the printing platform, the method includes: The tool head is controlled to print a bottom surface on the printing platform, and the first line segment and the second line segment are printed on the bottom surface.
7. The method according to claim 1, characterized in that The tool head comprises a first nozzle and a second nozzle, and the first nozzle and the second nozzle switch to work with each other; The controlling the tool head to print the first line segment and the second line segment on the printing platform comprises: Controlling the tool head to print the first line segment on the printing platform with the first nozzle; After the first line segment is printed, controlling the tool head to switch to printing the second line segment on the printing platform with the second nozzle; The offset of the tool head in the second direction includes the offset of the first nozzle and the second nozzle in the second direction.
8. The method according to claim 7, characterized in that The controlling the tool head to print the first line segment and the second line segment on the printing platform comprises: Controlling the first nozzle to print the first bottom surface with the first color consumable, and controlling the tool head to switch to printing the second bottom surface with the second color consumable through the second nozzle; Controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable, and controlling the tool head to switch to printing the second line segment on the first bottom surface with the second color consumable through the second nozzle; Among them, one of the first color consumable and the second color consumable is a dark color consumable, and the other consumable is a light color consumable.
9. The method according to claim 8, characterized in that The controlling the first nozzle to print the first line segment on the second bottom surface with the first color consumable includes: Controlling the first nozzle to continuously discharge the first color consumable material from a first preset starting point, and controlling the tool head to move to print the first line segment on the second bottom surface; wherein the first preset starting point is any point outside the first bottom surface and outside the second bottom surface; After the printing of the first line segment is completed, the tool head is controlled to move so that the first nozzle stops discharging material at a first preset end point; the first preset end point is any point outside the first bottom surface and the second bottom surface that does not include the first preset starting point; the first line segment does not include the first preset starting point and the first preset end point.
10. The method according to claim 7, characterized in that The method further comprises: Controlling the tool head to print a third line segment and a fourth line segment on the printing platform, wherein the third line segment and the fourth line segment are parallel and not collinear in the second direction; The third line segment and the fourth line segment are captured by the camera to obtain a third image and a fourth image, wherein the third line segment corresponds to the third image, and the fourth line segment corresponds to the fourth image; Based on the third image and the fourth image, an offset between the first nozzle and the second nozzle in the first direction is obtained.
11. The method according to claim 10, characterized in that The step of controlling the tool head to print the third line segment and the fourth line segment on the printing platform comprises: Controlling the tool head to print the first line segment and the third line segment with the first nozzle; After the first line segment and the third line segment are printed, the tool head is controlled to switch to printing the second line segment and the fourth line segment with the second nozzle.
12. The method according to claim 10, characterized in that The step of controlling the tool head to print the third line segment and the fourth line segment on the printing platform comprises: Controlling the first nozzle to print a third bottom surface with a third color consumable, and controlling the tool head to switch to printing a fourth bottom surface with a fourth color consumable through the second nozzle; Controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable, and controlling the tool head to switch to printing the second line segment and the fourth line segment on the third bottom surface with the fourth color consumable through the second nozzle; Wherein, any one of the third color consumable and the fourth color consumable is a dark color consumable, and the other consumable is a light color consumable.
13. The method according to claim 12, characterized in that The controlling the first nozzle to print the first line segment and the third line segment on the fourth bottom surface with the third color consumable includes: Controlling the first nozzle to continuously discharge the third color consumable material from a second preset starting point, and controlling the tool head to move to print the first line segment and the third line segment on the fourth bottom surface; wherein the second preset starting point is any point outside the third bottom surface and outside the fourth bottom surface; After the first line segment and the third line segment are printed, the tool head is controlled to move so that the first nozzle stops discharging material at the second preset end point; the second preset end point is any point outside the third bottom surface and the fourth bottom surface that does not include the second preset starting point; the first line segment and the third line segment do not include the second preset starting point and the second preset end point.
14. The method according to any one of claims 1 to 13, characterized in that: The camera is provided with a fill light; The step of acquiring the first line segment and the second line segment by the camera to obtain a first image and a second image includes: Illuminate the first line segment and the second line segment by the fill light; The illuminated first line segment and the second line segment are captured by the camera to obtain the first image and the second image.
15. A 3D printer, characterized in that: The 3D printer comprises: a controller, a printing platform, a tool head and a camera, wherein the tool head and the printing platform can move relative to each other; the controller comprises: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the controller executes the method as described in any one of claims 1 to 14.
Citation Information
Patent Citations
Nozzle calibration method and system of double-nozzle 3D printer
CN111267340A
Method for determining printer properties of FFF printer
CN114599504A
Calibration method for flow of 3D printer, and 3D printer
WO2024250618A1
Cited By
Printer control method and printer
US12515450B1