Multi-color model color boundary segmentation method and device, and related equipment

CN122887940APending Publication Date: 2026-10-09SHENZHEN CBD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611127471.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0002]目前,在3D打印技术领域,用户在面对大尺寸模型时,需要对模型进行分割,以方便进行分体打印,或是方便进行分包运输;现有的分拆模型的方案主要是针对单色模型进行平面分割,或是按照模型轮廓进行闭合描线从而进行曲面分割;而对于多个单一色块拼色形成的多色模型,想要不破坏完整色块的同时,又能将模型按不同颜色部位进行精细分割和进行单色打印,目前还没有相应的快捷方法

Benefits of technology

[0020]1.运用本申请实施例提供的方法,能够使用户对多个单一色块拼色形成的多色模型,按颜色边界进行分割,从而方便对分割后的模型进行单色打印或分包运输。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887940A_ABST
    Figure CN122887940A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of 3D printing, and provides a multi-color model color boundary segmentation method and device and related equipment, which comprises the following steps: traversing the triangular mesh data of a multi-color model; obtaining a color boundary of the multi-color model in an XYZ three-axis coordinate system; determining a closed polygon from the color boundary; generating a smooth segmentation surface according to the closed polygon; segmenting the multi-color model into a first segment model and a second segment model through the smooth segmentation surface; combining the smooth segmentation surface and the first segment model to generate a first segmented model; combining the smooth segmentation surface and the second segment model to generate a second segmented model; and storing the first segmented model and the second segmented model. The method can segment a multi-color model formed by multiple single-color blocks in the model slicing processing stage according to color boundaries, thereby facilitating single-color printing or separate packaging and transportation of the segmented model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of 3D printing technology, specifically relating to a method, apparatus and related equipment for segmenting multicolor models according to color boundaries. Background Technology

[0002] Currently, in the field of 3D printing technology, when faced with large-sized models, users need to divide the models to facilitate separate printing or packaging and transportation. Existing solutions for disassembling models mainly involve planar division of monochrome models or surface division by tracing closed lines according to the model's outline. However, for multi-color models formed by combining multiple single-color blocks, there is currently no quick and easy method to precisely divide the model according to different color parts and print them in monochrome without destroying the complete color blocks.

[0003] Therefore, there is a need to provide a method, apparatus, and related equipment for segmenting multicolor models according to color boundaries, so that ordinary users can segment the above-mentioned multicolor models according to color boundaries, thereby facilitating monochrome printing or subcontracting and transporting the segmented models. Summary of the Invention

[0004] This application provides a method, apparatus, and related equipment for segmenting multi-color models according to color boundaries. In the model slicing stage, a multi-color model formed by combining multiple single-color blocks can be segmented according to color boundaries, thereby facilitating monochrome printing or subcontracting and transporting the segmented model.

[0005] The first aspect of this application provides a method for segmenting a multicolor model according to color boundaries, including: Traverse the triangular mesh data of the multicolor model; Obtain a color boundary of the multicolor model in the XYZ three-axis coordinate system; A closed polygon is defined by the color boundary; A smooth segmentation surface is generated based on the closed polygon; The multicolor model is divided into a first segment and a second segment using the smooth dividing surface. The smooth segmentation surface is combined with the first segment model to generate the first segment model; The smooth segmentation surface is combined with the second segment model to generate the second segment model; Store the first segmented model and the second segmented model.

[0006] Furthermore, in the method for segmenting the multicolor model by color boundary, obtaining a color boundary of the multicolor model in the XYZ three-axis coordinate system includes: Obtain the color data from the triangular mesh data; Based on the color data, obtain triangular meshes with the same or similar colors and determine them as candidate mesh groups; Obtain consecutive adjacent triangular meshes from the candidate mesh group and determine them as the target triangular mesh group; Obtain the overall border of the target triangular mesh group and define it as the color boundary.

[0007] Furthermore, in the multi-color model segmentation method based on color boundaries, generating a smooth segmentation surface based on the closed polygon includes: A preliminary triangulation group is generated by performing polygon triangulation on the closed polygon. The initial triangular mesh group is regenerated to generate a finer, more uniform triangular mesh group. Smooth the subdivided uniform triangular mesh group to generate a smooth segmentation surface composed of triangular meshes.

[0008] Furthermore, the multicolor model segmentation method based on color boundaries also includes: Tenon and mortise protrusions are generated on the smooth segmentation surface of the first segment model; Mortise and tenon grooves are generated on the smooth segmentation surface of the second segment model.

[0009] Preferably, the mortise and tenon protrusion and the mortise and tenon groove are cylindrical, square, conical, trapezoidal, stepped, hemispherical, or annular.

[0010] Preferably, the polygon triangulation processing method adopts the ear-cutting method, the sector-shaped triangulation method, or the Delaunay triangulation method.

[0011] Preferably, the mesh regeneration process employs a remeshing algorithm based on the VCG library or a remeshing algorithm based on the CGAL library.

[0012] A second aspect of this application provides a device for segmenting a multicolor model by color boundaries, comprising: The grid data traversal module is used to traverse the triangular grid data of the multi-color model; The color boundary acquisition module is used to obtain a color boundary of a multicolor model in the XYZ three-axis coordinate system; A polygon determination module is used to determine a closed polygon based on the color boundary; A segmentation surface generation module is used to generate a smooth segmentation surface based on the closed polygon; The model segmentation module is used to segment the multi-color model into a first segment and a second segment using the smooth segmentation surface. The first segmented model generation module is used to combine the smooth segmentation surface with the first segmented model to generate the first segmented model. The second segmented model generation module is used to combine the smooth segmentation surface with the second segmented model to generate a second segmented model. The model storage module is used to store the first segment model and the second segment model.

[0013] Furthermore, in the multi-color model segmentation device, the color boundary acquisition module includes: The color data acquisition module is used to acquire color data from the triangular mesh data; The candidate grid determination module is used to obtain triangular grids with the same or similar colors based on color data and determine them as candidate grid groups. The target mesh determination module is used to obtain consecutive adjacent triangular meshes from the candidate mesh group and determine them as the target triangular mesh group. The color boundary determination module is used to obtain the overall perimeter of the target triangular mesh group and determine it as the color boundary.

[0014] Furthermore, in the multi-color model segmentation device based on color boundaries, the segmentation surface generation module includes: The triangulation generation module is used to perform polygon triangulation on closed polygons to generate a preliminary triangular mesh group; The triangulation generation module is used to regenerate the initial triangular mesh group into a more subdivided and uniform triangular mesh group. The mesh smoothing module is used to smooth a group of subdivided uniform triangular meshes to generate smooth segmentation surfaces composed of triangular meshes.

[0015] Furthermore, the multicolor model segmentation device based on color boundaries further includes: The mortise and tenon protrusion generation module is used to generate mortise and tenon protrusions on the smooth segmentation surface of the first segment model; The mortise and tenon groove generation module is used to generate mortise and tenon grooves on the smooth dividing surface of the second segment model.

[0016] A third aspect of this application provides an electronic device, including: At least one processing unit; and a storage unit communicatively connected to the at least one processing unit; The storage unit stores instructions that can be executed by the at least one processing unit. When the at least one processing unit executes the instructions, it implements the steps of the multicolor model segmentation method according to color boundaries as described in the first aspect above.

[0017] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processing unit, implements the steps of the multicolor model segmentation method according to color boundaries as described in the first aspect above.

[0018] A fifth aspect of this application provides a computer program product comprising computer instructions that, when executed by a computer, implement the steps of the multicolor model segmentation method according to color boundaries as described in the first aspect above.

[0019] Compared with the prior art, the beneficial effects of the present invention are:

[0020] 1. The method provided in the embodiments of this application enables users to divide a multi-color model formed by combining multiple single-color blocks according to color boundaries, thereby facilitating monochrome printing or subcontracting and shipping of the divided model.

[0021] 2. Using the method provided in the embodiments of this application, users can divide a multi-color model formed by combining multiple single color blocks according to color boundaries, and the model can be split into different single colors according to different color blocks, which makes it convenient for users to achieve single-color printing. This splitting method does not require users to purchase and use a multi-color printer.

[0022] 3. Using the method provided in the embodiments of this application, users can divide a multi-color model formed by combining multiple single-color blocks according to color boundaries, and users can print model segmentation components with different single colors, thereby achieving the effect of multi-color model.

[0023] 4. Using the method provided in the embodiments of this application, color boundaries can be automatically identified to achieve model segmentation, which is more efficient than manually drawing lines to segment multi-color areas; the color boundary line identification is more accurate, and the segmentation is less likely to cause color boundary cutting and mixing. After single-color printing and splicing, the color area is more consistent with the original multi-color design. Attached Figure Description

[0024] Figure 1 This is the main flowchart of the multicolor model segmentation method based on color boundaries in the embodiments of this application.

[0025] Figure 2 This is a sub-process of the multicolor model segmentation method based on color boundaries in the embodiments of this application. Figure 1 .

[0026] Figure 3 This is a sub-process of the multicolor model segmentation method based on color boundaries in the embodiments of this application. Figure 2 .

[0027] Figure 4This is a main structural diagram of the multicolor model segmentation device according to color boundaries in an embodiment of this application.

[0028] Figure 5 This is a substructure of the multicolor model segmentation device according to color boundaries in the embodiments of this application. Figure 1 .

[0029] Figure 6 This is a substructure of the multicolor model segmentation device according to color boundaries in the embodiments of this application. Figure 2 .

[0030] Figure 7 This is a schematic diagram of the two-color cylinder model 1 in the XYZ three-axis coordinate system of this application.

[0031] Figure 8 This is a schematic diagram of the two-color cylinder model 2 in the XYZ three-axis coordinate system of this application.

[0032] Figure 9 This is a schematic diagram of a closed polygon as seen from the XY plane in this application.

[0033] Figure 10 This is a schematic diagram of the polygon triangulation process from the XY plane perspective of this application. Figure 1 .

[0034] Figure 11 This is a schematic diagram of the mesh regeneration process from the XY plane perspective in this application. Figure 1 .

[0035] Figure 12 This is a schematic diagram of the mesh regeneration process from the XY plane perspective in this application. Figure 2 .

[0036] Figure 13 This is a schematic diagram of the mesh regeneration process from the XY plane perspective in this application. Figure 3 .

[0037] Figure 14 This is a schematic diagram of a group of uniformly subdivided triangular meshes from the XY plane perspective of this application.

[0038] Figure 15 This is a schematic diagram of a uniformly subdivided triangular mesh group from the XYZ three-dimensional perspective of this application.

[0039] Figure 16 This is a schematic diagram of the triangular mesh smoothing process in the XYZ three-dimensional view of this application.

[0040] Figure 17 This is a schematic diagram of the segmented surface mesh group from the XYZ three-dimensional perspective of this application.

[0041] Figure 18This is a schematic diagram of the first segment model and the mesh composition of the first segment model in this application.

[0042] Figure 19 This is a frontal view of the two-color angel mouse model to be segmented in this application.

[0043] Figure 20 This is a rendering of the angel mouse two-color model after being segmented according to color boundaries using the method of this application.

[0044] Figure 21 This is a rendering of the lower part of the Angel Mouse two-color model after it has been divided according to color boundaries in this application.

[0045] Figure 22 This is a flipped image of the upper part of the Angel Mouse two-color model after it has been divided according to color boundaries in this application.

[0046] Figure 23 This is a rendering of the lower part of the Angel Mouse two-color model after it has been segmented using the method described in this application, with the addition of mortise and tenon protrusions.

[0047] Figure 24 This is a flip view of the upper model with mortise and tenon grooves after the two-color angel mouse model is divided using the method of this application.

[0048] Figure 25 The electronic device structure diagram for implementing the multicolor model segmentation method based on color boundaries in the embodiments of this application is shown in the following diagram.

[0049] Figure 26 This is a schematic diagram of the color boundary segmentation model of the electronic device in the embodiment of this application.

[0050] Figure 27 A structural block diagram of a 3D printing device for implementing the multicolor model segmentation method based on color boundaries in this application.

[0051] Figure 28 This is a schematic diagram of the model in this application being divided into slices and printed after color boundaries.

[0052] Label Explanation:

[0053] Electronic device 7; 3D printing equipment 8; mobile storage device 9; processing unit 71; storage unit 72; computer program 73; controller 81; memory 82; printing control program 83.

[0054] Mesh data traversal module 100; Color boundary acquisition module 200; Color data acquisition module 220; Candidate mesh determination module 240; Target mesh determination module 260; Color boundary determination module 280; Polygon determination module 300; Segmentation surface generation module 400; Triangulation generation module 420; Triangulation generation module 440; Mesh smoothing module 460; Model segmentation module 500; First segment model generation module 600; Second segment model generation module 700; Tenon and mortise protrusion generation module 720; Tenon and mortise groove generation module 740; Model storage module 800.

[0055] Two-color cylinder model 1 101; Two-color cylinder model 2 102; Zero plane 103; Closed polygon 104; Vertex 105; Preliminary triangular mesh 106; Preliminary triangular mesh group 107; Node 108; First regenerated triangular mesh group 201; First regenerated triangular mesh 202; Subdivided uniform triangular mesh group 301; Subdivided uniform triangular mesh 302; Smooth dividing surface 401; First segment model 501; Second segment model 502; Angel mouse two-color model 601; Lower model 610; Upper model 620; Lower model dividing surface 611; Tenon and mortise protrusion 612; Upper model dividing surface 621; Tenon and mortise groove 622. Detailed Implementation

[0056] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application.

[0058] Figure 1 This is the main flowchart of the multicolor model segmentation method based on color boundaries according to an embodiment of this application. As shown in the figure, the multicolor model segmentation method based on color boundaries according to this application includes the following steps: S100. Traverse the triangular mesh data of the multicolor model; S200. Obtain a color boundary of the multicolor model in the XYZ three-axis coordinate system; S300. A closed polygon is defined by the aforementioned color boundary; S400. Generate a smooth segmentation surface based on the closed polygon; S500. The multicolor model is divided into a first segment model and a second segment model using the smooth dividing surface; S600. Combine the smooth segmentation surface with the first segment model to generate a first segmented model; S700. Combine the smooth segmentation surface with the second segment model to generate a second segment model; S800. Store the first segmented model and the second segmented model.

[0059] Furthermore, the multicolor model segmentation method of this application, based on color boundaries, also includes optional steps: S720. Generate mortise and tenon protrusions on the smooth dividing surface of the first segmented model; S740. Generate mortise and tenon grooves on the smooth dividing surface of the second segmented model.

[0060] Specifically, the mortise and tenon protrusion and the mortise and tenon groove are cylindrical, square, conical, trapezoidal, stepped, hemispherical, or annular.

[0061] Figure 2 This is a sub-process of the multicolor model segmentation method based on color boundaries in the embodiments of this application. Figure 1 As shown in the figure, this application Figure 1 Step S200 involves obtaining a color boundary of the multicolor model in the XYZ three-axis coordinate system, including the following sub-steps: S220. Obtain the color data from the triangular mesh data; S240. Obtain triangular meshes with the same or similar colors based on the color data and identify them as candidate mesh groups; S260. Obtain consecutive adjacent triangular meshes from the candidate mesh group and determine them as the target triangular mesh group; S280. Obtain the overall border of the target triangular mesh group and determine it as the color boundary.

[0062] Figure 3 This is a sub-process of the multicolor model segmentation method based on color boundaries in the embodiments of this application. Figure 2 As shown in the figure, this application Figure 1 Step S400, which generates a smooth segmentation surface based on the closed polygon, includes the following sub-steps: S420. Perform polygon triangulation on the closed polygon to generate a preliminary triangular mesh group; S440. Perform mesh regeneration on the initial triangular mesh group to generate a subdivided, uniform triangular mesh group; S460. Smooth the subdivided uniform triangular mesh group to generate a smooth segmentation surface composed of triangular meshes.

[0063] Figure 4 This is a main structural diagram of the multicolor model segmentation device according to color boundaries according to an embodiment of this application. As shown in the figure, the multicolor model segmentation device according to color boundaries according to this application includes: Mesh data traversal module 100 is used to traverse the triangular mesh data of the multicolor model; The color boundary acquisition module 200 is used to acquire a color boundary of a multicolor model in the XYZ three-axis coordinate system; Polygon determination module 300, used to determine a closed polygon by the color boundary; The segmentation surface generation module 400 is used to generate a smooth segmentation surface based on the closed polygon; The model segmentation module 500 is used to segment the multi-color model into a first segment and a second segment using the smooth segmentation surface. The first segmented model generation module 600 is used to combine the smooth segmentation surface with the first segmented model to generate a first segmented model. The second segmented model generation module 700 is used to combine the smooth segmentation surface with the second segmented model to generate a second segmented model. The model storage module 800 is used to store the first segment model and the second segment model.

[0064] In addition, the multicolor model segmentation device of this application also includes optional modules: The mortise and tenon protrusion generation module 720 is used to generate mortise and tenon protrusions on the smooth segmentation surface of the first segment model; The mortise and tenon groove generation module 740 is used to generate mortise and tenon grooves on the smooth dividing surface of the second segment model.

[0065] Figure 5 This is a substructure of the multicolor model segmentation device according to color boundaries in the embodiments of this application. Figure 1 As shown in the figure, this application Figure 4 The color boundary acquisition module 200 in the middle includes the following sub-modules: Color data acquisition module 220 is used to acquire color data in the triangular mesh data; The candidate mesh determination module 240 is used to obtain triangular meshes with the same or similar colors based on color data and determine them as candidate mesh groups; The target mesh determination module 260 is used to obtain consecutive adjacent triangular meshes from the candidate mesh group and determine them as the target triangular mesh group; Color boundary determination module 280 is used to obtain the overall perimeter of the target triangular mesh group and determine it as the color boundary.

[0066] Figure 6 This is a substructure of the multicolor model segmentation device according to color boundaries in the embodiments of this application. Figure 2 As shown in the figure, this application Figure 4 The segmentation surface generation module 400 in the middle includes the following sub-modules: Triangulation generation module 420 is used to perform polygon triangulation processing on closed polygons to generate a preliminary triangular mesh group. The triangulation generation module 440 is used to perform mesh regeneration processing on the initial triangular mesh group to generate a subdivided and uniform triangular mesh group. The mesh smoothing module 460 is used to smooth a group of subdivided uniform triangular meshes to generate a smooth segmentation surface composed of triangular meshes.

[0067] Figure 7 This is a schematic diagram of the two-color cylindrical model 1 in the XYZ three-axis coordinate system of this application. As shown in the figure, this figure illustrates a specific two-color cylindrical model 101 in the XYZ three-axis coordinate system with its circular base attached to the zero plane 103; it can be seen that the upper half of the mesh of the two-color cylindrical model 101 has black dots filling to represent black, and the lower half is a blank mesh to represent white.

[0068] Specifically, the dashed circles on the left side of this diagram represent triangular meshes M1-M9; where triangular meshes M1-M7 are black; and triangular meshes M8-M9 are transparent; therefore, according to... Figure 2 The steps in the example can obtain the color data of M1-M9; then, the triangular meshes M1-M7, all black, are identified as the first group of candidate meshes; the triangular meshes M8-M9, all white, are identified as the second group of candidate meshes; from the first group of candidate meshes, consecutive adjacent triangular meshes M1-M7 can be obtained and identified as the first group of target triangular meshes; from the second group of candidate meshes, consecutive adjacent triangular meshes M8-M9 can be obtained and identified as the second group of target triangular meshes; therefore, the common edge of the triangular meshes at the adjacent intersection of triangular meshes M1, M7 and triangular meshes M8, M9 is the color boundary; zooming in on the entire two-color cylindrical model 101, the overall edge of the upper black triangular mesh is the color boundary; correspondingly, the color boundary forms a closed polygon 104; it can be noted that the color boundary is the edge of the triangular mesh on the model, and the vertices of the closed polygon 104 are the vertices 105 of the triangular mesh.

[0069] In particular, according to Figure 2In step S240 of the example, triangular meshes with the same or similar colors are obtained based on the color data and determined as candidate mesh groups. Here, the mention of "same or similar colors" can be understood as meaning that, for example, the RGB grayscale values ​​of gray are 128, 128, and 128 respectively. When obtaining similar colors, within a certain color deviation range, specifically, the allowable error range of the grayscale value can be set for the RGB grayscale value. For example, triangular meshes with RGB grayscale values ​​of 138, 138, and 138, which are lighter gray, will also be determined as candidate mesh groups. In this case, the allowable error range of the grayscale value is set to 10.

[0070] Specifically, in the example of the two-color cylinder model 101 shown in this figure, all vertices of the closed polygon 104 lie on the same plane, therefore, combined with... Figure 3 As can be seen, when generating a smooth segmented surface based on a closed polygon, smoothing processing is not required; of course, if step S460 is executed and smoothing processing is performed, it will not affect the generation of the smooth segmented surface.

[0071] Figure 8 This is a schematic diagram of the two-color cylinder model 2 in the XYZ three-axis coordinate system of this application. As shown in the figure, this figure illustrates a specific two-color cylinder model 2 102 in the XYZ three-axis coordinate system, with its circular base attached to the zero plane 103; it can be seen that the upper half of the mesh of the two-color cylinder model 2 102 has black dots filling to represent black, and the lower half is a blank mesh representing white; the difference is that the vertices of the closed polygon 104 in this figure are not on the same plane, therefore, combined with Figure 3 As can be seen, when generating a smooth segmented surface based on a closed polygon, smoothing processing is required; similarly, the color boundary is the edge of the triangular mesh on the model, and the vertex of the closed polygon 104 is the vertex 105 of the triangular mesh.

[0072] Figure 9 This is a schematic diagram of a closed polygon viewed from the XY plane in this application. As shown in the figure, this figure... Figure 7 or Figure 8 Based on this, examples are given from the XY plane perspective. Figure 7 or Figure 8 The closed polygon 104; specifically, each vertex of the closed polygon 104 is... Figure 7 or Figure 8 Vertex 105 on the color boundary.

[0073] Figure 10 This is a schematic diagram of the polygon triangulation process from the XY plane perspective of this application. Figure 1 As shown in the figure, in Figure 9 Based on the example of closed polygon 104; using Figure 3In step S420, the closed polygon 104 is subjected to polygon triangulation to generate a preliminary triangular mesh group. Specifically, as an example process in this figure, the ear-cutting method is used. Starting from point P1, points P1 and P2 are connected in a counterclockwise direction to cut out triangular mesh G1. Similarly, triangular meshes G2, G3, G4, G5, and G6 can be cut out. Then, connecting points P7 and P2, triangular mesh G7 can be cut out. Similarly, triangular meshes G8, G9, and G10 can be cut out. Finally, the largest triangular mesh G11 remains. Thus, the entire closed polygon 104 is subjected to polygon triangulation to generate a preliminary triangular mesh group 107, which contains multiple preliminary triangular meshes 106.

[0074] At this point, because the initial triangular meshes (106) are of uneven size, they are not suitable as smooth dividing surfaces for joining two segmented models. This is because... Figure 8 Taking the middle vertex 105 as an example, if the adjacent vertices 105 in the Z-axis direction have large fluctuations, then in conjunction with this figure, for example, if points P1 and P2 are located at a low position and point P0 is located at a high position, then the triangular mesh area where G1 is located is prone to forming a peak-like structure with a steep rise at point P0 and a sharp drop towards points P1 and P2 after the final printing. Such a structure is fragile and easily broken. Therefore, a more beneficial approach is to optimize the mesh after generating the initial triangular mesh group 107.

[0075] Figure 11 This is a schematic diagram of the mesh regeneration process from the XY plane perspective in this application. Figure 1 As shown in the figure, starting from this figure, Figures 11-14 The symbols are all Figure 3 Step S440 involves regenerating the initial triangular mesh group to create a more subdivided, uniform triangular mesh group. Figure 11 As a transitional example, the example performs an initial mesh regeneration process to generate... Figure 12 The illustration shows a regeneration of the triangular mesh group 201. The ultimate goal is to generate... Figure 14 The subdivided uniform triangular mesh group 301 in the middle still needs to undergo further mesh regeneration processing based on the regeneration of triangular mesh group 201.

[0076] Specifically, in this diagram, the four longest line segments in the initial triangular mesh group 107 are divided, corresponding to nodes J1, J2, J3, and J4, respectively. Generally, these nodes can be the midpoints of the line segments. Correspondingly, by connecting these nodes to the nearest node and the triangular vertex, the initial triangular mesh group 107 can be regenerated to generate the desired mesh. Figure 12 The diagram shows a regenerated triangular mesh group 201.

[0077] Figure 12This is a schematic diagram of the mesh regeneration process from the XY plane perspective in this application. Figure 2 As shown in the figure, this diagram illustrates that in Figure 11 Based on this, the initial triangular mesh group 107 is regenerated to generate a first-generation triangular mesh group 201. It can be seen that the first-generation triangular mesh 202 in the central region is compared with the first-generation triangular mesh 202. Figure 11 The initial triangular mesh 106 is more subdivided and uniform.

[0078] Figure 13 This is a schematic diagram of the mesh regeneration process from the XY plane perspective in this application. Figure 3 As shown in the figure, Figure 3 The process in step S440 involves regenerating the initial triangular mesh group to generate a more subdivided, uniformly sized triangular mesh group. Specifically, this figure only serves as an example process, demonstrating a second mesh regeneration process to generate... Figure 14 The schematic diagram shows a subdivided uniform triangular mesh group 301.

[0079] This diagram divides the longer line segments in the first-generation triangular mesh group 201, with the corresponding node 108 represented by smaller blank dots in the diagram. Correspondingly, connecting the node to the nearest node and the triangle vertex allows for a second mesh regeneration process on the first-generation triangular mesh group 201, resulting in a mesh like... Figure 14 The subdivided uniform triangular mesh group 301 is shown.

[0080] Figure 14 This is a schematic diagram of a uniformly subdivided triangular mesh group from the XY plane perspective of this application. As shown in the figure, this diagram... Figure 13 Based on the initial regenerated triangular mesh group 201, a second mesh regeneration process is performed to generate a subdivided uniform triangular mesh group 301. It can be seen that the subdivided uniform triangular mesh 302 in the central region is significantly different from the previous one. Figure 9 The regenerated triangular mesh 202 is further subdivided and uniform.

[0081] Figure 15 This is a schematic diagram of a subdivided uniform triangular mesh group from the XYZ three-dimensional perspective of this application. As shown in the figure, this diagram illustrates the process from an oblique perspective in the XYZ three-axis coordinate system. Figure 14 The state of the subdivided uniform triangular mesh group 301 is used as a perspective transition to prepare the example. Figure 3 The principle of step S460 is to perform triangular mesh smoothing on a group of subdivided uniform triangular meshes to generate a smooth segmentation surface.

[0082] Figure 16 This is a schematic diagram illustrating the triangular mesh smoothing process from the XYZ three-dimensional perspective of this application. As shown in the figure, this image is in the XYZ three-axis coordinate system... Figure 15Based on the subdivided uniform triangular mesh group 301, the diagram is shown. Figure 3 The process in step S460 involves smoothing the subdivided uniform triangular mesh group to generate smooth segmentation surfaces. Specifically, this figure is only an example process; the example demonstrates the smoothing of the mesh to generate... Figure 17 The schematic smooth division surface 401.

[0083] This figure illustrates the smoothing process of the internal triangular vertices in the subdivided uniform triangular mesh group 301. Specifically, the smoothing principle is illustrated by the mesh points within the dashed circle on the right. Point K0 serves as the common vertex of multiple upper triangular meshes. When its height along the Z-axis is higher than the adjacent vertices of the eight associated triangular meshes, its Z-axis height needs to be reduced to the average height of the adjacent vertices. Here, it is assumed that the resultant vector of the normal vectors of the eight associated triangular meshes is exactly along the Z-axis. After smoothing, point K0 needs to be translated along the Z-axis to point K1, and the height of point K1 is the average height of the eight vertices K2-K9 along the Z-axis.

[0084] Similarly, assuming that point K0 in the right dashed circle corresponds to the vertex of position K0 in the left subdivided uniform triangular mesh group 301, then point K0 needs to be translated upwards to position K1 along the direction of the resultant vector of the normal vectors of the five associated triangular meshes. The height of position K1 is the average height of the corresponding five vertices with respect to the direction of the resultant vector.

[0085] Similarly, the smoothed segmentation surface 401 required for the final cost application can be generated by smoothing the triangular mesh from the subdivided uniform triangular mesh group 301.

[0086] Figure 17 This is a schematic diagram of the segmented surface mesh group from the XYZ three-dimensional perspective of this application. As shown in the figure, this diagram illustrates the segmented surface mesh group from an oblique perspective in the XYZ three-axis coordinate system. Figure 16 The state of the smooth segmentation surface 401 is used as a viewpoint transition to prepare an example. Figure 1 The principle of step S500 is that the multi-color model is divided into a first segment model and a second segment model through a smooth dividing surface.

[0087] Figure 18 This is a schematic diagram of the first segment model and the mesh composition of the first segment model in this application. As shown in the figure, this figure is in the XYZ three-axis coordinate system. Figure 17 Based on the smooth segmentation surface 401, the diagram is shown. Figure 1 The process in step S500 is to divide the multicolor model into a first segment and a second segment using a smooth dividing surface; specifically, this figure is only used as an example process.

[0088] This diagram will be based on Figure 8The two-color cylindrical model 2.102 shown is used as an example because the vertices 105 of the triangular mesh on its color boundary are not on the same plane, making it more representative; in the figure, Figure 8 The two-color cylindrical model 2.102 shown has a mesh shape that is similar to... Figure 17 By performing a Boolean subtraction operation on the smooth dividing surface 401 shown, the lower mesh group of the two-color cylindrical model 102 can be preserved and combined with the smooth dividing surface 401 to form the first segment model 501 in the figure; in the figure, Figure 8 The two-color cylindrical model 2.102 shown has a mesh shape that is similar to... Figure 17 By performing a Boolean subtraction operation on the smooth dividing surface 401 shown, the upper mesh group of the two-color cylindrical model 102 can be preserved and combined with the smooth dividing surface 401 to form the second segment model 502 in the figure.

[0089] Figure 19 This is a frontal view of the angel mouse two-color model to be segmented according to this application. As shown in the figure, this figure takes an example of the angel mouse two-color model 601. It can be seen that the head and body of the angel mouse two-color model 601 are different colors. By using the technical method of this application to obtain the color boundaries of the upper and lower parts, and then generating a smooth segmentation surface according to the closed polygon formed by the color boundaries, the model can be segmented into the head and body.

[0090] Figure 20 The figure shows the effect of segmenting the Angel Mouse two-color model according to color boundaries using the method of this application. As shown in the figure, after segmenting the Angel Mouse two-color model 601 according to color boundaries using the technical method of this application, the model is separated into a lower model 610 and an upper model 620.

[0091] Figure 21 This is a rendering of the lower part of the Angel Mouse two-color model after it has been segmented according to color boundaries using the technical method of this application. As shown in the figure, after the Angel Mouse two-color model 601 is segmented according to color boundaries using the technical method of this application, the surface of the resulting lower part of the model segmentation surface 611 is mostly smooth. At the root of the wings, it can naturally transition into a smooth slope, thus achieving an ideal segmentation effect.

[0092] Figure 22 This is a flipped image of the upper model of the Angel Mouse two-color model after it has been segmented according to color boundaries in this application. As shown in the figure, after the Angel Mouse two-color model 601 is segmented according to color boundaries using the technical method of this application, the surface of the generated upper model segmentation surface 621 is also mostly smooth. At the root of the wings, it can also naturally transition into a smooth slope, thus achieving an ideal segmentation effect.

[0093] Figure 23 This is a rendering of the lower part of the angel mouse two-color model after segmentation using the method of this application, with added tenon and mortise protrusions. As shown in the figure, according to this application... Figure 1 In the S720 process step, a tenon and mortise protrusion 612 can be generated on the lower model dividing surface 611; specifically, the structural shape of the tenon and mortise protrusion 612 in the figure is a trapezoidal column.

[0094] Figure 24 This is a flip view of the upper model with mortise and tenon grooves after the two-color angel mouse model is divided using the method of this application. As shown in the figure, according to this application... Figure 1 In step S740 of the process, a tenon and mortise groove 622 can be generated on the upper model's dividing surface 621; specifically, the tenon and mortise groove 622 in the figure also has a trapezoidal column shape, used to connect with... Figure 23 The tenon and mortise protrusions 612 in the middle are used for tenon and mortise fitting.

[0095] Combination Figure 23 and Figure 24 Judging from the generation effect of the tenon and mortise protrusion 612 and the tenon and mortise groove 622 in the model, compared with the general method of cutting the model by plane, it can be seen that, as Figure 21 Although the surface of the lower part of the model segmentation surface 611 is not as smooth as the planar segmentation surface, it is precisely this unevenness that helps to prevent the model from slipping when splicing and bonding the model, and is more beneficial to the splicing and bonding of the model. At the same time, the smooth segmentation surface technology of this application can avoid the formation of sharp peaks at the edges of the segmentation surface, and can avoid the structure being fragile and easy to break.

[0096] Of course, more importantly, for this application Figure 8 For example, in a two-color model where the color boundaries are not all on the same plane, the method of dividing a multi-color model according to color boundaries in this application can ensure that each color region on the divided model remains intact; and generating mortise and tenon structures on the smooth dividing surface can also facilitate model printing and splicing. Obviously, the technical method of this application is more convenient to use, and the final division and splicing effect will be more aesthetically pleasing.

[0097] Figure 25 This is a block diagram of an electronic device that implements the color boundary segmentation method for the multicolor model in this application. As shown in the figure, the electronic device 7 in this figure is exemplified by having a processing unit 71. As shown, an electronic device 7 includes a processing unit 71 and a storage unit 72; wherein the storage unit 72 stores a computer program 73 or instructions that can be executed by the processing unit 71, and the computer program 73 or instructions are executed by the processing unit 71 to enable the processing unit 71 to perform actions such as… Figure 1 , 2 The steps in 3.

[0098] Storage unit 72, which is the third aspect of this application, provides a non-transitory computer-readable storage medium; wherein, storage unit 72 stores instructions executable by at least one processing unit 71, so that when at least one processing unit 71 executes, it performs as follows: Figure 1 , 2 The steps in 3.

[0099] Storage unit 72 is defined as a non-transitory computer-readable storage medium, which can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as those implemented during execution. Figure 1 , 2 The program instructions / modules corresponding to each step in section 3. Processing unit 71 executes various server functions and data processing by running the non-transient computer program 73, instructions, and modules stored in storage unit 72, thereby achieving the above-mentioned... Figure 1 , 2 The steps involving a computer and a processing unit are described in the embodiments corresponding to 3.

[0100] Storage unit 72 may include a stored program area and a stored data area. The stored program area may store the operating system and applications required for at least one function; the stored data area may store data created during the use of electronic device 7. Furthermore, storage unit 72 may include a high-speed random access memory unit and may also include non-transient storage units, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. In some embodiments, storage unit 72 may optionally include storage units remotely located relative to processing unit 71, and these remote storage units may be connected via a network to an electronic device performing multicolor model segmentation by color boundaries. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0101] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application-specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processing unit, which may be a dedicated or general-purpose programmable processing unit, capable of receiving data and instructions from a storage system, at least one input unit, and at least one output device, and transmitting data and instructions to the storage system, the at least one input unit, and the at least one output device.

[0102] These computer programs 73 (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processing unit and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, storage unit, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processing unit, including machine-readable media that receive machine instructions determined to be machine-readable signals. The term “machine-readable signal” refers to any signal used to provide machine instructions and / or data to a programmable processing unit.

[0103] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.

[0104] Figure 26 This is a schematic diagram of an electronic device segmenting a model by color boundaries according to an embodiment of this application. As shown in the figure, the user runs a model preprocessing software program through the electronic device 7. According to the color boundary segmentation method of this application, the user can obtain the polygons that form closed paths of the color boundaries of the two-color model, and then generate a smooth segmentation surface of the model to be segmented into two segments, or generate tenons and mortises on the smooth segmentation surface of the model. Subsequently, the stored segmented model is sliced ​​to obtain the sliced ​​image data of the segmented model after color segmentation required for the printing stage.

[0105] Figure 27 The structural block diagram of a 3D printing device for implementing the multicolor model segmentation method according to color boundaries of this application is shown in the figure. As shown, a 3D printing device 8 includes a controller 81 and a memory 82; wherein the memory 82 stores a printing control program 83 or instructions that can be executed by the controller 81, and the printing control program 83 or instructions are executed by the controller 81 to enable the controller 81 to perform actions such as… Figure 1 , 2 The steps in 3 are because the 3D printing device 8 can also embed the program function of the multicolor model segmentation method of this application according to color boundaries as needed.

[0106] Figure 28 This diagram illustrates the process of slicing and printing the model according to color boundaries. As shown, the user uses a mobile storage device 9 to import the sliced ​​image data obtained after slicing into the 3D printing device 8 for exposure and printing, thereby obtaining the printed entity of the segmented model after color division.

[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for segmenting a multicolor model based on color boundaries, characterized in that, include: Traverse the triangular mesh data of the multicolor model; Obtain a color boundary of the multicolor model in the XYZ three-axis coordinate system; A closed polygon is defined by the color boundary; Generate a smooth segmentation surface based on the closed polygon; The multicolor model is divided into a first segment and a second segment using the smooth dividing surface. The smooth segmentation surface is combined with the first segment model to generate the first segment model; The smooth segmentation surface is combined with the second segment model to generate the second segment model; Store the first segmented model and the second segmented model.

2. The method for segmenting a multicolor model according to color boundaries as described in claim 1, characterized in that, Obtaining a color boundary of a multicolor model in the XYZ three-axis coordinate system includes: Obtain the color data from the triangular mesh data; Based on the color data, obtain triangular meshes with the same or similar colors and determine them as candidate mesh groups; Obtain consecutive adjacent triangular meshes from the candidate mesh group and determine them as the target triangular mesh group; Obtain the overall border of the target triangular mesh group and define it as the color boundary.

3. The method for segmenting a multicolor model according to color boundaries as described in claim 1, characterized in that, The step of generating a smooth segmentation surface based on the closed polygon includes: A preliminary triangulation group is generated by performing polygon triangulation on the closed polygon. The initial triangular mesh group is regenerated to generate a finer, more uniform triangular mesh group. Smooth the subdivided uniform triangular mesh group to generate a smooth segmentation surface composed of triangular meshes.

4. The method for segmenting a multicolor model according to color boundaries as described in claim 1, characterized in that, Also includes: Tenon and mortise protrusions are generated on the smooth segmentation surface of the first segment model; Mortise and tenon grooves are generated on the smooth segmentation surface of the second segment model.

5. The method for segmenting a multicolor model according to color boundaries as described in claim 4, characterized in that, The mortise and tenon protrusions and the mortise and tenon grooves are cylindrical, square, conical, trapezoidal, stepped, hemispherical, or annular.

6. A device for segmenting a multi-color model according to color boundaries, characterized in that, include: Grid The data traversal module is used to traverse the triangular mesh data of the multi-color model; The color boundary acquisition module is used to obtain a color boundary of a multicolor model in the XYZ three-axis coordinate system; A polygon determination module is used to determine a closed polygon based on the color boundary; A segmentation surface generation module is used to generate a smooth segmentation surface based on the closed polygon; The model segmentation module is used to segment the multi-color model into a first segment and a second segment using the smooth segmentation surface. The first segmented model generation module is used to combine the smooth segmentation surface with the first segmented model to generate the first segmented model. The second segmented model generation module is used to combine the smooth segmentation surface with the second segmented model to generate a second segmented model. The model storage module is used to store the first segment model and the second segment model.

7. A multi-color model segmentation device according to claim 6, characterized in that, The color boundary acquisition module includes: The color data acquisition module is used to acquire color data from the triangular mesh data; The candidate grid determination module is used to obtain triangular grids with the same or similar colors based on color data and determine them as candidate grid groups. The target mesh determination module is used to obtain consecutive adjacent triangular meshes from the candidate mesh group and determine them as the target triangular mesh group. The color boundary determination module is used to obtain the overall perimeter of the target triangular mesh group and determine it as the color boundary.

8. A multi-color model segmentation device according to claim 6, characterized in that, The segmentation surface generation module includes: The triangulation generation module is used to perform polygon triangulation on closed polygons to generate a preliminary triangular mesh group; The triangulation generation module is used to regenerate the initial triangular mesh group into a more subdivided and uniform triangular mesh group. The mesh smoothing module is used to smooth a group of subdivided uniform triangular meshes to generate smooth segmentation surfaces composed of triangular meshes.

9. A multi-color model segmentation device according to claim 6, characterized in that, Also includes: The mortise and tenon protrusion generation module is used to generate mortise and tenon protrusions on the smooth segmentation surface of the first segment model; The mortise and tenon groove generation module is used to generate mortise and tenon grooves on the smooth dividing surface of the second segment model.

10. An electronic device, characterized in that, include: At least one processing unit; and a storage unit communicatively connected to the at least one processing unit; The storage unit stores instructions that can be executed by the at least one processing unit. When the at least one processing unit executes the instructions, it implements the steps of the multicolor model segmentation method according to color boundaries as described in any one of claims 1-4.

11. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores a computer program, which, when executed by the processing unit, implements the steps of the multicolor model segmentation method according to any one of claims 1-4.

12. A computer program product, characterized in that, The computer program product includes computer instructions, which, when executed by a computer, implement the steps of the multicolor model segmentation method according to any one of claims 1-4.