Method, apparatus, computer device, and storage medium for 3D printer

By automatically determining and performing the flush amount based on material color difference in 3D printers, the problem of nozzle residue after material switching in multi-color printing is solved, and the printing quality and efficiency are improved.

CN115214121BActive Publication Date: 2025-06-20SHANGHAI LUNKUO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210835226.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2025-06-20
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

During multi-color 3D printing, the remaining materials in the nozzle when the material is switched will cause the front and back materials to mix, affecting the appearance of the printed object.

Method used

By acquiring slice data associated with the three-dimensional model, the amount of erosion required for each material switching is determined, so that the nozzle extrudes the corresponding material in multiple erosion areas, and the remaining current material is washed away. The amount of flush is automatically determined based on the color difference between the current material and the next material.

Benefits of technology

It effectively avoids material mixing, improves the appearance quality of printed objects, saves materials and printing time, and reduces user trial and error costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115214121B_ABST
    Figure CN115214121B_ABST
Patent Text Reader

Abstract

A method for a 3D printer, an apparatus for a 3D printer, a computer device, a storage medium, and a program product are provided. The method includes: obtaining slice data associated with a three-dimensional model, wherein each multi-color slice includes a plurality of regions assigned respective different colors, and the plurality of regions will be printed by respective different materials having respective different colors; and for each multi-color slice, determining an amount of flushing required each time the nozzle of the 3D printer switches from the current color material to the next color material during movement along a planned path to print the multi-color slice, wherein the amount of flushing is determined such that after switching from the current color material to the next color material, the nozzle moves to a plurality of flushing zones on the planned path and extrudes a total amount of the next color material at the plurality of flushing zones to flush the current color material remaining in the nozzle, and wherein the amount of flushing is automatically determined based on a color difference between the current color and the next color.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of 3D printing technology, and in particular, to a method and apparatus for a 3D printer, a computer device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Fused Deposition Modeling (FDM) refers to a process in which a filamentous material such as a thermoplastic, wax, or metal is extruded from a heated nozzle, and the nozzle is moved along a pre-planned path to print a printed object corresponding to a digital three-dimensional model in a layer-by-layer manner.

[0003] Some FDM 3D printers on the market can achieve multi-material printing, and a common FDM 3D printer has a structure of "single nozzle and multiple inlets". During the printing process, when it is necessary to switch from material A to material B, the 3D printer first withdraws material A from the nozzle and then feeds material B into the nozzle. A problem that may be encountered during material switching is that there will still be a certain residue of material A in the nozzle, so that when extruding material B, the first long section of the extruded filament will be a mixture of material A and material B (also referred to as "transition material" in this article). This is particularly common in multi-color printing (material A and material B have different colors), and each section of the filament extruded after material switching is a mixed color of the colors of material A and material B. If the printing process is directly started after material switching, these mixed colors will be printed onto the printed object, affecting the appearance. Summary of the Invention

[0004] According to one aspect of the present disclosure, there is provided a method for a 3D printer, including: obtaining slice data associated with a three-dimensional model, the slice data describing multiple layers of slices stacked on top of each other and the planned path of the nozzle of the 3D printer when printing each layer of slices, the multiple layers of slices including at least one multi-color slice, each multi-color slice including multiple regions assigned corresponding different colors, and the multiple regions will be printed by multiple materials having corresponding different colors respectively; and for each multi-color slice, determining the flushing amount required each time the nozzle of the 3D printer switches from the current color material to the next color material during moving along the planned path to print the multi-color slice, the flushing amount being determined such that after switching from the current color material to the next color material, the nozzle moves to multiple flushing zones on the planned path and extrudes a total amount of the next color material equal to the flushing amount at the multiple flushing zones to flush the residual current color material in the nozzle, and the flushing amount is automatically determined based on the color difference between the current color and the next color

[0005] According to another aspect of the present disclosure, there is also provided an apparatus for a 3D printer, including: a first module configured to obtain slice data associated with a three-dimensional model, the slice data describing multiple layers of slices stacked on top of each other and the planned path of the nozzle of the 3D printer when printing each layer of slices, the multiple layers of slices including at least one multi-color slice, each multi-color slice including multiple regions assigned corresponding different colors, and the multiple regions will be printed by multiple materials with corresponding different colors respectively; and a second module configured to, for each multi-color slice, determine the flushing amount required each time the nozzle of the 3D printer switches from the current color material to the next color material during the movement along the planned path to print the multi-color slice, the flushing amount being determined such that after switching from the current color material to the next color material, the nozzle moves to multiple flushing zones on the planned path and extrudes a total amount of the next color material equal to the flushing amount at the multiple flushing zones to flush the residual current color material in the nozzle, and the flushing amount is automatically determined based on the color difference between the current color and the next color.

[0006] According to yet another aspect of the present disclosure, there is also provided a computer device, including: a processor; and a memory storing a computer program thereon, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0007] According to yet another aspect of the present disclosure, there is also provided a non-transitory computer-readable storage medium storing a computer program thereon, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0008] According to yet another aspect of the present disclosure, there is also provided a computer program product including a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0009] According to one or more embodiments of the present disclosure, for each material switch in multi-color printing, the required volume of transition material is automatically determined according to the different colors of the materials before and after the switch, without the user manually setting it in the slicing software, which can not only save materials and printing time, but also reduce the user's trial-and-error cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In the drawings, unless otherwise specified, the same reference numerals throughout the several views denote the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0011] Figure 1 A flowchart of a method for a 3D printer according to an embodiment of the present disclosure is shown;

[0012] Figure 2shows a flowchart of steps for determining the flushing amount in the method shown in Figure 1 ;

[0013] Figure 3 shows a flowchart of a method for 3D printing according to an embodiment of the present disclosure;

[0014] Figure 4 shows a flowchart of steps for allocating corresponding flushing amount shares of the flushing amount to a plurality of flushing zones in the method shown in Figure 3 ;

[0015] Figure 5 shows a flowchart of steps for allocating corresponding flushing amount shares to a plurality of flushing zones in the method shown in Figure 4 ;

[0016] Figure 6 shows a flowchart of steps for allocating corresponding flushing amount shares to a plurality of flushing zones in the method shown in Figure 4 ;

[0017] Figure 7 shows a schematic diagram of a device for a 3D printer according to an embodiment of the present disclosure; and

[0018] Figure 8 shows an example configuration of a computer device that can be used to implement the methods described herein. Detailed Description

[0019] In the following, only certain exemplary embodiments are briefly described. The drawings and the description are considered to be exemplary in nature and not restrictive. As used herein, the terms "flushing amount" and "printing amount" both refer to the amount of material extruded from the nozzle of a 3D printer and can thus be used interchangeably. It should be understood that such "flushing amount" or "printing amount" is a theoretical design value and there may be an error from the actual extrusion amount of the nozzle during the printing process. As used herein, the term "based on" should be interpreted as being at least partially based on.

[0020] Before introducing the embodiments of the present disclosure in detail, a brief introduction to 3D printing slicing software in the related art is first given. Slicing software is a kind of software that generates control codes (such as gcode) for controlling the processor of a 3D printer according to a digital three-dimensional model. Common slicing software on the market includes, for example, Ultimaker Cura and Prusa Slicer. These slicing software usually provide a graphical user interface, and users operate on the graphical user interface, such as loading model files, setting printing parameters, etc. Then, the slicing software slices the loaded three-dimensional model in STL, DAE or OBJ format to obtain slicing data, and converts the slicing data into a gcode code string. Generally speaking, the slicing process of slicing software includes the following steps:

[0021] Step 1: Model loading. Read in model data from the outside and convert the three-dimensional model into a combination of triangles represented by the internal data structure of the slicing software.

[0022] Step 2: Lamination. The so-called lamination is to intersect a three-dimensional model with an XY plane at a certain height interval to form a plurality of slices stacked on top of each other, and the distance between layers is called the layer height. Lamination is essentially a process of converting a 3D model into a series of 2D planes.

[0023] Step 3: Component division. After lamination, a stack of 2D planar graphics is obtained. Mark each layer of 2D planar graphics, marking the outer wall, inner wall, filling, upper and lower surfaces, support members, etc. The support members, like other components, can have outer walls, inner walls, filling, upper and lower surfaces.

[0024] Step 4: Path generation. In this step, plan the movement path of the nozzle in different components. Independent paths can be generated for each component, and the printing order of each component is determined.

[0025] Step 5: Gcode generation. After generating the path, it is necessary to translate the movement path of the nozzle into gcode code that can be executed by the processor of the 3D printer.

[0026] To solve the problem that the transitional material in multi-color printing affects the appearance of the printed object, a wiping tower has been introduced in the industry. After each material switch, the transitional material is first spit onto the wiping tower, and then the three-dimensional model is printed. However, there are still some problems in the use of the wiping tower:

[0027] Problem 1. When switching from material A to material B, how much material B needs to be flushed to flush out the remaining material A in the nozzle?

[0028] The existing method in the industry is for the user to set the flushing volume on the graphical user interface of the slicing software. However, it is difficult for the user to determine exactly how much flushing volume needs to be set for various different color combinations before and after the switch. If the flushing volume set by the default of the slicing software is used, usually more than half of the material is consumed on the wiping tower, resulting in material waste. Moreover, for some special color switches (such as switching from black to white), the default flushing volume is often not sufficient to flush the material before the switch cleanly.

[0029] Question 2. How to reasonably plan the use of transitional materials to reduce waste?

[0030] In order to make full use of transitional materials, solutions of printing transitional materials into the infill and printing them onto specified parts (usually non-appearance parts) have been proposed in the industry, but these solutions are restricted by certain conditions. For example, the 3D printing process generally requires printing the outer wall first and then the infill because if the infill is printed first, it will cause ghosting on the appearance of the printed object (the contact points between the infill and the outer wall protrude to the outer surface of the printed object). This restriction on the printing order will result in the transitional materials not being fully utilized. In addition, using transitional materials to print the infill and non-appearance parts may also cause the color of the transitional materials to be visually visible through the outer wall, especially if the color of the outer wall is relatively light.

[0031] Question 3. How to improve the printing stability of the wiping tower?

[0032] The wiping tower occupies a part of the build space of the 3D printer, making the entire build space not fully available for printing the target object. Therefore, a small wiping tower is desirable. However, a small wiping tower means that its bottom area is very small, so that the adhesion force between the bottom surface and the printing platform of the 3D printer is not sufficient to cope with the tangential moment that linearly increases with the increase in the height of the wiping tower, easily causing the wiping tower to shake or even tip over.

[0033] Embodiments of the present disclosure propose a method for a 3D printer that can alleviate, mitigate, or eliminate at least one of the various problems mentioned above.

[0034] The following will refer to Figure 1 to describe in detail the method for 3D printing according to the embodiments of the present disclosure. Figure 1 A flowchart of a method 100 for 3D printing according to an embodiment of the present disclosure is shown. The method 100 can be implemented by, for example, slicing software.

[0035] In step 101, slice data associated with a 3D model is obtained. The slice data describes multiple layers of slices stacked on top of each other and the planned path of the nozzle of a 3D printer when printing each layer of slices. The multiple layers of slices include at least one multi-color slice, and each multi-color slice includes multiple regions assigned corresponding different colors, and the multiple regions will be printed separately by multiple materials with corresponding different colors.

[0036] When printing a multi-color slice, after printing a color region of the layer of slices, the filament of the current color is withdrawn from the nozzle or extruder of the 3D printer, and the filament of the next color is changed in, and then the next color region of the layer of slices is continued to be printed.

[0037] In step 102, for each multi-color slice, determine the flushing amount required each time when switching from the current color material to the next color material during the movement of the nozzle of the 3D printer along the planned path to print the multi-color slice of this layer. The flushing amount is determined so that after switching from the current color material to the next color material, the nozzle moves to multiple flushing zones on the planned path and extrudes a total of the flushing amount of the next color material at the multiple flushing zones to flush the remaining current color material in the nozzle.

[0038] As will be described in detail below, the flushing amount is automatically determined based on the color difference between the current color and the next color. The inventors recognize that according to different color combinations before and after changing the material, the flushing required to flush the remaining previous color material in the nozzle is different. For example, the flushing amount of the white filament required when changing from black to white is different from the flushing amount of the black filament required when changing from black to white. Therefore, it is necessary to determine how much flushing amount of the next color filament is required to flush the remaining current color filament in the nozzle according to the color difference between the current color and the next color (Problem 1).

[0039] Figure 2 shows a flowchart of step 102 for determining the flushing amount in method 100 according to an embodiment of the present disclosure. Step 102 may include the following operations. Figure 1 In step 201, calculate the difference metric between the current color and the next color.

[0040] In step 202, determine the flushing amount based on the difference metric, and the flushing amount is positively correlated with the difference metric.

[0041]

[0042] ​It should be understood that there can be various different measurement criteria for the difference between two colors. Although some specific examples are described below, these examples should not be considered restrictive but illustrative. The common feature of these examples is that the flushing amount is determined based on the difference measurement between the current color and the next color, such that the flushing amount is positively correlated with the difference measurement. It is impossible and unnecessary for the present disclosure to enumerate all feasible implementation manners.

[0043] According to some embodiments, the difference measurement includes a luminance difference measurement between the luminance component of the current color in the first color space and the luminance component of the next color in the first color space, and a distance measurement between the current color and the next color in the second color space. When the luminance component of the next color is greater than the luminance component of the current color, the contribution of the luminance difference measurement to the flushing amount is greater than when the luminance component of the next color is less than the luminance component of the current color.

[0044] In one example, the first color space and the second color space can be any one of RGB, CMY, HSV, YUV, and HIS, and the first color space and the second color space can be the same or different color spaces. The inventors recognize that the visual tolerance of the human eye for dark colors (such as black) is higher than that for bright colors (such as white) or transitional colors (such as gray). Therefore, the flushing amount required to replace a bright-colored wire material with a dark-colored wire material is much less than the flushing amount required to replace a dark-colored wire material with a bright-colored wire material. For example, changing from a white wire material to a black wire material requires a flushing amount of 100 cubic millimeters, while changing from a black wire material to a white wire material requires a flushing amount of 400 cubic millimeters.

[0045] Two example methods for calculating the difference measurement between the current color and the next color and determining the flushing amount will be specifically described below.

[0046] Method 1 According to some embodiments, the first color space is the YUV color space, and the second color space is the HSV color space. Then, the calculation of the difference measurement between the current color and the next color includes: (1) the luminance difference measurement between the current color and the next color in the YUV color space; (2) the distance measurement between the current color and the next color in the HSV color space.

[0047] (1) In the YUV color space, the calculation of the luminance difference measurement can include:

[0048] · Calculate distY = abs(B.y - A.y), where distY represents the luminance difference between the next color and the current color in the YUV color space, B.y represents the luminance component of the next color in the YUV color space, A.y represents the luminance component of the current color in the YUV color space, and abs() is the absolute value function.

[0049] · Calculation lumiFlush is a measure of brightness difference, K1, K2, and m are calibration coefficients, and the value range of m is 0.5 to 0.9.

[0050] As mentioned above, since the human eye has a higher visual tolerance for dark colors compared to bright or transitional colors, the contribution of the brightness difference measure to the flushing amount when changing from a dark wire material to a bright wire material (A.y ≤ B.y) should be greater than the contribution of the brightness difference measure to the flushing amount when changing from a bright wire material to a dark wire material (A.y > B.y). Therefore, the value of K1 is greater than that of K2. In the example, the value range of K1 is 480 to 640, and the value range of K2 is 60 to 120.

[0051] (2) In the HSV color space, the calculation of the distance measure may include:

[0052] · Calculate the first distance representation d1 and the second distance representation d2 of the current color and the next color in the HSV color space.

[0053] There are three components in the HSV space: h (hue), s (saturation), and v (value). The three components of color A are A.h, A.s, and A.v, and the three components of color B are B.h, B.s, and B.v, where A.h ∈ [0, 2π), A.s ∈ [0, 1.0], A.v ∈ [0, 1.0], and B.h ∈ [0, 2π), B.s ∈ [0, 1.0], B.v ∈ [0, 1.0]. In one example, the first distance representation d1 and the second distance representation d2 of the current color and the next color in the HSV color space are calculated using the three components h, s, and v:

[0054] d1 = cos(A.h) * A.s * A.v - cos(B.h) * B.s * B.v

[0055] d2 = sin(A.h) * A.s * A.v - sin(B.h) * B.s * B.v

[0056] It can be understood that in the HSV color space, other forms of distance representation can also be adopted.

[0057] In one example, the following form of distance representation can be adopted: d = ||(A.v * A.s cos(A.h), A.v sin(A.h), A.v) - (B.v * B.s cos(B.h), B.v * B.s sin(B.h), B.v)||.

[0058] In another example, a distance representation of the following form can be adopted: d = ||(A.scos(A.h), A.ssin(A.h)) - (B.scos(B.h), A.ssin(B.h))||.

[0059] In another example, a distance representation of the following form can be adopted: d = ||A.h - B.h||.

[0060] In another example, a distance representation of the following form can be adopted: d = max(||(A.scos(A.h), A.ssin(A.h)) - (B.scos(B.h), A.ssin(B.h))||, |A.v - B.v|).

[0061] · Calculate

[0062] distHS represents the distance between the next color and the current color in the HSV color space. max() is a function to take the maximum value, min() is a function to take the minimum value. K3, K4, and K5 are calibration coefficients. The value range of K3 is 1 to 1.6. K4 and K5 are positive decimals and their sum is 1. A.v represents the lightness component of the current color in the HSV color space, and B.v represents the lightness component of the next color in the HSV color space.

[0063] · Calculate hsFlush = K6 * distHS. hsFlush is a distance metric, and K6 is a calibration coefficient with a value range of 200 to 250.

[0064] After obtaining the luminance difference metric lumiFlush and the distance metric hsFlush between the current color and the next color in the HSV color space, according to some embodiments, determining the flushing amount based on the difference metric includes calculating flushVolume is the flushing amount, and deg is a calibration coefficient with a value range of 90° to 150°.

[0065] According to some embodiments of Method 2, the first color space is the YUV color space, and the second color space is the HSV color space. Then, the calculation of the luminance difference metric includes: (1) the luminance difference metric between the current thread color and the next thread color in the YUV color space; (2) the distance metric between the current thread color and the next thread color in the HSV color space.

[0066] (1) In the YUV color space, the calculation of the luminance difference metric includes:

[0067] · Calculate lumiFactor1 = lumiB * K7 + K8, where lumiFactor1 is an adjustment factor related to the luminance component of the next color in the YUV color space, lumiB is the luminance component of the next color in the YUV color space, and K7 and K8 are calibration coefficients. The value range of K7 is 2 to 4, and the value range of K8 is 0.5 to 1.

[0068] · Calculate lumiFactor2 is an adjustment factor related to the luminance difference between the next color and the current color in the YUV color space, lumiA is the luminance component of the current color in the YUV color space, and K9 and n are calibration coefficients. The value range of K9 is 1 to 2, and the value range of n is 1 to 2. It should be understood that the value ranges of the luminance components lumiA and lumiB in the YUV color space are both 0 to 1.

[0069] As mentioned above, since the human eye has a higher visual tolerance for dark colors compared to bright or transitional colors, the contribution of the luminance difference metric to the flushing amount when replacing a dark thread material with a bright thread material (lumiB > lumiA) should be greater than the contribution of the luminance difference metric to the flushing amount when replacing a bright thread material with a dark thread material (lumiB ≤ lumiA). Therefore, when lumiB > lumiA, lumiFactor2 is set to a positive number, and when lumiB ≤ lumiA, lumiFactor2 is set to 0.

[0070] (2) In the HSV color space, the calculation of the distance metric includes:

[0071] · Calculate the first distance representation d1 and the second distance representation d2 of the current color and the next color in the HSV color space.

[0072] As mentioned above, in the HSV color space, various forms of distance representations can be adopted, which will not be elaborated here.

[0073] · Calculate dist12 represents the distance representation related to the first distance representation d1 and the second distance representation d2, K10 is a calibration coefficient, and its value range is 1 to 1.6, and max() is a function to take the maximum value.

[0074] · Calculate d3 = A.v - B.v, where d3 represents the lightness difference between the current color and the next color in the HSV color space, A.v represents the lightness component of the current color in the HSV color space, and B.v represents the lightness component of the next color in the HSV color space.

[0075] · Calculate colorDist is the distance metric.

[0076] According to some embodiments, determining the erosion amount based on the difference metric includes: calculating flushVolume = UNIT * (lumiFactor1 + lumiFactor2) * colorDist, where flushVolume is the erosion amount, UNIT is a calibration coefficient, and the value range of UNIT is 90 to 150.

[0077] According to some embodiments, the difference metric includes a luminance difference metric between the luminance component of the current color in the first color space and the luminance component of the next color in the first color space, and a chrominance difference metric between the chrominance component of the current color in the first color space and the chrominance component of the next color in the first color space. Since the human eye is more sensitive to the luminance component than the chrominance component, when determining the erosion amount, the luminance difference metric is given a greater weight than the chrominance difference metric.

[0078] In one example, the first color space can be any one of RGB, CMY, HSV, YUV, and HIS. Taking the first color space as the YUV color space as an example below, another example method for calculating the difference metric between the current color and the next color and determining the erosion amount is described.

[0079] According to some embodiments of Method 3, the first color space is the YUV color space, and the calculation of the luminance difference metric includes: (1) the luminance difference metric between the current color and the next color in the YUV color space; (2) the chrominance difference metric between the current color and the next color in the YUV color space.

[0080] (1) In the YUV color space, the calculation of the luminance difference metric includes:

[0081] · Calculate where colorFactor is the weight for the luminance difference metric, K11 and K12 are calibration coefficients, the value range of K11 is 1.2 to 2.5, the value range of K12 is 0.3 to 0.8, B.y represents the luminance component of the next color in the YUV color space, A.y represents the luminance component of the current color in the YUV color space, and max() is a function for taking the maximum value.

[0082] · Calculate flushY = colorFactor * log(abs(A.y - B.y) + 1), where flushY is the luminance difference metric, abs() is a function for taking the absolute value, and log() is a function for taking the logarithm.

[0083] Since the human eye is more sensitive to the Y component (luminance) than chrominance, when calculating flushY, the weight of the Y component is increased through the colorFactor coefficient.

[0084] (2) In the YUV color space, the calculation of the chromaticity difference metric includes:

[0085] · Calculate flushU = log(abs(A.u - B.u) + 1), where flushU is the difference metric of the U component between the current color and the next color in the YUV color space, A.u represents the U component of the current color in the YUV color space, and B.u represents the U component of the next color in the YUV color space.

[0086] · Calculate flushV = log(abs(colorA.v - colorB.v) + 1), where flushV is the difference metric of the V component between the current color and the next color in the YUV color space, colorA.v represents the V component of the current color in the YUV color space, and colorB.v represents the V component of the next color in the YUV color space.

[0087] After obtaining the luminance difference metric flushY, the difference metric flushU of the U component between the current color and the next color in the YUV color space, and the difference metric flushV of the V component between the current color and the next color in the YUV color space, according to some embodiments, determining the flushing amount based on the difference metrics includes: calculating flushVolume = volumFactor * max(flushY, flushU, flushV), where flushVolume is the flushing amount, volumFactor is a calibration coefficient, and the value range is 80 to 120.

[0088] Through the above example method, it is automatically determined how much new material is needed to flush the old material out of the nozzle each time the wire material is switched. Thereby, the problem of wire material color mixing caused by too small a flushing amount is prevented, the printing quality is improved, and at the same time, the problem of wire material waste caused by too large a flushing amount is prevented.

[0089] In order to better utilize the new material (transition material) used to flush the old material, the path of using the transition material can be planned to reduce waste (Problem 2).

[0090] The following will refer to Figure 3 A method for 3D printing according to an embodiment of the present disclosure will be described in detail. Figure 3 FIG. shows a flowchart of a method 300 for 3D printing according to an embodiment of the present disclosure. The method 300 can be implemented by, for example, slicing software.

[0091] In step 301, slice data associated with the three-dimensional model is obtained.

[0092] In step 302, for each multi-color slice of each layer, determine the flushing amount required each time the nozzle of the 3D printer switches from the current color material to the next color material during the movement along the planned path to print the multi-color slice of that layer.

[0093] Steps 301 - 302 are similar to Figure 1 the shown steps 101 - 102, so for the sake of brevity, they will not be elaborated here.

[0094] In step 303, for each material switch of each multi-color slice of each layer, allocate the corresponding flushing amount share of the flushing amount to a plurality of flushing zones. Step 303 will be described in combination with Figure 4 below.

[0095] In step 304, according to the slice data and the corresponding flushing amount shares allocated to the plurality of flushing zones for each material switch, determine the final planned path of each layer of slices and generate control codes, which can be executed by the processor of the 3D printer to control the nozzle to move along the final planned path and print multiple layers of slices layer by layer.

[0096] According to some embodiments, for each multi-color slice of each layer, the plurality of flushing zones include a first position set and at least one second position set. The first position set corresponds to a wiping tower to be constructed for wiping the nozzle, and the at least one second position set corresponds to at least one support member to be constructed for printing overhanging portions of the three-dimensional model.

[0097] Figure 4 shows a flowchart of step 303 of allocating the corresponding flushing amount share of the flushing amount to a plurality of flushing zones in Figure 3 the shown method 300 according to an embodiment of the present disclosure. Figure 4 The shown embodiment is used to extrude the transition material onto the wiping tower and use the transition material for printing the support members of the 3D model. Compared with using the transition material to print the infill, using the transition material to print the support members can bring greater benefits in many cases. For example, the printing process is not restricted by the printing order of printing the outer wall first and then the infill, nor will it cause the color of the transition material to be visually visible through the outer wall.

[0098] As Figure 4 shown, step 303 may include the following operations.

[0099] In step 401, obtain the flushing amount FlushVoume determined for this material switch.

[0100] Determine, by methods such as Method 1, Method 2, or Method 3 described above, how much volume of new material is required to flush the old material remaining in the nozzle.

[0101] In step 402, determine the total printing volume SupportVolume planned for printing at least a part of the support in the multi-color slice of this layer, and the cumulative printing volume FilledVolume that has been planned for printing at least a part of the support in the multi-color slice of this layer in each previous material change before this material change during the printing of the multi-color slice of this layer.

[0102] In step 403, based on the flushing volume FlushVoume, the total printing volume SupportVolume, and the cumulative printing volume FilledVolume, allocate corresponding flushing volume shares to multiple flushing zones.

[0103] Step 403 will be described in combination with Figure 5 and Figure 6 described in detail later.

[0104] Figure 5 shows a flowchart of step 403 for allocating corresponding flushing volume shares to multiple flushing zones in the method 400 shown in Figure 4 according to an embodiment of the present disclosure. Figure 5 The shown embodiment is used to extrude the transition material onto the wiping tower and use the transition material to print the support of the 3D model.

[0105] As Figure 5 shown, step 403 may include the following operations.

[0106] In step 501, by subtracting the cumulative printing volume FilledVolume from the total printing volume SupportVolume, determine the available flushing volume SupportAvailable that at least one support can bear for this material change.

[0107] SupportAvailable = SupportVolume - FilledVolume.

[0108] In step 502, set the flushing volume share FlushToSupport allocated to at least one support to be equal to the smaller of the difference obtained by subtracting the fixed flushing volume MinFlushToTower reserved for the wiping tower in each material change from the flushing volume FlushVolume and the available flushing volume SupportAvailable.

[0109] FlushToSupport = min(FlushVolume - MinFlushToTower, SupportAvailable).

[0110] In practice, since the material change process often causes overflow of material outside the nozzle and the molten material inside the nozzle is not full after the material change, it is necessary to extrude a certain volume of transitional material from the nozzle onto the wiping tower, so that the wiping tower wipes the nozzle clean and the molten material inside the nozzle becomes full. For this purpose, a fixed flushing volume reserved for the wiping tower, denoted as MinFlushToTower, needs to be set.

[0111] In step 503, the flushing volume share FlushToTower allocated to the wiping tower is set to be equal to the difference obtained by subtracting the flushing volume share FlushToSupport allocated to at least one support from the flushing volume FlushVoume.

[0112] FlushToTower = FlushVoume - FlushToSupport.

[0113] In an example, assume that there are 3 color regions on the planned path of the current multi-color slice: a white region, a black region, and a yellow region, and the printing order is the white region, the black region, and the yellow region in sequence. Assume that this layer of slice requires 300 cubic millimeters of transitional material to print the support (SupportVolume = 300), and the fixed flushing volume MinFlushToTower reserved for the wiping tower in each material change is 15 cubic millimeters.

[0114] When printing the white region, assume that the cumulative printed volume FilledVolume planned for the part of the support in this layer of multi-color slice is 0 cubic millimeters. Therefore, the available flushing volume SupportAvailable that the support can bear = SupportVolume - FilledVolume, which is equal to 300 cubic millimeters.

[0115] When changing the white wire material to the black wire material, assume that the flushing volume FlushVolume required to change from the white wire material to the black wire material is determined according to the method described above to be 100 cubic millimeters. Then, the available flushing volume SupportAvailable that the support can bear is equal to 300 cubic millimeters, and the difference obtained by subtracting the fixed flushing volume MinFlushToTower reserved for the wiping tower in each material change from the flushing volume FlushVolume is 85 cubic millimeters. Therefore, the flushing volume share FlushToSupport allocated to at least one support is the smaller of 300 cubic millimeters and 85 cubic millimeters, that is, 85 cubic millimeters, and the flushing volume share FlushToTower allocated to the wiping tower = FlushVoume - FlushToSupport, which is equal to 15 cubic millimeters.

[0116] When changing the black filament to a yellow filament, the cumulative print volume FilledVolume planned for printing the support part in the multi-color slice of this layer is 85 cubic millimeters. Therefore, the available flushing volume SupportAvailable that the support part can bear = SupportVolume - FilledVolume, which is equal to 215 cubic millimeters. Assuming that the flushing volume FlushVolume required to change from the black filament to the yellow filament is determined according to the method described above to be 250 cubic millimeters, then the available flushing volume SupportAvailable that the support part can bear is equal to 215 cubic millimeters, and the difference obtained by subtracting the fixed flushing volume MinFlushToTower reserved for the wiping tower in each material change from the flushing volume FlushVolume is 235 cubic millimeters. Therefore, the flushing volume share FlushToSupport allocated to at least one support part is the smaller of 215 cubic millimeters and 235 cubic millimeters, that is, 215 cubic millimeters, and the flushing volume share FlushToTower allocated to the wiping tower = FlushVoume - FlushToSupport, which is equal to 35 cubic millimeters.

[0117] At this time, the cumulative print volume FilledVolume planned for printing the support part in the multi-color slice of this layer is updated to 85 + 215 = 300 cubic millimeters, and the available flushing volume SupportAvailable that the support part can bear is equal to 0 cubic millimeters. It can be understood that in subsequent printing of this layer slice, if material change is still required, then the transitional material will all be squeezed onto the wiping tower.

[0118] According to some embodiments, for each multi-color slice of each layer, the plurality of flushing zones further include a third position set, and the third position set corresponds to a position directly above the waste inlet of the waste receiving container of the 3D printer. In such an embodiment, the 3D printer is equipped with a waste receiving container, and a part of the transitional material generated during the material change process will be extruded into the waste receiving container. This can reduce the occupied area of the wiping tower printed on the printing platform of the 3D printer, thereby increasing the actual available building space on the printing platform of the 3D printer.

[0119] Figure 6 Shows another embodiment according to the present disclosure in Figure 4 The flowchart of step 403 for allocating corresponding flushing volume shares to the plurality of flushing zones in the method 400 shown. Figure 6 The embodiment shown is used to squeeze the transitional material from the waste inlet into the waste receiving container, squeeze the transitional material onto the wiping tower, and use the transitional material to print the support part of the 3D model. As Figure 6 Shown, step 403 includes the following operations.

[0120] In step 601, the available flushing amount SupportAvailable that at least one support can bear for this material switch is determined by subtracting the cumulative printing amount FilledVolume from the total printing amount SupportVolume.

[0121] SupportAvailable = SupportVolume - FilledVolume.

[0122] In step 602, the flushing amount share FlushToSupport allocated to at least one support is set to be equal to the smaller of the difference obtained by subtracting the fixed flushing amount MinFlushToTower reserved for the wiping tower from the flushing amount FlushVolume and the available flushing amount SupportAvailable.

[0123] FlushToSupport = min(FlushVolume - MinFlushToTower, SupportAvailable).

[0124] Steps 601 - 602 are similar to Figure 5 steps 501 - 502 shown, so for the sake of brevity, they will not be elaborated here.

[0125] In step 603, the flushing amount share FlushToTower allocated to the wiping tower is set to be equal to the fixed flushing amount MinFlushToTower.

[0126] FlushToTower = MinFlushToTower.

[0127] In step 604, the flushing amount share FlushToWaste allocated to the waste receiving container is set to be equal to the difference obtained by subtracting the flushing amount share FlushToSupport allocated to at least one support and the fixed flushing amount from the flushing amount FlushVoume.

[0128] FlushToWaste = FlushVoume - FlushToSupport - MinFlushToTower.

[0129] In one example, assume that there are three color regions on the planned path of the current multi-color slice: a white region, a black region, and a yellow region, and the printing order is the white region, the black region, and the yellow region in sequence. Assume that this layer of the slice requires 300 cubic millimeters of transitional material to print the support (SupportVolume = 300), and the fixed flushing volume reserved for the wiping tower in each material change, MinFlushToTower, is 15 cubic millimeters.

[0130] When printing the white region, assume that the cumulative printed volume FilledVolume planned for the part of the support in this layer of the multi-color slice is 0 cubic millimeters. Therefore, the available flushing volume that the support can bear, SupportAvailable = SupportVolume - FilledVolume, is equal to 300 cubic millimeters.

[0131] When changing the white wire material to the black wire material, assume that the flushing volume FlushVolume required to change from the white wire material to the black wire material is determined to be 100 cubic millimeters according to the method described above. Then, the available flushing volume that the support can bear, SupportAvailable, is equal to 300 cubic millimeters, and the difference between the flushing volume FlushVolume and the fixed flushing volume MinFlushToTower reserved for the wiping tower in each material change is 85 cubic millimeters. Therefore, the flushing volume share FlushToSupport allocated to at least one support is the smaller of 300 cubic millimeters and 85 cubic millimeters, that is, 85 cubic millimeters, and the flushing volume share allocated to the wiping tower is the fixed flushing volume MinFlushToTower, equal to 15 cubic millimeters. The flushing volume share FlushToWaste allocated to the waste receiving container = FlushVoume - FlushToSupport - MinFlushToTower, which is equal to 0. That is, no transitional material will be squeezed into the waste receiving container.

[0132] When changing the black filament to a yellow filament, the cumulative print volume FilledVolume planned for printing the support part in the multi-color slice of this layer is 85 cubic millimeters. Therefore, the available flushing volume SupportAvailable that the support can bear = SupportVolume - FilledVolume, which is equal to 215 cubic millimeters. Assuming that the flushing volume FlushVolume required to change from the black filament to the yellow filament is determined to be 250 cubic millimeters according to the method described above, then the available flushing volume SupportAvailable that the support can bear is equal to 215 cubic millimeters, and the difference obtained by subtracting the fixed flushing volume MinFlushToTower reserved for the wiping tower in each material change from the flushing volume FlushVolume is 235 cubic millimeters. Therefore, the flushing volume share FlushToSupport allocated to at least one support is the smaller of 215 cubic millimeters and 235 cubic millimeters, that is, 215 cubic millimeters, and the flushing volume share FlushToTower allocated to the wiping tower is the fixed flushing volume MinFlushToTower, which is equal to 15 cubic millimeters. The flushing volume share FlushToWaste allocated to the waste receiving container = FlushVoume - FlushToSupport - MinFlushToTower, which is equal to 20 cubic millimeters.

[0133] At this time, the cumulative print volume FilledVolume planned for printing the support part in the multi-color slice of this layer is updated to 85 + 215 = 300 cubic millimeters, and the available flushing volume SupportAvailable that the support can bear is equal to 0 cubic millimeters. It can be understood that in subsequent printing of this layer slice, if material change is still required, then 15 cubic millimeters of the transitional material will be squeezed onto the wiping tower, and the rest of the transitional material will be squeezed into the waste receiving container.

[0134] In actual printing, the print head (on which a nozzle is installed) first moves to the waste receiver and extrudes a part of the transitional material (if necessary), then moves above the wiping tower to squeeze a part of the transitional material onto the wiping tower, and finally uses the remaining transitional material to print the support for supporting the printed object. It will be understood that if the flushing volume share FlushToWaste allocated to the waste receiving container is 0, then the path segment that makes the print head move directly above the waste inlet of the waste receiving container can be excluded from the final planned path determined for this layer slice. In this way, unnecessary movement of the print head can be avoided, thereby saving printing time.

[0135] In practice, as the printing process progresses, the wiping tower also continuously rises, which brings the problem of how to improve the stability of the wiping tower (Problem 3). To this end, it is necessary to reasonably plan the shape and size of the wiping tower, that is, to plan the path of the print head when printing each layer slice of the wiping tower, so that the wiping tower occupies a smaller surface area of the printing platform while maintaining the structural stability.

[0136] According to some embodiments, the wiping tower is a columnar body with a square horizontal cross-section. The wiping tower has a height H. Determining the final planned path of each layer slice includes: determining the movement path of the nozzle when printing the wiping tower so that the wiping tower is printed to have a bottom side length edgeLen, and the bottom side length edgeLen satisfies:

[0137] H = factor * edgeLen 4 ,

[0138] where factor is a calibration coefficient, and its value range is 0.02 to 0.05.

[0139] It can be understood that the wiping tower can be not only a cube but also a cuboid.

[0140] According to some embodiments, the wiping tower is a columnar body with a rectangular horizontal cross-section. The wiping tower has a height H. Determining the final planned path of each layer slice includes: determining the movement path of the nozzle when printing the wiping tower so that the wiping tower is printed to have a width width and a depth depth, and the width width and the depth depth satisfy:

[0141] H = factorX * width 3 * depth

[0142] H = factorY * width * depth 3

[0143] where factorX and factorY are calibration coefficients. The value range of factorX is 0.02 to 0.05, and the value range of factorY is 0.02 to 0.05.

[0144] In one example, width can be set as a constant, and at the same time, the calibration coefficient factorX corresponding to width is set to determine the value of depth accordingly.

[0145] In another example, depth can be set as a constant, and at the same time, the calibration coefficient factorY corresponding to depth is set to determine the value of depth accordingly.

[0146] In another example, width and depth can be set to have a certain ratio. For example, the ratio of width to depth is 2, and the values of width and depth can be solved.

[0147] In practice, the swaying of the material scraping tower can also be reduced by adding reinforcement attachments (such as skirts) at the bottom of the material scraping tower. However, the inventor found through experiments that the reinforcement effect of the skirt is not very ideal. When occupying the same area of the hot bed, compared with adding a skirt, adding a chamfer can greatly improve the stability of the material scraping tower.

[0148] According to some embodiments, determining the final planned path of each layer of slices includes: determining the movement path of the nozzle when printing the material scraping tower, so that the material scraping tower is printed to include a body part and a chamfer part surrounding the bottom of the body part, and the size of the horizontal cross-section of the chamfer part decreases with the increase of height to zero.

[0149] By planning the movement path of the nozzle when printing the material scraping tower, a material scraping tower with the desired shape and size can be printed, thereby alleviating or solving Problem 3. Thus, not only can the area on the printing platform that can actually be used to place printed objects be increased, but also the probability of printing failure caused by the instability or collapse of the material scraping tower can be reduced.

[0150] The present disclosure also provides a device 700 for 3D printing. Figure 7 The schematic diagram of the device 700 for 3D printing according to an embodiment of the present disclosure is shown. The device 700 includes a first module 710 and a second module 720.

[0151] The first module 710 is configured to obtain slice data associated with a three-dimensional model. The slice data describes multiple layers of slices stacked on top of each other and the planned path of the nozzle of the 3D printer when printing each layer of slices. The multiple layers of slices include at least one multi-color slice, and each multi-color slice includes multiple regions assigned corresponding different colors, and the multiple regions will be printed by multiple materials with corresponding different colors respectively.

[0152] The second module 720 is configured to, for each multi-color slice, determine the flushing amount required each time the nozzle of the 3D printer switches from the current color material to the next color material during the movement along the planned path to print the multi-color slice. The flushing amount is determined so that after switching from the current color material to the next color material, the nozzle moves to multiple flushing zones on the planned path and extrudes a total amount of the next color material equal to the flushing amount at the multiple flushing zones to flush the residual current color material in the nozzle. The flushing amount is automatically determined based on the color difference between the current color and the next color.

[0153] It should be understood, Figure 7Each module of the apparatus 700 shown in the figure may correspond to each step in the method described with reference to Figures 1-6 Accordingly, the operations, features, and advantages described above for the method embodiments are equally applicable to the apparatus 700 and the modules included therein. For the sake of brevity, some operations, features, and advantages are not described herein again.

[0154] Although specific functions have been discussed above with reference to specific modules, it should be noted that the functions of the various modules discussed herein can be divided into multiple modules, and / or at least some of the functions of multiple modules can be combined into a single module. The actions performed by a specific module discussed herein include the specific module itself performing the action, or alternatively the specific module invoking or otherwise accessing another component or module that performs the action (or performs the action in combination with the specific module). Thus, a specific module that performs an action may include the specific module itself that performs the action and / or another module that the specific module invokes or otherwise accesses and that performs the action.

[0155] According to one aspect of the present disclosure, there is provided a computer device, which includes a memory, a processor, and a computer program stored on the memory. The processor is configured to execute the computer program to implement the steps of any one of the method embodiments described above.

[0156] According to one aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of any one of the method embodiments described above.

[0157] According to one aspect of the present disclosure, there is provided a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of any one of the method embodiments described above.

[0158] Hereinafter, illustrative examples of such computer devices, non-transitory computer-readable storage media, and computer program products will be described in conjunction with Figure 8 the description.

[0159] Figure 8FIG. 0 shows an example configuration of a computer device 800 that can be used to implement the methods described herein. The computer device 800 can be a variety of different types of devices, such as a server of a service provider, a device associated with a client (e.g., a client device), a system-on-chip, and / or any other suitable computer device or computing system. Examples of the computer device 800 include, but are not limited to: desktop computers, server computers, laptop or netbook computers, mobile devices (e.g., tablets, cellular or other wireless phones (e.g., smartphones), notepad computers, mobile stations), wearable devices (e.g., glasses, watches), entertainment devices (e.g., entertainment appliances, set-top boxes communicatively coupled to a display device, gaming consoles), televisions or other display devices, automotive computers, and so on. Thus, the scope of the computer device 800 can range from full-resource devices with substantial memory and processor resources (e.g., personal computers, gaming consoles) to low-resource devices with limited memory and / or processing resources (e.g., traditional set-top boxes, handheld gaming consoles).

[0160] The computer device 800 can include at least one processor 802, a memory 804, one or more communication interfaces 806, a display device 808, other input / output (I / O) devices 810, and one or more mass storage devices 812 that can communicate with each other, such as via a system bus 814 or other suitable connections.

[0161] The processor 802 can be a single processing unit or multiple processing units, and all processing units can include a single or multiple computing units or multiple cores. The processor 802 can be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and / or any device that manipulates signals based on operation instructions. Among other capabilities, the processor 802 can be configured to obtain and execute computer-readable instructions stored in the memory 804, the mass storage device 812, or other computer-readable media, such as program code of an operating system 816, program code of an application 818, program code of other programs 820, and so on.

[0162] Memory 804 and mass storage device 812 are examples of computer-readable storage media for storing instructions that are executed by processor 802 to implement the various functions described above. For example, memory 804 generally can include both volatile and non-volatile memory (e.g., RAM, ROM, etc.). In addition, mass storage device 812 generally can include a hard disk drive, a solid state drive, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CD, DVD), storage arrays, network attached storage, storage area network, and the like. Memory 804 and mass storage device 812 can both be collectively referred to herein as memory or computer-readable storage media, and can be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code that can be executed by processor 802 as a particular machine configured to implement the operations and functions described in the examples herein.

[0163] Multiple program modules can be stored on mass storage device 812. These programs include operating system 816, one or more application programs 818, other programs 820, and program data 822, and they can be loaded into memory 804 for execution. Examples of such application programs or program modules can include, for example, computer program logic (e.g., computer program code or instructions) for implementing the following components / functions: acquisition unit 810, identification unit 820, determination unit 830, slicing unit 840, merging unit 850, generation unit 860, method 200 and / or method 500, 700, and / or other embodiments described herein.

[0164] Although illustrated as being stored in memory 804 of computer device 800 in Figure 8 , module 816, 818, 820, and 822 or portions thereof can be implemented using any form of computer-readable medium accessible by computer device 800. As used herein, "computer-readable medium" includes at least two types of computer-readable media, namely computer storage media and communication media.

[0165] Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD), or other optical storage devices, magnetic cassettes, tapes, magnetic disk storage devices or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computer device.

[0166] In contrast, a communication medium can embody computer-readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism. The computer storage media as defined herein do not include a communication medium.

[0167] Computer device 800 may also include one or more communication interfaces 806 for exchanging data with other devices, such as over a network, a direct connection, etc., as discussed previously. Such communication interfaces can be one or more of the following: any type of network interface (e.g., network interface card (NIC)), wired or wireless (such as IEEE802.11 wireless LAN (WLAN)) wireless interface, Worldwide Interoperability for Microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, BluetoothTM interface, Near Field Communication (NFC) interface, etc. Communication interface 806 can facilitate communication within a variety of network and protocol types, including wired networks (e.g., LAN, cable, etc.) and wireless networks (e.g., WLAN, cellular, satellite, etc.), the Internet, etc. Communication interface 806 can also provide communication with external storage devices (not shown) such as in storage arrays, network-attached storage, storage area networks, etc.

[0168] In some examples, a display device 808, such as a monitor, can be included to display information and images to a user. Other I / O devices 810 can be devices that receive various inputs from a user and provide various outputs to the user, and can include touch input devices, gesture input devices, cameras, keyboards, remote controls, mice, printers, audio input / output devices, etc.

[0169] It should be understood that the various forms of the flow shown above can be reordered, added to, or steps deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and no limitation is made herein.

[0170] It should be understood that in this specification, terms such as "center", "longitudinal", "lateral", "length", "width", "story height", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate the orientation or positional relationship or dimensions based on the orientation or positional relationship or dimensions shown in the drawings. The use of these terms is only for the convenience of description and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation on the protection scope of the present disclosure.

[0171] In addition, terms such as "first", "second", "third", etc. are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", "third" may explicitly or implicitly include one or more of such features. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless otherwise specifically defined.

[0172] In the present disclosure, unless otherwise clearly specified and limited, terms such as "mounted", "connected", "coupled", "fixed", etc. should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection, an electrical connection, or a communication connection; it may be directly connected, or indirectly connected through an intermediate medium, and may be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.

[0173] In the present disclosure, unless otherwise clearly specified and limited, the first feature being "on" or "under" the second feature may include the first and second features being in direct contact, or may include the first and second features not being in direct contact but being in contact through additional features therebetween. Moreover, the first feature being "above", "over" and "on top of" the second feature includes the first feature being directly above and obliquely above the second feature, or merely indicating that the first feature has a higher horizontal height than the second feature. The first feature being "under", "beneath" and "underneath" the second feature includes the first feature being directly below and obliquely below the second feature, or merely indicating that the first feature has a lower horizontal height than the second feature.

[0174] This specification provides many different embodiments or examples that can be used to implement the present disclosure. It should be understood that these different embodiments or examples are entirely exemplary and are not used to limit the protection scope of the present disclosure in any way. Therefore, the protection scope of the present disclosure should be subject to the protection scope defined by the appended claims.

Claims

1. A method for a 3D printer, comprising: Obtain slice data associated with a 3D model, where the slice data describes multiple layers of slices stacked on top of each other and the planned paths of the nozzles of the 3D printer when printing each layer of slices. The multiple layers of slices include at least one multi-color slice, and each multi-color slice includes multiple regions assigned corresponding different colors, and the multiple regions will be printed by multiple materials with corresponding different colors respectively; and For each multi-color slice, determine the flushing amount required each time the nozzle of the 3D printer switches from the current color material to the next color material during the movement along the planned path to print the multi-color slice. The flushing amount is determined such that after switching from the current color material to the next color material, the nozzle moves to multiple flushing zones on the planned path and extrudes a total of the flushing amount of the next color material at the multiple flushing zones to flush the remaining current color material in the nozzle. The flushing amount is automatically determined based on the difference metric between the current color and the next color, and the difference metric includes: The brightness difference metric between the brightness component of the current color in the first color space and the brightness component of the next color in the first color space, and the distance metric between the current color and the next color in the second color space; or The brightness difference metric between the brightness component of the current color in the first color space and the brightness component of the next color in the first color space, and the chromaticity difference metric between the chromaticity component of the current color in the first color space and the chromaticity component of the next color in the first color space.

2. The method according to claim 1, wherein, Determining the flushing amount includes: Calculating the difference metric between the current color and the next color; and Determining the flushing amount based on the difference metric, where the flushing amount is positively correlated with the difference metric.

3. The method according to claim 2, wherein, In response to the difference metric including: the brightness difference metric between the brightness component of the current color in the first color space and the brightness component of the next color in the first color space, and the distance metric between the current color and the next color in the second color space: When the brightness component of the next color is greater than the brightness component of the current color, the contribution of the brightness difference metric to the flushing amount is greater than when the brightness component of the next color is less than the brightness component of the current color.

4. The method according to claim 3, wherein, The first color space is the YUV color space, and the second color space is the HSV color space, where the calculation of the brightness difference metric includes: Calculation , where represents the luminance difference between the next color and the current color in the YUV color space, represents the luminance component of the next color in the YUV color space, represents the luminance component of the current color in the YUV color space, is a function for taking the absolute value; and Calculation , where is the luminance difference metric, , and are calibration coefficients, ranges from 480 to 640, ranges from 60 to 120, ranges from 0.5 to 0.9, and Where the calculation of the distance metric includes: Calculate a first distance representation of the current color and the next color in the HSV color space and a second distance representation ; Calculation , where represents the distance between the next color and the current color in the HSV color space, is a function for taking the maximum value, is a function for taking the minimum value, K3, K4, and K5 are calibration coefficients, the value range of K3 is 1 to 1.6, K4 and K5 are positive decimals and the sum of the two is 1, represents the lightness component of the current color in the HSV color space, represents the lightness component of the next color in the HSV color space; and Calculation , where is the distance metric, and K6 is a calibration coefficient with a value range of 200 to 250.

5. The method according to claim 4, wherein, Determining the flushing amount based on the difference metric includes: Calculation , where is the scouring amount is the calibration coefficient, and the value range is 90° to 150°.

6. The method according to claim 3, wherein, The first color space is the YUV color space, and the second color space is the HSV color space, where the calculation of the brightness difference metric includes: Calculation , where is an adjustment factor related to the luminance component of the next color in the YUV color space, is the luminance component of the next color in the YUV color space, and are calibration coefficients, has a value range of 2 to 4, has a value range of 0.5 to 1; and Calculation , where is an adjustment factor related to the luminance difference between the next color and the current color in the YUV color space, is the luminance component of the current color in the YUV color space, and are calibration coefficients, ranges from 1 to 2, ranges from 1 to 2, and Where the calculation of the distance metric includes: Calculate a first distance representation of the current color and the next color in the HSV color space and a second distance representation ; Calculation , wherein represents the distance representation related to the first distance representation and the second distance representation , is a calibration coefficient, and its value range is 1 to 1.6, is a function for taking the maximum value; Calculation , where represents the lightness difference between the current color and the next color in the HSV color space, represents the lightness component of the current color in the HSV color space, represents the lightness component of the next color in the HSV color space; and Calculation , wherein is the distance metric.

7. The method according to claim 6, wherein, Determining the flushing amount based on the difference metric includes: Calculation , where is the scouring amount is the calibration coefficient, and its value range is 90 - 150 8. The method according to claim 2, wherein, In response to the difference metric including: the luminance difference metric between the luminance component of the current color in the first color space and the luminance component of the next color in the first color space, and the chrominance difference metric between the chrominance component of the current color in the first color space and the chrominance component of the next color in the first color space: When determining the flushing amount, the luminance difference metric is given a greater weight than the weight of the chrominance difference metric.

9. The method according to claim 8, wherein, The first color space is the YUV color space, wherein the calculation of the luminance difference metric includes: Calculation , where is the weight for the luminance difference metric, and are calibration coefficients, has a value range of 1.2 to 2.5, has a value range of 0.3 to 0.8, represents the luminance component of the next color in the YUV color space, represents the luminance component of the current color in the YUV color space, is the function to take the maximum value; and Calculation , wherein is the luminance difference metric, is the absolute value function, is the logarithmic function, and Wherein the calculation of the chrominance difference metric includes: Calculation , wherein is the difference metric of the U component of the current color and the next color in the YUV color space, represents the U component of the current color in the YUV color space, represents the U component of the next color in the YUV color space; and Calculation , where is the difference metric of the V component of the current color and the next color in the YUV color space, represents the V component of the current color in the YUV color space, represents the V component of the next color in the YUV color space.

10. The method according to claim 9, wherein, Determining the flushing amount based on the difference metric includes: Calculation , where is the scouring amount is the calibration coefficient, and its value range is 80 - 120 11. The method according to any one of claims 1 - 10, further comprising: For each material change of each multi-color slice of each layer, allocating the corresponding flushing amount share of the flushing amount to the plurality of flushing zones; And According to the slice data and the corresponding flushing amount shares allocated to the plurality of flushing zones for each material change, determining the final planned path of each layer of slices and generating control codes, which can be executed by the processor of the 3D printer to control the nozzle to move along the final planned path and print the multi-layer slices layer by layer.

12. The method according to claim 11, wherein, For each multi-color slice of each layer, the plurality of flushing zones include a first set of positions and at least one second set of positions. The first set of positions corresponds to a wiping tower to be constructed for wiping the nozzle, and the at least one second set of positions corresponds to at least one support to be constructed for printing the overhanging part of the three-dimensional model. And wherein, for each material change of each multi-color slice of each layer, allocating the corresponding flushing amount share of the flushing amount to the plurality of flushing zones includes: Obtaining the flushing amount determined for this material change; Determining the total printing amount planned for printing the part of the at least one support in this multi-color slice of this layer and the cumulative printing amount that has been planned for printing the part of the at least one support in this multi-color slice of this layer in each previous material change before this material change during the printing of this multi-color slice of this layer; and Based on the flushing amount, the total printing amount, and the cumulative printing amount, allocating the corresponding flushing amount shares to the plurality of flushing zones.

13. The method according to claim 12, wherein, Based on the flushing amount, the total printing amount, and the cumulative printing amount, allocating the corresponding flushing amount shares to the plurality of flushing zones includes: By subtracting the cumulative printing amount from the total printing amount, determining the available flushing amount that the at least one support can bear for this material change; Setting the flushing amount share allocated to the at least one support to be equal to the smaller of the difference obtained by subtracting the fixed flushing amount reserved for the wiping tower in each material change from the flushing amount and the available flushing amount; and Setting the flushing amount share allocated to the wiping tower to be equal to the difference obtained by subtracting the flushing amount share allocated to the at least one support from the flushing amount.

14. The method according to claim 12, wherein, For each multi-color slice layer, the plurality of flushing zones further include a third position set corresponding to a position directly above the waste inlet of the waste receiving container of the 3D printer, and wherein, based on the flushing amount, the total printing amount, and the cumulative printing amount, allocating corresponding flushing amount shares to the plurality of flushing zones includes: Determining, by subtracting the cumulative printing amount from the total printing amount, the available flushing amount that the at least one support can bear for this material change; Setting the flushing amount share allocated to the at least one support to be equal to the smaller of the difference obtained by subtracting the fixed flushing amount reserved for the wiping tower in each material change from the flushing amount and the available flushing amount; Setting the flushing amount share allocated to the wiping tower to be equal to the fixed flushing amount; and Setting the flushing amount share allocated to the waste receiving container to be equal to the difference obtained by subtracting the flushing amount share allocated to the at least one support and the fixed flushing amount from the flushing amount.

15. The method according to claim 12, wherein, The abrasive tower is a columnar body with a square horizontal cross-section, and the abrasive tower has a height , and wherein determining the final planned path for each layer of slices includes: Determine the movement path of the nozzle when printing the abrasive tower so that the abrasive tower is printed to have a bottom side length , and the bottom side length satisfies , where is a calibration coefficient, and its value range is 0.02 to 0.

05.

16. The method according to claim 12, wherein, The abrasive tower is a columnar body with a rectangular horizontal cross-section, and the abrasive tower has a height , and wherein determining the final planned path for each layer of slices includes: Determine the movement path of the nozzle when printing the abrasive tower so that the abrasive tower is printed to have a width width and a depth depth, where the width width and the depth depth satisfy and , where and are calibration coefficients, has a value range of 0.02 to 0.05, has a value range of 0.02 to 0.

05.

17. The method according to claim 12, wherein, Determining the final planned path for each slice layer includes: Determining the movement path of the nozzle when printing the wiping tower such that the wiping tower is printed to include a body portion and a chamfer portion surrounding the bottom of the body portion, and the size of the horizontal cross-section of the chamfer portion decreases to zero as the height increases.

18. An apparatus for a 3D printer, comprising: A first module for obtaining slice data associated with a three-dimensional model, wherein the slice data describes multiple layers of slices stacked on top of each other and the planned path of the nozzle of the 3D printer when printing each slice layer, and wherein the multiple layers of slices include at least one multi-color slice layer, and each multi-color slice layer includes a plurality of regions assigned corresponding different colors, and the plurality of regions will be printed by multiple materials with corresponding different colors respectively; and A second module for, for each multi-color slice layer, determining the flushing amount required each time the nozzle of the 3D printer switches from the current color material to the next color material during moving along the planned path to print the multi-color slice layer, wherein the flushing amount is determined such that after switching from the current color material to the next color material, the nozzle moves to a plurality of flushing zones on the planned path and extrudes a total of the flushing amount of the next color material at the plurality of flushing zones to flush the remaining current color material in the nozzle, and wherein the flushing amount is automatically determined based on a difference metric between the current color and the next color, and the difference metric includes: A brightness difference metric between the brightness component of the current color in a first color space and the brightness component of the next color in the first color space; and a distance metric between the current color and the next color in a second color space; or A brightness difference metric between the brightness component of the current color in a first color space and the brightness component of the next color in the first color space; and a chromaticity difference metric between the chromaticity component of the current color in the first color space and the chromaticity component of the next color in the first color space.

19. A computer device, comprising: A processor; And A memory on which a computer program is stored, wherein the computer program, when executed by the processor, implements the steps of the method according to any one of claims 1 to 17.

20. A non-transitory computer-readable storage medium storing a computer program thereon, wherein, The computer program, when executed by the processor, implements the steps of the method according to any one of claims 1 to 17.

21. A computer program product, comprising a computer program, wherein, The computer program, when executed by the processor, implements the steps of the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Fabricating full color three-dimensional objects

    CN106103054A

  • Multi-color 3D printing method, printer, printing equipment and computer storage medium

    CN113787707A