Method for determining the offset of a tool head and 3D printer

By printing parallel line segments on a 3D printer and acquiring images, the tool head offset is automatically analyzed, solving the printing accuracy problem caused by tool head movement offset and achieving higher measurement accuracy and printing quality.

CN120096089BActive Publication Date: 2026-01-27SHENZHEN TUOZHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510335811.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-01-27
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The movement offset of the tool head in existing 3D printers leads to reduced printing accuracy, and manual measurement of offset has low accuracy.

Method used

By printing two parallel and non-collinear line segments on a printing platform, capturing images of the line segments using a camera, and determining the offset of the tool head in the vertical direction based on image analysis, automatic compensation is achieved.

Benefits of technology

It improves the measurement accuracy of tool head offset, simplifies operation, avoids errors caused by manual measurement, and improves printing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120096089B_ABST
    Figure CN120096089B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a tool head offset determination method and a 3D printer. The method comprises the following steps: controlling the tool head to print a first line segment and a second line segment which are parallel and not collinear on a printing platform; collecting the first line segment and the second line segment through a camera to obtain a first image and a second image; and obtaining the offset of the tool head in a second direction based on the first image and the second image, wherein the second direction is perpendicular to a first direction. The embodiment of the application is beneficial to improving the offset measurement accuracy of the tool head.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D printing technology, and more particularly to a method for determining the offset of a tool head and a 3D printer. Background Technology

[0002] With the rapid development of 3D printing technology, people have increasingly higher requirements for printing accuracy. The tool head of a 3D printer inevitably has a certain offset during movement. For example, when we need to move it 100mm horizontally, the actual distance traveled might be 100.03mm or 99.96mm. This is a limitation inherent in the motion mechanism itself and cannot be completely eliminated. Clearly, this imprecise movement leads to a loss of printing accuracy. If this offset can be measured, targeted compensation can be made, thereby improving printing accuracy.

[0003] In traditional solutions, 3D printers can only print specific models. Then, various features of the model are manually measured, and a series of calculations are performed to determine the tool head's offset in multiple directions, allowing for targeted compensation. However, the accuracy of offsets calculated through manual measurement is relatively low. Summary of the Invention

[0004] To address the aforementioned problems in the prior art, this 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 acquiring images corresponding to the two line segments, the offset of the tool head in the direction perpendicular to the line segments is determined based on the images. Compared to manually measuring various features of the printed part and calculating motion errors, determining the offset of the tool head based on image comparison of the actual printed line segments can improve the measurement accuracy of the offset.

[0005] In a first aspect, embodiments of this application provide a method for determining the 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 including a printing platform and a camera connected to the tool head, the tool head being movable relative to the printing platform; the method comprising:

[0006] The tool head is controlled 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 non-collinear in a first direction;

[0007] The camera captures the first line segment and the second line segment 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, the second direction being perpendicular to the first direction.

[0009] Secondly, embodiments of this application provide a controller located in a 3D printer. The 3D printer includes a tool head, a printing platform, and a camera. The tool head and the printing platform are movable relative to each other. The controller includes 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 used 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 configured to obtain the offset of the tool head in a second direction, which is perpendicular to the first direction, based on the first image and the second image.

[0013] Thirdly, embodiments of this application provide a 3D printer, the 3D printer including: a controller, a printing platform, a tool head, and a camera, the tool head being movable relative to the printing platform; the controller including: a processor and a memory, the processor being connected to the memory, the memory being used to store computer programs, and the processor being used to execute the computer programs stored in the memory, so that the controller performs the method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product, the computer program product including a non-transitory computer-readable storage medium storing a computer program, the computer program product being operable to cause a computer to perform the method as described in the first aspect.

[0016] Implementing the embodiments of this application has the following beneficial effects:

[0017] In this embodiment, the 3D printer controller first controls the tool head to print a first line segment and a second line segment that are parallel and non-collinear in a first direction on the printing platform. Then, a camera captures the first and second line segments to obtain a first image corresponding to the first line segment and a second image corresponding to the second line segment. Finally, based on the first and second images, the offset of the tool head in a 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 to manually measuring the various features of the printed model, implementing this application can automatically measure the tool head offset, making the operation simpler and avoiding measurement errors caused by manual measurement, thus improving the measurement accuracy and computational efficiency of the tool head offset. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the structure of a 3D printer provided in an embodiment of this application;

[0020] Figure 2 A flowchart illustrating a method for determining the offset of a tool head provided in an embodiment of this application;

[0021] Figure 3 A schematic diagram of a printed pattern provided for an embodiment of this application;

[0022] Figure 4 A schematic diagram of line segment printing provided for an embodiment of this application;

[0023] Figure 5 A schematic diagram of a line segment image provided in an embodiment of this application;

[0024] Figure 6 A schematic diagram of a projection intensity distribution provided in an embodiment of this application;

[0025] Figure 7 A schematic diagram illustrating target point detection provided in an embodiment of this application;

[0026] Figure 8 A functional unit block diagram of a controller provided in an embodiment of this application;

[0027] Figure 9 This is a functional block diagram of a 3D printer provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0029] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0030] In this document, the term "embodiment" means that a particular feature, result, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0031] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation", "connection" and "linkage" should be interpreted broadly. In one example, they can be a fixed connection, a detachable connection, or an integral connection; they can be a mechanical connection, an electrical connection, or a connection that allows communication between them; they can be a direct connection or an indirect connection through an intermediate medium; they can be the internal connection of two elements or the interaction between two elements.

[0032] First, refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of a 3D printer provided in an embodiment of this 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 the following: an onboard microcontroller unit (MCU), a central processing unit (CPU), a field-programmable gate array (FPGA) chip, a single-chip microcomputer (SCM), etc. The controller 101 may be integrated into the 3D printer 100 to control the 3D printer 100 in printing the part. Optionally, the 3D printer 100 may include multiple controllers 101 located in different positions; this application does not limit the number or placement of the controllers. The part being printed is the object printed by the 3D printer on the printing platform 103. The size, shape, and other parameters of the printing platform 103 can be synchronized in real time to the controller 101 of the 3D printer 100. The controller 101 can divide the printing platform 103 into multiple grids and display these grids in the operating device. The operating device is used to receive user operation control; the user can input relevant parameters in the operating device and send these parameters to the controller 101 of the 3D printer 100 through the operating device. Then, the controller 101 can print the corresponding printout according to the relevant parameters input by the user in the operating device. For example, 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, thereby printing the desired 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, used for remote control of the 3D printer.

[0034] The tool head 102 is mounted on the 3D printer. The controller 101 controls the movement of the tool head 102, moving it to a designated position for printing. The tool head 102 can be connected to a feeding device containing various colors of filament, which supplies the nozzles on the tool head 102 with these filaments. The tool head 102 contains a heating block that delivers molten filament to the nozzles. The nozzles are the end components of the print head, responsible for extruding and depositing the molten filament onto the printing platform 103 to print the corresponding object. The printing platform 103 supports the printed object and can move on the 3D printer. A camera 104 is connected to the tool head 102 and follows its movement to capture images of the printed object. Optionally, the camera can also be mounted on other parts of the 3D printer and can move relative to the printing platform to capture images of the printed object.

[0035] In some feasible implementations, the 3D printer 100 of this application embodiment is a dual-head printer, with two nozzles provided on the tool head 102, such as... Figure 1 The first nozzle 105 and the second nozzle 106 shown are interchangeable for printing operations. The controller, through the tool head 102, extrudes filament through the interaction of the two nozzles onto the printing platform 103, where the desired part is printed. The 3D printer 100 with two nozzles can receive filaments of multiple colors through the two nozzles, thereby printing multi-color parts or parts with support material.

[0036] In this embodiment, the user can download / input parameters such as the shape, color, and printing position of the printed part in the operating device or slicing software. The operating device or slicing software sends these parameters to the 3D printer 100. The controller 101 executes the corresponding program to control the movement of the tool head 102 of the 3D printer 100, controlling the tool head 102 to move to the printing position. Optionally, the controller 101 can also control the movement of the printing platform to bring the printing platform closer to the tool head or control the printing platform to move in a predefined xy plane. It also controls the feeding device to deliver consumables of the corresponding color to the tool head 102. Then, the controller 101 controls the tool head 102 to extrude consumables of different colors to the printing position of the printing platform 103 through the first nozzle 105 and the second nozzle 106, thereby printing multi-colored printed parts on the printing platform 103.

[0037] It is understood that the embodiments of this application are only illustrated using a dual-head printer as an example. Those skilled in the art can also apply the methods of the embodiments of this application to a single-nozzle printer or a multi-tool-head 3D printer, and there is no limitation here.

[0038] When the tool head 102 of the 3D printer 100 moves, due to the limitations of the motion structure itself, the movement distance of the tool head 102 deviates from the theoretical movement distance. This deviation reduces printing accuracy, and there is also a deviation between the two nozzles. Therefore, in this embodiment, two identical but non-overlapping preset patterns can be set on the operating device and printed by the tool head 102 of the 3D printer 100. Alternatively, the printing trajectory of the preset patterns can be pre-set in the 3D printer and triggered by the user clicking the tool head deviation calibration control. Then, images of the two preset patterns are captured by the camera 104 and sent to the controller 101. The controller 101 can calculate the tool head deviation by analyzing the images. In some feasible implementations, one nozzle in the tool head 102 can be controlled to print the two preset patterns to calibrate the tool head deviation. Furthermore, another nozzle in the tool head can be controlled to print the two preset patterns to calibrate the deviation between the two nozzles.

[0039] For example, in this embodiment of the 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 captures the first line segment and the second line segment through the camera 104 to obtain the first image and the second image. 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, the second direction being perpendicular to the first direction.

[0042] In some feasible implementations, the controller can control the tool head to move to the printing position corresponding to the parameters input by the user in the operating device or slicing software, and provide the tool head with the consumables corresponding to the parameters through the feeding device. Then, the controller controls the tool head to extrude the material through the nozzle and extrude the material onto the printing platform, thereby printing the printed part corresponding to the model file on the printing platform.

[0043] Before printing begins, during initialization, or upon receiving a user-initiated tool head offset calibration request, the tool head can be controlled to print two parallel and non-collinear line segments on the printing platform. Images of the two line segments are captured by a camera. Based on these images, the offset of the tool head in the perpendicular direction of the line segments can be analyzed. Software compensation can be applied to the tool head's movement based on this offset, thereby improving print quality. Implementing this application solves the problem of low measurement accuracy caused by manual offset measurement and improves the accuracy of offset measurement.

[0044] See Figure 2 , Figure 2 This is a flowchart illustrating a method for determining the offset of a tool head, provided in an embodiment of this application. The method is applied to the controller of the aforementioned 3D printer. The tool head is mounted on the 3D printer, which includes a printing platform and a camera. The tool head and the printing platform are movable 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 and second line segments on the printing platform.

[0046] In some feasible implementations, the first line segment and the second line segment are parallel and not collinear in a first direction. The controller obtains preset parameters from the operating device of the 3D printer, which include the printing paths of the first and second line segments; or, the 3D printer has preset printing paths for the first and second line segments, wherein the printing paths of the first and second line segments are associated with controls for the nozzle offset calibration function of the 3D printer. For example, when the controller detects that the user clicks the nozzle offset calibration control, it executes the code corresponding to printing the first and second line segments.

[0047] In practice, the controller controls the tool head to move along the printing path of the first line segment to the preset printing start point of the first line segment. Starting from the preset printing start point of the first line segment, the controller controls the tool head to move along the first direction and extrude the consumables 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 start point of the second line segment according to the printing path of the second line segment. Starting from the preset printing start point of the second line segment, the controller controls the tool head to move along the first direction and extrude the consumables 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 using two nozzles on the tool head; that is, the first line segment can be printed using one nozzle, and the second line segment can be printed using the other nozzle. Alternatively, the first and second line segments can be printed using a single nozzle; this application does not limit this to either method.

[0050] Alternatively, a complete pattern can be printed using a 3D printer, for example, a parallelogram. An example is... Figure 3 As shown, when the printed pattern is a rectangle, the controller obtains user-defined parameters such as the rectangle's side length and endpoint positions from the slicing software or operating device, and controls the tool head to print the rectangular pattern on the printing platform based on these parameters. Optionally, the parameters of the rectangular pattern can be stored in the 3D printer as gcode.

[0051] In this context, 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. In this case, the extension direction of line segment AD or line segment BC can be considered the second direction. Therefore, the offset of the tool head in the second direction can be obtained by offsetting the coordinates of corresponding points on line segments AB and DC, thereby compensating for the movement of the tool head in the second direction. For example, 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 corresponding points on line segment AD or line segment BC, thereby compensating for the movement of the tool head in the second direction.

[0053] For example, before the control tool head prints the first and second line segments on the printing platform, the method may further include:

[0054] The control tool head prints the bottom surface on the printing platform, and prints the first and second line segments on the bottom surface.

[0055] During the 3D printing process, the first layer is affected by various factors such as the temperature of the printing platform and the material of the printing platform, which can lead to printing defects in the first layer.

[0056] Before printing the first and second line segments, the controller directs the tool head to print the bottom surface on the printing platform. After the bottom surface is printed, the controller then prints the first and second line segments on that surface. This avoids printing defects that can easily occur when printing the first and second line segments on the first layer, and also prevents the surface material / texture of the printing platform from affecting the printing of the first and second line segments, ensuring the success of printing them. Furthermore, printing the bottom surface ensures stable nozzle output flow, preventing flow fluctuations from affecting the position coordinates of the printed first and second line segments. Implementing this application can improve the accuracy of tool head offset calibration.

[0057] Optionally, the filament color for printing the bottom surface can be different from the filament color for printing the first and second line segments. The two filament colors can be clearly distinguished, for example, one is a dark filament color and the other is a light filament color. In the image captured by the camera, the bottom surface can be clearly distinguished from the first and second line segments, simplifying the image processing steps, improving the accuracy of image processing, and thus further improving the accuracy of tool head offset calibration.

[0058] Optionally, the color filaments for the first and second line segments can be different, and both the color filaments for the first and second line segments are different from the color filament for the bottom surface. This allows the first line segment, the second line segment, and the bottom surface to be distinguished on the printing platform, enabling the camera to capture clear line segment images. Based on these line segment images, the offset of the tool head can be accurately determined, improving the accuracy of the offset determination.

[0059] It can be seen that by controlling the tool head to print the bottom surface on the printing platform before printing the first and second line segments, and then printing the first and second line segments on the bottom surface, defects in the first layer of the printed first and second line segments can be avoided, as well as the influence of the printing platform on the first and second line segments. Furthermore, the consumable flow rate output from the nozzle can be stabilized, thereby printing stable and defect-free first and second line segments. By analyzing the images of the first and second line segments, the tool head offset with higher accuracy can be determined.

[0060] In some feasible implementations, the tool head includes a first nozzle and a second nozzle, which switch between each other. Controlling the tool head to print a first line segment and a second line segment on the printing platform can include: controlling the tool head to print the first line segment on the printing platform using 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 using the second nozzle; in this embodiment, 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 material normally, switches the second nozzle to standby mode, at which point 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 the 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 standby mode and controls the second nozzle to discharge material normally. At this time, the second nozzle is closer to the printing platform than the first nozzle, and the controller controls the tool head to move so that the second nozzle prints the second line segment on the printing platform.

[0062] For example, 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, the tool head is switched to print a second line segment on the printing platform with a second nozzle. The images of the line segments printed by the two nozzles can be acquired, and the offset of the first nozzle and the second nozzle in the second direction can be determined based on the acquired images, thereby realizing the offset measurement of the two nozzles and improving the accuracy of the offset measurement.

[0063] Furthermore, in some feasible implementations, controlling the tool head to print the first and second line segments on the printing platform includes:

[0064] The first nozzle is controlled to print a first bottom surface with a first-color consumable, and the tool head is controlled to switch to printing a second bottom surface with a second-color consumable through a second nozzle; the first nozzle is controlled to print a first line segment on the second bottom surface with a first-color consumable, and the tool head is controlled to switch to printing a second line segment on the first bottom surface with a second-color consumable through a second nozzle; in this embodiment of the application, either the first-color consumable or the second-color consumable can be a dark-colored consumable, and the other consumable can be a light-colored consumable.

[0065] Specifically, the controller controls the feeding device or external feed rack to supply the first color filament to the first nozzle and the second color filament to the second nozzle. Then, the controller controls the first nozzle of the tool head to discharge filament normally, switches the second nozzle to standby mode, and controls the tool head to move to print the first bottom surface of the first color filament. After the first bottom surface is printed, the controller controls the first nozzle of the tool head to switch to standby mode and switches the second nozzle to discharge filament normally, using the tool head to move to print the second bottom surface of the second color filament. Alternatively, the controller can control the tool head to switch between the first and second nozzles to print the first and second bottom surfaces. For example, the controller controls the tool head to print the first layer of the first bottom surface using the first color filament with the first nozzle, then controls the tool head to print the first layer of the second bottom surface using the second color filament with the second nozzle, then switches back to the first nozzle to print the second layer of the first bottom surface using the first color filament, and so on, to complete the printing of the first and second bottom surfaces. Alternatively, after the controller controls the tool head to print layers 1 to 2n of the first bottom surface using the first nozzle and the first color consumable (where n is greater than 1), it controls the tool head to print layers 1 to 2n of the second bottom surface using the second nozzle and the second color consumable. Then, it switches back to printing layers 2n to 2n of the first bottom surface using the first nozzle and the first color consumable, and then controls the tool head to print layers 2n to 2n of the second bottom surface using the second nozzle and the second color consumable, and so on, to complete the printing of the first and second bottom surfaces. There are many ways to print the bottom surface using the first and second nozzles, and this application does not limit this.

[0066] After printing on the first and second bottom surfaces is completed, the controller again controls the first nozzle to discharge material normally, switches the second nozzle to standby mode, and uses the tool head to control the first nozzle to print the first line segment of the first color consumable on the second bottom surface. After the first line segment is printed, the controller controls the first nozzle to switch to standby mode, controls the second nozzle to discharge material normally, and uses the tool head to control the second nozzle to print the second line segment of the second color consumable on the first bottom surface.

[0067] For example, the printing effect is as follows Figure 4 As shown, Figure 4 The lighter-colored consumable is the first-color consumable, and the darker-colored consumable is the second-color consumable. The bottom surface printed with the first-color consumable is the first bottom surface, and the bottom surface printed with the second-color consumable 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] As can be seen, 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 nozzle with the second color consumable, the printed line segments can be made unaffected by the printing platform. Furthermore, 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, facilitating the acquisition of 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 can all be different 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 a first line segment on the second bottom surface with a first color consumable may include:

[0071] The first nozzle is controlled to continuously dispense the first color consumable from the first preset starting point, and the tool head is controlled to move to print the first line segment on the second bottom surface;

[0072] After the first line segment is printed, the control tool head moves so that the first nozzle stops discharging material at the first preset endpoint.

[0073] In this embodiment, the first preset starting point can be any point outside the first bottom surface and outside the second bottom surface. The first preset ending point can be any point outside the first bottom surface and outside the second bottom surface, excluding the first preset starting point. The first line segment does not include the first preset starting point and the first preset ending point.

[0074] During 3D printing, the nozzle at the printing start point is unstable, especially the flow rate. In some feasible implementations, the tool head can be controlled to remain at the start point for a period of time, waiting for material to exit the nozzle, ensuring sufficient internal flow and preventing under-extrusion from affecting the printing of the line segment. At this time, the nozzle is in a heated state, and partially molten filament will flow out during the start point dwell phase. To ensure stable filament flow and line width for the first and second line segments, the start point needs to be located outside the first and second bottom surfaces; that is, the first or second line segment does not include the printing start point.

[0075] For example, the controller controls the first nozzle to continuously output the first color material from a first preset starting point outside the first and second bottom surfaces. After the flow rate of the first color material 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 controller continues to control the tool head to move so that the first nozzle moves to a first preset ending point to stop discharging material.

[0076] It should be noted that because the filament flow gradually decreases when the nozzle stops dispensing, the printed line width can become unstable. Therefore, after the first line segment is printed, it is necessary to control the tool head to continue moving and move the first nozzle to a first preset endpoint outside the first and second bottom surfaces to stop dispensing. That is, the first or second line segment does not include the printing endpoint.

[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, causing the line width to be unstable. E1 is the first preset ending point. At the first preset ending point, the flow rate of the first color consumable will decrease, causing the line width to be unstable. Therefore, S1 and E1 are both set outside the first bottom surface and outside the second bottom surface, respectively. Among them, S2 is the preset starting point corresponding to the second nozzle, and E2 is the preset ending point corresponding to the second nozzle. The 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 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 described again here.

[0078] It can be seen that by controlling the first nozzle to continuously feed material of the first color 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 feeding material at the first preset ending point, the line width of the printed first line segment and the second line segment can be stabilized, thereby avoiding the influence of unstable line width on the offset measurement accuracy and improving the offset measurement accuracy.

[0079] 202: The first line segment and the second line segment are captured by the camera to obtain the first image and the second image.

[0080] In this embodiment of the application, the first line segment corresponds to the first image, and the second line segment corresponds to the second image.

[0081] Optionally, the camera can be connected to the tool head. The movement of the camera can be controlled by controlling the movement of the tool head, so as to capture a first image corresponding to the first line segment and a second image corresponding to the second line segment.

[0082] Optionally, the camera can be independently mounted on the 3D printer and can move relative to the printing platform. After the first and second line segments are printed, the first and second images can be captured by controlling the camera to move to the appropriate position.

[0083] This application will use the connection between the camera and the tool head as an example for explanation. The processing method of independently setting the camera on the 3D printer is similar to that of the embodiments of this application, and will not be repeated here.

[0084] For example, acquiring a first image and a second image by capturing a first line segment and a second line segment using a camera may include:

[0085] Based on the first target point, the first line segment is captured by the camera to obtain the first image;

[0086] Based on the second target point, the second line segment is captured by the camera to obtain the second image.

[0087] In this embodiment, the first target point can 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, the first image of the first line segment acquired based on the first target point should be the same as the second image of the second line segment acquired based on the second target point, provided that the tool head is not offset. 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 moves the tool head to move the camera above the first target point, then captures an image of the first line segment, obtaining a first image. Next, the controller moves the tool head a preset distance along the second direction to move the camera above the second target point, capturing an image of the second line segment, obtaining a second image. The preset distance is the theoretical distance between the first and second line segments in the second direction.

[0090] In some feasible implementations, the first target point cannot be close to the two endpoints of the first line segment, and the second target point also cannot be close to the two endpoints of the first line segment, 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. When 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 along the second direction to capture the image of the second line segment, the captured first and second images should be identical. If they are different, the difference in coordinates of the target point in the second image along the second direction is the offset in the second direction.

[0091] Optionally, the first target point can be the midpoint of the first line segment. The second target point can be the midpoint of the second line segment. In this way, the acquired first image can include the entire first line segment, and the acquired second image can include the entire second line segment. The first line segment is symmetrically distributed in the first image, and the second line segment is symmetrically distributed in the second image, which facilitates subsequent analysis of the offset in the second direction and improves the measurement accuracy of the offset.

[0092] As can be seen, based on the first target point, the first line segment can be captured by the camera to obtain the first image. Then, based on the second target point, the second line segment can be captured by the camera to obtain the second image. Based on the difference between the first image and the second image, the offset of the tool head movement can be determined. Compared with manual offset measurement, the measurement accuracy of offset is improved.

[0093] For example, a fill light can be installed on the camera.

[0094] By capturing the first line segment and the second line segment using a camera, a first image and a second image can be obtained, which may include:

[0095] Illuminate the first and second line segments with supplementary lighting;

[0096] The first and second lines are captured by a camera to obtain a first image and a second image.

[0097] Specifically, when acquiring the image of the first line segment, the controller first controls the fill light to illuminate the first line segment. With the first line segment illuminated, the camera acquires the image of the first line segment, obtaining the first image. After the first image is acquired, the controller controls the fill light to illuminate the second line segment. With the second line segment illuminated, the camera acquires the image of the second line segment, obtaining the second image.

[0098] As can be seen, by illuminating the first and second line segments with a supplementary light and then capturing the illuminated first and second line segments with a camera, a clearer first and second image can be obtained, which facilitates the analysis of the tool head movement offset and improves the measurement accuracy of the offset.

[0099] Optionally, a supplementary light can be used to simultaneously illuminate the first and second line segments. Then, a camera can capture the illuminated first and second line segments to obtain a target image, which includes the images corresponding to the first and second line segments. In this way, by acquiring the overall images of the first and second line segments, 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 a first line segment. This first material line is formed by the tool head printing the first line segment on the printing platform and can be considered as the first line segment. The second image includes a second material line corresponding to a second line segment. This second material line is formed by the tool head printing the second line segment on the printing platform and can be considered as 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. This application embodiment will use the first material line and the second material line as examples to illustrate the process. The processing method for the first material line and the second material line being horizontal is similar to that of this application embodiment 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 this rotation angle and adjust the first material line to the vertical direction.

[0101] For example, obtaining the first image by capturing the first line segment based on the first target point using the camera may include:

[0102] Based on the first target point, the first line segment is captured by the camera to obtain the fifth image;

[0103] Obtain the rotation angle of the first material line in the fifth image;

[0104] Based on the rotation angle of the first material line, adjust the first material line in the fifth image to obtain the first image.

[0105] For example, the fifth image is as follows Figure 5 As shown in image 501, the image corresponding to the second line segment is as follows: Figure 5Image 502 is shown in the image. The parallelogram lines in image 501 are the first material line, and the parallelogram lines in image 502 are the second material line. The light spots near the first material line in image 501 are the images of the supplementary light source passing through the first line segment onto the heated bed, and the light spots near the second material line in image 502 are the images of the supplementary light source passing through the second line segment onto the heated bed. Due to differences in material transmittance, the distribution of light spots in the images may be discrete. As can be seen from images 501 and 502, the material lines are not perfectly vertical in the images; there is a small rotation angle between the material lines and the vertical direction. The controller needs to obtain this rotation angle to adjust the first and second material lines to the vertical direction.

[0106] It should be noted that the embodiments of this application are only described by taking the adjustment of the first material line and the second material line to the vertical direction as an example. The processing method for adjusting the first material line and the second material line to the horizontal direction is similar to that of the embodiments of this application, and will not be described again here.

[0107] For example, 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 the opposite direction 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 prediction angle corresponding to the first prediction line with the smallest width is taken as the rotation angle of the first prediction line.

[0112] In this embodiment, the rotation angle of the first feed line is within a preset range, optionally [-1, 1]. The controller obtains multiple predicted angles within the preset range, optionally using a step size of 0.1 degrees, dividing the preset range [-1, 1] into 20 angles: -1, -0.9, ..., -0.2, -0.1, 0.1, 0.2, ..., 0.9, 1. It should be noted that this embodiment only uses the preset range [-1, 1] divided into 20 angles as an example for illustration. Those skilled in the art can also set other preset ranges and divide the preset range into other predicted angles. The processing method for setting other preset ranges and dividing the preset range into other predicted angles is similar to that of this embodiment and will not be repeated here.

[0113] Then, based on each predicted angle, the first material line in the fifth image is rotated in the reverse direction to obtain each first predicted material line. Next, the width of each first predicted material line is detected. Optionally, the width can be obtained by detecting the width of the line segment intersecting each first predicted material line with the upper or lower boundary of the fifth image, and this width can be used as the width of each first predicted material line. The embodiments of this application do not limit the method for detecting the width of each first predicted material line.

[0114] Furthermore, the widths of each first predicted material line are 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 then used as the rotation angle of the first material line. It should be noted that the projected width of the first material line is the smallest when it is completely vertical; therefore, 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] As can be seen, in this embodiment of the application, by obtaining multiple predicted angles from a preset range and rotating the first material line in the fifth image in the reverse direction based on the multiple predicted angles, multiple first predicted material lines can be obtained. 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 the 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 implementations, the rotation angle of the first material line can also be obtained directly through a line detection method. For example, the line detection method may include: Hough Line detection (HLD), Line Segment Detector (LSD), etc., which are not limited here.

[0117] Furthermore, based on the rotation angle of the first material line, the first material line is adjusted to a vertical direction to obtain the 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. By obtaining the rotation angle of the first material line in the fifth image, and based on the rotation angle of the first material line, the first material line can be adjusted to the vertical direction to obtain the first image. This simplifies the calculation of the coordinates of the corresponding points on the first material line and improves the calculation efficiency of the offset of the tool head movement.

[0119] Since the rotation angle of the second material line and the rotation angle of the first material line are both related to the camera's mounting angle, and the rotation angle of the second material line is equal to that 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 can be adjusted to obtain the second image.

[0120] Alternatively, the rotation angle of the second material line can be determined based on the method of any of the above embodiments, and the image corresponding to the second material line can be adjusted based on the rotation angle to obtain the second image. 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 described again here.

[0121] The method described above for estimating and straightening line segments with rotation angles is just one example. It should be understood that there are many other possible ways to estimate the rotation angle of a line segment and straighten it, which will not be illustrated here.

[0122] Alternatively, if the first material line and the second material line are vertical / horizontal, then a first image containing the first material line and a second image containing the second material line can be used directly.

[0123] 203: Based on the first and second images, obtain the offset of the tool head in the second direction.

[0124] In this embodiment, the second direction is perpendicular to the first direction. It should be noted that since the first line segment and the second line segment are parallel in the first direction, the coordinates of the first material line in the first image and the second material line in the second image are exactly the same in the first direction. Therefore, the offset of the first material line and the second material line in the second direction is the offset generated 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] For example, the control tool head prints a first line segment at y = y0 in a predefined xy plane, and then prints a second line segment at y = y0 + 60mm. Theoretically, if the tool head does not shift, the camera captures a first image containing the first line segment at y = y0, and a second image containing the second line segment at a point +60mm along the y direction. The first and second images should be identical; for example, the position of the first line segment in the first image should be the same as the position of the second line segment in the second image. For instance, if the starting and ending points of the first and second line segments have the same x-coordinate, then theoretically, the y-coordinates of any point in either the first or second line segment should differ by 60mm under the same x-coordinate. However, since the camera is movable and has moved by +60mm to capture the second image, the positions of the line segments in the images should be consistent. If the position of the first line segment in the first image differs from the position of the second line segment in the second image, image processing can be used to obtain the y1 coordinate of any point in the first line segment in the first image, and the y2 coordinate of any point in the second line segment in the second pixel at the same x-coordinate. The difference between the y1 and y2 coordinates is the offset of the tool head in the y-direction. Alternatively, a preset mapping relationship between the positional difference between the two images and the offset of the tool head can be established. For example, if the positional difference between the first and second line segments in the images is 2mm, the corresponding tool head offset is 1mm.

[0126] Optionally, if the camera is fixed inside the 3D printer, it takes a picture, which includes a first image and a second image. If the camera is facing the printing platform, the difference between the first and second line segments in the picture in the second direction can be directly compared. By transforming the pixels and 3D printer coordinates, the offset of the tool head in the second direction can be obtained. If the camera and the printing platform are tilted, the picture needs to be straightened before comparing the difference between the first and second line segments in the picture in the second direction.

[0127] In some feasible implementations, obtaining the offset of the tool head in the second direction based on the first and second images may include the following steps:

[0128] Obtain the first projection intensity distribution of the first image;

[0129] Obtain the second projection intensity distribution of the second image;

[0130] Based on the first projection intensity distribution, the coordinates of the third target point are obtained;

[0131] Based on the second projection intensity distribution, the coordinates of the fourth target point are obtained;

[0132] Based on the coordinates of the third and fourth target points, the offset of the tool head in the second direction is obtained.

[0133] The third target point can be any point on the central axis of the first material line, and the fourth target point can be the corresponding 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 and fourth target points.

[0134] Specifically, the controller first vertically projects the first image to obtain a first projection intensity distribution, and then vertically projects the second image to obtain a second projection intensity distribution. For example, the first or 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 or second image. The points on the broken line are distributed on both sides of a baseline, and the raised part in the middle is the first material line or the second material line.

[0135] It should be noted that, in this embodiment of the application, the first material line is vertical in the first image, and the second material line is vertical in the second image, as examples for illustration. If the first or second material line is horizontal, the first image is horizontally projected to obtain a first projection intensity distribution, and the second image is horizontally projected to obtain a second projection intensity distribution. Alternatively, the horizontal material line can be rotated to a vertical position to obtain a vertical projection intensity distribution.

[0136] Furthermore, the controller determines a third target point on the central axis of the first material line based on the first projection intensity distribution.

[0137] In some feasible implementations, the coordinates of the third target point are obtained based on the first projection intensity distribution, which may include, for example, the following steps:

[0138] The first material line is obtained based on the first projected intensity distribution;

[0139] The first baseline is obtained by fitting a straight line to the third projected intensity distribution excluding the first material line in the first projected intensity distribution;

[0140] Obtain the coordinates of the intersection point of the first baseline and the first boundary of the first material line, and thus obtain the coordinates of the first intersection point;

[0141] Obtain the coordinates of the first endpoint of the first feed line;

[0142] Based on the coordinates of the first intersection point and the first endpoint, the coordinates of the third target point are obtained.

[0143] Wherein, the first boundary can be any boundary of the first material line, the first endpoint can be any endpoint of the second boundary of the first material line, and the second boundary can be another boundary of the first material line other than the first boundary.

[0144] Specifically, the controller detects the first projected intensity distribution and separates the raised portion in the middle of the first projected intensity distribution to obtain the first material line. For example, as shown... Figure 7 As shown, the controller scans the first projection intensity distribution and focuses on the central convex portion of the first projection intensity distribution. Figure 7 The first boundary 703 and the second boundary 704 shown are separated, and the first boundary 703 and the second boundary 704 are the two boundaries of the first material line.

[0145] Then, a straight line fit is performed on the third projected intensity distribution excluding the first material line from the first projected intensity distribution. That is, a straight line fit is performed on the broken line portion excluding the first material line, and the straight line closest to this broken line portion is determined, as shown below. Figure 7 The first reference line 701 is shown. It should be noted that the first reference line 701 determined by different methods may differ; however, in this embodiment, 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, differences in the first reference line 701 do not affect the calculation of the offset in the second direction, improving the accuracy of the offset calculation.

[0146] Furthermore, the coordinates of the intersection point of the first baseline 701 and the first boundary 703 of the first material line are obtained, resulting in the following: Figure 7 The coordinates (x1, y1) of the first intersection point M are shown. Then, the coordinates of any endpoint of the second boundary 704 of the first material line are obtained, i.e., the coordinates of the first endpoint. 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 embodiments, the protruding part of the first material line can also be fitted into a straight line 702. The intersection point of the straight line 702 and the second boundary is used as the first endpoint N, and the coordinates (x2, y2) of the first endpoint N are obtained. 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] Therefore, based on the first projected intensity distribution, a first material line can be obtained, and a first baseline can be obtained by fitting a straight line to the third projected intensity distribution excluding the first material line in the first projected intensity distribution. Then, the coordinates of the intersection point of the first baseline and the first boundary of the first material line are used as the coordinates of the first intersection point to obtain the coordinates of the first endpoint of the first material line. 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. Thus, 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, improving the measurement accuracy of the offset.

[0148] Furthermore, the controller detects the second projection intensity distribution, determines the second material line and the second reference line within the second projection intensity distribution, and obtains the coordinates of the second intersection point and 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 second endpoint. It should be noted that in this embodiment, 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 is understandable that the third target point is a point on the central axis of the first material line, and the fourth target point is a point on the central axis of the second material line corresponding to the third target point. When there is no offset in the tool head movement, the coordinates of the third target point and the fourth target point are exactly the same. When there is an offset in the tool head movement, the difference in coordinates between the central axes of the first and second material lines 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 and 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 the second projection intensity distribution of the second image, a third target point is determined on the central axis of the first material line based on the first projection intensity distribution, and a fourth target point is determined 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 fourth target point, the offset of the tool head in the second direction can be obtained, thus improving the measurement accuracy of the offset of the tool head movement.

[0151] In one embodiment of this application, the method may further include:

[0152] The control tool head prints the third and fourth line segments on the printing platform;

[0153] The third and fourth line segments are captured by a camera to obtain the third and fourth images;

[0154] Based on the third and fourth images, the offset between the first nozzle and the second nozzle in the first direction is obtained.

[0155] Among them, 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 parallel and non-collinear third and fourth line segments on the printing platform in the second direction. The third and fourth line segments are captured by a camera to obtain third and fourth images. It should be noted that since the second direction is perpendicular to the first direction, by capturing the third image corresponding to the third line segment and the fourth image corresponding to the fourth line segment, the offset between the first and second nozzles in the first direction can be analyzed based on the third and fourth images. The method for controlling the tool head to print the third and fourth line segments on the printing platform is similar to the method for controlling the tool head to print the first and second line segments on the printing platform in any of the above embodiments. The method for capturing the third and fourth line segments and obtaining the third and fourth images by the camera is similar to the method for capturing the first and second line segments and obtaining the first and second images by the camera in any of the above embodiments. The method for obtaining the offset between the first and second nozzles in the first direction based on the third and fourth images is similar to the method for obtaining the offset of the tool head in the second direction based on the third and fourth images in any of the above embodiments, and will not be elaborated further here.

[0157] Thus, 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 motion offset of the first nozzle and the second nozzle on the plane of the printing platform can be determined. By calibrating this offset, the motion 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 this application, controlling the tool head to print the third and fourth line segments on the printing platform may include:

[0159] The control tool head prints the first and third line segments using the first nozzle;

[0160] After the first and third line segments are printed, the control tool head is switched to print the second and fourth line segments with the second nozzle.

[0161] It should be noted that the controller can control the first nozzle to continuously print a first line segment and a third line segment that are perpendicular to each other, and then control the second nozzle to continuously print a second line segment and a fourth line segment that are perpendicular to each other, thereby determining the offset between 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 material normally, and then controls the second nozzle to switch to standby mode. By controlling the movement of the tool head, the first and third line segments are continuously printed on the printing platform. After the first and third line segments are printed, the controller controls the first nozzle to switch to standby mode, and then controls the second nozzle to discharge material normally, continuously printing the second and fourth line segments on the printing platform by controlling the movement of the tool head. Figure 4 As shown, the first nozzle can continuously print line segments AC and AB, and the second nozzle can continuously print line segments BD and CD.

[0163] In this way, by continuously printing the first, third, second, and fourth line segments through dual-nozzle switching, the offsets of the first and second nozzles in the first and second directions can be determined by analyzing the images of the above four line segments. This eliminates the need to determine the offset in the second direction first, thus simplifying the operation process and improving the calculation efficiency of the dual-nozzle motion offset.

[0164] In one feasible embodiment, controlling the tool head to print the third and fourth line segments on the printing platform includes:

[0165] Control the first nozzle to print the third bottom surface with the third color consumable, and control the tool head to switch to printing the fourth bottom surface with the fourth color consumable through the second nozzle;

[0166] Control the first nozzle to print the first line segment and the third line segment on the fourth bottom surface using the third color consumable, and control the tool head to switch to printing the second line segment and the fourth line segment on the third bottom surface using the fourth color consumable through the second nozzle;

[0167] Of these, either the third-color consumable or the fourth-color consumable is a dark-colored consumable, and the other is a light-colored 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 external feed rack to supply the third color filament to the first nozzle and the fourth color filament to the second nozzle. Then, the controller controls the first nozzle of the tool head to discharge filament normally, switches the second nozzle to standby mode, and controls the tool head to move and print the third bottom surface of the third color filament. After the third bottom surface is printed, the controller controls the first nozzle of the tool head to switch to standby mode and switches the second nozzle to discharge filament normally, using the tool head to move and print the fourth bottom surface of the fourth color filament. Alternatively, the controller can control the tool head to switch between the first and second nozzles to print the third and fourth bottom surfaces. For example, the controller controls the tool head to print the first layer of the third bottom surface using the third color filament with the first nozzle, then controls the tool head to print the first layer of the fourth bottom surface using the fourth color filament with the second nozzle, then switches back to the first nozzle to print the second layer of the third bottom surface using the third color filament, then controls the tool head to print the second layer of the fourth bottom surface using the fourth color filament with the second nozzle, and so on, to complete the printing of the third and fourth bottom surfaces. Alternatively, after the controller controls the tool head to print layers 1 to 2n of the third bottom surface using the third color filament with the first nozzle (where n is greater than 1), it controls the tool head to print layers 1 to 2n of the fourth bottom surface using the fourth color filament with the second nozzle. Then, it switches back to printing layers 2n to 2n of the third bottom surface using the third color filament with the first nozzle, and then controls the tool head to print layers 2n to 2n of the fourth bottom surface using the fourth color filament with the second nozzle, and so on, to complete the printing of the third and fourth bottom surfaces. There are many ways to print the bottom surface using the first and second nozzles, and this application does not limit this.

[0169] After printing on the third and fourth bottom surfaces is complete, the controller resumes normal material output from the first nozzle, switches the second nozzle to standby mode, and uses the tool head to control the first nozzle to continuously print the first and third line segments of the third color filament on the fourth bottom surface. After printing the first and third line segments, the controller switches the first nozzle to standby mode, controls the second nozzle to normal material output, and uses the tool head to control the second nozzle to print the second and fourth line segments of the fourth color filament on the third bottom surface.

[0170] As can be seen, 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 and third line segments on the fourth bottom surface with the third color consumable, and controlling the tool head to switch to printing the second and fourth line segments on the third bottom surface with the fourth color consumable through the second nozzle, the printed line segments are not affected by the printing platform. Furthermore, by distinguishing the color consumable used for the line segments from the color consumable of the bottom surface, the first, second, third, and fourth line segments can be clearly distinguished, facilitating the acquisition of line segment images. 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 and third line segments on the fourth bottom surface using a third color consumable may include:

[0172] Control the first nozzle to continuously dispense the third color consumable from the second preset starting point, and control the tool head to move to print the first and third line segments on the fourth bottom surface;

[0173] After the first and third line segments are printed, the control tool head moves to stop the first nozzle from discharging material at the second preset endpoint.

[0174] In this embodiment, the second preset starting point can be any point outside the third and fourth bottom surfaces, and the second preset ending point can be any point outside the third and fourth bottom surfaces excluding the second preset starting point. Neither the first nor the third line segment includes the second preset starting point or the second preset ending point.

[0175] Understandably, to avoid nozzle instability at the printing start point, especially flow instability, the tool head needs to remain at the start point for a period of time to allow for nozzle discharge, ensuring sufficient internal flow and preventing under-extrusion from affecting line segment printing. Therefore, the second preset start point needs to be set outside the third and fourth bottom surfaces. Furthermore, to prevent line width instability due to gradually decreasing filament flow when the nozzle stops discharging, the tool head needs to continue moving away from the line segment after printing. Therefore, the second preset end point also needs to be set outside the third and fourth bottom surfaces, and not coincide with the second preset start point.

[0176] Specifically, the controller first controls the movement of the tool head, moving the first nozzle to a second preset starting point, from which material is continuously discharged. After the material output from the first nozzle stabilizes, the controller controls the tool head to move to continuously print the first and third line segments on the fourth bottom surface. After the first and third line segments are printed, the controller controls the tool head to continue moving to move the first nozzle to a second preset ending point, where material discharge stops.

[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 and third line segments when the output consumable flow rate is stable, the problem of unstable line widths of the printed first and third line segments caused by consumable accumulation at the starting point can be solved. After the first and third line segments are printed, controlling the first nozzle to move to the second preset ending point to stop discharging material can solve the problem of unstable consumable flow rate output by the first nozzle, thereby printing the first, second, third, and fourth line segments with stable line widths. Based on the offset calculation of these line segments, the accuracy of offset measurement can be improved.

[0178] Then, the controller controls the second nozzle to continuously dispense the fourth color consumable from the preset starting point corresponding to the second nozzle, and controls the tool head to move to print the second and fourth line segments on the third bottom surface;

[0179] After the second and fourth line segments are printed, the control tool head moves so that the second nozzle stops discharging material at the preset endpoint corresponding to the second nozzle.

[0180] In some feasible implementations, after determining the tool head's offset in the first direction and the offset in the second direction, the controller can adjust the tool head's movement trajectory based on these offsets, thereby calibrating the tool head's offsets in the first and second directions. This application does not limit the calibration method for the tool head's movement trajectory. Optionally, after determining the tool head's offset in the second direction, the controller can first calibrate the tool head's offset in the second direction, and then determine and calibrate the tool head's offset in the first direction. Alternatively, the controller can simultaneously calibrate both the tool head's offsets in the first and second directions after determining them.

[0181] In some feasible implementations, to ensure the accuracy of the tool head's offset in the second direction, after determining the tool head's offset in the second direction, the controller can 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 tool head offset in the second direction, and determine the repeatability of the two determined offsets. This repeatability can reflect the accuracy of the offset calculation.

[0182] For example, the method may include:

[0183] The first line segment and the second line segment are captured again by the camera to obtain the first repeated image and the second repeated image. 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 and second repeated images, the repeated offset of the tool head in the second direction is obtained;

[0185] The repeatability accuracy is obtained based on the offset and repeatability of the tool head in the second direction.

[0186] The offset of the tool head in the second direction is calibrated based on repeatability accuracy, tool head offset in the second direction, and repeatability offset.

[0187] Specifically, the controller selects a fifth target point on the first line segment, ensuring that the fifth target point does not coincide with the first target point. It then selects a sixth target point on the second line segment, again ensuring that the sixth target point does not coincide with the second target point. Based on the fifth target point, the controller captures an image of the first line segment using a camera, obtaining a first duplicate image. Based on the sixth target point, the controller captures an image of the second line segment using a camera, obtaining a second duplicate image. The processing method for capturing the first and second line segments using a camera to obtain the first and second duplicate images is similar to the processing method for capturing the first and second line segments using a camera to obtain the first and second images as described 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, obtaining the repeatability difference. Further, the image resolutions of the first image and / or the second image are obtained, wherein the image resolutions of the first image and the second image are the same. Based on the image resolutions of the first image and / or the second image, the 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 image resolution and motion coefficient is determined, and the embodiments of this application do not limit the method for determining the motion coefficient.

[0189] Furthermore, the controller uses the product of the repeatability difference and the motion coefficient as the repeatability accuracy between the tool head's offset and repeated offset in the second direction. This allows the determination of the repeatability accuracy of the tool head's offset and repeated offset in the second direction, thereby determining whether the offset in the second direction is accurate and improving the precision of the tool head's offset measurement.

[0190] When the repeatability of the tool head's offset and repeated offset in the second direction exceeds a preset threshold, it indicates that the measurement of the tool head's 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 can be 5 micrometers.

[0191] Therefore, the controller selects a new target point on the first line segment and, based on the new target point, controls the camera to acquire images of the new first line segment and the new second line segment to obtain the new tool head offset in the second direction. Then, it calculates the repetition accuracy of the new tool head offset in the second direction with any previously obtained offset, until there are any two offsets in the second direction whose repetition accuracy is less than a first threshold.

[0192] It should be noted that if the repeatability of any two offsets in the second direction is less than the preset threshold, it means that the offsets in the two determined second directions are accurate. Either 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 points of the first line segment and the second line segment, repeatedly calculating the offset of the tool head in the second direction, and calculating the repeatability of any two offsets until the repeatability of any two offsets is less than a preset threshold, the offset of the tool head in the second direction is calibrated based on any one of the two offsets with repeatability 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 and fourth line segments multiple times, repeatedly calculate the tool head offset in the first direction, and thus determine the repeatability accuracy of any two offsets. Based on the repeatability accuracy of the two offsets, the accurate tool head offset in the first direction can be determined for calibration. This improves the accuracy of offset measurement and offset calibration.

[0195] In summary, when measuring the offset of the tool head, the 3D printer controller first controls the tool head to print a first line segment and a second line segment that are parallel and non-collinear in a first direction on the printing platform. Then, a camera captures the first and second line segments, obtaining a first image corresponding to the first line segment and a second image corresponding to the second line segment. Finally, based on the first and second images, the offset of the tool head in a 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 to manually measuring the various features of the printed model, implementing this application can automatically measure the tool head offset, simplifying the operation and avoiding measurement errors caused by manual measurement, thus improving the measurement accuracy and computational efficiency of the tool head offset.

[0196] See Figure 8 , Figure 8 This is a block diagram illustrating the functional units of a controller provided in an embodiment of this application. The controller 800 is located in a 3D printer, which includes a tool head, a printing platform, and a camera. The tool head and the printing platform are movable 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] The 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, wherein the second direction is perpendicular to the first direction.

[0200] In some feasible implementations, the camera is connected to the tool head.

[0201] In some feasible implementations, in acquiring the first and second line segments using a camera to obtain the first and second images, the image acquisition unit 802 is specifically used for:

[0202] Based on the 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;

[0203] Based on the second target point, the second image is obtained by capturing the second line segment through the camera. 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; the second target point is the midpoint of the second line segment.

[0205] In some feasible implementations, the image acquisition unit 802 is also used to capture the first line segment and the second line segment again through the camera to obtain the first repeated image and the 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 configured to: obtain the repeating offset of the tool head in the second direction based on the first repeating image and the second repeating image;

[0207] The repeatability accuracy is obtained based on the offset and repeatability of the tool head in the second direction.

[0208] The offset of the tool head in the second direction is calibrated based on repeatability accuracy, tool head offset in the second direction, and repeatability offset.

[0209] In some feasible implementations, before the control tool head prints the first and second line segments on the printing platform, the control unit 801 is further configured to:

[0210] The control tool head prints the bottom surface on the printing platform, and prints the first and second line segments on the bottom surface.

[0211] In some feasible implementations, the tool head includes a first nozzle and a second nozzle, which switch between each other.

[0212] In controlling the tool head to print the first and second line segments on the printing platform, the control unit 801 is specifically used for:

[0213] The control tool head prints the first line segment on the printing platform using the first nozzle;

[0214] After the first line segment is printed, the control tool head is switched to print the second line segment on the printing platform using the 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, the control unit 801, in controlling the tool head to print the first and second line segments on the printing platform, is specifically used for:

[0217] Control the first nozzle to print the first bottom surface with the first color consumable, and control the tool head to switch to printing the second bottom surface with the second color consumable through the second nozzle;

[0218] Control the first nozzle to print a first line segment on the second bottom surface using a first color consumable, and control the tool head to switch to printing a second line segment on the first bottom surface using a second color consumable through the second nozzle;

[0219] Among them, one of the first-color consumables and the second-color consumables is a dark-colored consumable, and the other is a light-colored 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] The first nozzle is controlled to continuously dispense the first color consumable from the first preset starting point, and the tool head is controlled 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;

[0222] After the first line segment is printed, the control tool head moves so that the first nozzle stops discharging material at the first preset endpoint; the first preset endpoint is any point outside the first bottom surface and outside the second bottom surface, excluding the first preset starting point; the first line segment does not include the first preset starting point and the first preset endpoint.

[0223] In some feasible implementations, the control unit 801 is also 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 non-collinear in the second direction;

[0224] The image acquisition unit 802 is also used to acquire the third line segment and the fourth line segment through the camera to obtain the third image and the fourth image, wherein 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 also used to obtain the offset of the first nozzle and the second nozzle in a first direction based on the third image and the fourth image.

[0226] In some feasible implementations, the control unit 801, in controlling the tool head to print the third and fourth line segments on the printing platform, is specifically used for:

[0227] The control tool head prints the first and third line segments using the first nozzle;

[0228] After the first and third line segments are printed, the control tool head is switched to print the second and fourth line segments with the second nozzle.

[0229] In some feasible implementations, the control unit 801, in controlling the tool head to print the third and fourth line segments on the printing platform, is specifically used for:

[0230] Control the first nozzle to print the third bottom surface with the third color consumable, and control the tool head to switch to printing the fourth bottom surface with the fourth color consumable through the second nozzle;

[0231] Control the first nozzle to print the first line segment and the third line segment on the fourth bottom surface using the third color consumable, and control the tool head to switch to printing the second line segment and the fourth line segment on the third bottom surface using the fourth color consumable through the second nozzle;

[0232] Among them, either the third-color consumable or the fourth-color consumable is a dark-colored consumable, and the other consumable is a light-colored consumable.

[0233] In some feasible implementations, the control unit 801, in controlling the first nozzle to print the first and third line segments on the fourth bottom surface with the third color filament, is specifically used for:

[0234] The first nozzle is controlled to continuously dispense the third color consumable from the second preset starting point, and the tool head is controlled 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 and third line segments are printed, the control tool head moves so that the first nozzle stops discharging material at the second preset endpoint; the second preset endpoint is any point outside the third bottom surface and outside the fourth bottom surface, excluding the second preset starting point; neither the first nor the third line segment includes the second preset starting point nor the second preset endpoint.

[0236] In some feasible implementations, the camera is equipped with a supplementary light;

[0237] In acquiring first and second images by capturing first and second line segments through a camera, the image acquisition unit is specifically used for:

[0238] Illuminate the first and second line segments with supplementary lighting;

[0239] The first and second lines are captured by a camera to obtain a first image and a second image.

[0240] See Figure 9 , Figure 9 This is a functional block diagram of a 3D printer provided as an embodiment of this application. Figure 9As shown, the 3D printer 900 includes a controller 901, a printing platform 902, a tool head 903, and a camera 904. The tool head 903 and the printing platform 902 are movable relative to each other. The controller 901 includes a transceiver 9011, a processor 9012, and a memory 9013. They are connected to each other via a bus 9014. The memory 9013 is used to store computer programs and data, and can transfer the data stored in the memory 9013 to the processor 9012. The 3D printer 900 may include any of the 3D printers described in the embodiments above, and the controller 901 may include the controller or controller 800 described in any of the embodiments above.

[0241] Processor 9012 is used to read computer programs from memory 9013 and perform the following operations:

[0242] The control tool head prints 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 non-collinear in a first direction;

[0243] The camera captures a first line segment and a second line segment to obtain a first image and a second image. The first line segment corresponds to the first image, and the second line segment corresponds to the second image.

[0244] Based on the first and second images, the offset of the tool head in the second direction is obtained, which is perpendicular to the first direction.

[0245] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, a 3D printer includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0246] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the methods described in the above method embodiments.

[0247] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments.

[0248] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0249] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

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

[0251] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

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

[0253] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0254] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0255] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for determining the offset of a tool head, characterized in that, The method is applied to the controller of a 3D printer, wherein the tool head is disposed on the 3D printer, the 3D printer includes a printing platform and a camera, and the tool head is movable relative to the printing platform; the method includes: The tool head is controlled 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 non-collinear in a first direction; The camera captures the first line segment and the second line segment 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, wherein the second direction is perpendicular to the first direction; The tool head includes a first nozzle and a second nozzle, which switch between each other. The control of the tool head to print the first line segment and the second line segment on the printing platform includes: The tool head is controlled to print the first line segment on the printing platform using the first nozzle; After the first line segment is printed, the tool head is controlled to switch to print the second line segment on the printing platform with the second nozzle; Wherein, 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; The method of controlling the tool head to print the first line segment and the second line segment on the printing platform includes: The first nozzle is controlled to print the first bottom surface with the first color consumable, and the tool head is controlled to switch to printing 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 using the first color consumable, and control the tool head to switch to printing the second line segment on the first bottom surface using the second color consumable through the second nozzle.

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 through the camera to obtain the first image and the second image includes: Based on the 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 image is obtained by capturing the second line segment through the camera, 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 includes: 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. 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, the repeated offset of the tool head in the second direction is obtained; The repeatability accuracy is obtained based on the offset of the tool head in the second direction and the repeat offset; The offset of the tool head in the second direction is calibrated based on the repeatability accuracy, 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 the 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, One of the first-color consumables and the second-color consumables is a dark-colored consumable, and the other is a light-colored consumable.

8. The method according to claim 1, characterized in that, The control of the first nozzle to print the first line segment on the second bottom surface with the first color consumable includes: The first nozzle is controlled to continuously dispense the first color consumable from a first preset starting point, and the tool head is controlled 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 first line segment is printed, the tool head is controlled to move so that the first nozzle stops discharging material at the first preset endpoint; the first preset endpoint is any point outside the first bottom surface and outside the second bottom surface, excluding the first preset starting point; the first line segment does not include the first preset starting point and the first preset endpoint.

9. The method according to claim 1, characterized in that, The method further includes: The tool head is controlled 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 non-collinear in the second direction; The camera captures the third line segment and the fourth line segment 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 and fourth images, the offset of the first nozzle and the second nozzle in the first direction is obtained.

10. The method according to claim 9, characterized in that, The control of the tool head to print the third and fourth line segments on the printing platform includes: The tool head is controlled to print the first line segment and the third line segment using the first nozzle; After the first line segment and the third line segment are printed, the tool head is controlled to switch to print the second line segment and the fourth line segment with the second nozzle.

11. The method according to claim 9, characterized in that, The control of the tool head to print the third and fourth line segments on the printing platform includes: Control the first nozzle to print the third bottom surface with the third color consumable, and control the tool head to switch to printing the fourth bottom surface with the fourth color consumable through the second nozzle; The first nozzle is controlled to print the first line segment and the third line segment on the fourth bottom surface using the third color consumable, and the tool head is controlled to switch to printing the second line segment and the fourth line segment on the third bottom surface using the fourth color consumable through the second nozzle; Among them, either the third color consumable or the fourth color consumable is a dark-colored consumable, and the other consumable is a light-colored consumable.

12. The method according to claim 11, characterized in that, The control of 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: The first nozzle is controlled to continuously discharge the third color consumable from a second preset starting point, and the tool head is controlled 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 endpoint; the second preset endpoint is any point outside the third bottom surface and outside the fourth bottom surface, excluding 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 endpoint.

13. The method according to any one of claims 1-12, characterized in that, The camera is equipped with a fill light; The step of acquiring the first line segment and the second line segment through the camera to obtain the first image and the second image includes: The fill light illuminates the first line segment and the second line segment; The first image and the second image are obtained by capturing the illuminated first line segment and the second line segment through the camera.

14. A 3D printer, characterized in that, The 3D printer includes: a controller, a printing platform, a tool head, and a camera, wherein the tool head and the printing platform are movable relative to each other; the controller includes: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to cause the controller to perform the method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Nozzle calibration method and system of double-nozzle 3D printer

    CN111267340A

  • Method for determining printer properties of FFF printer

    CN114599504A