Path planning method for multi-color printing, and 3D printer, device and storage medium

By calculating and planning the waste value and flushing volume during 3D printer filament switching, the printing path is optimized, solving the problem of filament waste, improving filament utilization, and reducing 3D printing costs.

WO2025247139A1PCT designated stage Publication Date: 2025-12-04SHENZHEN CREALITY 3D TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/097102
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-27
Filing Date
2025-05-26
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Existing 3D printers suffer from significant filament waste when switching filaments, especially when residual filament in the nozzle cavity causes color contamination. Current solutions clean the filament by extruding mixed filament, but this method wastes a lot of filament.

Method used

By acquiring the color information of the printed model, the waste value when switching between different colors of consumables is calculated. Based on the preset height and color information, the model is sliced, and the outline information and printing path of the sliced ​​layer are obtained. The flushing volume and waste value when switching consumables are planned, and the printing path is optimized to reduce consumable waste.

Benefits of technology

It enables waste planning during material switching, reduces material waste, improves material utilization, and lowers 3D printing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025097102_04122025_PF_FP_ABST
    Figure CN2025097102_04122025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a path planning method for multi-color printing, and a 3D printer, a device and a medium. The path planning method for multi-color printing provided in the present application comprises: acquiring color information corresponding to a printing model, wherein the printing model has at least two colors, and calculating a waste value corresponding to switching between filaments of two different colors; slicing the printing model on the basis of a preset height and the color information, so as to obtain contour information of a plurality of slice layers; on the basis of the contour information, acquiring a first printing path of each slice layer; for a slice layer having two or more colors, on the basis of the corresponding first printing path, acquiring a flushing volume corresponding to switching between filaments of two different colors within the contour of the corresponding slice layer; and for the slice layer having two or more colors, on the basis of the flushing volume and the waste value, determining a plan for the waste value, so as to obtain a second printing path.
Need to check novelty before this filing date? Find Prior Art

Description

Path planning methods for multicolor printing, 3D printers, equipment and storage media

[0001] This application claims priority to Chinese Patent Application No. 202410667394.X, filed on May 27, 2024, entitled "Path planning method for multicolor printing, 3D printer, device and storage medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of 3D printing technology, specifically to a path planning method for multi-color printing, a 3D printer, equipment, and storage medium. Background Technology

[0003] Fused deposition modeling (FDM) processes extrude filamentary material from heated nozzles and move the nozzles along a pre-planned path to print objects corresponding to digital 3D models layer by layer.

[0004] Some 3D printers on the market can print with multiple materials. Common 3D printers have a single nozzle with multiple feed inlets. The material changing process involves retracting the previous color filament and then switching to a different color. Because residual filament from the previous color remains in the nozzle cavity, the printing color of the current color can be contaminated. Existing 3D printing solutions can clean the previous color filament by extruding the mixed-color filament through a washing tower after switching filaments, until the filament output is entirely the other color. However, this method wastes a significant amount of filament. Summary of the Invention

[0005] In view of this, this application provides a path planning method for multicolor printing, a 3D printer, an apparatus, and a storage medium to solve the technical problem of excessive waste of consumables when switching consumables in the prior art.

[0006] In a first aspect, this application provides a path planning method for multi-color printing, the method comprising the following steps:

[0007] Obtain the color information corresponding to the printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different two colors;

[0008] The printed model is sliced ​​according to the preset height and the color information to obtain the outline information of multiple slice layers;

[0009] Based on the contour information, obtain the first printing path for each slice layer;

[0010] For the slice layer with two or more colors, the flushing volume of the consumables of different colors within the outline of the slice layer during switching is obtained according to the first printing path.

[0011] For slice layers containing two or more colors, the waste value is planned based on the flushing volume and the waste value to obtain a second printing path.

[0012] The beneficial effects of this application are as follows: It obtains color information corresponding to a printed model, wherein the printed model has at least two colors; calculates the waste value corresponding to the switching of consumables of different colors; slices the printed model according to a preset height and the color information to obtain contour information of multiple slice layers; obtains a first printing path for each slice layer based on the contour information; for slice layers with two or more colors, obtains the flushing volume of consumables of different colors within the contour of the corresponding slice layer during switching according to the first printing path; for slice layers with two or more colors, determines the planning of the waste value based on the flushing volume and the waste value to obtain a second printing path; through the above technical solution, it realizes the planning of waste during consumable switching, reduces consumable waste, improves the utilization rate of consumables, and thus saves the cost of 3D printing.

[0013] In some embodiments, calculating the waste value corresponding to the switching between two different colors of consumables includes: obtaining the three primary color R channels, three primary color G channels, and three primary color B channels of the color; obtaining the distance between any two different colors based on the three primary color R channels, the three primary color G channels, and the three primary color B channels; obtaining the waste value corresponding to the switching between two different colors of consumables based on a preset minimum waste value, a preset maximum waste value, the distance between two different colors, and a waste value calculation formula, wherein the waste value calculation formula includes E = E1 + (E2 - E1) * n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between two different colors.

[0014] In some embodiments, slicing the printed model according to a preset height and the color information includes: acquiring support data and Z-seam data; merging the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and the Z-seam data to form model data; slicing the printed model according to the preset height and the model data; or, including: merging the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face to form colored slice data; acquiring support data and Z-seam data, and slicing the support data and the Z-seam data into first path planning data and second path planning data respectively; forming model data according to the colored slice data, the first path planning data, and the second path planning data; slicing the printed model according to the preset height and the model data.

[0015] In some embodiments, the contour information includes coordinate point information of each color contour based on color differentiation, and the color contour has one or more; obtaining the first printing path of each slice layer based on the contour information includes: for each slice layer, obtaining the path area of ​​each color contour according to the coordinate point information of one or more color contours, and obtaining the first printing path of each slice layer according to the path area and a preset fill density.

[0016] In some embodiments, after obtaining the outline information of multiple slice layers, the method further includes: determining whether the current slice layer includes two or more colors; if not, using the first printing path of the current slice layer as the final printing path of the current slice layer.

[0017] In some embodiments, obtaining the flushing volume of two different colors of consumables within the contour of the slice layer during switching according to the first printing path includes: obtaining the flushing volume of two different colors of consumables within the contour of the slice layer during switching according to the first printing path and the consumable flow rate corresponding to a preset nozzle.

[0018] In some embodiments, determining the planning of the waste value based on the flushing volume and the waste value to obtain a second printing path includes: if the flushing volume is smaller than the waste value, then planning the waste value of the flushing volume to the first printing path, and planning the remaining waste value to the coating tower to obtain a second printing path.

[0019] Secondly, embodiments of this application also provide a 3D printer, including a data acquisition module, a slicing module, a first printing path acquisition module, a flushing volume acquisition module, and a second printing path acquisition module; the data acquisition module is configured to acquire color information corresponding to a printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different colors; the slicing module is configured to slice the printing model according to a preset height and the color information to obtain contour information of multiple slice layers; the first printing path acquisition module is configured to acquire a first printing path for each slice layer based on the contour information; the flushing volume acquisition module is configured to, for slice layers with two or more colors, acquire the flushing volume of consumables of different colors within the contour of the corresponding slice layer when switching according to the corresponding first printing path; the second printing path acquisition module is configured to, for slice layers with two or more colors, determine the planning of the waste value according to the flushing volume and the waste value to obtain a second printing path.

[0020] In some embodiments, the data acquisition module is configured to calculate the waste value corresponding to the switching of consumables of two different colors, including: acquiring the three primary color R channel, three primary color G channel and three primary color B channel of the color; acquiring the distance between any two different colors based on the three primary color R channel, three primary color G channel and three primary color B channel; acquiring the waste value corresponding to the switching of consumables of two different colors based on a preset minimum waste value, a preset maximum waste value, the distance between two different colors and a waste value calculation formula, wherein the waste value calculation formula includes E=E1+(E2-E1)*n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between two different colors.

[0021] In some embodiments, the slicing module is configured to slice the printed model according to a preset height and the color information to obtain contour information of multiple slice layers, including: acquiring support data and Z-seam data; merging the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and the Z-seam data to form model data; slicing the printed model according to the preset height and the model data; or, including: merging the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face to form colored slice data; acquiring support data and Z-seam data, and slicing the support data and the Z-seam data into first path planning data and second path planning data respectively; forming model data according to the colored slice data, the first path planning data, and the second path planning data; slicing the printed model according to the preset height and the model data.

[0022] In some embodiments, the contour information includes coordinate point information of each color contour based on color differentiation, and the color contour has one or more; the first printing path acquisition module is configured to acquire a first printing path for each slice layer based on the contour information, including: for each slice layer, acquiring the path area of ​​each color contour according to the coordinate point information of one or more color contours, and acquiring the first printing path for each slice layer according to the path area and a preset fill density.

[0023] In some embodiments, the slicing module is configured to, after obtaining the outline information of multiple slice layers, further include: determining whether the current slice layer includes two or more colors; if not, using the first printing path of the current slice layer as the final printing path of the current slice layer.

[0024] In some embodiments, the flushing volume acquisition module is configured to acquire the flushing volume of two different colors of consumables within the outline of the corresponding slice layer when switching, based on the first printing path, including: acquiring the flushing volume of two different colors of consumables within the outline of the corresponding slice layer when switching, based on the first printing path and the consumable flow rate corresponding to a preset nozzle.

[0025] In some embodiments, the second printing path acquisition module is configured to determine the planning of the waste value based on the flushing volume and the waste value to obtain a second printing path, including: if the flushing volume is less than the waste value, then the waste value of the flushing volume is planned to the first printing path, and the remaining waste value is planned to the coating tower to obtain a second printing path.

[0026] Thirdly, embodiments of this application also provide an electronic device, which includes a processor and a memory. The memory stores instructions, and the processor calls the instructions in the memory to cause the electronic device to execute the multi-color printing path planning method of the first aspect. The method includes: obtaining color information corresponding to a printing model, wherein the printing model has at least two colors; calculating the waste value corresponding to the switching of consumables of different colors; slicing the printing model according to a preset height and the color information to obtain contour information of multiple slice layers; obtaining a first printing path for each slice layer based on the contour information; for slice layers with two or more colors, obtaining the flushing volume of consumables of different colors within the contour of the corresponding slice layer during switching according to the first printing path; and for slice layers with two or more colors, determining the planning of the waste value according to the flushing volume and the waste value to obtain a second printing path.

[0027] In some embodiments, calculating the waste value corresponding to the switching between two different colors of consumables includes: obtaining the three primary color R channels, three primary color G channels, and three primary color B channels of the color; obtaining the distance between any two different colors based on the three primary color R channels, three primary color G channels, and three primary color B channels; obtaining the waste value corresponding to the switching between two different colors of consumables based on a preset minimum waste value, a preset maximum waste value, the distance between two different colors, and a waste value calculation formula, wherein the waste value calculation formula includes E = E1 + (E2 - E1) * n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between two different colors.

[0028] In some embodiments, slicing the printed model according to a preset height and the color information includes: acquiring support data and Z-seam data; merging the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and the Z-seam data to form model data; slicing the printed model according to the preset height and the model data; or, including: merging the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face to form colored slice data; acquiring support data and Z-seam data, and slicing the support data and the Z-seam data into first path planning data and second path planning data respectively; forming model data according to the colored slice data, the first path planning data, and the second path planning data; slicing the printed model according to the preset height and the model data.

[0029] In some embodiments, the contour information includes coordinate point information of each color contour based on color differentiation, and the color contour has one or more; obtaining the first printing path of each slice layer based on the contour information includes: for each slice layer, obtaining the path area of ​​each color contour according to the coordinate point information of one or more color contours, and obtaining the first printing path of each slice layer according to the path area and a preset fill density.

[0030] In some embodiments, after obtaining the outline information of multiple slice layers, the method further includes: determining whether the current slice layer includes two or more colors; if not, using the first printing path of the current slice layer as the final printing path of the current slice layer.

[0031] Fourthly, embodiments of this application also provide a computer-readable storage medium that stores computer instructions that, when executed on an electronic device, cause the electronic device to perform a multi-color printing path planning method as described in the first aspect.

[0032] Understandably, the 3D printer of the second aspect, the electronic device of the third aspect, and the storage medium of the fourth aspect all correspond to the method of the first aspect. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here. Attached Figure Description

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

[0034] Figure 1 is a flowchart illustrating the multi-color printing path planning method provided in an embodiment of this application;

[0035] Figure 2 is a first schematic diagram of the slice layer provided in an embodiment of this application;

[0036] Figure 3 is a second schematic diagram of the slice layer provided in an embodiment of this application;

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

[0038] Figure 5 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;

[0039] Figure 6 is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation

[0040] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without inventive effort are within the scope of protection of the present application.

[0041] In this application, unless otherwise expressly specified or limited, the terms "installation," "connection," "fixation," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components; they can refer to mere surface contact; or they can refer to surface contact connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0042] Furthermore, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as referring to specific or particular structures. The terms "some embodiments," "other embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this application, as well as the features of different embodiments or examples.

[0043] Figure 1 is a flowchart illustrating the multi-color printing path planning method according to an embodiment of this application. It should be noted that if substantially the same result is obtained, the multi-color printing path planning method of this application is not limited to the flow order shown in Figure 1. As shown in Figure 1, the multi-color printing path planning method mainly includes the following steps:

[0044] S101, Obtain the color information corresponding to the printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different two colors;

[0045] In one specific embodiment, a particular model of 3D printer may support printing in multiple colors, and the corresponding printed model will also correspond to multiple colors. For example, the current model of 3D printer supports printing in 4 colors, and the printed model also corresponds to 4 colors. By selecting the three primary colors RGB (data representation of color information) corresponding to these 4 colors according to the color wheel, these 4 colors can be set as c1, c2, c3, and c4.

[0046] In some embodiments, calculating the waste value corresponding to the switching between two different colors of consumables includes:

[0047] Obtain the three primary color channels (R, G, and B) of the color;

[0048] Based on the three primary color R channel, the three primary color G channel, and the three primary color B channel, obtain the distance between any two different colors;

[0049] Based on the preset minimum waste value, the preset maximum waste value, the distance between the two different colors, and the waste value calculation formula, the waste value corresponding to the switching of consumables of the two different colors is obtained. The waste value calculation formula includes E=E1+(E2-E1)*n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between the two different colors.

[0050] In one specific embodiment, the waste value corresponding to the switching between two different colors of consumables is obtained, that is, the amount of consumables that needs to be removed when switching between two different colors of consumables, to ensure that there is no color mixing area in the nozzle. In order to obtain the waste value corresponding to the switching between two different colors of consumables, the distance between any two different colors is required. Without loss of generality, let c 1,R The R channel represents the three primary colors of color c1. 1,G c1 represents the three primary colors and the G channel. 1,B c1 represents the B channel of the three primary colors, c 2,R This represents the R channel of the three primary colors of color c2. 2,G c2 represents the three primary colors and the G channel. 2,B Let c2 represent the B channel of the three primary colors. Then, the distance L1 between colors c1 and c2 is...

[0051] The distance between two different colors is normalized to obtain a normalized value for the distance between the two different colors. Specifically, this may include calculating the longest distance Lmax between all colors. The RGB value of white is (0,0,0), and the RGB value of black is (255,255,255). Therefore, the distance from white to black is the longest distance Lmax between all colors. Thus, the normalized value of the distance between color c1 and color c2 is n1 = L1 / Lmax, which divides the distance between the two different colors into the interval 0 to 1. Based on this, the waste value for switching consumables between two different colors can be obtained, forming a waste value set Es. It should be noted that the waste value corresponding to the switching of consumables between two different colors is the flushing amount of consumables during the switching process.

[0052] S102, the printed model is sliced ​​according to the preset height and the color information to obtain the outline information of multiple slice layers;

[0053] In one specific embodiment, the 3D printed model is cut on the XY plane according to a preset height and the aforementioned multiple colors to obtain a contour set. The contour set includes multiple contours (pps), and each contour includes two or more colors. For example, the 3D printed model can be cut into 5 layers, and each contour can include sub-contours of 2 colors, which can be blue and purple respectively.

[0054] In some embodiments, slicing the printed model according to a preset height and the color information includes:

[0055] Acquire support data and Z-slit data, and merge the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and Z-slit data to form model data;

[0056] The printed model is sliced ​​according to the preset height and the model data;

[0057] Or, including:

[0058] The first vertex data of the printed model, the first triangle face of the printed model, and the color information corresponding to the first triangle face are merged to form the colored slice data;

[0059] Acquire support data and Z-seam data, and slice the support data and Z-seam data into first path planning data and second path planning data respectively. Based on the colored slice data, the first path planning data and the second path planning data, form model data.

[0060] The printed model is sliced ​​according to the preset height and the model data.

[0061] In one specific embodiment, the original data of the printing model can be obtained and the printing model can be loaded. The original data includes multiple first triangle faces and first vertex data, and the printing model has a first color. At least some of the first triangle faces of the printing model are painted with a second color. Model data is generated based on the first vertex data, the first triangle faces, and the color information of each first triangle face.

[0062] In one specific embodiment, applying a second color to at least a portion of the first triangular faces of a 3D printed model includes: applying the second color to at least a portion of the first triangular faces of the 3D printed model face by face, or applying the second color to the current first triangular face of the 3D printed model and filling the adjacent first triangular faces of the current first triangular face with the second color. Applying the second color to at least a portion of the first triangular faces of the 3D printed model may further include: dividing the first triangular faces of the 3D printed model into multiple second triangular faces, and further subdividing the at least a portion of the second triangular faces with the second color to apply the second color to at least a portion of the first triangular faces of the 3D printed model. After applying the second color to at least a portion of the first triangular faces of the 3D printed model, the method further includes: determining multiple containers for storing color data, storing the color data of the multiple first triangular faces in the multiple containers respectively, the number of containers being the same as the number of first triangular faces, and the color data of the multiple first triangular faces including a first color and a second color.

[0063] In one specific embodiment, the above-mentioned slicing of support data into first path planning data may include: deserializing the support data, obtaining the deserialized support data, slicing the support data into layers to obtain support slice data, and using the support slice data as the first path planning data.

[0064] It should be noted that the final printed slice requires complete vertex and triangle data. This complete vertex and triangle data includes the original first vertex data, the first triangle data, and the first vertex data and first triangle data after color settings. In other words, it includes the aforementioned first vertex data, the aforementioned first triangle data, the color information of the aforementioned first triangle data, and the color information of the aforementioned first vertex data. Due to the special nature of triangle subdivision, merging the aforementioned first vertex data, the aforementioned first triangle data, the aforementioned first triangle data's color data, and the aforementioned first vertex data's color data may not be directly merged into model data. Therefore, it needs to be combined with the support data and Z-seam data to form the model data.

[0065] First, merge and color the first vertex data and the first triangle face. Different nozzles can be used to plan different colors. The support data and Z-seam data need to be planned separately as path planning data (first path planning data and second path planning data). Merge the path planning data into the colored slice data. The support data and Z-seam data are only added functionally. The above model data is slice data.

[0066] S103, Based on the contour information, obtain the first printing path for each slice layer;

[0067] In some embodiments, the contour information includes coordinate point information of each color contour based on color differentiation, wherein the color contour has one or more.

[0068] The step of obtaining the first printing path for each slice layer based on the contour information includes:

[0069] For each slice layer, the path area of ​​each color contour is obtained based on the coordinate point information of one or more color contours, and the first printing path of each slice layer is obtained based on the path area and the preset fill density.

[0070] In one specific embodiment, the area of ​​the path region can be the area of ​​the region identified as being divided into paths; based on the area of ​​the path region and the preset fill density, the print path (length) within each color contour is obtained, and the print path can be the area filled inside each color contour.

[0071] Obtaining the area of ​​a path region for each color contour based on coordinate point information can be achieved using existing techniques. This process includes: determining all coordinate points constituting the path region, with these points arranged in a specific order, typically clockwise or counter-clockwise, to form a closed contour; defining the path using coordinate points, which can be represented by a Path or Paths data structure; directly calculating the area of ​​the polygon defined by the Path object using the Area function; the polygon area calculation depends on the orientation of the coordinate points—a positive value is returned if the path is counter-clockwise, and a negative value if clockwise; depending on the requirements, the area may need to be represented by its absolute value; if the path is self-intersecting (i.e., the edges of the polygon intersect), these self-intersecting parts need to be processed first; before calculating the area, the CleanPolygon or CleanPolygons function can be used to optimize and clean the path, removing collinear or overly close points to avoid calculation errors; calling the Area function and passing in the path to obtain the polygon area; and finally, obtaining the polygon area based on the value returned by the Area function, which can be converted to the appropriate unit of measurement as needed.

[0072] In some embodiments, after obtaining the contour information of the multiple slice layers, the method further includes:

[0073] Determine whether the current slice layer contains two or more colors. If not, use the first printing path of the current slice layer as the final printing path of the current slice layer.

[0074] It should be noted that when the slice layer currently includes only one color, there is no need to switch consumables, and therefore no need to determine the second printing path.

[0075] In one specific embodiment, a first schematic diagram of the slice layer is shown in Figure 2. The slice layer in Figure 2 includes two colors: a light color, blue, and a dark color, purple. A second schematic diagram of the slice layer is shown in Figure 3. The slice layer in Figure 3 includes only one color. Alternatively, the slice layer may include three or four colors, etc.

[0076] S104, for the slice layer with two or more colors, the flushing volume of the consumables of different colors within the outline of the slice layer during switching is obtained according to the first printing path.

[0077] In some embodiments, obtaining the flushing volume of two different colors of consumables within the contour of the corresponding slice layer during switching according to the first printing path includes:

[0078] Based on the consumable flow rate corresponding to the first printing path and the preset nozzle, the flushing volume of the two different colors of consumables within the contour of the corresponding slice layer during switching is obtained.

[0079] In one specific embodiment, the flow rate of the consumables corresponding to the preset nozzle can be set to e. Then, the flushing volume V of the two different colors of consumables within the contour of the slice layer during switching is V = path * e. It should be noted that the switching of the two different colors of consumables is performed in the order of the first printing path.

[0080] S105, for the slice layer with two or more colors, the waste value is planned according to the flushing volume and the waste value to obtain the second printing path.

[0081] In some embodiments, determining the waste value based on the flushing volume and the waste value to obtain a second printing path includes:

[0082] If the flushing volume is smaller than the waste value, then the waste value equal to the flushing volume is allocated to the first printing path, and the remaining waste value is allocated to the coating tower to obtain the second printing path.

[0083] It should be noted that since the infill path is inside the printing model, planning the transition mixing segment to the infill path (first printing path) and planning the remaining waste value to the paint tower can reduce the flushing time and avoid too much material being used to print the paint tower, thereby saving material.

[0084] In one specific embodiment, if the flushing volume is less than the waste value, then the waste value equal to the flushing volume is allocated to the filling path, and the remaining waste value is allocated to the coating tower. If the flushing volume is greater than or equal to the waste value, then all waste values ​​are allocated to the filling path, and so on. This process determines the path planning for waste values ​​when switching between any two different colors of consumables in the aforementioned multi-layer contour. After obtaining the first printing path and the second printing path, the model can be printed according to the first printing path and the second printing path.

[0085] The multi-color printing path planning method provided in this application embodiment obtains color information corresponding to a printing model, wherein the printing model has at least two colors, calculates the waste value corresponding to the switching of consumables of different colors; slices the printing model according to a preset height and the color information to obtain contour information of multiple slice layers; obtains a first printing path for each slice layer based on the contour information; for slice layers with two or more colors, obtains the flushing volume of consumables of different colors within the contour of the corresponding slice layer during switching according to the first printing path; for slice layers with two or more colors, determines the planning of the waste value according to the flushing volume and the waste value to obtain a second printing path; this realizes the planning of waste during consumable switching, reduces consumable waste, improves the utilization rate of consumables, and thus saves the cost of 3D printing.

[0086] Figure 4 is a schematic diagram of the structure of a 3D printer according to an embodiment of this application. The 3D printer 40 includes a data acquisition module 41, a slicing module 42, a first printing path acquisition module 43, a flushing volume acquisition module 44, and a second printing path acquisition module 45.

[0087] The data acquisition module 41 is configured to acquire color information corresponding to the printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different two colors.

[0088] The slicing module 42 is configured to slice the printed model according to a preset height and the color information to obtain the outline information of multiple slice layers;

[0089] The first printing path acquisition module 43 is configured to acquire the first printing path of each slice layer based on the contour information;

[0090] The flushing volume acquisition module 44 is configured to, for the slice layer with two or more colors, acquire the flushing volume of the consumables of different colors within the outline of the slice layer when switching, according to the first printing path.

[0091] The second printing path acquisition module 45 is configured to, for the slice layer containing two or more colors, determine the planning of the waste value based on the flushing volume and the waste value to obtain the second printing path.

[0092] For other details regarding the implementation of the above technical solutions by each module in the 3D printer, please refer to the description of the multi-color printing path planning method provided in the above application embodiments, which will not be repeated here.

[0093] Figure 5 is a schematic diagram of the structure of an electronic device according to an embodiment of this application. As shown in Figure 5, the electronic device 50 includes a processor 51 and a memory 52 communicatively connected to the processor 51.

[0094] The memory 52 stores program instructions for implementing the multicolor printing path planning method of any of the above embodiments.

[0095] The processor 51 is used to execute program instructions stored in the memory 52 for waste planning for the 3D printer.

[0096] The processor 51 can also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip with signal processing capabilities. The processor 51 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0097] The memory 52 can be used to store the computer programs and / or modules. The processor 51 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 52 and calling the data stored in the memory 52. ​​The memory 52 may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application program required for a function, etc.

[0098] The memory 52 can be integrated into the processor 51 or it can be set separately from the processor 51.

[0099] This application provides a computer-readable storage medium, the structural diagram of which is shown in Figure 6. The storage medium 60 stores a readable computer program 61. The computer program 61 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks or optical disks, ROM (Read-Only Memory), RAM (Random Access Memory), or terminal devices such as computers, servers, mobile phones, and tablets.

[0100] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules 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, or indirect coupling or communication connection between apparatuses or modules, and may be electrical, mechanical, or other forms.

[0101] The modules described above as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0102] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0103] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0104] The aforementioned computer program product includes one or more computer instructions. When the aforementioned computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The aforementioned computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The aforementioned computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0105] The technical solutions provided in this application have been described in detail above. Specific examples have been used in this application 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.

[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0108] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0110] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A path planning method for multi-color printing, applied to a 3D printer, characterized in that, include: Obtain the color information corresponding to the printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different two colors; The printed model is sliced ​​according to the preset height and the color information to obtain the outline information of multiple slice layers; Based on the contour information, obtain the first printing path for each slice layer; For the slice layer with two or more colors, the flushing volume of the consumables of different colors within the outline of the slice layer during switching is obtained according to the first printing path. For slice layers containing two or more colors, the waste value is planned based on the flushing volume and the waste value to obtain a second printing path.

2. The method of claim 1, wherein, The calculation of the waste value corresponding to the switching between two different colors of consumables includes: Obtain the three primary color channels (R, G, and B) of the color; Based on the three primary color R channel, the three primary color G channel, and the three primary color B channel, obtain the distance between any two different colors; Based on the preset minimum waste value, the preset maximum waste value, the distance between the two different colors, and the waste value calculation formula, the waste value corresponding to the switching of consumables of the two different colors is obtained. The waste value calculation formula includes E=E1+(E2-E1)*n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between the two different colors.

3. The method of claim 1, wherein, Slicing the printed model according to the preset height and the color information includes: Acquire support data and Z-slit data, and merge the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and Z-slit data to form model data; The printed model is sliced ​​according to the preset height and the model data; Or, including: The first vertex data of the printed model, the first triangle face of the printed model, and the color information corresponding to the first triangle face are merged to form the colored slice data; Acquire support data and Z-seam data, and slice the support data and Z-seam data into first path planning data and second path planning data respectively. Based on the colored slice data, the first path planning data and the second path planning data, form model data. The printed model is sliced ​​according to the preset height and the model data.

4. The method of claim 1, wherein, The contour information includes coordinate point information of each color contour based on color differentiation, and the color contour has one or more. The step of obtaining the first printing path for each slice layer based on the contour information includes: For each slice layer, the path area of ​​each color contour is obtained based on the coordinate point information of one or more color contours, and the first printing path of each slice layer is obtained based on the path area and the preset fill density.

5. The method of claim 1, wherein, After obtaining the contour information of multiple slice layers, the process further includes: Determine whether the current slice layer contains two or more colors. If not, use the first printing path of the current slice layer as the final printing path of the current slice layer.

6. The method of claim 1, wherein, The flushing volume of two different colors of consumables during switching within the outline of the corresponding slice layer is obtained according to the first printing path, including: Based on the consumable flow rate corresponding to the first printing path and the preset nozzle, the flushing volume of the two different colors of consumables within the contour of the corresponding slice layer during switching is obtained.

7. The method of claim 1, wherein, Based on the flushing volume and the waste value, a plan for the waste value is determined to obtain the second printing path, including: If the flushing volume is smaller than the waste value, then the waste value equal to the flushing volume is allocated to the first printing path, and the remaining waste value is allocated to the coating tower to obtain the second printing path.

8. A 3D printer characterized by, It includes a data acquisition module, a slicing module, a first printing path acquisition module, a flushing volume acquisition module, and a second printing path acquisition module; The data acquisition module is configured to acquire color information corresponding to the printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different two colors. The slicing module is configured to slice the printed model according to a preset height and the color information to obtain the outline information of multiple slice layers; The first printing path acquisition module is configured to acquire the first printing path of each slice layer based on the contour information; The flushing volume acquisition module is configured to, for a slice layer with two or more colors, acquire the flushing volume of consumables of different colors within the outline of the slice layer when switching, according to the first printing path. The second printing path acquisition module is configured to, for slice layers containing two or more colors, determine the planning of the waste value based on the flushing volume and the waste value to obtain the second printing path.

9. The 3D printer of claim 8, wherein, The data acquisition module is configured to calculate the waste value corresponding to the switching between two different colors of consumables, including: Obtain the three primary color channels (R, G, and B) of the color; Based on the three primary color R channel, the three primary color G channel, and the three primary color B channel, obtain the distance between any two different colors; Based on the preset minimum waste value, the preset maximum waste value, the distance between the two different colors, and the waste value calculation formula, the waste value corresponding to the switching of consumables of the two different colors is obtained. The waste value calculation formula includes E=E1+(E2-E1)*n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between the two different colors.

10. The 3D printer of claim 8, wherein, The slicing module is configured to slice the printed model according to a preset height and the color information to obtain the contour information of multiple slice layers, including: Acquire support data and Z-slit data, and merge the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and Z-slit data to form model data; The printed model is sliced ​​according to the preset height and the model data; Or, including: The first vertex data of the printed model, the first triangle face of the printed model, and the color information corresponding to the first triangle face are merged to form the colored slice data; Acquire support data and Z-seam data, and slice the support data and Z-seam data into first path planning data and second path planning data respectively. Based on the colored slice data, the first path planning data and the second path planning data, form model data. The printed model is sliced ​​according to the preset height and the model data.

11. The 3D printer of claim 8, wherein, The contour information includes coordinate point information of each color contour based on color differentiation, and the color contour has one or more. The first print path acquisition module is configured to acquire a first print path for each slice layer based on the contour information, including: For each slice layer, the path area of ​​each color contour is obtained based on the coordinate point information of one or more color contours, and the first printing path of each slice layer is obtained based on the path area and the preset fill density.

12. The 3D printer of claim 8, wherein, The slicing module is configured to, after obtaining the contour information of multiple slice layers, further include: Determine whether the current slice layer contains two or more colors. If not, use the first printing path of the current slice layer as the final printing path of the current slice layer.

13. The 3D printer of claim 8, wherein, The flushing volume acquisition module is configured to acquire the flushing volume of two different colors of consumables within the outline of the corresponding slice layer during switching, based on the first printing path, including: Based on the consumable flow rate corresponding to the first printing path and the preset nozzle, the flushing volume of the two different colors of consumables within the contour of the corresponding slice layer during switching is obtained.

14. The 3D printer of claim 8, wherein, The second printing path acquisition module is configured to determine the planning of the waste value based on the flushing volume and the waste value to obtain the second printing path, including: If the flushing volume is smaller than the waste value, then the waste value equal to the flushing volume is allocated to the first printing path, and the remaining waste value is allocated to the coating tower to obtain the second printing path.

15. An electronic device comprising a memory, a processor, the memory storing a computer program executable by the processor, characterized in that, When the processor executes the computer program, it implements the path planning method for multicolor printing as described in any one of claims 1 to 7, the method comprising: Obtain the color information corresponding to the printing model, wherein the printing model has at least two colors, and calculate the waste value corresponding to the switching of consumables of different two colors; The printed model is sliced ​​according to the preset height and the color information to obtain the outline information of multiple slice layers; Based on the contour information, obtain the first printing path for each slice layer; For the slice layer with two or more colors, the flushing volume of the consumables of different colors within the outline of the slice layer during switching is obtained according to the first printing path. For slice layers containing two or more colors, the waste value is planned based on the flushing volume and the waste value to obtain a second printing path.

16. The electronic device according to claim 15, characterized in that, The calculation of the waste value corresponding to the switching between two different colors of consumables includes: Obtain the three primary color channels (R, G, and B) of the color; Based on the three primary color R channel, the three primary color G channel, and the three primary color B channel, obtain the distance between any two different colors; Based on the preset minimum waste value, the preset maximum waste value, the distance between the two different colors, and the waste value calculation formula, the waste value corresponding to the switching of consumables of the two different colors is obtained. The waste value calculation formula includes E=E1+(E2-E1)*n1, where E1 is the preset minimum waste value, E2 is the preset maximum waste value, and n1 is the normalized value of the distance between the two different colors.

17. The electronic device according to claim 15, characterized in that, Slicing the printed model according to the preset height and the color information includes: Acquire support data and Z-slit data, and merge the first vertex data of the printed model, the first triangular face of the printed model, and the color information corresponding to the first triangular face with the support data and Z-slit data to form model data; The printed model is sliced ​​according to the preset height and the model data; Or, including: The first vertex data of the printed model, the first triangle face of the printed model, and the color information corresponding to the first triangle face are merged to form the colored slice data; Acquire support data and Z-seam data, and slice the support data and Z-seam data into first path planning data and second path planning data respectively. Based on the colored slice data, the first path planning data and the second path planning data, form model data. The printed model is sliced ​​according to the preset height and the model data.

18. The electronic device according to claim 15, characterized in that, The contour information includes coordinate point information of each color contour based on color differentiation, and the color contour has one or more. The step of obtaining the first printing path for each slice layer based on the contour information includes: For each slice layer, the path area of ​​each color contour is obtained based on the coordinate point information of one or more color contours, and the first printing path of each slice layer is obtained based on the path area and the preset fill density.

19. The electronic device according to claim 15, characterized in that, After obtaining the contour information of multiple slice layers, the process further includes: Determine whether the current slice layer contains two or more colors. If not, use the first printing path of the current slice layer as the final printing path of the current slice layer.

20. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the multicolor printing path planning method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Printing method for multi-material three-dimensional model

    CN107199694A

  • Method and device for 3D printer, computer equipment and storage medium

    CN115214121A

  • Method for 3D printer, computer equipment and storage medium

    CN115648617A

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

    CN118024587A

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

    CN118700541A