Hole repairing method and device of three-dimensional grid model and graph processing method

Through the three-dimensional mesh model hole repair method with multi-threaded parallel processing, the problems of slow processing speed of large models and poor processing of complex three-dimensional holes in the existing technology are solved, and faster processing speed and better mesh are achieved Quality, suitable for large-scale data applications.

CN119399400APending Publication Date: 2025-02-07HEFEI MEIYA OPTOELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411412422.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

Existing graphics processing algorithms are slow to process large models, especially for triangulated mesh processing of complex three-dimensional holes, and are not suitable for non-manifold points.

Method used

A hole repair method for three-dimensional grid model is proposed. Through multi-thread parallel processing, point-face information in the three-dimensional grid model is obtained, and point-face information, boundary edge information and hole information are processed in parallel based on preset thread groups. , and finally achieve the repair of holes.

Benefits of technology

It improves processing speed, is suitable for large-scale data application needs, and introduces non-manifold hole segmentation method to adapt to non-manifold point situations, improving the geometry and grid quality of the holes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399400A_ABST
    Figure CN119399400A_ABST
Patent Text Reader

Abstract

The invention discloses a hole repairing method and device of a three-dimensional mesh model and a graph processing method, and relates to the field of computer graph processing, and the hole repairing method of the three-dimensional mesh model comprises the steps that point-surface information in the three-dimensional mesh model is acquired, and surfaces in the point-surface information are triangular surfaces; based on a preset first thread group, performing parallel processing on each surface in the point-surface information to obtain boundary edge information, a boundary edge being an edge with only one corresponding surface; performing parallel processing on each edge in the boundary edge information based on a preset second thread group to obtain hole information; and performing hole repair processing on the hole information based on a preset third thread group to obtain a repaired three-dimensional mesh model. According to the hole repairing method for the three-dimensional grid model, a large number of thread groups can be distributed in each thread group for parallel processing, the processing speed is higher, and the hole repairing method is suitable for large-scale data application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical fields of computer graphics, three-dimensional mesh data processing, and more particularly to a method and device for repairing holes in a three-dimensional mesh model and a graphics processing method. Background Art

[0002] Existing graphics processing algorithms are slow when processing large models, and are not ideal for processing triangulated meshes of complex three-dimensional holes such as large holes and narrow holes, and are not suitable for non-manifold point situations.

[0003] In related technologies, there are methods to improve processing speed by changing data structure, data segmentation, etc., but these methods are not effective for processing large models. Summary of the invention

[0004] To this end, the purpose of the implementation mode of the present application is to propose a hole repair method, device and graphics processing method, device, electronic device, storage medium and computer program product for a three-dimensional mesh model. The hole repair method for a three-dimensional mesh model of the present invention can be processed in parallel by multiple threads, with a faster processing speed, and is suitable for large-scale data application requirements.

[0005] An embodiment of the present application provides a method for repairing holes in a three-dimensional mesh model, the method comprising: obtaining point and surface information in the three-dimensional mesh model, wherein the surfaces in the point and surface information are triangular surfaces; performing parallel processing on each surface in the point and surface information based on a preset first thread group to obtain boundary edge information, wherein the boundary edge is an edge with only one corresponding surface; performing parallel processing on each edge in the boundary edge information based on a preset second thread group to obtain hole information; performing hole repair processing on the hole information based on a preset third thread group to obtain a repaired three-dimensional mesh model.

[0006] Exemplarily, the second thread group includes a thread group for determining border edge adjacency relationships and a thread group for determining non-popular points. The preset second thread group performs parallel processing on each edge in the border edge information to obtain hole information, including: based on the thread group for determining border edge adjacency relationships, performing parallel processing on each edge in the border edge information to obtain adjacency relationship information between each border edge; based on the thread group for determining non-popular points, performing parallel processing on each edge in the border edge information to obtain non-popular point information; based on the adjacency relationship information between each border edge and the non-popular point information, obtaining hole information.

[0007] Exemplarily, the boundary edge information includes access flag information, and the thread group based on determining the boundary edge adjacency relationship performs parallel processing on each edge in the boundary edge information to obtain the adjacency relationship information between each boundary edge, including: based on the thread group for determining the boundary edge adjacency relationship, searching for the next boundary edge according to the direction of the current boundary edge; when the access flag information of the next boundary edge indicates that the boundary edge has not been visited, determining that the boundary edge is the next adjacent boundary edge of the current boundary edge, and changing the access flag information of the boundary edge to indicate that the boundary edge has been visited; traversing all boundary edges to obtain the adjacency relationship information between each boundary edge.

[0008] Exemplarily, the method of performing parallel processing on each edge in the boundary edge information based on the thread group for determining non-popular points to obtain non-popular point information includes: based on the thread group for determining non-popular points, for the target vertex of the current boundary edge, determining the number of other boundary edges with the target vertex as the vertex; when the number of other boundary edges is greater than a preset number, determining the target vertex of the current boundary edge as a non-popular point; and traversing all boundary edges to obtain non-popular point information.

[0009] Exemplarily, the hole information is obtained based on the adjacency relationship information between each boundary edge and the non-popular point information, including: modifying the adjacency relationship information between each boundary edge based on the non-popular point information to obtain target adjacency relationship information between each boundary edge; and obtaining the hole information based on the target adjacency relationship information.

[0010] Exemplarily, the adjacency relationship information between each boundary edge is modified based on the non-popular point information to obtain target adjacency relationship information between each boundary edge, including: judging whether the end point of the current boundary edge is a non-popular point based on the non-popular point information, wherein the boundary edge is a directed edge, and the end point of the boundary edge represents one end indicated by the direction in the boundary edge; when the end point of the current boundary edge is a non-popular point, calculating the ear angle between the current boundary edge and each next adjacent boundary edge associated with the current boundary edge, wherein the ear angle is the angle between the two boundary edges toward the hole side; based on the ear angle, modifying the adjacency relationship of the current boundary edge to obtain the target adjacency relationship; traversing all boundary edges to obtain the target adjacency relationship information between each boundary edge.

[0011] Exemplarily, modifying the adjacency relationship of the current boundary edge based on the ear angle to obtain a target adjacency relationship includes: determining the next adjacent boundary edge corresponding to the minimum value in the ear angle as the target adjacent boundary edge of the current boundary edge; and obtaining the target adjacency relationship based on the target adjacent boundary edge.

[0012] Exemplarily, the third thread group includes a thread group for determining the concavity and convexity of ear vertices and a thread group for determining ear weights, the hole information includes multiple ear information, and the hole repair processing is performed on the hole information based on the preset third thread group to obtain a repaired three-dimensional mesh model, including: based on the thread group for determining the concavity and convexity of ear vertices, determining the concavity and convexity of each ear vertex in the hole information; based on the thread group for determining the ear weights, calculating the ear weight of each ear in the hole information; sorting each ear in the hole information based on the concavity and convexity and ear weight; and performing hole repair processing on the hole information according to the sorting result to obtain a repaired three-dimensional mesh model.

[0013] Exemplarily, the method of determining the convexity and concavity of each ear in the hole information based on the thread group for determining the concavity and convexity of the ear includes: based on the thread group for determining the concavity and convexity of the ear, determining the ear vertex whose ear angle is greater than a preset angle as a convex point, and vice versa as a concave point, wherein three adjacent vertices of the hole boundary constitute an ear, and the ear angle is the angle toward the side of the hole.

[0014] Exemplarily, the ear weight of each ear in the hole information is calculated by the following formula:

[0015]

[0016] Among them, Q is the ear weight, C is the perimeter of the triangular surface formed by the current ear, Li represents the three side lengths of the triangular surface formed by the current ear, Li (i = 0, 1, 2) represent the three side lengths respectively, and A represents the projection area of ​​the triangular surface formed by the current ear on the hole normal.

[0017] Exemplarily, sorting each ear in the hole information based on the convexity and the ear weight includes: preliminarily sorting each ear based on the convexity, wherein the sorting order of the ear vertices that are convex points is smaller than the sorting order of the ear vertices that are concave points; for ears with the same convexity, sorting each ear based on the ear weight, wherein the smaller the ear weight corresponding to the ear, the smaller the sorting order.

[0018] Exemplarily, the hole information is repaired according to the sorting result to obtain a repaired three-dimensional mesh model, including: judging whether the last ear in the current sorting result meets a preset condition according to the sorting result; if the last ear meets the preset condition, performing a closed repair process on the ear; based on the convexity and concavity of each ear after the closed repair process and the ear weight, the ears are re-sorted and closed-repaired until the number of ears is zero, thereby obtaining a repaired three-dimensional mesh model.

[0019] Exemplarily, obtaining hole information based on the target adjacency relationship information includes: taking an initial boundary edge as a starting point, searching for a next boundary edge based on the target adjacency relationship, until returning to the initial boundary edge to obtain initial hole information; and filtering the initial hole information to obtain the hole information.

[0020] Exemplarily, the initial hole information includes information on the number of initial hole edges, and the initial hole information is screened to obtain the hole information, including: when the number of initial hole edges corresponding to the initial hole information is less than a first preset number and greater than a second preset number, retaining the initial hole information, otherwise discarding it; and obtaining the hole information based on the retained initial hole information.

[0021] Exemplarily, the first thread group includes a thread group for determining point-surface topological relationships, and the preset first thread group performs parallel processing on each surface in the point-surface information to obtain boundary edge information, including: based on the thread group for determining point-surface topological relationships, determining the related surfaces of each vertex to obtain point-surface topological relationship information; based on the point-surface topological relationship information, obtaining boundary edge information.

[0022] Another embodiment of the present application provides a mesh model processing method, which includes: scanning the target object and obtaining point cloud data based on the scanning results; meshing the point cloud data to obtain a three-dimensional mesh model; and repairing holes in the three-dimensional mesh model according to the above-mentioned three-dimensional mesh model hole repair method to obtain a repaired three-dimensional mesh model.

[0023] Another embodiment of the present application provides a hole repairing device for a three-dimensional mesh model, the device comprising: an acquisition module, used to acquire point and surface information in the three-dimensional mesh model, wherein the surface in the point and surface information is a triangular surface; a first processing module, used to perform parallel processing on each surface in the point and surface information based on a preset first thread group to obtain boundary edge information, wherein the boundary edge is an edge with only one corresponding surface; a second processing module, used to perform parallel processing on each edge in the boundary edge information based on a preset second thread group to obtain hole information; and a third processing module, used to perform repair processing on each hole in the hole information based on a preset third thread group to obtain a repaired three-dimensional mesh model.

[0024] Another embodiment of the present application provides a mesh model processing device, which includes: a scanning module, which is used to scan the target object and obtain point cloud data based on the scanning results; a fourth processing module, which is used to grid the point cloud data to obtain a three-dimensional mesh model; and a hole repair module, which is used to repair holes in the three-dimensional mesh model according to the above-mentioned three-dimensional mesh model hole repair method to obtain a repaired three-dimensional mesh model.

[0025] Another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any of the above embodiments when executing the computer program.

[0026] Another embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method of any of the above embodiments are implemented.

[0027] Another embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed by a processor of a computer device, the computer device is enabled to perform the steps of the method of any of the above embodiments.

[0028] In the above implementation, point and surface information in a three-dimensional mesh model is obtained, wherein the surface in the point and surface information is a triangular surface; each surface in the point and surface information is processed in parallel based on a preset first thread group to obtain boundary edge information, wherein a boundary edge is an edge with only one corresponding surface; each edge in the boundary edge information is processed in parallel based on a preset second thread group to obtain hole information; and the hole information is repaired based on a preset third thread group to obtain a repaired three-dimensional mesh model. The hole repair method of a three-dimensional mesh model of the present invention can allocate a large number of threads in each group of threads for parallel processing, with a faster processing speed, and is suitable for large-scale data application requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A flow chart of a method for repairing holes in a three-dimensional mesh model provided in an embodiment of the present application;

[0030] Figure 2 A flowchart for obtaining boundary edge information provided by an implementation method of the present application;

[0031] Figure 3 A schematic diagram of a boundary edge provided for an embodiment of the present application;

[0032] Figure 4 A flowchart for obtaining hole information provided in an embodiment of the present application;

[0033] Figure 5 A flowchart of determining a boundary edge adjacency relationship thread group provided in an embodiment of the present application;

[0034] Figure 6 A flowchart of determining a non-popular point thread group provided for an embodiment of the present application;

[0035] Figure 7A flowchart of obtaining hole information based on adjacency information and non-popular point information provided in an embodiment of the present application;

[0036] Figure 8 A schematic diagram of a non-popular point provided for an embodiment of the present application;

[0037] Fig. 9 A flowchart for obtaining target adjacency relationship information between each boundary edge provided in an embodiment of the present application;

[0038] Fig.10 A schematic diagram of an ear provided for an embodiment of the present application;

[0039] Fig.11 A schematic diagram of the ear angle provided for an embodiment of the present application;

[0040] Fig.12 A flowchart for modifying the adjacency relationship of the current boundary edge provided in an implementation manner of the present application;

[0041] Fig.13 A flowchart of obtaining hole information based on target adjacency information provided in an embodiment of the present application;

[0042] Fig.14 A flowchart for screening initial hole information provided in an embodiment of the present application;

[0043] Fig.15 A flowchart of hole repair processing for hole information provided in an embodiment of the present application;

[0044] Fig.16 A flowchart for sorting each ear in the hole information provided by an embodiment of the present application;

[0045] Fig.17 A flowchart of performing hole repair processing on hole information according to the sorting result provided in an embodiment of the present application;

[0046] Fig.18 A flowchart of a graphics processing method provided in an embodiment of the present application;

[0047] Fig.19 A schematic diagram of a hole repair device for a three-dimensional mesh model provided in an embodiment of the present application;

[0048] Fig. 20 A schematic diagram of a graphics processing device provided in an embodiment of the present application;

[0049] Fig.21 A block diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0050] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0051] Existing graphics processing algorithms are slow when processing large models, and are not ideal for processing triangulated meshes of complex three-dimensional holes such as large holes and narrow holes, and are not suitable for non-manifold point situations.

[0052] In related technologies, there are methods to improve processing speed by changing data structure, data segmentation, etc., but these methods are not effective for processing large models.

[0053] Based on this, the present application proposes a method for repairing holes in a three-dimensional mesh model, which can be processed in parallel by multiple threads to repair holes with a faster processing speed. It can be expanded to large model processing to meet the needs of large-scale data applications, and introduces a non-manifold hole segmentation method that is adaptive to non-manifold point situations.

[0054] Figure 1 It is a flow chart of a method for repairing holes in a three-dimensional mesh model according to an embodiment of the present application.

[0055] As an example, Figure 1 As shown in FIG. 1 , the hole repair method of the three-dimensional mesh model includes:

[0056] S101, obtaining point and surface information in a three-dimensional mesh model, wherein the surface in the point and surface information is a triangular surface.

[0057] S102: Perform parallel processing on each face in the point-face information based on a preset first thread group to obtain boundary edge information, wherein a boundary edge is an edge that has only one corresponding face.

[0058] S103: Perform parallel processing on each edge in the boundary edge information based on a preset second thread group to obtain hole information.

[0059] S104, performing hole repair processing on the hole information based on a preset third thread group to obtain a repaired three-dimensional mesh model.

[0060] Exemplarily, the hole repair method of the three-dimensional mesh model of the present application can be processed based on the CUDA (Compute Unified Device Architecture is a parallel computing platform and programming model developed by NVIDIA, which allows developers to use the graphics processing unit GPU for high-performance general computing) model platform. First, the graphics processing unit GPU (Graphics Processing Unit) obtains the point and surface information in the three-dimensional mesh model. The three-dimensional mesh model data can be obtained by scanning a scanning instrument. For example, the surface of a target object is scanned to obtain the point and surface information of the surface. There may be some holes in the point and surface information of the surface. The holes are repaired using the hole repair method to obtain complete surface information. The point and surface information in the three-dimensional mesh model is obtained. For example, the point and surface information is obtained after the surface information is meshed, wherein the surface in the point and surface information is a triangular surface.

[0061] Exemplarily, a structure CudaMesh can be customized in a graphics processor GPU, wherein the structure can add flags, index arrays and other information, and the point surface information is copied to the GPU in the form of a structure. Based on the preset first thread group, each face in the point surface information is processed in parallel to obtain boundary edge information, wherein the boundary edge is an edge with only one corresponding face. The first thread group can be configured according to the number of faces. It can be understood that the first thread group processes each face in parallel. The first thread group includes multiple parallel processing threads, and parallel processing between these threads can improve the processing speed. According to the first thread group, boundary edge information is obtained, and the boundary edge is an edge with only one corresponding face. It can be understood that a triangular face corresponds to three edges. If a certain edge corresponds to other triangular faces, then the edge is not a boundary edge. On the contrary, the edge with only one corresponding face is a boundary edge. Based on the preset second thread group, each edge in the boundary edge information is processed in parallel to obtain hole information.

[0062] Exemplarily, after obtaining the boundary edge information, each edge in the boundary edge information is processed in parallel based on a preset second thread group to obtain hole information. The second thread group can be allocated according to the number of boundary edges. It can be understood that the second thread group processes each boundary edge, and the second thread group also includes multiple threads for parallel processing. Parallel processing between these threads can improve processing speed. Based on the second thread group, hole information is obtained.

[0063] Exemplarily, after the hole information is obtained, a third thread group is allocated according to the number of holes, and the third thread group is used to process each hole. The third thread group includes multiple threads, and these threads are processed in parallel to improve the processing speed. The hole information is repaired based on the third thread group to obtain a repaired three-dimensional mesh model.

[0064] The hole repair method of the three-dimensional mesh model of the present application can realize multi-thread group parallel processing, with faster processing speed, and is suitable for large-scale data application needs.

[0065] As an example, Figure 2 As shown, each face in the point face information is processed in parallel based on a preset first thread group to obtain boundary edge information, including:

[0066] S201, based on the point-surface topological relationship determination thread group, determine the related surface of each vertex to obtain point-surface topological relationship information.

[0067] S202, obtaining boundary edge information based on point-surface topological relationship information.

[0068] Exemplarily, the first thread group includes a thread group for determining the point-surface topological relationship. The graphics processor GPU records the related faces of each vertex in parallel according to the point-surface relationship to obtain the point-surface topological relationship information. Based on the point-surface topological relationship information, the boundary edge information is obtained. For example, each edge corresponds to a boundary flag EdgeMask, the initial value is 0, and each face occupies three flags to mark whether each edge of each triangular face is a boundary edge. Flag 1 indicates that the edge is a boundary edge. Among them, the boundary edge is an edge with only one corresponding face, such as Figure 3 Shown in the middle.

[0069] As an example, the boundary edge information may be a boundary edge index sequence. For example, the boundary marker EdgeMask is reduced and summed to obtain a boundary edge index sequence. The edge in the boundary edge index sequence that represents the edge at the EdgeMask sequence of 1 is the nth boundary edge. According to the boundary edge index sequence and the EdgeMask sequence, a directed boundary edge structure BLine, vertex indices v1, v2, face index f, and initialized edge adjacency relationships pre, next can be established to obtain the adjacency relationship between the boundary edges based on subsequent processing.

[0070] As an example, Figure 4 As shown, the second thread group includes a thread group for determining the border edge adjacency relationship and a thread group for determining the non-popular point. Based on the preset second thread group, each edge in the border edge information is processed in parallel to obtain hole information, including:

[0071] S401 , based on the boundary edge adjacency determination thread group, performs parallel processing on each edge in the boundary edge information to obtain adjacency relationship information between each boundary edge.

[0072] S402, based on the determination of the non-popular point thread group, each edge in the boundary edge information is processed in parallel to obtain the non-popular point information.

[0073] S403: Obtain hole information based on the adjacency relationship information and non-popular point information between each boundary edge.

[0074] Exemplarily, the second thread group includes a thread group for determining the adjacency relationship of border edges and a thread group for determining non-popular points. The direction of the border edge itself has been determined when it is stored. It is stipulated that in a face, point number 0 points to number 1, that is, the direction of the border edge is 0-->1, 1-->2, 2-->0, and the previous edge and the next edge in the adjacent border represent the adjacency relationship. Based on the thread group for determining the adjacency relationship of border edges, each edge in the border edge information is processed in parallel to obtain the adjacency relationship information between each border edge. According to the thread group for determining non-popular points, each edge in the border edge information is processed in parallel to obtain the non-popular point information. It should be noted that the thread group for determining the adjacency relationship of border edges and the thread group for determining non-popular points are processed in parallel. Based on the adjacency relationship information and non-popular point information between each border edge, the hole information is obtained.

[0075] As an example, Figure 5 As shown, the boundary edge information includes access flag information. Based on determining the boundary edge adjacency relationship, the thread group performs parallel processing on each edge in the boundary edge information to obtain adjacency relationship information between each boundary edge, including:

[0076] S501 , based on determining the boundary edge adjacency relationship thread group, searching for the next boundary edge according to the direction of the current boundary edge.

[0077] S502: When the access flag information of the next boundary edge indicates that the boundary edge has not been visited, determine that the boundary edge is the next adjacent boundary edge of the current boundary edge, and change the access flag information of the boundary edge to indicate that the boundary edge has been visited.

[0078] S503, traverse all boundary edges to obtain adjacency relationship information between each boundary edge.

[0079] Exemplarily, the thread group that determines the adjacency relationship of the boundary edges traverses all boundary edges once, records the current boundary edge as BLineI, searches for the next boundary edge BLineJ according to the direction of the current boundary edge, sets the next edge index next of the current edge BLineI and the previous edge index pre of the next edge BLineJ. When the access flag information of the next boundary edge indicates that the boundary edge has not been accessed, the boundary edge is determined to be the next adjacent boundary edge of the current boundary edge, and the access flag information of the boundary edge is changed to indicate that the boundary edge has been accessed, so as to prevent other threads from accessing the boundary edge. When a boundary edge has been accessed to become the next boundary edge of a boundary edge, the access flag BMask is set to 1, and it is no longer accessed by threads corresponding to other boundary edges, so as to prevent errors caused by modification of the adjacency relationship when multiple boundary edges have the same point. In order to prevent access conflicts and repeated modifications, the present application uses atomic operations to check the access flag information of the boundary edge. The access flag information can be an access flag BMask, and the access flag BMask is an access flag for atomic operations to check the boundary edge. For example, the atomic operation atomicCAS in Cuda is used to access the boundary edge flag BMask corresponding to the thread. The CAS operation usually contains three parameters: memory location, expected original value and new value, and returns the old value. Set the expected original value to 0 and the new value to 1. If the BMask value of the boundary edge is equal to the expected original value 0, it means that it has not been accessed, and it is set to 1, and the return value is 0; if the BMask value of the edge is 1 but not equal to the expected original value 0, it means that the boundary edge has been accessed, and its value is not changed, and the return value is 1. This step traverses all boundary edges to obtain the adjacency relationship information between each boundary edge.

[0080] As an example, Figure 6 As shown, based on the determination of the non-popular point thread group, each edge in the boundary edge information is processed in parallel to obtain the non-popular point information, including:

[0081] S601 : Based on determining a non-popular point thread group, for a target vertex of a current boundary edge, determine the number of other boundary edges having the target vertex as a vertex.

[0082] S602: When the number of other boundary edges is greater than a preset number, determine that the target vertex of the current boundary edge is a non-popular point.

[0083] S603, traverse all boundary edges to obtain non-popular point information.

[0084] Exemplarily, the target vertex of the current boundary edge can be the vertex at one end indicated by the direction in the current boundary edge. Of course, the other end can also be set as the target vertex, and the number of other boundary edges with the target vertex as the vertex is determined. When the number of other boundary edges is greater than the preset number, the target vertex of the current boundary edge is determined to be a non-popular point. For example, the preset number can be set to 2, that is, there are still two boundary edge vertices that coincide with the target vertex, and the vertex is determined to be a non-popular point, and all boundary edges are traversed to obtain non-popular point information.

[0085] As an example, a non-manifold point flag NonManifoldBit can be set to mark vertices where multiple boundary edges have a common point. Here, a non-manifold point refers to the intersection of two or more hole boundaries at the same point, and the point is a non-manifold vertex on the hole.

[0086] In traditional hole repair processing, non-manifold points are often removed first and then repaired, which complicates the data processing process and is not suitable for newly generated non-manifolds. This application introduces a non-manifold hole segmentation method that adapts to non-manifold point situations and repairs holes with better geometric shapes and mesh quality.

[0087] As an example, Figure 7 As shown, based on the adjacency information between each boundary edge and the non-popular point information, the hole information is obtained, including:

[0088] S701, modifying the adjacency relationship information between each boundary edge based on the non-popular point information to obtain the target adjacency relationship information between each boundary edge.

[0089] S702, obtaining hole information based on target adjacency information.

[0090] For example, Figure 8 As shown, there are multiple adjacency relationships at non-popular points. For example, the next border edge of directed border edge 1 can be 2 or 3. The present application also modifies the adjacency relationship information between each border edge according to the non-popular point information to obtain the target adjacency relationship information between each border edge, and then obtains the hole information based on the target adjacency relationship information. It can be understood that the target adjacency relationship is the only corresponding adjacency relationship between directed border edges.

[0091] As an example, Fig. 9 As shown, the adjacency relationship information between each boundary edge is modified based on the non-popular point information to obtain the target adjacency relationship information between each boundary edge, including:

[0092] S901, judging whether the end point of the current boundary edge is a non-popular point based on the non-popular point information, wherein the boundary edge is a directed edge, and the end point of the boundary edge indicates an end pointed by the direction in the boundary edge.

[0093] S902: When the end point of the current boundary edge is a non-popular point, calculate the ear angle between the current boundary edge and each next adjacent boundary edge associated with the current boundary edge, wherein the ear angle is the angle between the two boundary edges toward the hole side.

[0094] S903, based on the ear angle, modify the adjacency relationship of the current boundary edge to obtain the target adjacency relationship.

[0095] S904, traverse all boundary edges to obtain target adjacency relationship information between each boundary edge.

[0096] For example, Fig.10 As shown, two adjacent boundary edges form an ear, and the angle of an ear on one side of the hole is called the ear angle, as shown in Fig.11 Schematic diagram of the ear angle shown. Determine whether the end point of the current boundary edge is a non-manifold point. The end point of the boundary edge indicates the end of the direction in the boundary edge. If you check whether the end point of the directed edge is a marked non-manifold point, there are multiple possibilities for the adjacency relationship of the directed edge at the non-manifold point. Calculate the ear angle of the adjacent boundary edge at the non-manifold point. Based on the ear angle, modify the adjacency relationship of the current boundary edge to obtain the target adjacency relationship. Traverse all boundary edges to obtain the target adjacency relationship information between each boundary edge.

[0097] As an example, Fig.12 As shown, based on the ear angle, the adjacency relationship of the current boundary edge is modified to obtain the target adjacency relationship, including:

[0098] S1201, determining the next adjacent boundary edge corresponding to the minimum value of the ear angle as the target adjacent boundary edge of the current boundary edge.

[0099] S1202, obtaining a target adjacency relationship based on the target adjacency boundary edge.

[0100] For example, the present application modifies the adjacency relationship between boundary edges according to the principle of smaller ear angle. That is, the next adjacent boundary edge corresponding to the minimum value of the ear angle is determined as the target adjacent boundary edge of the current boundary edge. For example, Figure 8 As shown in the figure, directed boundary edge 1 is at a non-manifold point. To construct the next adjacent boundary edge, boundary edge 2 or boundary edge 3 can be selected. Boundary edge 2 is selected based on the principle of smaller ear angle. That is, boundary edge 2 is the target adjacent boundary edge of the current boundary edge 1. Based on this principle, the direction of the directed edge at the non-manifold point is clarified to reduce the generation of non-manifold points or island holes.

[0101] As an example, Fig.13 As shown, hole information is obtained based on target adjacency information, including:

[0102] S1301, starting from the initial boundary edge, searching for the next boundary edge based on the target adjacency relationship until returning to the initial boundary edge to obtain initial hole information.

[0103] S1302, screening the initial hole information to obtain hole information.

[0104] Exemplarily, the border edge access flags BMask are all set to zero, and the next border edge is continuously searched from the first edge according to the adjacency relationship of the directed border edge, and the BMask of the visited edge is set to 1 to avoid repeated access, until the initial border edge is found to form an initial hole closed loop. The initial hole information is screened to obtain the screened hole information.

[0105] As an example, Fig.14 As shown, the initial hole information includes the initial hole edge quantity information. The initial hole information is screened to obtain the hole information, including:

[0106] S1401, when the number of initial hole edges corresponding to the initial hole information is less than the first preset number and greater than the second preset number, retain the initial hole information; otherwise, discard it.

[0107] S1402, obtaining hole information based on the retained initial hole information.

[0108] Exemplarily, a thread group may be allocated to establish hole information, record the initial edge index Record[i] of the hole i, the number of hole edges Count[i], and set the hole flag HoleMask[i] to 1. The initial hole information includes the initial hole edge number information. If the initial hole edge number is less than the first preset number and greater than the second preset number, the initial hole is retained. The first preset number may be a set upper limit threshold of the hole edge number, and the second preset number may be 2. For example, if the hole edge number is less than 3, or the hole edge number is greater than the set upper limit threshold of the hole edge number, HoleMask[i] is set to indicate an invalid hole, which is discarded and will not be repaired later. Or if the hole does not form a closed loop, it is also discarded. The hole information is obtained based on the retained initial hole information.

[0109] Exemplarily, invalid holes may be discarded by initializing a flag EMask for each ear of a valid hole to 1, setting the ear flag EMask of an invalid hole to 0, and setting the hole flag to 0.

[0110] After obtaining the hole information, the holes are repaired.

[0111] As an example, Fig.15 As shown, the hole information includes multiple ear information, and the hole information is repaired based on the preset third thread group to obtain a repaired three-dimensional mesh model, including:

[0112] S1501, based on the thread group for determining the concavity and convexity of the ear vertices, determine the concavity and convexity of each ear vertex in the hole information.

[0113] S1502, based on determining the ear weight thread group, calculate the ear weight of each ear in the hole information.

[0114] S1503, sorting each ear in the hole information based on the convexity and the ear weight.

[0115] S1504, performing hole repair processing on the hole information according to the sorting result to obtain a repaired three-dimensional mesh model.

[0116] Exemplarily, the third thread group includes a thread group for determining the concavity of the ear vertices and a thread group for determining the ear weights. It should be noted that the thread group for determining the concavity of the ear vertices and the thread group for determining the ear weights are processed in parallel, and the concavity of the ear vertices and the ear weights are determined for each ear. A hole includes multiple ear information. For example, an ear Ear is established for each hole, and three adjacent vertices on the hole constitute an ear, and the ear angle is the angle toward one side of the hole. Based on the thread group for determining the concavity of the ear vertices, the concavity of each ear vertex in the hole information is determined. The ear weight of each ear is calculated according to the ear weight calculation formula of the present application. Each ear in the hole information is sorted based on the concavity and convexity and the ear weight, and the hole information is repaired based on the sorting result to obtain a repaired three-dimensional mesh model.

[0117] As an example, based on determining the ear convexity and concavity thread group, determining the concavity and convexity of each ear in the hole information includes: based on determining the ear convexity and concavity thread group, determining the ear vertex whose ear angle is greater than a preset angle as a convex point, and vice versa as a concave point, wherein three adjacent vertices on the hole boundary constitute an ear, and the ear angle is the angle toward the side of the hole.

[0118] For example, the ear of each hole is established, and three adjacent vertices on the hole constitute an ear, and the ear angle is the angle toward the hole. The preset angle can be 180 degrees. For example, if the ear angle at the vertex is greater than 180 degrees, it is a convex point, otherwise it is a concave point.

[0119] As an example, the ear weight of each ear in the hole information is calculated by the following formula:

[0120]

[0121] Among them, Q is the ear weight, C is the perimeter of the triangular surface formed by the current ear, Li represents the length of the three sides of the triangular surface formed by the current ear, Li (i = 0, 1, 2) represents the length of the three sides respectively, and A represents the projection area of ​​the triangular surface formed by the current ear on the hole normal.

[0122] Exemplarily, the ear weight of each ear is calculated according to the above formula, wherein, in order to calculate the projection area A of the triangular face formed by the current ear on the hole normal, it is necessary to establish a thread to parallelly calculate the normal of each valid hole, and the normal of the valid hole is calculated by calculating the sum of the normals of the faces where the hole boundary edges are located. To calculate the normal of the valid hole, a thread can be established to parallelly calculate the normalized normal of each face. It can be understood that the face normal is used to calculate the hole normal, and the hole normal is used to calculate the above A value.

[0123] After calculating the ear weight of each ear and the concavity of the ear vertex by the above formula, each ear in the hole information is sorted according to the concavity and the ear weight.

[0124] As an example, Fig.16 As shown, each ear in the hole information is sorted based on the concavity and ear weight, including:

[0125] S1601, preliminarily sorting each ear based on concavity and convexity, wherein the sorting order of the ear vertices that are convex points is smaller than the sorting order of the ear vertices that are concave points.

[0126] S1602, for ears with the same concavity and convexity, sort each ear based on the ear weight, wherein the smaller the ear weight corresponding to the ear is, the smaller its sorting order is.

[0127] For example, the ears on the holes are sorted according to the concave-convex properties, with convex points being ranked first, and the ears with smaller weights being ranked first. When sorting by size, the concave-convex properties are considered first. Sorting from small to large, convex points are ranked first, and concave points are ranked last. If they are all convex points or concave points, the ear weights are further compared, and the ear weights with smaller weights are ranked first.

[0128] As an example, Fig.17 As shown, the hole information is repaired according to the sorting result to obtain a repaired three-dimensional mesh model, including:

[0129] S1701, judging whether the last ear in the current sorting result meets a preset condition according to the sorting result.

[0130] S1702: When the last ear meets the preset conditions, close and repair the ear.

[0131] S1703, based on the convexity and concavity of each ear after the closed repair process and the ear weight, the ears are reordered and closed and repaired until the number of ears is zero, thereby obtaining a repaired three-dimensional mesh model.

[0132] Exemplarily, a new thread can be created to process each hole. First, the last ear in the sorting result is checked to determine whether it meets the preset conditions. The preset conditions include that the ear does not generate repeated faces and non-manifold edges, where non-manifold edges mean that more than two faces share edges. If the last ear in the current sorting result meets the preset conditions, the ear is closed and repaired, that is, the two ends of the ear are connected to form a closed triangle, indicating that the triangle has been closed, and the adjacent ear information at both ends of the ear is updated, and the process is iterated continuously until the entire hole is completely closed. If the last ear in the current sorting result generates repeated faces and non-manifold edges, the ear is skipped, and then the second to last ear in the sorting is checked until an ear that meets the preset conditions is found. After each ear is closed, the convexity and ear weight of each ear of the hole are recalculated, and the sorting and closure repair processes are re-performed until the number of ears is zero, and a repaired three-dimensional mesh model is obtained.

[0133] As an example, after each ear is closed, the information of the ears adjacent to this ear will change, while the information of other ears will not change. To save computational effort, only the concavity and convexity of the newly generated ears and the ear weights can be calculated, sorted, and the sorting results updated. Each time an ear is closed, the number of ears is reduced by 1. The ear sorting, closing, and updating process is repeated until the number of ears is equal to 0, and the hole is closed. Traverse the ears from back to front, and select the ear with the largest weight to close each time. Add the newly generated face to the main grid, and the process ends.

[0134] This application also proposes a grid model processing method.

[0135] As an example, Fig.18 As shown, the grid model processing method includes:

[0136] S1801, scanning the target object and obtaining point cloud data based on the scanning result.

[0137] S1802, gridding the point cloud data to obtain a three-dimensional grid model.

[0138] S1803, repairing holes in the three-dimensional mesh model according to the above-mentioned three-dimensional mesh model hole repair method to obtain a repaired three-dimensional mesh model.

[0139] The present application also proposes a hole repair device for a three-dimensional grid model.

[0140] As an example, Fig.19As shown, the hole repairing device of the three-dimensional mesh model includes: an acquisition module 1901, used to obtain point and surface information in the three-dimensional mesh model, wherein the surface in the point and surface information is a triangular surface; a first processing module 1902, used to perform parallel processing on each surface in the point and surface information based on a preset first thread group to obtain boundary edge information, wherein a boundary edge is an edge with only one corresponding surface; a second processing module 1903, used to perform parallel processing on each edge in the boundary edge information based on a preset second thread group to obtain hole information; a third processing module 1904, used to perform repair processing on each hole in the hole information based on a preset third thread group to obtain a repaired three-dimensional mesh model.

[0141] The present application also proposes a grid model processing device.

[0142] As an example, Fig. 20 As shown, the mesh model processing device includes: a scanning module 2001, used to scan the target object and obtain point cloud data based on the scanning result; a fourth processing module 2002, used to perform meshing processing on the point cloud data to obtain a three-dimensional mesh model; a hole repair module 2003, used to repair holes in the three-dimensional mesh model according to the above-mentioned hole repair method of the three-dimensional mesh model to obtain a repaired three-dimensional mesh model.

[0143] The application also proposes a computer-readable storage medium.

[0144] In this embodiment, a computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned three-dimensional mesh model hole repair method and mesh model processing method are implemented.

[0145] Fig.21 A block diagram of an electronic device provided for an embodiment of the present application.

[0146] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the above-mentioned three-dimensional mesh model hole repair method and mesh model processing method are implemented.

[0147] like Fig.21 As shown, for ease of understanding, the embodiment of the present application shows a specific electronic device.

[0148] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0149] like Fig.21 As shown, the device includes a computing unit 2101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 2102 or a computer program loaded from a storage unit 2108 into a random access memory (RAM) 2103. In the RAM 2103, various programs and data required for the operation of the electronic device can also be stored. The computing unit 2101, the ROM 2102, and the RAM 2103 are connected to each other via a bus 2104. An input / output (I / O) interface 2105 is also connected to the bus 2104.

[0150] Multiple components in the electronic device are connected to the I / O interface 2105, including: an input unit 2106, such as a keyboard, a mouse, etc.; an output unit 2107, such as various types of displays, speakers, etc.; a storage unit 2108, such as a disk, an optical disk, etc.; and a communication unit 2109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 2109 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0151] The computing unit 2101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 2101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 2101 executes the various methods described above, such as the hole repair method and the mesh model processing method of the three-dimensional mesh model. For example, in some embodiments, the hole repair method and the mesh model processing method of the three-dimensional mesh model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 2108. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 2102 and / or a communication unit 2109. When the computer program is loaded into RAM 2103 and executed by the computing unit 2101, the hole repair method and the mesh model processing method of the three-dimensional mesh model described above may be executed. Alternatively, in other embodiments, the computing unit 2101 may be configured to execute the hole repair method and the mesh model processing method of the three-dimensional mesh model in any other appropriate manner (for example, by means of firmware).

[0152] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this application, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

[0153] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0154] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0155] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0156] In addition, the terms "first", "second", etc. used in the embodiments of the present application are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the present embodiment. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present application can explicitly or implicitly indicate that at least one of the features is included in the embodiment. In the description of the present application, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.

[0157] In this application, unless otherwise clearly specified or limited in the embodiments, the terms "installed", "connected", "connected" and "fixed" etc. appearing in the embodiments should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integrated connection. It can be understood that it can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements, or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to the specific implementation situation.

[0158] In the present application, unless otherwise clearly specified and limited, a first feature being “above” or “below” a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being “above”, “above”, and “above” a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being “below”, “below”, and “below” a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0159] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for repairing holes in a three-dimensional mesh model, characterized in that: The method comprises: Acquire point and surface information in a three-dimensional mesh model, wherein the surface in the point and surface information is a triangular surface; Based on a preset first thread group, each face in the point face information is processed in parallel to obtain boundary edge information, wherein the boundary edge is an edge having only one corresponding face; Processing each edge in the boundary edge information in parallel based on a preset second thread group to obtain hole information; The hole information is subjected to hole repair processing based on a preset third thread group to obtain a repaired three-dimensional mesh model.

2. The hole repair method of the three-dimensional mesh model according to claim 1, characterized in that: The second thread group includes a thread group for determining border edge adjacency and a thread group for determining non-popular points. The preset second thread group performs parallel processing on each edge in the border edge information to obtain hole information, including: Based on the boundary edge adjacency determination thread group, each edge in the boundary edge information is processed in parallel to obtain adjacency relationship information between each boundary edge; Based on the non-popular point determination thread group, each edge in the boundary edge information is processed in parallel to obtain non-popular point information; Based on the adjacency relationship information between each boundary edge and the non-popular point information, hole information is obtained.

3. The hole repair method of the three-dimensional mesh model according to claim 2, characterized in that: The boundary edge information includes access flag information, and the thread group based on the determination of the boundary edge adjacency relationship performs parallel processing on each edge in the boundary edge information to obtain adjacency relationship information between each boundary edge, including: Based on the determined border edge adjacency relationship thread group, searching for the next border edge according to the direction of the current border edge; In a case where the access flag information of the next boundary edge indicates that the boundary edge has not been visited, determining that the boundary edge is the next adjacent boundary edge of the current boundary edge, and changing the access flag information of the boundary edge to indicate that the boundary edge has been visited; Traverse all boundary edges and obtain the adjacency relationship information between each boundary edge.

4. The method for repairing holes in a three-dimensional mesh model according to claim 2, characterized in that: The determining non-popular point thread group processes each edge in the boundary edge information in parallel to obtain non-popular point information, including: Based on the determination of the non-popular point thread group, for a target vertex of a current boundary edge, determining the number of other boundary edges having the target vertex as a vertex; When the number of the other boundary edges is greater than a preset number, determining the target vertex of the current boundary edge as a non-popular point; Traverse all boundary edges to obtain non-popular point information.

5. The method for repairing holes in a three-dimensional mesh model according to claim 2, characterized in that: The obtaining hole information based on the adjacency relationship information between each boundary edge and the non-popular point information includes: Modifying the adjacency relationship information between each boundary edge based on the non-popular point information to obtain target adjacency relationship information between each boundary edge; The hole information is obtained based on the target adjacency relationship information.

6. The method for repairing holes in a three-dimensional mesh model according to claim 5, characterized in that: The modifying the adjacency relationship information between each boundary edge based on the non-popular point information to obtain the target adjacency relationship information between each boundary edge includes: Determining whether the end point of the current boundary edge is a non-popular point based on the non-popular point information, wherein the boundary edge is a directed edge, and the end point of the boundary edge represents an end indicated by a direction in the boundary edge; When the end point of the current boundary edge is a non-popular point, the ear angle between the current boundary edge and each next adjacent boundary edge associated with the current boundary edge is calculated, wherein the ear angle is the angle between the two boundary edges toward the hole side; Based on the ear angle, modify the adjacency relationship of the current boundary edge to obtain a target adjacency relationship; Traverse all boundary edges and obtain the target adjacency relationship information between each boundary edge.

7. The method for repairing holes in a three-dimensional mesh model according to claim 6, characterized in that: The step of modifying the adjacency relationship of the current boundary edge based on the ear angle to obtain a target adjacency relationship includes: Determine the next adjacent boundary edge corresponding to the minimum value of the ear angle as the target adjacent boundary edge of the current boundary edge; A target adjacency relationship is obtained based on the target adjacency boundary edge.

8. The method for repairing holes in a three-dimensional mesh model according to claim 1, characterized in that: The third thread group includes a thread group for determining the concavity and convexity of the ear vertices and a thread group for determining the ear weights. The hole information includes a plurality of ear information. The hole information is repaired based on the preset third thread group to obtain a repaired three-dimensional mesh model, including: Determine the convexity and concavity of each ear vertex in the hole information based on the thread group for determining the concavity and convexity of the ear vertex; Calculate the ear weight of each ear in the hole information based on the determining ear weight thread group; sorting each ear in the hole information based on the concavity and convexity and the ear weight; The hole information is repaired according to the sorting result to obtain a repaired three-dimensional mesh model.

9. The method for repairing holes in a three-dimensional mesh model according to claim 8, characterized in that: The determining the convexity and concavity of each ear in the hole information based on the determining ear concavity and convexity thread group comprises: Based on the thread group for determining the ear convexity and concavity, the ear vertices whose ear angles are greater than a preset angle are determined to be convex points, and vice versa, concave points, wherein three adjacent vertices on the hole boundary constitute an ear, and the ear angle is the angle toward the hole side.

10. The method for repairing holes in a three-dimensional mesh model according to claim 8, characterized in that: The ear weight of each ear in the hole information is calculated by the following formula: Among them, Q is the ear weight, C is the perimeter of the triangular surface formed by the current ear, Li represents the three side lengths of the triangular surface formed by the current ear, Li (i = 0, 1, 2) represent the three side lengths respectively, and A represents the projection area of ​​the triangular surface formed by the current ear on the hole normal.

11. The method for repairing holes in a three-dimensional mesh model according to claim 8, characterized in that: Sorting each ear in the hole information based on the concavity and convexity and the ear weight, comprising: Preliminarily sorting each ear based on the concavity and convexity, wherein the sorting order of the ear vertices that are convex points is smaller than the sorting order of the ear vertices that are concave points; For ears with the same concavity and convexity, each ear is sorted based on the ear weight, wherein the smaller the ear weight corresponding to the ear is, the smaller the sorting order is.

12. The method for repairing holes in a three-dimensional mesh model according to claim 8, characterized in that: Performing hole repair processing on the hole information according to the sorting result to obtain a repaired three-dimensional mesh model, including: According to the sorting result, determine whether the last ear in the current sorting result meets the preset condition; When the last ear meets the preset conditions, performing a closing and repairing process on the ear; Based on the convexity and ear weight of each ear after the closed repair process, the ears are reordered and closed and repaired until the number of ears is zero, thereby obtaining a repaired three-dimensional mesh model.

13. The method for repairing holes in a three-dimensional mesh model according to claim 5, characterized in that: Obtaining hole information based on the target adjacency information includes: Taking the initial boundary edge as the starting point, searching for the next boundary edge based on the target adjacency relationship until returning to the initial boundary edge to obtain initial hole information; The initial hole information is screened to obtain the hole information.

14. The method for repairing holes in a three-dimensional mesh model according to claim 13, characterized in that: The initial hole information includes initial hole edge quantity information, and the initial hole information is screened to obtain the hole information, including: If the number of initial hole edges corresponding to the initial hole information is less than the first preset number and greater than the second preset number, the initial hole information is retained; otherwise, it is discarded; The hole information is obtained based on the retained initial hole information.

15. The method for repairing holes in a three-dimensional mesh model according to claim 1, characterized in that: The first thread group includes a thread group for determining a point-surface topological relationship, and the preset first thread group performs parallel processing on each surface in the point-surface information to obtain boundary edge information, including: Based on the point-surface topological relationship determination thread group, the related surface of each vertex is determined to obtain point-surface topological relationship information; Based on the point-surface topological relationship information, boundary edge information is obtained.

16. A grid model processing method, characterized in that: The method comprises: Scan the target object and obtain point cloud data based on the scanning results; Performing grid processing on the point cloud data to obtain a three-dimensional grid model; According to the hole repair method of a three-dimensional mesh model described in any one of claims 1 to 15, holes in the three-dimensional mesh model are repaired to obtain a repaired three-dimensional mesh model.

17. A hole repair device for a three-dimensional mesh model, characterized in that: The device comprises: An acquisition module, used for acquiring point and surface information in a three-dimensional mesh model, wherein the surface in the point and surface information is a triangular surface; A first processing module, configured to perform parallel processing on each face in the point-face information based on a preset first thread group to obtain boundary edge information, wherein the boundary edge is an edge having only one corresponding face; A second processing module, configured to perform parallel processing on each edge in the boundary edge information based on a preset second thread group to obtain hole information; The third processing module is used to perform repair processing on each hole in the hole information based on a preset third thread group to obtain a repaired three-dimensional mesh model.

18. A network model processing device, characterized in that: The device comprises: A scanning module, used to scan the target object and obtain point cloud data based on the scanning results; A fourth processing module, used for performing grid processing on the point cloud data to obtain a three-dimensional grid model; A hole repair module is used to repair holes in the three-dimensional mesh model according to the hole repair method of the three-dimensional mesh model described in any one of claims 1-15 to obtain a repaired three-dimensional mesh model.

19. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 15 are implemented.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.