A 3D printing model decomposition method, system, device and medium

CN118429364BActive Publication Date: 2026-07-21XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2024-05-10
Publication Date
2026-07-21

Smart Images

  • Figure CN118429364B_ABST
    Figure CN118429364B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of 3D printing, and discloses a 3D printing model decomposition method, system, device and medium, which comprises the following steps: topological reconstruction is performed on an STL file of a model to be decomposed to obtain a pretreatment model; a region growing algorithm based on image segmentation is used to divide the triangular facets of the pretreatment model into several facet regions; a candidate cutting plane normal vector selection algorithm based on a greedy search strategy is used to select the cutting plane normal vectors of the several facet regions to obtain several candidate cutting plane normal vectors; the optimal cutting plane is determined according to the several candidate cutting plane normal vectors, with the sum of the support-free value and the block volume value of the model pre-cutting result being optimal as the target; and the optimal cutting plane is used to cut the model to be decomposed to obtain several support-free sub-models; the decomposition process is simple, has good universality, can quickly segment the model, and improves the processing efficiency of the model decomposition algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of 3D printing technology, and specifically relates to a method, system, device and medium for decomposing 3D printed models. Background Technology

[0002] 3D printing is a new and efficient manufacturing technology, also known as additive manufacturing. Its basic principle is to process the three-dimensional digital model of the object to be printed by computer, perform unidirectional layer-by-layer slicing operations, and obtain numerical control code that can be recognized by the 3D printing equipment under the path planning algorithm. Finally, the 3D printing equipment is used to build up the material layer by layer from bottom to top to form a printed entity.

[0003] Traditional three-axis 3D printing equipment uses a three-degree-of-freedom spatial translation mechanism, which controls the relative spatial position of the printed part and the print head. It cannot achieve rotation or oscillation of the printing plane. Therefore, it can only print objects by stacking layers in one direction. With traditional three-axis 3D printing equipment, when printing models with overhanging or bridge structures, it is necessary to rely on the assistance of support structures, which will prolong the printing time. After printing, it is also necessary to spend time and manpower to remove the support structures for post-processing. Moreover, since the support structures are bonded to the object as a whole, it will affect the surface accuracy of the object and even pose a risk of damaging the main structure.

[0004] To address the aforementioned issues, various types of five-axis 3D printing equipment have been developed. Five-axis 3D printing equipment, based on the traditional three-axis 3D printing mechanism, adds two rotational axes to control the spatial angle changes of the printing plane and the printing nozzle, achieving a five-degree-of-freedom motion mechanism. This allows for more flexible printing of models from multiple directions, making support-free 3D printing possible. However, to truly achieve support-free 3D printing, data processing of the three-dimensional model is still required to ensure that the five-axis 3D printing mechanism can print each part of the model without support.

[0005] In recent years, a considerable number of domestic and international publications have proposed various computational methods for the decomposition of 3D models in 3D printing, employing different algorithmic frameworks and targeting various model segmentation objectives. For example, Hao et al. proposed a curvature-based model segmentation scheme, which can obtain decomposition results for some large and complex models by analyzing the curvature of their surfaces. The main goal is to decompose large and complex models into simple sub-models that are easy to assemble, but it lacks versatility for models with no significant surface features. Another example is Gao et al., who presented a decomposition method based on global optimization, which minimizes the surface area that the 3D model needs to support, achieving near-supportless printing on a five-DOF 3D printer. However, this algorithm has very low computational efficiency when the number of facets is large. In summary, existing 3D model decomposition techniques for 3D printing lack versatility, and the decomposition algorithms are complex and inefficient. Summary of the Invention

[0006] To address the technical problems existing in the prior art, this invention provides a 3D printing model decomposition method, system, device, and medium to solve the technical problems of the lack of versatility, complex decomposition algorithms, and low efficiency of existing 3D printing three-dimensional model decomposition technology.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a method for decomposing 3D printed models, including: The STL file of the model to be decomposed is topologically reconstructed to obtain a preprocessed model; Using an image segmentation-based region growing algorithm, the triangular facets of the preprocessed model are divided into several facet regions; wherein each facet region contains several triangular facets in the model to be decomposed, the intersection of any two facet regions is empty, and all facet regions contain all triangular facets of the model to be decomposed. A candidate cut surface normal vector selection algorithm based on a greedy search strategy is used to select cut surface normal vectors for several of the aforementioned surface regions, thereby obtaining several candidate cut surface normal vectors. Based on the candidate cutting plane normal vectors, the optimal cutting plane is determined with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result. The model to be decomposed is divided using the optimal splitting plane to obtain several supportless sub-models.

[0008] Furthermore, the preprocessing model is based on a preset data structure. model The data is stored in a preset model group structure. model Including vertex sets Point Edge set Edge and noodle collection Facet ; Wherein, the vertex set Point Including vertex number Point_Index and vertex coordinates Point_Locate [3]; the edge set Edge Including edge numbers Edge_Index Numbering the two vertices of the edge Edge_Point [2] and the numbering of the two critical facets of the edge. Edge_Facet [2]; the patch set Facet Including noodle number Facet_Index Numbering of the three vertices of the face Facet_Point [3] Numbering of the three sides of the dough sheet Facet_Edge [3] and the numbers of the three adjacent face pieces. Facet_Facet [3]

[0009] Furthermore, the process of dividing the triangular patches of the preprocessed model into several patch regions using an image segmentation-based region growing algorithm is as follows: Select any unpartitioned triangular facet in the preprocessing model as the current seed point, and take the unpartitioned triangular facets adjacent to the current seed point as neighborhood points; Determine whether the current seed point and the neighboring points meet the preset similarity criteria; if so, use the neighboring points that meet the similarity criteria as new seed points to continue growing until no new seed points are generated. At this point, the growth of a region is completed, and a patch region is obtained. The algorithm iterates through each unpartitioned triangular facet in the preprocessing model until all triangular facets in the preprocessing model are partitioned, at which point the algorithm ends, resulting in several facet regions.

[0010] Furthermore, the preset similarity criterion is that the dihedral angle formed by the seed point and the neighboring points on the outside of the model is greater than 135°.

[0011] Furthermore, the process of selecting candidate face normal vectors by using a greedy search-based algorithm to select face normal vectors for several face regions and obtaining several candidate face normal vectors is as follows: By sampling direction vectors at equal intervals in three-dimensional space, a vector set is obtained. ; wherein, the vector set It contains several direction vectors; From the set of vectors Select a direction vector that can support multiple facet regions, and use this selected direction vector as a candidate cut surface normal vector, adding it to the candidate cut surface normal vector set. ; Repeat from the set of vectors The operation of selecting direction vectors continues until all facet regions are supported by candidate cut surface normal vectors or a set of candidate cut surface normal vectors. When the candidate section normal vectors reach a preset threshold, output the set of candidate section normal vectors. That is, we obtain several candidate section normal vectors.

[0012] Furthermore, based on the aforementioned candidate section normal vectors, and with the objective of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation results, the process of determining the optimal segmentation plane is as follows: Select any candidate section normal vector as the current segmentation normal vector; Determine the minimum and maximum heights of the model to be decomposed on the current segmentation normal vector; Starting from the lowest height, the model to be decomposed is pre-segmented according to a preset segmentation interval until the highest height is reached, resulting in several segmented blocks, which is the model pre-segmentation result. The sum of the support-free value and the block volume value of the model pre-segmentation results is calculated, and the optimal segmentation plane is determined with the goal of optimizing the sum of the support-free value and the block volume value of the model pre-segmentation results.

[0013] Furthermore, in determining the optimal segmentation plane with the goal of maximizing the sum of the support-free value and the block volume value of the model's pre-segmentation results, the specific objective function is as follows:

[0014]

[0015]

[0016] in, The sum of the support-free value and the block volume value of the model's pre-segmentation results; The unsupported value of the model's pre-segmentation results; The value of the block volume of the model's pre-segmentation results; These are weighting coefficients; These are the faces in the model that can be supported by the current cutting plane; This represents the total number of triangular faces in the model. This represents the number of segments into which the model has been divided. For the first The bounding box volume of each segment; This represents the bounding box volume of the model.

[0017] The present invention also provides a 3D printing model decomposition system, comprising: The topology reconstruction module is used to reconstruct the topology of the STL file of the model to be decomposed, so as to obtain a preprocessed model. The patch region segmentation module is used to segment the triangular patches of the preprocessed model into several patch regions using a region growing algorithm based on image segmentation. Each patch region contains several triangular patches in the model to be decomposed, the intersection of any two patch regions is empty, and all patch regions contain all triangular patches of the model to be decomposed. The normal vector selection module is used to select the normal vectors of the cut surfaces of several patch regions using a candidate cut surface normal vector selection algorithm based on a greedy search strategy, so as to obtain several candidate cut surface normal vectors. The optimal splitting plane module is used to determine the optimal splitting plane based on several candidate splitting plane normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-splitting result; The segmentation module is used to segment the model to be decomposed using the optimal segmentation plane to obtain several supportless sub-models.

[0018] The present invention also provides a 3D printing model decomposition device, comprising: Memory, used to store computer programs; A processor is used to implement the steps of the 3D printing model decomposition method when executing the computer program.

[0019] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the 3D printing model decomposition method.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides a 3D printing model decomposition method. It involves topological reconstruction of the STL file of the workpiece model to be printed, followed by region growing algorithm based on image segmentation to divide the triangular facets of the preprocessed model into regions. Next, a candidate section normal vector selection algorithm based on a greedy search strategy is used to select section normal vectors for several facet regions. Then, the optimal cutting plane is determined based on the candidate section normal vectors. Finally, the model to be decomposed is segmented according to the optimal cutting plane, resulting in supportless sub-models, thus meeting the requirements for supportless printing. This invention features a simple decomposition process, is applicable to different types of five-axis 3D printing equipment, and has good versatility. It can also decompose models with overhanging or bridge structures for supportless printing, reducing material waste and avoiding the cumbersome process of removing supports after printing, thus promoting the application of five-axis 3D printing technology. The use of region growing results based on image segmentation, transformed into supportless model decomposition results suitable for 3D printing through a greedy search strategy, enables rapid model segmentation and improves the processing efficiency of the model decomposition algorithm. Attached Figure Description

[0021] Figure 1 This is a flowchart of the 3D printing model decomposition method described in this invention.

[0022] Figure 2 This is a schematic diagram of the structure of the model to be decomposed in this invention; Figure 3 This is a schematic diagram of the model decomposition results of the model to be decomposed in this invention; Figure 4 This is a schematic diagram of the sub-model block structure of the model decomposition result in this invention. Detailed Implementation

[0023] To make the technical problems solved by the present invention, the technical solutions, and the beneficial effects clearer, the following specific embodiments provide a further detailed description of the present invention. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of the invention.

[0024] This invention provides a 3D printing model decomposition method for the supportless printing process of a five-axis 3D printer, which is particularly suitable for supportless printing of workpieces with overhanging or bridge structures as the target.

[0025] As attached Figure 1 As shown, the 3D printing model decomposition method includes the following steps: Step 1: Obtain the STL file of the model to be decomposed, and perform topology reconstruction on the STL file to obtain a preprocessed model. The topology reconstruction process involves preprocessing the STL file of the model to be decomposed according to a preset data structure. model Store it.

[0026] The preset data structure model The following conditions must be met: 1) The preset data structure model The elements in the data structure are all vertices, edges, and triangles in the model to be decomposed; 2) Access the preset data structure. model When accessing vertex elements in the data structure, the spatial coordinates of the corresponding vertex can be obtained; 3) Access the preset data structure. model When accessing triangular facet elements, one can directly access the three edges and three vertices of the corresponding triangular facet; 4) Access the preset data structure. model When accessing edge elements, one can directly access the two adjacent triangular faces and two vertices of the corresponding edge; 5) Access the preset data structure. model When accessing a triangular facet element, you can directly access the three adjacent triangular faces of the corresponding triangular facet.

[0027] The preprocessing model follows a preset data structure. model The data is stored in a preset model group structure. model Including vertex sets Point Edge set Edge and noodle collection Facet As shown in Table 1 below; wherein, the vertex set Point Including vertex number Point_Index and vertex coordinates Point_Locate [3]; the edge set Edge Including edge numbers Edge_Index Numbering the two vertices of the edge Edge_Point [2] and the numbering of the two critical facets of the edge. Edge_ Facet [2]; the patch set Facet Including noodle number Facet_Index Numbering of the three vertices of the face Facet_Point [3] Numbering of the three sides of the dough sheet Facet_Edge [3] and the numbers of the three adjacent face pieces. Facet_Facet [3]

[0028] Table 1 Preset Data Structure model Structure table

[0029] It should be noted that the STL file of the model to be decomposed contains all the information that can describe the surface shape of the 3D model, including the vertex information and normal vector information of the triangular facets in the 3D model. However, since the same vertex is occupied by multiple triangular facets in the 3D model, when the STL file records a triangular facet containing a corresponding vertex, it will record the spatial coordinates of the corresponding vertex in turn, which has the defect of large data redundancy. Secondly, in the subsequent model partitioning operation, the region growing algorithm based on image segmentation needs to access other triangular facets adjacent to it through the seed point, which cannot be implemented in the data structure of the STL file that does not contain the topological information of the triangular facets. Therefore, this invention performs topological reconstruction on the STL file of the model to be decomposed. By traversing the triangular facets of the model to be decomposed, processing the vertices and edges of each triangular facet in turn, constructing topological relationships, and finally obtaining the vertex set Point, edge set Edge, and facet set Facet with topological data structure, the large data redundancy can be avoided and a data structure containing the topological information of the triangular facets can be obtained.

[0030] Specifically, the process of performing topology reconstruction on the STL file of the model to be decomposed to obtain the preprocessed model involves the following steps: Step 11: Construct the vertex set Point Edge set Edge and noodle collection Facet The constructed vertex set Point Edge set Edge and noodle collection Facet Initialize to an empty set; and initialize the iteration variable. i The value is 1.

[0031] Step 12: Traverse each triangle in the STL file of the model to be decomposed. triangular pieces Add to the set of facets Facet Among them, triangular facets Add to the set of facets Facet At that time, the triangular piece The face number, the three vertex numbers of the face, the three edge numbers of the face, and the numbers of the three adjacent faces of the face are all written into the face set. Facet Read the triangular facet. The spatial coordinates of the three vertices , and ;in, Triangular facet The first spatial coordinate, Triangular facet The second spatial coordinate, Triangular facet The third spatial coordinate.

[0032] Step 13, for triangular facets For each vertex, determine whether it already exists in the vertex set. Point If the vertex does not exist, then the corresponding vertex is added to the vertex set. Point In the middle, record the corresponding vertex number and spatial coordinates; otherwise, obtain the corresponding vertex number.

[0033] Step 14: Based on the triangular facets Number the three vertices and construct the edge relationships; specifically, traverse the triangular facets. The combination of three vertices, namely vertex A-vertex B, vertex A-vertex C, and vertex B-vertex C; for a triangular facet Given the combination of three vertices, determine whether an edge already exists that corresponds to the given edge set. Edge If the edge does not exist, create a new edge and record the numbers of the two vertices corresponding to the new edge and the number of the face to which the new edge belongs; otherwise, record the adjacent triangles of the existing edge and mark the two adjacent triangles as adjacent faces. Step 15: Repeat steps 11-14 to process the next triangle in the STL file of the model to be decomposed, until all triangles have been traversed.

[0034] In this invention, the specific pseudocode for the process of topological reconstruction of the STL file of the model to be decomposed to obtain the preprocessed model is shown in Table 2 below: Table 2 shows the pseudocode implementation of topology reconstruction for the STL file of the model to be decomposed.

[0035] Step 2: Using an image segmentation-based region growing algorithm, the triangular faces of the preprocessed model are divided into several face regions. Each face region contains several triangular faces from the model to be decomposed. The intersection of any two face regions is empty, and all face regions contain all triangular faces of the model to be decomposed.

[0036] The region growing algorithm based on image segmentation is used to divide the triangular facets of the preprocessed model into regions, that is, to divide the triangular mesh on the model surface from bottom to top; the basic idea is: First, define the triangular facets of the model as object points and the adjacent triangular facets as neighborhood points. Select an object point in the model as the seed point for region growth, compare the neighboring points around the seed point with the seed point itself. If the neighboring points and the seed point meet the pre-defined similarity criteria, then merge the neighboring points into the seed point set and continue to grow outward until no new seed points are generated. At this point, the growth of a region is completed.

[0037] Therefore, the core issue of region growing algorithms lies in how to formulate similarity criteria. In two-dimensional digital image processing, a similarity criterion could be that the grayscale difference between two adjacent pixels in a grayscale image is less than a certain threshold. In three-dimensional model surface partitioning, a suitable similarity criterion is selected based on the actual application scenario. For example, to find relatively smooth surface regions on the model, the difference in curvature values ​​represented by adjacent patches being less than a certain threshold can be used as a similarity criterion, or the difference in the average geodesic distance between adjacent vertices can be considered. Preferably, the similarity criterion used in this invention is the dihedral angle formed by the neighboring point and the seed point on the outside of the model. Greater than 135°.

[0038] Specifically, the process of dividing the triangular facets of the preprocessed model into several facet regions using a region growing algorithm based on image segmentation is as follows: Step 21: Select any unpartitioned triangular facet in the preprocessing model as the current seed point, and take the unpartitioned triangular facets adjacent to the current seed point as neighborhood points.

[0039] Step 22: Determine whether the current seed point and the neighboring points meet the preset similarity criteria; if so, use the neighboring points that meet the similarity criteria as new seed points to continue growing until no new seed points are generated. At this point, the growth of a region is completed, and a patch region is obtained.

[0040] Step 23: Traverse each unpartitioned triangular facet in the preprocessing model until all triangular facets in the preprocessing model are partitioned. The algorithm ends, and several facet regions are obtained.

[0041] It should be noted that the implementation process of the region growing algorithm based on image segmentation is as follows: Step 210: Construct model partition information Seed point queue Set similarity criterion parameters ; for the model partitioning information Perform initialization to set all elements to 0; initialize the seed point queue. Set to an empty set; initialize iteration variables. , .

[0042] Step 220: When the model partition information If there are unpartitioned triangular faces in the array, perform partitioning; in each iteration, Increment by 1.

[0043] Step 230: Traverse the patch set in the preprocessed model Facet Each triangular facet in If the triangular facet is not partitioned If the value is 0, the corresponding triangular facet is added to the seed point queue as a seed point. In the middle; and set the partition label of the seed point as the current iteration number. The current loop terminates after the traversal is complete.

[0044] Step 240: When the seed point queue When the region is not empty, the region growth process is executed cyclically; specifically: starting from the seed point queue... Extract a triangular facet from the given information and use it as the current seed point; traverse all unpartitioned adjacent faces of the current seed point as neighborhood points; calculate the angle between the normal vectors of the current seed point and the neighborhood points. Simultaneously, calculate the vector from the center point of the neighboring points to the center point of the seed point, and determine the angle between the vector and the normal vector of the neighboring point patch. γ If the included angle Less than the set similarity criteria or γ If the angle is less than 90°, add the neighboring points to the seed point queue. In the middle, and set its partition label to the current iteration number. .

[0045] Step 250: Continue iterative processing until all triangular faces are partitioned.

[0046] It should be noted that in the region growing algorithm based on image segmentation, triangular faces in the preprocessing model are defined as object points, adjacent triangular faces as neighborhood points, and one object point in the model is selected as the seed point for region growing; the similarity accuracy is defined as the dihedral angle formed by the neighborhood point and the seed point on the outside of the model being greater than 135°, that is, the angle between the normal vectors of the neighborhood point and the seed point being less than 45°; where the angle is defined as... γ The purpose of using less than 90° as another similarity criterion is to determine whether the dihedral angle formed by two adjacent faces is located inside or outside the model, i.e., whether the model forms a mountain peak or valley shape at this point. Since the range of the included angle of the normal vectors is only [0, 180°), it is impossible to determine the angle solely based on its magnitude. γ Under conditions less than 90°, the model that could have formed a cone structure was not split into two different parts.

[0047] In this invention, after partitioning the model surface using an image segmentation-based region growing algorithm, several non-overlapping regions of the model that contain all the model's triangular facets are obtained, i.e., a partition of the model's triangular facet set, and the partitioning information of the model facets is output. Part .

[0048] In this invention, the specific implementation pseudocode of the region growing algorithm based on image segmentation is shown in Table 3 below.

[0049] Table 3. Pseudocode implementation of the region growing algorithm based on image segmentation

[0050] Step 3: Using a candidate section normal vector selection algorithm based on a greedy search strategy, select the section normal vectors of several of the said facet regions to obtain several candidate section normal vectors. The set of candidate section normal vectors obtained by the candidate section normal vector selection algorithm based on a greedy search strategy can ensure that the entire partition of the model is covered with a relatively small number of candidate section normal vectors; preferably, the number of candidate section normal vectors is at least the set of candidate section normal vectors. Preset lower limit of the number of elements .

[0051] Specifically, the process of selecting candidate face normal vectors from several face regions using a greedy search-based algorithm to obtain several candidate face normal vectors is as follows: Step 31: Sample direction vectors at equal intervals in three-dimensional space to obtain a vector set. ; wherein, the vector set It contains several direction vectors.

[0052] Step 32, from the vector set Select a direction vector that can support multiple facet regions, and use this selected direction vector as a candidate cut surface normal vector, adding it to the candidate cut surface normal vector set. Specifically, when determining whether a direction vector can support a surface region, the following steps are taken: Step 321: Calculate the partition normal vector for each of the patch regions according to the calculation formula of the partition normal vector; wherein, the calculation formula of the partition normal vector is:

[0053] in: For the first The partition normal vector of each patch region; For the first The number of triangular faces contained in each face region; For the first The first area of ​​the facet region A triangular facet; For the first The normal vector of each facet.

[0054] Step 322: Based on the angle between the partitioning normal vector and the direction vector of the patch region, determine whether the corresponding direction vector can support the corresponding patch region; specifically, when the angle between the partitioning normal vector and the direction vector of the patch region is less than 90°, the corresponding direction vector can support the corresponding patch region; otherwise, it cannot support it.

[0055] Step 33: Repeat from the set of vectors The operation of selecting direction vectors continues until all facet regions are supported by candidate cut surface normal vectors or a set of candidate cut surface normal vectors. When the candidate section normal vectors reach a preset threshold, output the set of candidate section normal vectors. That is, we obtain several candidate section normal vectors.

[0056] It should be noted that the more model partitions the selected candidate cut surface normal vectors can support simultaneously, the more likely a better segmentation result will be obtained. Ideally, each direction in the uniformly sampled space is used as the set of candidate cut surface normal vectors, and the optimal segmentation result can be obtained based on this set. However, if the number of elements in the set of candidate cut surface normal vectors is too large, the computational efficiency will be very low. Therefore, we select the better direction in each direction in the three-dimensional space as the candidate cut surface normal vector, and obtain the candidate cut surface normal vector by judging whether the corresponding direction vector can support the corresponding surface region.

[0057] It should be noted that the implementation process of the candidate section normal vector selection algorithm based on the greedy search strategy is as follows: Step 310: Initialize the set of candidate section normal vectors Empty set; initialize partition coverage information set All elements in the array are 0. The number of partitions; where the coverage information set The elements in the set represent the extent to which each patch region is supported by the candidate cut surface normal vector; when the selected direction vector can support the patch region, the element is recorded; when all partitions are supported, the set is empty. All elements in the vector set are non-zero values; by uniformly sampling directions at equal intervals in three-dimensional space, a vector set is obtained. .

[0058] Step 320: When the partition covers the information set There are uncovered partitions or candidate section normal vector sets. The number of elements in the middle is less than the preset lower limit If the condition is met, the normal vector of the section plane is selected; otherwise, the algorithm terminates.

[0059] Select the uncovered partition: Find the first uncovered partition; specifically, based on the partition coverage information set. The system uses the case where an element is 0 to determine if a partition has been covered. The first uncovered partition is the one with the smallest index where an element is 0; if it exists, then... Select a vector that can support the current partition and as many other partitions as possible; determine whether a direction vector can support a partition by calculating the normal vector between the current vector and the partition. The angle between the two points is determined to be less than 90°; the direction vector is also determined to support as many partitions as possible, by referring to the coverage of the vector. The number of partitions supported by this vector, when If the number of other partitions supported by this vector exceeds the number of other vectors that can be calculated, then this vector is the optimal vector for the current region; if there are no uncovered partitions, then... Select a vector that can support as many partitions as possible.

[0060] Update partition coverage information: Add the selected vector to the candidate section normal vector set. In, and from Delete it. Then update the partition overwrite information. The selected vector marks the partitions that it can support.

[0061] Step 330: Continue iterative processing, repeating the above steps until all partitions are covered, or the set of candidate section normal vectors is determined. The number of elements in the data has reached a preset lower limit. .

[0062] In this invention, the specific implementation pseudocode of the candidate section normal vector selection algorithm based on the greedy search strategy is shown in Table 4 below.

[0063] Table 4. Pseudocode implementation of the candidate section normal vector selection algorithm based on greedy search strategy.

[0064] Step 4: Based on the candidate section normal vectors, the optimal segmentation plane is determined with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation results. The process of determining the optimal segmentation plane based on the candidate section normal vectors with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation results is as follows: Step 41: Select any candidate cut surface normal vector as the current cutting normal vector.

[0065] Step 42: Determine the minimum and maximum heights of the model to be decomposed on the current splitting normal vector.

[0066] Step 43: Starting from the lowest height, perform pre-segmentation processing on the model to be decomposed according to the preset segmentation interval until the highest height is reached, to obtain several segmentation blocks, thus obtaining the model pre-segmentation result.

[0067] Step 44: Calculate the sum of the support-free value and the block volume value of the model pre-segmentation results. Determine the optimal segmentation plane with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation results. Specifically, the objective function for determining the optimal segmentation plane with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation results is:

[0068]

[0069]

[0070] in, The sum of the support-free value and the block volume value of the model's pre-segmentation results; The unsupported value of the model's pre-segmentation results; The value of the block volume of the model's pre-segmentation results; These are weighting coefficients; These are the faces in the model that can be supported by the current cutting plane; This represents the total number of triangular faces in the model. This represents the number of segments into which the model has been divided. For the first The bounding box volume of each segment; This represents the bounding box volume of the model.

[0071] It should be noted that determining a plane in three-dimensional space requires not only its normal vector but also the plane's position along that normal vector. Two tangents with the same normal vector but different positions will result in different cuts when they slice the same model. Therefore, after obtaining the set of candidate tangent normal vectors, the optimal cutting position for pre-slicing the model is determined using each normal vector in the set. For a tangent normal vector, the minimum height of the model along that vector direction is first determined. HMIN and highest height HMAX Select m As the segmentation interval, that is, from when segmenting... HMIN+m Starting from, gradually increasing m Until more HMAX Previously, multiple segmentation results were obtained; among them, the segmentation interval... m The segmentation interval is determined by the minimum axis length of the model bounding box; preferably, the segmentation interval... mIt is 1 / 20 of the minimum axis length of the model bounding box; for multiple segmentation results obtained from a single tangent normal vector, the optimal segmentation result is judged based on the principles of support-free operation and appropriate volume, and the optimal segmentation plane is further determined.

[0072] It should be noted that when calculating the number of facets that can be supported by the cutting plane in the model, the facets located on both sides of the cutting plane should be treated separately. This is because while the cutting plane can support the facets on both sides, its own normal vector is unidirectional. When the height of a facet is lower than that of a facet on the cutting plane, the judgment condition should no longer be that the angle between the normal vectors is less than 90°, but rather that the angle is greater than 90°. In the objective function for determining the optimal cutting plane, the unsupported value and the block volume value of the cutting results are normalized to facilitate the weighted summation of the two values ​​to obtain the total cutting value and to compare different cutting schemes. Since unsupportedness is the main goal of model decomposition, the weighting coefficients... The value should be within the range of (0,1); therefore, by selecting the tangent plane, the supportless printable sub-model decomposed by the tangent plane is obtained.

[0073] Step 5: Using the optimal splitting plane, the model to be decomposed is split to obtain several supportless sub-models.

[0074] The 3D printing model decomposition method described in this invention uses image segmentation-based region growing results and a greedy search strategy to transform these results into supportless model decomposition results suitable for 3D printing. This allows for rapid model segmentation and improves the processing efficiency of the model decomposition algorithm. The decomposition method is simple and applicable to different types of five-axis 3D printing equipment. In particular, it can decompose various models with overhanging or bridge structures for supportless printing, reducing material waste and avoiding the tedious process of removing supports after printing.

[0075] This invention also provides a 3D printing model decomposition system, including a topology reconstruction module, a patch region partitioning module, a normal vector selection module, an optimal splitting plane module, and a splitting module. The topology reconstruction module is used to perform topology reconstruction on the STL file of the model to be decomposed, obtaining a preprocessed model. The patch region partitioning module is used to partition the triangular patches of the preprocessed model into several patch regions using a region growing algorithm based on image segmentation. Each patch region contains several triangular patches from the model to be decomposed, and the intersection of any two patch regions is... The model is empty, and all the said facet regions contain all the triangular facets of the model to be decomposed; the normal vector selection module is used to select the cross-face normal vectors of several facet regions using a candidate cross-face normal vector selection algorithm based on a greedy search strategy, to obtain several candidate cross-face normal vectors; the optimal cutting plane module is used to determine the optimal cutting plane based on several candidate cross-face normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result; the segmentation module is used to segment the model to be decomposed using the optimal cutting plane to obtain several support-free sub-models.

[0076] This invention also provides a 3D printing model decomposition device, comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of a 3D printing model decomposition method; performing topological reconstruction on the STL file of the model to be decomposed to obtain a preprocessed model; using a region growing algorithm based on image segmentation to divide the triangular facets of the preprocessed model into several facet regions; wherein each facet region contains several triangular facets in the model to be decomposed, the intersection of any two facet regions is empty, and all facet regions contain all triangular facets of the model to be decomposed; using a candidate section normal vector selection algorithm based on a greedy search strategy to select section normal vectors for several facet regions to obtain several candidate section normal vectors; based on several candidate section normal vectors, determining an optimal cutting plane with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result; and using the optimal cutting plane to segment the model to be decomposed to obtain several support-free sub-models.

[0077] Alternatively, when the processor executes the computer program, it implements the functions of each module in the above system, such as: a topology reconstruction module for topology reconstruction of the STL file of the model to be decomposed to obtain a preprocessed model; a patch region division module for dividing the triangular patches of the preprocessed model into several patch regions using a region growing algorithm based on image segmentation; wherein each patch region contains several triangular patches in the model to be decomposed, the intersection of any two patch regions is empty, and all patch regions contain all triangular patches of the model to be decomposed; a normal vector selection module for selecting the cross-sectional normal vectors of several patch regions using a candidate cross-sectional normal vector selection algorithm based on a greedy search strategy to obtain several candidate cross-sectional normal vectors; an optimal splitting plane module for determining the optimal splitting plane based on the several candidate cross-sectional normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result; and a splitting module for splitting the model to be decomposed using the optimal splitting plane to obtain several support-free sub-models.

[0078] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing preset functions, the instruction segments describing the execution process of the computer program in the 3D printing model decomposition device.

[0079] For example, the computer program can be divided into a topology reconstruction module, a patch region partitioning module, a normal vector selection module, an optimal splitting plane module, and a splitting module. The specific functions of each module are as follows: The topology reconstruction module is used to perform topology reconstruction on the STL file of the model to be decomposed, obtaining a preprocessed model; the patch region partitioning module is used to partition the triangular patches of the preprocessed model into several patch regions using a region growing algorithm based on image segmentation; wherein each patch region contains several triangular patches from the model to be decomposed, and the intersection of any two patch regions... The set is empty, and all the said facet regions contain all the triangular facets of the model to be decomposed; the normal vector selection module is used to select the facet normal vectors of several facet regions using a candidate facet normal vector selection algorithm based on a greedy search strategy, to obtain several candidate facet normal vectors; the optimal splitting plane module is used to determine the optimal splitting plane based on several candidate facet normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result; the splitting module is used to split the model to be decomposed using the optimal splitting plane to obtain several support-free sub-models.

[0080] The 3D printing model decomposition device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The 3D printing model decomposition device may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above are examples of 3D printing model decomposition devices and do not constitute a limitation on the 3D printing model decomposition device. It may include more components than described above, or combine certain components, or different components. For example, the 3D printing model decomposition device may also include input / output devices, network access devices, buses, etc.

[0081] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center of the 3D printing model decomposition equipment, connecting all parts of the equipment via various interfaces and lines.

[0082] The memory can be used to store the computer program and / or modules. The processor implements various functions of the 3D printing model decomposition device by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory.

[0083] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as sound playback, image playback, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMediaCards (SMC), Secure Digital (SD) cards, FlashCards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0084] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the 3D printing model decomposition method described above.

[0085] If the modules / units integrated in the 3D printing model decomposition system are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0086] Based on this understanding, the present invention can implement all or part of the processes in the above-described 3D printing model decomposition method, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described 3D printing model decomposition method. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or a preset intermediate form, etc.

[0087] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0088] Example illustration: As attached Figure 2 As shown, attached Figure 2 The diagram below shows the structure of the model to be decomposed; Appendix Figure 3 The diagram below shows the model decomposition results of the model to be decomposed; from the appendix... Figure 2-3 As can be seen from the above, the 3D printing model decomposition method described in this invention can be used to decompose the attached model. Figure 2 After decomposing the model to be decomposed, it can be divided into 4 support-free printing regions; as shown in the attached figure. Figure 4 As stated, Appendix Figure 4 The diagram below shows the sub-model block structure of the model decomposition results; from the appendix... Figure 4 As can be seen from this, the slicing plane is used to attach... Figure 2 After dividing the four supportless printing regions into four sub-models, supportless printing sub-models are obtained, which can satisfy the requirements for attaching... Figure 2 The need for support-free printing of the model to be decomposed.

[0089] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment, but also includes any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention.

Claims

1. A method for decomposing a 3D printed model, characterized in that, include: The STL file of the model to be decomposed is topologically reconstructed to obtain a preprocessed model; Using an image segmentation-based region growing algorithm, the triangular facets of the preprocessed model are divided into several facet regions; wherein each facet region contains several triangular facets in the model to be decomposed, the intersection of any two facet regions is empty, and all facet regions contain all triangular facets of the model to be decomposed. A candidate cut surface normal vector selection algorithm based on a greedy search strategy is used to select cut surface normal vectors for several of the aforementioned surface regions, thereby obtaining several candidate cut surface normal vectors. Based on the candidate cutting plane normal vectors, the optimal cutting plane is determined with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result. The model to be decomposed is divided using the optimal splitting plane to obtain several unsupported sub-models; The process of determining the optimal cutting plane based on several candidate cutting plane normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result, is as follows: Select any candidate section normal vector as the current segmentation normal vector; Determine the minimum and maximum heights of the model to be decomposed on the current segmentation normal vector; Starting from the lowest height, the model to be decomposed is pre-segmented according to a preset segmentation interval until the highest height is reached, resulting in several segmented blocks, which is the model pre-segmentation result. The sum of the support-free value and the block volume value of the model pre-segmentation result is calculated, and the optimal segmentation plane is determined with the goal of optimizing the sum of the support-free value and the block volume value of the model pre-segmentation result. The objective function for determining the optimal segmentation plane is as follows: The objective is to optimize the sum of the support-free value and the block volume value of the model's pre-segmentation results. in, This is the sum of the support-free value and the block volume value of the model's pre-segmentation results; The unsupported value of the model's pre-segmentation results; The value of the block volume of the model's pre-segmentation results; These are weighting coefficients; These are the faces in the model that can be supported by the current cutting plane; This represents the total number of triangular faces in the model. This represents the number of segments into which the model has been divided. For the first The bounding box volume of each segment; This represents the bounding box volume of the model.

2. The 3D printing model decomposition method according to claim 1, characterized in that, The preprocessing model follows a preset data structure. model The data is stored in a preset model group structure. model Including vertex sets Point Edge set Edge and noodle set Facet ; Wherein, the vertex set Point Including vertex number Point_Index and vertex coordinates Point_Locate [3]; the edge set Edge Including edge numbers Edge_Index Numbering the two vertices of the edge Edge_Point [2] and the numbering of the two critical facets of the edge. Edge_Facet [2]; the patch set Facet Including noodle number Facet_Index Numbering of the three vertices of the face Facet_Point [3] Numbering of the three sides of the dough sheet Facet_Edge [3] and the numbers of the three adjacent face pieces. Facet_ Facet [3] 3. The 3D printing model decomposition method according to claim 1, characterized in that, The process of dividing the triangular facets of the preprocessed model into several facet regions using an image segmentation-based region growing algorithm is as follows: Select any unpartitioned triangular facet in the preprocessing model as the current seed point, and take the unpartitioned triangular facets adjacent to the current seed point as neighborhood points; Determine whether the current seed point and the neighboring points meet the preset similarity criteria; if so, use the neighboring points that meet the similarity criteria as new seed points to continue growing until no new seed points are generated. At this point, the growth of a region is completed, and a patch region is obtained. The algorithm iterates through each unpartitioned triangular facet in the preprocessing model until all triangular facets in the preprocessing model are partitioned, at which point the algorithm ends, resulting in several facet regions.

4. The 3D printing model decomposition method according to claim 3, characterized in that, The preset similarity criterion is that the dihedral angle formed by the seed point and the neighboring points on the outside of the model is greater than 135°.

5. The 3D printing model decomposition method according to claim 1, characterized in that, The process of selecting candidate cross-section normal vectors from several facet regions using a greedy search-based algorithm is as follows: By sampling direction vectors at equal intervals in three-dimensional space, a vector set is obtained. ; wherein, the vector set It contains several direction vectors; From the set of vectors Select a direction vector that can support multiple facet regions, and use this selected direction vector as a candidate cut surface normal vector, adding it to the candidate cut surface normal vector set. ; Repeat from the set of vectors The operation of selecting direction vectors continues until all facet regions are supported by candidate cut surface normal vectors or a set of candidate cut surface normal vectors. When the candidate section normal vectors reach a preset threshold, output the set of candidate section normal vectors. That is, we obtain several candidate section normal vectors.

6. A 3D printing model decomposition system, characterized in that, include: The topology reconstruction module is used to reconstruct the topology of the STL file of the model to be decomposed, so as to obtain a preprocessed model. The patch region segmentation module is used to segment the triangular patches of the preprocessed model into several patch regions using a region growing algorithm based on image segmentation. Each patch region contains several triangular patches in the model to be decomposed, the intersection of any two patch regions is empty, and all patch regions contain all triangular patches of the model to be decomposed. The normal vector selection module is used to select the normal vectors of the cut surfaces of several patch regions using a candidate cut surface normal vector selection algorithm based on a greedy search strategy, so as to obtain several candidate cut surface normal vectors. The optimal splitting plane module is used to determine the optimal splitting plane based on several candidate splitting plane normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-splitting result; The segmentation module is used to segment the model to be decomposed using the optimal segmentation plane to obtain several unsupported sub-models; The process of determining the optimal cutting plane based on several candidate cutting plane normal vectors, with the goal of maximizing the sum of the support-free value and the block volume value of the model pre-segmentation result, is as follows: Select any candidate section normal vector as the current segmentation normal vector; Determine the minimum and maximum heights of the model to be decomposed on the current segmentation normal vector; Starting from the lowest height, the model to be decomposed is pre-segmented according to a preset segmentation interval until the highest height is reached, resulting in several segmented blocks, which is the model pre-segmentation result. The sum of the support-free value and the block volume value of the model pre-segmentation result is calculated, and the optimal segmentation plane is determined with the goal of optimizing the sum of the support-free value and the block volume value of the model pre-segmentation result. The objective function for determining the optimal segmentation plane is as follows: The objective is to optimize the sum of the support-free value and the block volume value of the model's pre-segmentation results. in, This is the sum of the support-free value and the block volume value of the model's pre-segmentation results; The unsupported value of the model's pre-segmentation results; The value of the block volume of the model's pre-segmentation results; These are weighting coefficients; These are the faces in the model that can be supported by the current cutting plane; This represents the total number of triangular faces in the model. This represents the number of segments into which the model has been divided. For the first The bounding box volume of each segment; This represents the bounding box volume of the model.

7. A 3D printing model decomposition device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the 3D printing model decomposition method as described in any one of claims 1-5 when executing the computer program.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the 3D printing model decomposition method as described in any one of claims 1-5.