Multicolor printing slicing method, electronic device, and storage medium

By color-smearing and subdividing the triangle faces of the 3D printed model, model data is generated, and the problems of low multi-color printing efficiency and waste of consumables are solved, achieving efficient multi-color printing effect.

WO2025175779A1PCT designated stage Publication Date: 2025-08-28SHENZHEN CREALITY 3D TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/123423
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-23
Filing Date
2024-10-08
Publication Date
2025-08-28

AI Technical Summary

Technical Problem

Among the existing multi-color 3D printing technology, the printing efficiency is low and the consumables consume a lot, which is mainly due to the color pollution problem caused by residual consumables in the nozzle cavity.

Method used

By color-smearing and subdividing the triangle faces of the 3D printed model, model data is generated, and color data is stored in a container, supporting data and Z-slit data are combined to form a multi-color printing slice method, and multi-color printing is performed using different nozzle feeds.

Benefits of technology

It improves the efficiency of multi-color printing, reduces the use of consumables, and achieves efficient multi-color printing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024123423_28082025_PF_FP_ABST
    Figure CN2024123423_28082025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a multicolor printing slicing method, an electronic device and a storage medium. The multicolor printing slicing method provided by the present application comprises: acquiring original data of a 3D printing model, and loading the 3D printing model, the original data comprising a plurality of first triangular faces and first vertex data, and the 3D printing model having a first color; painting at least part of the first triangular faces of the 3D printing model with a second color; on the basis of the first vertex data, the first triangular faces and color data of each of the first triangular faces, generating model data; and slicing the 3D printing model on the basis of a preset height and the model data, so as to obtain contour sets, and dividing the contour sets on the basis of the color data to obtain divided contour sets.
Need to check novelty before this filing date? Find Prior Art

Description

Multi-color printing slicing method, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese Patent Application No. 202410203708.0 filed on February 23, 2024, the contents of which are incorporated herein by reference in their entirety. Technical Field

[0003] The present application relates to the field of 3D printing technology, and in particular to a multi-color printing slicing method, electronic equipment, and storage medium. Background Art

[0004] 3D printing, also known as additive manufacturing, is a new manufacturing technology that uses digital models as a foundation to create physical objects by depositing materials layer by layer. As 3D printing technology matures and the market grows, so too does the demand for color printing, and printers capable of multi-color printing are becoming increasingly common. Currently, most multi-color 3D printers on the market use a multi-input, one-output method to print color 3D models. The material switching method involves retracting the previous color's consumables and switching to the next color's consumables. Residual amounts of the previous color's consumables within the printhead cavity can contaminate the printouts of the current color's consumables.

[0005] Summary of the Invention

[0006] The purpose of this application is to provide a multi-color printing slicing method, electronic equipment and storage medium to solve the technical problems of low printing efficiency and high consumption of printing consumables in related technologies of multi-color printing.

[0007] The technical solution of this application is as follows, which provides a multi-color printing and slicing method, including:

[0008] Obtaining original data of a 3D printing model and loading the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color;

[0009] Applying a second color to at least a portion of the first triangular surface of the 3D printed model;

[0010] Generate model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular face;

[0011] The 3D printing model is sliced ​​according to a preset height and the model data to obtain a contour set, and the contour set is divided according to the color data to obtain a divided contour set.

[0012] Furthermore, applying a second color to at least a portion of the first triangular surface of the 3D printed model includes:

[0013] The second color is applied to at least a portion of the first triangular faces of the 3D printing model, or the second color is applied to the current first triangular face of the 3D printing model, and the first triangular faces adjacent to the current first triangular face are filled with the second color.

[0014] Furthermore, applying a second color to at least a portion of the first triangular surface of the 3D printed model includes:

[0015] The first triangular face of the 3D printing model is divided into a plurality of second triangular faces, and at least a portion of the second triangular faces is subdivided and painted with a second color, so as to apply the second color to at least a portion of the first triangular face of the 3D printing model.

[0016] Furthermore, after applying the second color to at least a portion of the first triangular surface of the 3D printed model, the method further includes:

[0017] Determine a plurality of containers for storing color data, and store the color data of the plurality of first triangular faces in the plurality of containers respectively. The number of the containers is the same as the number of the first triangular faces, and the color data of the plurality of first triangular faces includes a first color and a second color.

[0018] Furthermore, generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets includes:

[0019] Acquire support data and Z-seam data, and merge the first vertex data, the first triangular face, and the color data of each of the first triangular facets with the support data and the Z-seam data to form model data.

[0020] Furthermore, generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets includes:

[0021] Merging the first vertex data, the first triangular face, and the color data of each of the first triangular face to form colored slice data;

[0022] Acquire support data and Z-seam data, and slice the support data and the Z-seam data into first path planning data and second path planning data, respectively, and form model data based on the colored sliced ​​data, the first path planning data, and the second path planning data.

[0023] Furthermore, slicing the support data into first path planning data includes:

[0024] Deserialize the supporting data, obtain the deserialized supporting data, and

[0025] Perform slice cutting to obtain supporting slice data, and use the supporting slice data as first path planning data.

[0026] Another technical solution of the present application is as follows: a multi-color printing and slicing 3D printer is provided, comprising a data loading module, a color painting module, a model data forming module, and a contour set acquisition module;

[0027] The data loading module is configured to obtain original data of a 3D printing model and load the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color;

[0028] The color painting module is used to paint a second color on at least a portion of the first triangular surface of the 3D printing model;

[0029] The model data forming module is configured to generate model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular face;

[0030] The contour set acquisition module is configured to slice the 3D printing model according to a preset height and the model data to obtain a contour set, and divide the contour set according to the color data to obtain a divided contour set.

[0031] Another technical solution of the present application is as follows: an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program that can be executed by the processor, and when the processor executes the computer program, it implements the multi-color printing slicing method described in any of the above technical solutions.

[0032] Another technical solution of the present application is as follows: providing a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the multi-color printing slicing method as described in any of the above technical solutions is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0034] FIG1 is a schematic flow chart of a multi-color printing and slicing method provided in one or more embodiments of the present application.

[0035] FIG2 is a schematic structural diagram of a 3D printer provided by one or more embodiments of the present application.

[0036] FIG3 is a schematic diagram of the structure of an electronic device provided by one or more embodiments of the present application.

[0037] FIG4 is a schematic diagram of the structure of a computer-readable storage medium provided in one or more embodiments of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0039] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0040] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0041] FIG1 is a flow chart of the multi-color printing and slicing method of an embodiment of the present application. It should be noted that the multi-color printing and slicing method of the present application is not limited to the flow sequence shown in FIG1 if substantially the same results are achieved. As shown in FIG1 , the multi-color printing and slicing method mainly includes the following steps:

[0042] S101 , obtaining original data of a 3D printing model and loading the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color.

[0043] In a specific embodiment, before loading the 3D printing model, the original data of the 3D printing model can be obtained, that is, multiple first triangle facets and first vertex data vectors of the 3D printing model can be obtained, and the number of colors for color change of the 3D printing model can also be obtained; wherein the number of colors for color change can be set according to actual conditions.

[0044] S102: Apply a second color to at least a portion of the first triangular surface of the 3D printing model.

[0045] In some embodiments, applying a second color to at least a portion of the first triangular face of the 3D printed model includes:

[0046] The second color is applied to at least a portion of the first triangular faces of the 3D printing model, or the second color is applied to the current first triangular face of the 3D printing model, and the first triangular faces adjacent to the current first triangular face are filled with the second color.

[0047] In a specific embodiment, the color of the first triangle (triangle patch) can be set in the user interface to apply the second color to at least part of the first triangle of the 3D printed model. The user sets the color of the first triangle to the first color (for example, blue) by default. For painting by surface, if the first triangle needs to be set to the second color (for example, green), after the user interface receives the color setting instruction for painting by surface, the first triangle can be selected, and the first triangle will be changed to the second color as a whole.

[0048] For filling and smearing, if it is necessary to set at least part of the first triangle to the second color, after the user interface receives the color setting instruction for subdividing the smearing, it sets the filling and smearing angle to a, and according to the selected first triangle, recursively traverses the three directions of the first triangle (the three directions perpendicular to the three sides of the first triangle) to determine whether the angle between the adjacent first triangle and the current first triangle is greater than the preset angle value a. If it is greater than a, stop traversing, and color the current first triangle and the adjacent first triangle whose angle with the current first triangle is less than the preset angle value a.

[0049] In some embodiments, applying a second color to at least a portion of the first triangular face of the 3D printed model includes:

[0050] The first triangular face of the 3D printing model is divided into a plurality of second triangular faces, and at least a portion of the second triangular faces is subdivided and painted with a second color, so as to apply the second color to at least a portion of the first triangular face of the 3D printing model.

[0051] In a specific embodiment, for subdivided smearing, if it is necessary to set the first triangular face (all or part) to the second color, after the user interface receives the subdivided smearing color setting instruction, the first triangular face of the 3D printed model can be divided into multiple second triangular faces (the corresponding number of second vertex data can also be generated at this time), and a certain coordinate position on the second triangular face can be selected, such as pos (x, y), and the radius of the circle can be set to r; then the smeared color data corresponds to a circular area with pos as the center and r as the radius; the final color area can be obtained recursively by gradually subdividing inward, each time the subdivision is performed, the corresponding subdivided face is detected once to see if it is within the smeared circular area. It should be noted that at least part of the first triangular face can also be smeared to a third color, etc. The smearing method is the same as the method of smearing the first triangular face to the second color, and the type of color data of the above-mentioned first triangular face is the same as the number of colors for the above-mentioned color change.

[0052] In some embodiments, after applying a second color to at least a portion of the first triangular face of the 3D printed model, the method further includes:

[0053] Determine a plurality of containers for storing color data, and store the color data of the plurality of first triangular faces in the plurality of containers respectively. The number of the containers is the same as the number of the first triangular faces, and the color data of the plurality of first triangular faces includes a first color and a second color.

[0054] In a specific embodiment, the first triangle data is obtained and a container vector for storing color data is obtained, and the number of containers is consistent with the number of multiple first triangles; the color data of each first triangle is stored in a corresponding container respectively, and when the model data (including the original first triangle data) and color data need to be written into a 3mf file, the color data of all first triangles in the container are written into the 3mf file together. It should be noted that since the area of ​​the first triangle is colored, a lot of triangle data (colored triangles) and vertices (colored vertices) will be added, thereby increasing the amount of data. By storing the color data of each first triangle in a corresponding container respectively, the original first vertex data and the first triangle are retained. If the original first vertex data and the first triangle are not saved, multiple colorings will destroy the original data, and the amount of data will become larger and larger, thereby occupying space resources.

[0055] S103: Generate model data according to the first vertex data, the first triangular faces, and the color data of each of the first triangular faces.

[0056] In some embodiments, generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets includes:

[0057] Acquire support data and Z-seam data, and merge the first vertex data, the first triangular face, and the color data of each of the first triangular facets with the support data and the Z-seam data to form model data.

[0058] In a specific embodiment, since the final printed slice requires complete vertex and triangle data, the complete vertex and triangle data include the original first vertex data, the first triangle, and the first vertex data and the first triangle after color setting, that is, the first vertex data, the first triangle, the color data of the first triangle, and the color data of the first vertex data. It should be noted that due to the particularity of triangle subdivision, when merging the first vertex data, the first triangle, the color data of the first triangle, and the color data of the first vertex data, it may not be possible to directly merge them into model data, and they need to be combined with support data and Z-seam data to form model data.

[0059] In some embodiments, generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets includes:

[0060] Merging the first vertex data, the first triangular face, and the color data of each of the first triangular face to form colored slice data;

[0061] Acquire support data and Z-seam data, and slice the support data and the Z-seam data into first path planning data and second path planning data, respectively, and form model data based on the colored sliced ​​data, the first path planning data, and the second path planning data.

[0062] In a specific embodiment, the first vertex data, the first triangle, the color data of the first triangle, and the color data of the first vertex data are first merged (the first vertex data and the first triangle are merged and colored) to form colored slice data; the support data and the Z-seam data are sliced ​​into first path planning data and second path planning data, respectively, and model data is formed based on the colored slice data, the first path planning data, and the second path planning data. The number of the triangles mentioned above is the same as the number of the color data.

[0063] It should be noted that the first vertex data and the first triangle face are first merged and colored, and different nozzles can be planned for different colors; the support data and Z-seam data need to be separately planned into path planning data (first path planning data and second path planning data), and the path planning data is merged into the colored slice data. The support data and Z-seam data are only functionally added, and the above-mentioned model data is slice data.

[0064] In some embodiments, slicing the support data into first path planning data includes:

[0065] Deserialize the supporting data, obtain the deserialized supporting data, and

[0066] Perform slice cutting to obtain supporting slice data, and use the supporting slice data as first path planning data.

[0067] In a specific embodiment, before slicing the support data into the first path planning data, it also includes smearing the support data, that is, setting the color of the support data, and before slicing the Z-seam data into the second path planning data, it also includes smearing the Z-seam data; in addition, it is also necessary to smear the support interception data and smear the Z-seam interception data.

[0068] In a specific embodiment, the colored data can be deserialized (via mergeColorMeshes) and then stored in trimesh (a Python library) to obtain colored slice data. The colored data can include the color data of the first triangle and the color data of the first vertex data.

[0069] S104 , slicing the 3D printing model according to a preset height and the model data to obtain a contour set, and dividing the contour set according to the color data to obtain a divided contour set.

[0070] In one specific embodiment, the model data is sliced ​​horizontally according to a preset height to obtain a set of contours at the preset height. This set of contours is then divided according to the color data of the first triangular facets and the color data of the first vertex data to obtain a divided set of contours. After obtaining the divided set of contours, the printing area of ​​each layer is divided according to the divided set of contours based on preset slicing parameters and output as an actual printing path. When performing multi-color printing, different nozzles can be used to feed different color contour sets.

[0071] An embodiment of the present application provides a multi-color printing slicing method, which obtains original data of a 3D printing model and loads the 3D printing model, wherein the original data includes multiple first triangular faces and first vertex data, and the 3D printing model has a first color; a second color is applied to at least part of the first triangular faces of the 3D printing model; model data is generated based on the first vertex data, the first triangular faces, and the color data of each of the first triangular faces; the 3D printing model is sliced ​​according to a preset height and the model data to obtain a contour set, and the contour set is divided according to the color data to obtain a divided contour set; multi-color printing slicing can be achieved, and multi-color printing can be performed on the result of multi-color printing slicing, that is, the divided contour set, so as to improve the printing efficiency of multi-color printing and reduce the consumption of printing consumables.

[0072] FIG2 is a schematic diagram of the structure of a 3D printer according to an embodiment of the present application. The 3D printer 20 includes a data loading module 21, a color painting module 22, a model data forming module 23, and a contour set acquiring module 24;

[0073] The data loading module 21 is configured to obtain original data of a 3D printing model and load the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color;

[0074] The color painting module 22 is configured to paint a second color on at least a portion of the first triangular surface of the 3D printing model;

[0075] The model data forming module 23 is configured to generate model data according to the first vertex data, the first triangular facets, and the color data of each of the first triangular facets;

[0076] The contour set acquisition module 24 is configured to slice the 3D printing model according to a preset height and the model data to obtain a contour set, and divide the contour set according to the color data to obtain a divided contour set.

[0077] For other details about how the modules in the 3D printer implement the above technical solutions, please refer to the description of the multi-color printing and slicing method provided in the above application embodiments, which will not be repeated here.

[0078] FIG3 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. As shown in FIG3 , the electronic device 30 includes a processor 31 and a memory 32 in communication with the processor 31 .

[0079] The memory 32 stores program instructions for implementing the multi-color printing and slicing method of any one of the above embodiments.

[0080] The processor 31 is used to execute program instructions stored in the memory 32 to perform multi-color printing slices.

[0081] The processor 31 may also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip having signal processing capabilities. The processor 31 may 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 device, a discrete gate or transistor logic device, or a discrete hardware component. The general-purpose processor may be a microprocessor or any conventional processor.

[0082] The memory 32 may be used to store the computer programs and / or modules. The processor 31 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 32 and calling data stored in the memory 32. The memory 32 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the like.

[0083] The memory 32 may be integrated into the processor 31 or may be provided separately from the processor 31 .

[0084] The embodiment of the present application provides a computer-readable storage medium, the structure of which is shown in FIG4 . A readable computer program 41 is stored on the storage medium 40. The computer program 41 can be stored in the above-mentioned storage medium in the form of a software product, including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), and other media that can store program codes, or a terminal device such as a computer, server, mobile phone, or tablet.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0086] The modules described above as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0087] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the aforementioned integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may be stored in a computer-readable storage medium.

[0088] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0089] The above-mentioned computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, all or part of the above-mentioned process or function according to the embodiment of the present application is generated. The above-mentioned computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from a website, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website, a computer, a server or a data center. The above-mentioned computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center that includes one or more available media integrations. The above-mentioned available medium can be a magnetic medium, (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state drive (SSD)).

[0090] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used in the present application to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0091] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0092] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus, and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0093] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0095] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A multi-color printing and slicing method, characterized in that: include: Obtaining original data of a 3D printing model and loading the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color; Applying a second color to at least a portion of the first triangular surface of the 3D printed model; Generate model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular face; The 3D printing model is sliced ​​according to a preset height and the model data to obtain a contour set, and the contour set is divided according to the color data to obtain a divided contour set.

2. The multi-color printing and slicing method according to claim 1, characterized in that: Applying a second color to at least a portion of the first triangular surface of the 3D printed model includes: The second color is applied to at least a portion of the first triangular faces of the 3D printing model, or the second color is applied to the current first triangular face of the 3D printing model, and the second color is applied to adjacent first triangular faces of the current first triangular face.

3. The multi-color printing and slicing method according to claim 1, characterized in that: Applying a second color to at least a portion of the first triangular surface of the 3D printed model includes: The first triangular face of the 3D printing model is divided into a plurality of second triangular faces, and at least a portion of the second triangular faces is subdivided and painted with a second color, so as to paint at least a portion of the first triangular face of the 3D printing model with a second color.

4. The multi-color printing and slicing method according to claim 1, characterized in that: After applying a second color to at least a portion of the first triangular surface of the 3D printed model, the method further includes: Determine a plurality of containers for storing color data, and store the color data of the plurality of first triangular faces in the plurality of containers respectively. The number of the containers is the same as the number of the first triangular faces, and the color data of the plurality of first triangular faces includes a first color and a second color.

5. The multi-color printing and slicing method according to claim 1, characterized in that: Generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets, including: Acquire support data and Z-seam data, and merge the first vertex data, the first triangular face, and the color data of each of the first triangular facets with the support data and the Z-seam data to form model data.

6. The multi-color printing and slicing method according to claim 1, characterized in that: Generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets, including: Merging the first vertex data, the first triangular face, and the color data of each of the first triangular face to form colored slice data; Acquire support data and Z-seam data, and slice the support data and the Z-seam data into first path planning data and second path planning data, respectively, and form model data based on the colored sliced ​​data, the first path planning data, and the second path planning data.

7. The multi-color printing and slicing method according to claim 6, characterized in that: Slicing the support data into first path planning data includes: Deserialize the supporting data, obtain the deserialized supporting data, and Perform slice cutting to obtain supporting slice data, and use the supporting slice data as first path planning data.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, wherein: The processor performs: Obtaining original data of a 3D printing model and loading the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color; Applying a second color to at least a portion of the first triangular surface of the 3D printed model; Generate model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular face; The 3D printing model is sliced ​​according to a preset height and the model data to obtain a contour set, and the contour set is divided according to the color data to obtain a divided contour set.

9. The electronic device according to claim 8, wherein: Applying a second color to at least a portion of the first triangular surface of the 3D printed model includes: The second color is applied to at least a portion of the first triangular faces of the 3D printing model, or the second color is applied to the current first triangular face of the 3D printing model, and the second color is applied to adjacent first triangular faces of the current first triangular face.

10. The electronic device according to claim 8, wherein Applying a second color to at least a portion of the first triangular surface of the 3D printed model includes: The first triangular face of the 3D printing model is divided into a plurality of second triangular faces, and at least a portion of the second triangular faces is subdivided and painted with a second color, so as to paint at least a portion of the first triangular face of the 3D printing model with a second color.

11. The electronic device according to claim 8, wherein After applying a second color to at least a portion of the first triangular surface of the 3D printed model, the method further includes: Determine a plurality of containers for storing color data, and store the color data of the plurality of first triangular faces in the plurality of containers respectively. The number of the containers is the same as the number of the first triangular faces, and the color data of the plurality of first triangular faces includes a first color and a second color.

12. The electronic device according to claim 8, wherein Generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets, including: Acquire support data and Z-seam data, and merge the first vertex data, the first triangular face, and the color data of each of the first triangular facets with the support data and the Z-seam data to form model data.

13. The electronic device according to claim 8, wherein: Generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets, including: Merging the first vertex data, the first triangular face, and the color data of each of the first triangular face to form colored slice data; Acquire support data and Z-seam data, and slice the support data and the Z-seam data into first path planning data and second path planning data, respectively, and form model data based on the colored sliced ​​data, the first path planning data, and the second path planning data.

14. The electronic device according to claim 13, wherein: Slicing the support data into first path planning data includes: Deserialize the supporting data, obtain the deserialized supporting data, and Perform slice cutting to obtain supporting slice data, and use the supporting slice data as first path planning data.

15. A computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by a processor: Obtaining original data of a 3D printing model and loading the 3D printing model, wherein the original data includes a plurality of first triangular faces and first vertex data, and the 3D printing model has a first color; Applying a second color to at least a portion of the first triangular surface of the 3D printed model; Generate model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular face; The 3D printing model is sliced ​​according to a preset height and the model data to obtain a contour set, and the contour set is divided according to the color data to obtain a divided contour set.

16. The computer-readable storage medium according to claim 15, wherein: Applying a second color to at least a portion of the first triangular surface of the 3D printed model includes: The second color is applied to at least a portion of the first triangular faces of the 3D printing model, or the second color is applied to the current first triangular face of the 3D printing model, and the first triangular faces adjacent to the current first triangular face are filled with the second color.

17. The computer-readable storage medium according to claim 15, wherein: Applying a second color to at least a portion of the first triangular surface of the 3D printed model includes: The first triangular face of the 3D printing model is divided into a plurality of second triangular faces, and at least a portion of the second triangular faces is subdivided and painted with a second color, so as to apply the second color to at least a portion of the first triangular face of the 3D printing model.

18. The computer-readable storage medium according to claim 15, wherein: After applying a second color to at least a portion of the first triangular surface of the 3D printed model, the method further includes: Determine a plurality of containers for storing color data, and store the color data of the plurality of first triangular faces in the plurality of containers respectively. The number of the containers is the same as the number of the first triangular faces, and the color data of the plurality of first triangular faces includes a first color and a second color.

19. The computer-readable storage medium according to claim 15, wherein: Generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets, including: Acquire support data and Z-seam data, and merge the first vertex data, the first triangular face, and the color data of each of the first triangular facets with the support data and the Z-seam data to form model data.

20. The computer-readable storage medium according to claim 15, wherein Generating model data according to the first vertex data, the first triangular face, and the color data of each of the first triangular facets, including: Merging the first vertex data, the first triangular face, and the color data of each of the first triangular face to form colored slice data; Acquire support data and Z-seam data, and slice the support data and the Z-seam data into first path planning data and second path planning data, respectively, and form model data based on the colored sliced ​​data, the first path planning data, and the second path planning data.

Citation Information

Patent Citations

  • Full-color layered slicing algorithm based on three-dimensional model of texture mapping

    CN110757804A

  • 3D printed slice generation method, device and equipment and storage medium

    CN111070664A

  • Data processing method and system for 3D printing and storage medium

    CN112560126A

  • Three-dimensional (3D) printing color changing method and device, computer equipment and storage medium

    CN113211782A

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

    CN115214121A