Model segmentation method for 3D printing, electronic device, and storage medium

By obtaining the triangle face and vertex data of the 3D printed model, determining the sub-model collection and setting the color, the problem of consumable waste is solved, and accurate printing of sub-model segmentation and reducing consumable waste is achieved.

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

Patent Information

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

AI Technical Summary

Technical Problem

Existing 3D printing technology cannot effectively distinguish different printing sub-models, resulting in waste of consumables.

Method used

By loading the 3D printed model, obtaining the triangle face and vertex data, determining the sub-model collection, and setting the color for each sub-model, slicing and dividing, we obtain the outline collection.

Benefits of technology

It realizes accurate segmentation of the printing sub-model, reduces waste of consumables and improves printing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024123512_28082025_PF_FP_ABST
    Figure CN2024123512_28082025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a model segmentation method for 3D printing, an electronic device, and a storage medium. The model segmentation method for 3D printing provided in the present application comprises: loading a 3D printing model, and acquiring all triangular facets and all vertex data of a selected area of the 3D printing model; obtaining edges of all the triangular facets on the basis of all the triangular facets and all the vertex data; determining a sub-model set on the basis of the edges of all the triangular facets, wherein the sub-model set comprises a plurality of sub-models, and the sub-models comprise a plurality of triangular facets having topological relationships; and setting a corresponding color for each sub-model, performing slicing on the sub-model set to obtain a contour set, and partitioning the contour set on the basis of the color corresponding to each sub-model to obtain a partitioned contour set.
Need to check novelty before this filing date? Find Prior Art

Description

Model segmentation method, electronic device and storage medium for 3D printing

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese Patent Application No. 202410203872.1 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 model segmentation method, electronic device, and storage medium for 3D printing. 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 stacking materials layer by layer. As 3D printing technology matures and the market grows, the demand for color printing is also increasing, and printers that can support multi-color printing are becoming more and more common. A 3D printable model typically includes multiple sub-models. Existing 3D printing technology is generally unable to effectively distinguish between different sub-models. When printing in multiple colors, different sub-models may require different colors of consumables. Therefore, existing 3D printing technology cannot effectively set the amount of consumables corresponding to different sub-models. As a result, the consumables corresponding to the previous sub-model must be used up before printing the next sub-model, resulting in a large amount of consumables wasted.

[0005] Summary of the Invention

[0006] The present application provides a model segmentation method, electronic device and storage medium for 3D printing to solve the technical problem of large-scale waste of printing consumables in the prior art.

[0007] The technical solution of the present application is as follows, providing a model segmentation method for 3D printing, comprising:

[0008] Loading a 3D printing model, and obtaining data of all triangular faces and all vertices of a selected area of ​​the 3D printing model;

[0009] Obtaining edges of all the triangular faces according to all the triangular faces and all the vertex data;

[0010] Determine a sub-model set according to the edges of all the triangular faces, wherein the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship;

[0011] A corresponding color is set for each sub-model, and the sub-model set is sliced ​​to obtain a contour set. The contour set is divided according to the color corresponding to each sub-model to obtain a divided contour set.

[0012] Furthermore, according to all the triangular faces and all the vertex data, edges of all the triangular faces are obtained, including:

[0013] Determine a current triangular face from all the triangular faces, and determine edges of the current triangular face and vertex data of the current triangular face based on the current triangular face and all the vertex data;

[0014] According to the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face are determined, and the edges having the same vertices are used as edges of adjacent triangular faces to obtain the edges of all triangular faces.

[0015] Furthermore, determining edges having the same vertices as the vertex data of the current triangular face based on the vertex data of the current triangular face, and using the edges having the same vertices as the edges of adjacent triangular faces to obtain the edges of all triangular faces, includes:

[0016] According to the vertex data of the current triangular face, determine the edge with the same vertex as the vertex data of the current triangular face, use the edge with the same vertex as the edge of the adjacent triangular face, use the adjacent triangular face as the latest current triangular face, and obtain the edge of the adjacent triangular face of the latest current triangular face according to the edge of the latest current triangular face, until all the triangular faces are traversed and the edges of all the triangular faces are obtained.

[0017] Furthermore, determining a sub-model set according to the edges of all the triangular faces includes:

[0018] An adjacent relationship table is formed according to the edges of all the triangular faces, and a sub-model set is determined according to the adjacent relationship table.

[0019] Furthermore, after setting the corresponding color for each sub-model, the method further includes: storing the corresponding colors of all triangular faces of the sub-model in different containers respectively.

[0020] Furthermore, the sub-model set is sliced ​​to obtain a contour set, and the contour set is divided according to the color corresponding to each sub-model setting to obtain a divided contour set, including:

[0021] The sub-model set is sliced ​​according to a preset height to obtain a contour set, and the contour set is divided according to the color corresponding to each triangle face of each sub-model to obtain a divided contour set.

[0022] Furthermore, after obtaining the divided contour sets, the method further includes: printing and combining the divided contour sets one by one according to a preset printing order.

[0023] Another technical solution of the present application is as follows: a 3D printer is provided, comprising a data acquisition module, an edge acquisition module, a sub-model set determination module, and a contour set determination module;

[0024] The data acquisition module is used to load the 3D printing model and obtain all triangular faces and all vertex data of the selected area of ​​the 3D printing model;

[0025] The edge acquisition module is used to obtain the edges of all the triangular faces according to all the triangular faces and all the vertex data;

[0026] The sub-model set determining module is configured to determine a sub-model set based on the edges of all the triangular faces, wherein the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship;

[0027] The contour set determination module is used to set a corresponding color for each sub-model, slice the sub-model set to obtain a contour set, and divide the contour set according to the color corresponding to each sub-model to obtain a divided contour set.

[0028] 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 executable by the processor, and when the processor executes the computer program, the model segmentation method for 3D printing as described in any of the above technical solutions is implemented.

[0029] Another technical solution of the present application is as follows: a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the model segmentation method for 3D printing as described in any of the above technical solutions is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] 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.

[0031] FIG1 is a schematic flow chart of a model segmentation method for 3D printing provided in one or more embodiments of the present application;

[0032] FIG2 is a schematic diagram of the structure of a triangular face provided by one or more embodiments of the present application;

[0033] FIG3 is a schematic structural diagram of a 3D printer provided by one or more embodiments of the present application;

[0034] FIG4 is a schematic diagram of the structure of an electronic device provided by one or more embodiments of the present application;

[0035] FIG5 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

[0036] 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.

[0037] 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.

[0038] 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.

[0039] FIG1 is a flow chart of a model segmentation method for 3D printing according to an embodiment of the present application. It should be noted that the model segmentation method for 3D printing according to 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 model segmentation method for 3D printing mainly includes the following steps:

[0040] S101, loading a 3D printing model, and obtaining all triangular faces and all vertex data of a selected area of ​​the 3D printing model.

[0041] It should be noted that the above-mentioned 3D printing model may include an overall model or multiple split models. When performing model segmentation, it is necessary to select an overall model (for example, overall model A) or one of multiple split models (for example, split models B, C, D); when the selected area is the overall model A, all triangular faces and all vertex data of the overall model A are obtained. When the selected area is one of multiple split models, for example, the selected area is split model B, all triangular faces and all vertex data of the corresponding split model B are obtained. After segmenting the split model B, other split models (for example, split model C and split model D) can be selected in sequence as selected areas until the 3D printing model is completely segmented.

[0042] In a specific embodiment, a 3D printing model mesh is loaded, and all triangular faces (triangular patches) and vertex data vectors of the 3D printing model are obtained. The above 3D printing model is the model to be printed.

[0043] S102: Obtain edges of all the triangular faces according to all the triangular faces and all the vertex data.

[0044] In some embodiments, obtaining edges of all triangular faces according to all triangular faces and all vertex data includes:

[0045] Determine a current triangular face from all the triangular faces, and determine edges of the current triangular face and vertex data of the current triangular face based on the current triangular face and all the vertex data;

[0046] According to the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face are determined, and the edges having the same vertices are used as edges of adjacent triangular faces to obtain the edges of all triangular faces.

[0047] In a specific embodiment, a schematic diagram of the structure of a triangle is shown in FIG2 . If the current triangle is f0, the three vertex indexes of the current triangle are v0, v1, and v2, and the current edge is edge0; the three vertex data of the current triangle are obtained, and the indexes of the three edges of the current triangle can be recorded in edge (which can be a container), and each edge of the current triangle contains two vertex indexes; traverse the other faces of all triangle facets to determine another edge that has the same vertex as the current edge edge0, such as the edge where f1 is located in FIG2 , and the index of the corresponding edge of the adjacent triangle f1 can be recorded in the adjacent faces neighbors of the current triangle f0;

[0048] In some embodiments, determining, based on vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face, and using the edges having the same vertices as edges of adjacent triangular faces to obtain edges of all triangular faces includes:

[0049] According to the vertex data of the current triangular face, determine the edge with the same vertex as the vertex data of the current triangular face, use the edge with the same vertex as the edge of the adjacent triangular face, use the adjacent triangular face as the latest current triangular face, and obtain the edge of the adjacent triangular face of the latest current triangular face according to the edge of the latest current triangular face, until all the triangular faces are traversed and the edges of all the triangular faces are obtained.

[0050] In a specific embodiment, the adjacent triangle is used as the latest current triangle, and the edges of the latest current triangle and the vertex data of the latest current triangle are determined. Based on the vertex data of the latest current triangle, the edges with the same vertices as the vertex data of the latest current triangle are determined, and the edges with the same vertices are used as the edges of the adjacent triangle, and so on, until all triangles are traversed and the edges of all triangles are obtained.

[0051] S103: Determine a sub-model set according to the edges of all the triangular faces, where the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship.

[0052] In some embodiments, determining a sub-model set based on the edges of all triangular faces includes:

[0053] An adjacent relationship table is formed according to the edges of all the triangular faces, and a sub-model set is determined according to the adjacent relationship table.

[0054] In a specific embodiment, all triangular facets are traversed according to the adjacent relationship table, and triangular facets with adjacent relationships are stored together to form a sub-model, and then a sub-model set meshes is formed, where the sub-model includes multiple triangular facets with topological relationships.

[0055] S104 , setting a corresponding color for each sub-model, slicing the sub-model set to obtain a contour set, and dividing the contour set according to the color corresponding to each sub-model to obtain a divided contour set.

[0056] The 3D printing model segmentation method provided in the embodiment of the present application loads a 3D printing model to obtain all triangular faces and all vertex data of a selected area of ​​the 3D printing model; obtains the edges of all triangular faces based on all triangular faces and all vertex data; determines a sub-model set based on the edges of all triangular faces, wherein the sub-model set includes multiple sub-models, and the sub-models include multiple triangular faces with topological relationships; sets a corresponding color for each sub-model, slices the sub-model set to obtain a contour set, and divides the contour set according to the color corresponding to each sub-model to obtain a divided contour set; the printed sub-models can be well distinguished, so that corresponding consumable amounts can be set for different printed sub-models, thereby reducing waste of consumables.

[0057] In some embodiments, after setting the corresponding color for each sub-model, the method further includes: storing the corresponding colors of all triangular faces of the sub-model in different containers.

[0058] The embodiment of the present application can avoid color confusion by storing the corresponding colors of all triangular faces of the sub-model in different containers, and can facilitate subsequent printing and improve printing speed.

[0059] In a specific embodiment, when setting a corresponding color for each of the sub-models, an independent component can be selected, that is, a sub-model can be selected. After determining that the color of the consumable is the first preset color (for example, red), the colors of all the triangular faces of the sub-model are marked as the first preset color, and the corresponding colors of all the triangular faces of the sub-model are stored in different containers, and the number of containers is the same as the number of triangular faces of the sub-model; and so on, the colors of all the faces of each sub-model can be set. If a sub-model has not set a color, the sub-model defaults to the second preset color (for example, green).

[0060] In some embodiments, the sub-model set is sliced ​​to obtain a contour set, and the contour set is divided according to the color corresponding to each sub-model to obtain the divided contour set, including:

[0061] The sub-model set is sliced ​​according to a preset height to obtain a contour set, and the contour set is divided according to the color corresponding to each triangle face of each sub-model to obtain a divided contour set.

[0062] In an embodiment of the present application, the sub-model set is sliced ​​according to a preset height to obtain a contour set, and the contour set is divided according to the color corresponding to each triangle face of each sub-model to obtain a divided contour set, which facilitates multi-color printing and reduces the waste of printing consumables.

[0063] In a specific embodiment, contour data of different colors are processed according to the corresponding colors of the sub-models. According to the preset slice layer height h, the relevant surfaces of the sub-model set (the original 3D printed model) are cut into two-dimensional contours in the XY plane at heights of h*1, h*2, h*3, h*4..., and there is a set of contours at each height. The line segment information on the contours corresponds to the color information of the original triangular faces; the multiple contours of each layer are distinguished by color to obtain the divided contour set.

[0064] In some embodiments, after obtaining the divided contour sets, the method further includes: printing and combining the divided contour sets one by one according to a preset printing order.

[0065] In a specific embodiment, the outlines of each layer are printed and combined according to a preset printing sequence, and different nozzles can be used to provide consumables for outlines of different colors during printing.

[0066] The 3D printing model segmentation method provided in the embodiment of the present application loads a 3D printing model to obtain all triangular faces and all vertex data of a selected area of ​​the 3D printing model; obtains the edges of all triangular faces based on all triangular faces and all vertex data; determines a sub-model set based on the edges of all triangular faces, wherein the sub-model set includes multiple sub-models, and the sub-models include multiple triangular faces with topological relationships; sets a corresponding color for each sub-model, slices the sub-model set to obtain a contour set, and divides the contour set according to the color corresponding to each sub-model to obtain a divided contour set; the printed sub-models can be well distinguished, so that corresponding consumable amounts can be set for different printed sub-models, thereby reducing waste of consumables.

[0067] FIG3 is a schematic diagram of the structure of a 3D printer according to an embodiment of the present application. The 3D printer 30 includes a data acquisition module 31, an edge acquisition module 32, a sub-model set determination module 33, and a contour set determination module 34;

[0068] The data acquisition module 31 is used to load the 3D printing model and obtain all triangular faces and all vertex data of the selected area of ​​the 3D printing model;

[0069] The edge acquisition module 32 is used to obtain the edges of all the triangular faces according to all the triangular faces and all the vertex data;

[0070] The sub-model set determining module 33 is configured to determine a sub-model set based on the edges of all the triangular faces, wherein the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship;

[0071] The contour set determination module 34 is configured to set a corresponding color for each sub-model, slice the sub-model set to obtain a contour set, and divide the contour set according to the color corresponding to each sub-model to obtain a divided contour set.

[0072] For other details about how the modules in the 3D printer implement the above technical solution, please refer to the description of the 3D printing model segmentation method provided in the above application embodiment, which will not be repeated here.

[0073] FIG4 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. As shown in FIG4 , the electronic device 40 includes a processor 41 and a memory 42 in communication with the processor 41 .

[0074] The memory 42 stores program instructions for implementing the 3D printing model segmentation method of any of the above embodiments.

[0075] The processor 41 is configured to execute program instructions stored in the memory 42 to perform model segmentation for 3D printing.

[0076] The processor 41 may also be referred to as a CPU (Central Processing Unit). The processor 41 may be an integrated circuit chip having signal processing capabilities. The processor 41 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.

[0077] The memory 42 may be used to store the computer programs and / or modules. The processor 41 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 42 and calling data stored in the memory 42. The memory 42 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.

[0078] The memory 42 may be integrated into the processor 41 or may be provided separately from the processor 41 .

[0079] The present application provides a computer-readable storage medium, the structure of which is shown in FIG5 . The storage medium 50 stores a readable computer program 51. The computer program 51 may be stored in the storage medium in the form of a software product, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a 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 drive, a magnetic disk or an optical disk, ROM (Read-Only Memory), RAM (Random Access Memory), and other media that can store program code, or a terminal device such as a computer, server, mobile phone, or tablet.

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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)).

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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.

[0090] 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 model segmentation method for 3D printing, characterized in that: include: Loading a 3D printing model, and obtaining data of all triangular faces and all vertices of a selected area of ​​the 3D printing model; Obtaining edges of all the triangular faces according to all the triangular faces and all the vertex data; Determine a sub-model set according to the edges of all the triangular faces, wherein the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship; A corresponding color is set for each sub-model, and the sub-model set is sliced ​​to obtain a contour set. The contour set is divided according to the color corresponding to each sub-model to obtain a divided contour set.

2. The model segmentation method for 3D printing according to claim 1, wherein: Obtaining edges of all triangular faces according to all triangular faces and all vertex data, including: Determine a current triangular face from all the triangular faces, and determine edges of the current triangular face and vertex data of the current triangular face based on the current triangular face and all the vertex data; According to the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face are determined, and the edges having the same vertices are used as edges of adjacent triangular faces to obtain the edges of all triangular faces.

3. The model segmentation method for 3D printing according to claim 2, wherein: Determining, based on the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face, and using the edges having the same vertices as the edges of adjacent triangular faces to obtain the edges of all triangular faces, including: According to the vertex data of the current triangular face, determine the edge with the same vertex as the vertex data of the current triangular face, use the edge with the same vertex as the edge of the adjacent triangular face, use the adjacent triangular face as the latest current triangular face, and obtain the edge of the adjacent triangular face of the latest current triangular face according to the edge of the latest current triangular face, until all the triangular faces are traversed and the edges of all the triangular faces are obtained.

4. The model segmentation method for 3D printing according to claim 1, wherein: A sub-model set is determined according to the edges of all the triangular faces, including: An adjacent relationship table is formed according to the edges of all the triangular faces, and a sub-model set is determined according to the adjacent relationship table.

5. The model segmentation method for 3D printing according to claim 1, characterized in that: After setting the corresponding color for each sub-model, the method further includes: storing the corresponding colors of all triangular faces of the sub-model in different containers.

6. The model segmentation method for 3D printing according to claim 5, characterized in that: Slicing the sub-model set to obtain a contour set, dividing the contour set according to the color corresponding to each sub-model, and obtaining a divided contour set, including: The sub-model set is sliced ​​according to the preset height to obtain the contour set. The contour set is divided according to the color corresponding to each triangle surface of the sub-model to obtain a divided contour set.

7. The model segmentation method for 3D printing according to claim 5, characterized in that: After obtaining the divided contour sets, the method further includes: printing and combining the divided contour sets one by one according to a preset printing order.

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: Loading a 3D printing model, and obtaining data of all triangular faces and all vertices of a selected area of ​​the 3D printing model; Obtaining edges of all the triangular faces according to all the triangular faces and all the vertex data; Determine a sub-model set according to the edges of all the triangular faces, wherein the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship; A corresponding color is set for each sub-model, and the sub-model set is sliced ​​to obtain a contour set. The contour set is divided according to the color corresponding to each sub-model to obtain a divided contour set.

9. The electronic device according to claim 8, wherein Obtaining edges of all triangular faces according to all triangular faces and all vertex data, including: Determine a current triangular face from all the triangular faces, and determine edges of the current triangular face and vertex data of the current triangular face based on the current triangular face and all the vertex data; According to the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face are determined, and the edges having the same vertices are used as edges of adjacent triangular faces to obtain the edges of all triangular faces.

10. The electronic device according to claim 9, wherein Determining, based on the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face, and using the edges having the same vertices as the edges of adjacent triangular faces to obtain the edges of all triangular faces, including: According to the vertex data of the current triangular face, determine the edge with the same vertex as the vertex data of the current triangular face, use the edge with the same vertex as the edge of the adjacent triangular face, use the adjacent triangular face as the latest current triangular face, and obtain the edge of the adjacent triangular face of the latest current triangular face according to the edge of the latest current triangular face, until all the triangular faces are traversed and the edges of all the triangular faces are obtained.

11. The electronic device according to claim 8, wherein A sub-model set is determined according to the edges of all the triangular faces, including: An adjacent relationship table is formed according to the edges of all the triangular faces, and a sub-model set is determined according to the adjacent relationship table.

12. The electronic device according to claim 8, wherein After setting the corresponding color for each sub-model, the method further includes: storing the corresponding colors of all triangular faces of the sub-model in different containers.

13. The electronic device according to claim 12, wherein: Slicing the sub-model set to obtain a contour set, dividing the contour set according to the color corresponding to each sub-model, and obtaining a divided contour set, including: The sub-model set is sliced ​​according to a preset height to obtain a contour set, and the contour set is divided according to the color corresponding to each triangle face of each sub-model to obtain a divided contour set.

14. The electronic device according to claim 12, wherein: After obtaining the divided contour sets, the method further includes: printing and combining the divided contour sets one by one according to a preset printing order.

15. A computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by a processor: Loading a 3D printing model, and obtaining data of all triangular faces and all vertices of a selected area of ​​the 3D printing model; Obtaining edges of all the triangular faces according to all the triangular faces and all the vertex data; Determine a sub-model set according to the edges of all the triangular faces, wherein the sub-model set includes a plurality of sub-models, and each sub-model includes a plurality of triangular faces having a topological relationship; A corresponding color is set for each sub-model, and the sub-model set is sliced ​​to obtain a contour set. The contour set is divided according to the color corresponding to each sub-model to obtain a divided contour set.

16. The computer-readable storage medium of claim 15, wherein: Obtaining edges of all triangular faces according to all triangular faces and all vertex data, including: Determine a current triangular face from all the triangular faces, and determine edges of the current triangular face and vertex data of the current triangular face based on the current triangular face and all the vertex data; According to the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face are determined, and the edges having the same vertices are used as edges of adjacent triangular faces to obtain the edges of all triangular faces.

17. The computer-readable storage medium of claim 16, wherein: Determining, based on the vertex data of the current triangular face, edges having the same vertices as the vertex data of the current triangular face, and using the edges having the same vertices as the edges of adjacent triangular faces to obtain the edges of all triangular faces, including: According to the vertex data of the current triangular face, determine the edge with the same vertex as the vertex data of the current triangular face, use the edge with the same vertex as the edge of the adjacent triangular face, use the adjacent triangular face as the latest current triangular face, and obtain the edge of the adjacent triangular face of the latest current triangular face according to the edge of the latest current triangular face, until all the triangular faces are traversed and the edges of all the triangular faces are obtained.

18. The computer-readable storage medium of claim 15, wherein: A sub-model set is determined according to the edges of all the triangular faces, including: An adjacent relationship table is formed according to the edges of all the triangular faces, and a sub-model set is determined according to the adjacent relationship table.

19. The computer-readable storage medium according to claim 15, wherein: After setting the corresponding color for each sub-model, the method further includes: storing the corresponding colors of all triangular faces of the sub-model in different containers.

20. The computer-readable storage medium according to claim 19, wherein Slicing the sub-model set to obtain a contour set, dividing the contour set according to the color corresponding to each sub-model, and obtaining a divided contour set, including: The sub-model set is sliced ​​according to a preset height to obtain a contour set, and the contour set is divided according to the color corresponding to each triangle face of each sub-model to obtain a divided contour set.

Citation Information

Patent Citations

  • 3D printing file generation method and device, computer equipment and storage medium

    CN113591300A

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

    CN115214121A

  • Three-dimensional model segmentation method and device, equipment and storage medium

    CN116310261A

  • Model printing method based on 3D printing equipment, electronic equipment and storage medium

    CN117416043A

  • Model segmentation method for 3D printing, 3D printer, equipment and storage medium

    CN118279536A