A GPU-based parallel method and system for generating quadrilateral meshes for geometric models

By using a GPU-parallel quadrilateral mesh generation method for geometric models, the surface triangulation and frame field solving were optimized, solving the problem of low computational efficiency for complex surface models and achieving efficient mesh generation and improved computational performance.

CN120526086BActive Publication Date: 2025-10-28PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511027115.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-10-28
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Existing algorithms suffer from low parallel computing efficiency on GPUs when processing complex surface models, especially in high-resolution standard field calculations, where they suffer from high storage resource consumption and long computation time, making it difficult to fully utilize the parallel computing capabilities of GPUs.

Method used

A GPU-based parallel quadrilateral mesh generation method for geometric models is adopted. By optimizing surface triangulation through UV stitching and cavity processing, and combining parallel topology solving and frame field solving, efficient mesh generation of multifaceted models is achieved.

Benefits of technology

It significantly improves computing performance, reduces data transfer overhead, reduces memory resource consumption, and enhances computing efficiency, enabling it to handle large-scale complex surface models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526086B_ABST
    Figure CN120526086B_ABST
Patent Text Reader

Abstract

This invention discloses a GPU-parallel method and system for generating quadrilateral meshes of geometric models, belonging to the field of computer graphics technology. The method includes: for a geometric model composed of multiple faces, a GPU thread acquires the parametric coordinates of facets in parallel, and performs spatial transformation on the parametric coordinates by establishing bounding boxes for the facets to obtain a facet stitching result; based on the facet stitching result, an original triangular mesh model is generated; the GPU thread processes the triangular elements in the original triangular mesh model in parallel to obtain a cavity-filtered triangular mesh and the network geometry information of the triangular mesh; the GPU thread solves the network topology structure of the triangular mesh in parallel; the GPU thread performs parallel solution of the frame field based on the network geometry information and network topology information of the triangular mesh; and the frame field is combined to generate the quadrilateral mesh structure of the geometric model. This invention increases the efficiency of mesh structure generation by improving the computational performance of the curved surface frame field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics technology, specifically to a method and system for generating quadrilateral meshes for geometric models based on GPU parallelism. Background Technology

[0002] Frame fields have wide applications in computer graphics. Frame field calculation is an important step in generating high-quality quadrilateral meshes for curved surfaces. It provides clear directional guidance for the mesh generation process and, with the help of singularity control mechanisms, effectively regulates the key nodes of mesh generation, thereby assisting in the generation of high-quality quadrilateral meshes and significantly improving the accuracy and efficiency of quadrilateral mesh generation for complex curved surfaces.

[0003] The mainstream methods for calculating the frame field on a surface mainly consist of two stages: initial triangulation of the surface and solving for the frame field on the triangular mesh. The mainstream approach to initial triangulation is to generate a triangular mesh in a two-dimensional parametric space using the Delaunay algorithm, and then map it onto the three-dimensional surface. Solving for the frame field occurs on the edges of the triangular mesh. This requires first calculating the topological relationships of the triangular mesh, and then generating a system of linear equations based on these relationships to obtain the frame field.

[0004] 1. Triangulation of curved surfaces.

[0005] Surface triangulation, as the most mature technique in current research on surface polygon meshing, is widely used in fields such as geographic modeling, 3D reconstruction, and graphics rendering. In terms of GPU parallel computing, Rong et al. proposed a 2D Delaunay triangulation method based on GPU and CPU collaboration in 2008. Its main process includes using the GPU to construct a discrete Voronoi diagram in parallel, and the CPU to refine the Delaunay structure. This method encompasses ten steps, including texture mapping, jump flooding algorithm, GPU initial mesh construction, CPU convex hull correction, missing point insertion, and edge flipping optimization. It achieves a 53% speedup compared to traditional CPU algorithms on uniformly distributed point sets of millions. Subsequently, Qi et al. extended this method to a full GPU implementation in 2011, supporting parallel processing of constraint insertion and edge flipping operations. It achieved up to 31 times speedup on synthetic data and approximately 4 times performance improvement on real GIS data, significantly enhancing its applicability in large-scale point set processing scenarios. The GPU-DT algorithm is based on the above work, significantly improving the speed of triangulation for large-scale point sets through CUDA parallel algorithms.

[0006] While the aforementioned algorithms have demonstrated significant advantages in various application areas, they still have several limitations. A typical problem is that when processing surface models with multiple faces, a strategy of performing GPU Delaunay triangulation on each face is often adopted. This cell-oriented triangulation method not only fails to fully utilize the parallel computing capabilities of the GPU, but also results in high I / O overhead due to frequent data transfers, significantly impacting the overall triangulation efficiency.

[0007] 2. Standard rack area

[0008] The frame field is a fourfold symmetrical direction field, defined based on the quotient space. Cross fields possess fourfold symmetry. The development of cross fields has gone through several important stages. In 2000, Hertzman et al. first proposed the concept of cross fields for texture rendering, but this technique did not gain widespread attention until Palacios et al. introduced rotationally symmetric fields in 2007. Panozzo et al., building on this, proposed a cross field generation method based on stretched orthogonal fields, significantly improving the universality of cross fields. Jiang et al. further expanded the application scope of surface cross fields by introducing constraints to reduce the dimensionality of variables and combining them with a customized Riemannian metric algorithm. In 2017, Beaufort et al. innovatively introduced Ginzburg-Landau theory into solving cross fields, providing an efficient numerical solution for this problem. The latest progress comes from Reberol et al. in 2021, who constructed a quadrilateral mesh generation framework for CAD models based on cross fields, providing an important tool for the field of industrial design.

[0009] Calculating frame fields on curved triangular meshes involves operations such as calculating mesh topology relationships and solving linear equations. The complexity of this problem increases dramatically with the mesh size. On one hand, generating a large number of mesh cells and the topological relationships between nodes is fundamental to frame field calculations; the storage and computational costs of this process increase quadratically with mesh resolution. On the other hand, constructing and solving linear equations based on Ginzburg-Landau theory is a crucial step in generating the frame field. As the mesh size increases, the dimension of the coefficient matrix increases significantly, leading to a substantial increase in storage resource consumption and solution time. Given these issues, calculating high-resolution frame fields requires substantial storage and computational resources, making it difficult to implement. Eigen is a C++ linear algebra library widely used in numerical computation; most frame field solutions on CPUs are implemented using Eigen.

[0010] In summary, existing algorithms perform serial computation on CPUs, and their computational efficiency bottlenecks are obvious when faced with the demand for high-precision frame field calculations on complex surfaces: for the initial triangulation process of the surface, the mainstream Delaunay triangulation method experiences a surge in the time consumption of computationally intensive operations such as topology lookup and hole detection as the cell size increases; solving the frame field on the triangular mesh requires constructing a global sparse linear equation system, which has low matrix assembly efficiency and is difficult to solve; direct methods are limited by memory usage and cannot handle large-scale problems, while iterative methods are affected by convergence speed and their solution performance is difficult to guarantee. Summary of the Invention

[0011] This invention discloses a GPU-parallel method and system for generating quadrilateral meshes for geometric models, which increases the efficiency of mesh structure generation for geometric models by improving the computational performance of surface frame fields.

[0012] To achieve the above objectives, the technical solution of the present invention includes the following:

[0013] A GPU-parallel method for generating quadrilateral meshes for geometric models, the method comprising:

[0014] For a model composed of multiple faces, each GPU thread obtains the parametric coordinates of the face in the UV coordinate system in parallel, and performs spatial transformation on the parametric coordinates of the face by establishing a bounding box of the face to obtain the face stitching result.

[0015] The original triangular mesh model is generated based on the patch stitching result, and each triangular unit in the original triangular mesh model is processed in parallel by each GPU thread to obtain the cavity-filtered triangular mesh and the network geometry information of the triangular mesh. The network geometry information includes: vertices and triangles.

[0016] Each GPU thread solves the network topology of the triangular mesh in parallel; wherein, the network topology includes: the topological composition of the edges, the adjacent triangles of the edges, and the adjacent edges of the vertices;

[0017] Each GPU thread performs parallel solution of the frame field based on the network geometry and topology information of the triangular mesh;

[0018] The quadrilateral mesh structure of the geometric model is generated by combining the aforementioned frame field.

[0019] Furthermore, each GPU thread acquires the parametric coordinates of the facet in the UV coordinate system in parallel, and performs a spatial transformation on the parametric coordinates of the facet by establishing a bounding box, to obtain the facet stitching result, including:

[0020] Each GPU thread acquires the parametric coordinates of all points in the UV coordinate system in parallel. , This represents the parameterized coordinate value of a point in the UV coordinate system in the horizontal direction. This represents the parameterized coordinate value of a point in the UV coordinate system in the vertical direction.

[0021] For each face of the model, a bounding box is used to enclose the face; wherein, the bounding box is the smallest rectangle that can contain the parameterized plane of the face, and the extreme coordinates of the bounding box include: horizontal extreme value U_min, horizontal extreme value U_max, vertical extreme value V_min, and vertical extreme value Vmax.

[0022] Parallel processing is performed on a per-patch basis. Each GPU thread performs vertical offset preprocessing based on the vertical extremum Vmax and the patch processing order index to obtain the vertical reference value of the patch.

[0023] Each GPU thread retrieves the position of the corresponding face in the face queue based on the face processing order index, and obtains the total offset of the preceding face based on the vertical reference value of all faces before the face.

[0024] Each GPU thread is based on the total offset of the preceding facets and the parameterized coordinate values ​​of this facet. Perform a vertical spatial transformation on all points in the image and the vertical extremum V_min to obtain the transformed parameterized coordinates of the corresponding points. ;

[0025] Obtain the parametric coordinates of all points in the patch after spatial transformation. .

[0026] Furthermore, the method for generating the original triangular mesh model based on the patch stitching results includes: executing the Delaunay subdivision algorithm in parallel using GPU threads.

[0027] Furthermore, each triangular unit in the original triangular mesh model is processed in parallel using each GPU thread to obtain the cavity-filtered triangular mesh and the network geometry information of the triangular mesh, including:

[0028] Each GPU thread calculates the centroid coordinates of different triangulation units in parallel and constructs a centroid-triangulation unit index mapping table.

[0029] Construct a first ray along the diagonal extension of the bounding box, and select an external point as the endpoint of the first ray;

[0030] Generate a second ray that starts at the centroid of the triangular unit and ends at that external point;

[0031] Establish a boundary edge quadtree spatial partitioning structure, and combine the boundary edge quadtree spatial partitioning structure with the intersection detection of the second ray and the edge of the triangular unit to obtain the intersection count of the triangular unit;

[0032] Perform Boolean determination on the intersection count of each triangular unit to obtain the retained flag bitmap of the triangular unit;

[0033] The original triangular mesh model is compressed based on the retained flag bitmap of the triangular unit, and after looking up the corresponding triangle index using the centroid-triangle index mapping table, the triangles with the flag bit of 0 in the retained flag bitmap are deleted to obtain the cavity filtered triangular mesh.

[0034] Extract the network geometry information of the triangular mesh ;in, Represents a vertex. It represents a triangle.

[0035] Furthermore, each GPU thread solves the network topology of the triangular mesh in parallel, including:

[0036] For each vertex in the triangular mesh The triangle is traversed in parallel using GPU threads. To generate the P_Tris array, which is used to store the set of adjacent triangle indices of vertices;

[0037] Vertex determination based on the P_Tris array Does there exist an adjacent edge at that vertex? In the case of adjacent edges, parallel prefix sum calculation is performed based on the P_Tris array to generate the P_Edges_Num_Prefix_Sum array, which is used to store the prefix sum of adjacent edges of vertices;

[0038] Allocate storage space for the P_Edges array based on the adjacent edge prefix sum, and write the vertices using multi-threading. The adjacent edge indices are written into the P_Edges array, which is used to store the set of adjacent edge indices of vertices;

[0039] Remove duplicates from the adjacent edges involved in the P_Edges array, and write the set of adjacent edge indices after deduplication into the Point_Start_Edge_Num array;

[0040] Parallel prefix sum calculation is performed based on the Point_Start_Edge_Num array to generate the P_Start_Edge_Num_Prefix_Sum array, which is used to store the prefix sums of adjacent edge endpoints;

[0041] Based on the prefix sum of the adjacent edge endpoints, the adjacent edge endpoints are written into the E_Fir_Point array and the E_Sec_Point array respectively; wherein, for any adjacent edge, the index value of the adjacent edge endpoint in the E_Fir_Point array is less than the index value of the adjacent edge endpoint in the E_Sec_Point array.

[0042] Perform parallel edge traversal on the triangular mesh, and process each edge... , retrieve vertex The set of adjacent triangles P_Tris[ ];in, Representing an edge Another vertex;

[0043] Based on the set of adjacent triangles P_Tris[ Perform triangle containment detection, and based on the detection results, store the number of triangles adjacent to the edge and the index of the triangles adjacent to the edge in the E_Tris_Num array and the E_Tris array, respectively;

[0044] By using the E_Fir_Point array, E_Sec_Point array, E_Tris_Num_Prefix_Sum array, E_Tris array, P_Edges_Num_Prefix_Sum array, and P_Edges array, respectively, we can obtain the topological structure of the edges, the adjacent triangles of the edges, and the adjacent edges of the vertices.

[0045] Furthermore, the vertices are implemented through the following steps. and vertex The query operation for the network topology between them:

[0046] Based on the vertex index value, for the vertex and vertex Perform sequence normalization;

[0047] Obtain the vertices using the P_Start_Edge_Num_Prefix_Sum array. The starting position for storing the edge's first node;

[0048] According to Point_Start_Edge_Num[ The value calculation terminates at the position end = start + out-degree, locking the candidate edge set E_Sec_Point[start : end].

[0049] Starting from the beginning position, visit each vertex sequentially according to memory order. For associated edges, read the index of the secondary endpoint of the current edge, current_ = E_Sec_Point[idx], if current_ == : Immediately return the current global index idx, and end the search when the position end is reached; if no match is found, return -1.

[0050] Furthermore, each GPU thread performs parallel solution of the frame field based on the network geometry and topology information of the triangular mesh, including:

[0051] Construct the optimization problem: Among them, the first component The second component , Indicates the signage area, Represents a curved surface. Indicates an adjustable parameter;

[0052] Using the thermal diffusion system, the optimization problem is derived, yielding the equation: ;in, Indicates the number of iterations. Let be a constant relating to the length of the diagonal and the shortest side of the bounding box of the surface. For a diagonal matrix, the elements in the diagonal matrix , , Representing edges respectively The area of ​​an adjacent triangle, Represents the stiffness matrix and condition matrix. It is by A single-column matrix composed of Indicates the first The first component in the next iteration The first in Quantity, Indicates the first The first component in the next iteration The first in Components, initial condition matrix The construction follows the boundary distinction principle;

[0053] Calculate the diagonal matrix based on the mesh topology and geometry information. and stiffness matrix The values ​​of each element in the table;

[0054] Diagonal matrix and stiffness matrix Substitute the values ​​of each element into the equation to solve for the conditional frame field.

[0055] Furthermore, based on the mesh topology and geometry information, the diagonal matrix is ​​calculated. and stiffness matrix The values ​​of each element in the table include:

[0056] Parallel thread synchronous computation is performed based on the adjacent triangles of the edges to obtain the diagonal matrix. The values ​​of each element in the table;

[0057] Iterate through each edge and find the adjacent triangle of the current edge based on the E_Tris array. and adjacent triangles ;

[0058] In adjacent triangles and adjacent triangles Find the four adjacent edges of the current edge and calculate the angle formed by the four adjacent edges and the current edge. Angle Angle and included angle Then, based on the included angle Angle Angle and included angle Calculate the weight of the current edge;

[0059] Calculate adjacent triangles and adjacent triangles The local coordinate system is used to calculate the included angle of the current side based on the local coordinate system. ;

[0060] Based on the included angle of the current edge And weights, calculate the stiffness matrix The value of the corresponding element in the middle.

[0061] Furthermore, the diagonal matrix and stiffness matrix Substituting the values ​​of each element into the equation, the solution for the conditional frame field is obtained, including:

[0062] Step 1: Calculate the matrix ;

[0063] Step 2: Based on the diagonal length of the bounding box and the shortest side length of the grid Calculate the initial included angle and the final angle XX ;

[0064] Step 3: Set the total number of loops Current loop count and execute Repeat Steps 4-8, each time in a loop. ;

[0065] Step 4: Based on the initial included angle Final angle Current loop count Total number of loops Calculate the current included angle ;

[0066] Step 5: Based on the current angle diagonal matrix and stiffness matrix Parallel Matrix Update And let the number of iterations ;

[0067] Step 6: Based on the current angle and condition matrix Calculate the matrix ;

[0068] Step 7: Solve using the parallel preconditioning conjugate gradient method ;

[0069] Step 8: Parallel Update , ;

[0070] Step 9: If Then proceed to Step 7; where c represents a set threshold.

[0071] Step 10: If Then calculate the field of the marker frame on the side.

[0072] A GPU-parallel quadrilateral mesh generation system for geometric models, the system comprising:

[0073] The UV stitching module is used to obtain the parametric coordinates of the facets in the UV coordinate system in parallel by each GPU thread for a model composed of multiple faces, and to perform spatial transformation on the parametric coordinates of the facets by establishing the bounding box of the facets to obtain the facet stitching result.

[0074] The triangular mesh generation module is used to generate an original triangular mesh model based on the patch stitching result, and to process each triangular unit in the original triangular mesh model in parallel using each GPU thread to obtain the cavity-filtered triangular mesh and the network geometry information of the triangular mesh. The network geometry information includes: vertices and triangles.

[0075] A topology generation module is used for each GPU thread to solve the network topology of the triangular mesh in parallel; wherein, the network topology includes: the topological composition of the edges, the adjacent triangles of the edges, and the adjacent edges of the vertices;

[0076] The frame field generation module is used by each GPU thread to solve the frame field in parallel based on the network geometry and network topology information of the triangular mesh;

[0077] The quadrilateral mesh generation module is used to generate a quadrilateral mesh structure for the geometric model in conjunction with the frame field.

[0078] Compared with the prior art, the present invention has at least the following beneficial effects.

[0079] 1) The UV stitching algorithm of the present invention maps the parameterized coordinates of multiple faces to a unified texture space and constructs a virtual stitching point cloud. While achieving a significant increase in the data scale of concurrent computing, it merges the data communication batches between the CPU and GPU through the coordinate mapping mechanism, and significantly reduces the data transmission overhead.

[0080] 2) This invention designs a parallel topology solver that exhibits superior space complexity, at only O(N) (where N is the number of points), significantly saving memory resources compared to existing methods. When solving linear equation systems, a parallel preprocessing conjugate gradient method is employed, which, compared to direct methods, avoids matrix decomposition, effectively saving memory consumption and making it suitable for computing high-resolution frame fields.

[0081] 3) The entire process of solving the surface frame field in this invention is completed on the GPU, which can improve the computational performance by 1 to 2 orders of magnitude compared with existing methods. Attached Figure Description

[0082] Figure 1 This is a schematic diagram of the standard frame field for the present invention.

[0083] Figure 2 This is a flowchart of the GPU-based parallel fast calculation method for curved surface frame fields according to the present invention.

[0084] Figure 3A A schematic diagram of UV occlusion on two surfaces.

[0085] Figure 3BA diagram illustrating how Delaunay operation after UV occlusion can lead to incorrect mesh topology.

[0086] Figure 4 These are example images of different faces of the model. Different colors represent different faces.

[0087] Figure 5 The diagram shows an example of how the unmodified Delaunay algorithm cannot properly handle cavities. In the diagram, (a) represents the original model, and (b) represents the model without preserving the cavity.

[0088] Figure 6 This is a schematic diagram of the UV stitching algorithm.

[0089] Figure 7A To standardize parameters after UV stitching.

[0090] Figure 7B This is a rendering of Delaunay after UV stitching.

[0091] Figure 8 This is a schematic diagram illustrating the principle of the cavity detection algorithm.

[0092] Figure 9 This is an example diagram of the cavity treatment according to the present invention.

[0093] Figure 10 For matrix A schematic diagram of the calculation. The red edge represents the current edge.

[0094] Figure 11 for A schematic diagram of the calculation. Where Z is the normal vector of triangle t1, and XYZ form a right-handed direct coordinate system. For the edge Projection on the XY plane for Rotate to the angle between the X and X axes.

[0095] Figure 12 This is a Delaunay mesh obtained using GPU-DT and the method of this invention.

[0096] Figure 13 This is an example of the frame field calculation results obtained by the present invention in the Mambo dataset. Detailed Implementation

[0097] In the following description, the invention will be further described by way of specific embodiments so that those skilled in the art can have a more thorough understanding of the features and advantages of the invention.

[0098] In this embodiment, the frame field of the present invention is defined on the edge of the triangular mesh. After determining the local coordinate system on the edge, as follows: Figure 1 As shown, it can be used in the local coordinate system. express.

[0099] like Figure 2 As shown, this invention can be mainly divided into two major stages: surface triangulation and frame field solution. In the surface triangulation stage, this invention implements GPU-parallel constrained Delaunay triangulation, and designs UV stitching and cavity processing operations to improve computational efficiency and correctly handle models with cavities. In the frame field solution stage, for GPU-parallel solution of high-resolution frame fields, this invention designs a grid topology data structure with a space complexity of O(N) and an access time complexity of O(1), and implements a parallel preprocessing conjugate gradient method that can converge quickly to solve linear equations.

[0100] 1. UV splicing.

[0101] For models composed of multiple faces, the two-dimensional parameter spaces of these faces often exhibit mutual occlusion. If Delaunay meshing is performed directly in this parameterized space, points between different faces will connect, leading to incorrect mesh topology. For example, when the UV coordinates of a facet change on a two-dimensional plane... Figure 3A When overlapping as shown, the traditional Delaunay triangulation algorithm will incorrectly connect the sampling points of different faces into cross-face triangles. Figure 3B (In the middle section), this cross-surface connection disrupts the geometric continuity of the surface, resulting in wrinkles or tears when mapped back to the 3D model.

[0102] To enable existing GPU Delaunay algorithms to simultaneously perform Delaunay operations on multiple faces, this invention proposes a UV stitching strategy that addresses the UV occlusion problem. During model parameterization, a UV stitching strategy is specifically designed to address this issue. Figure 4 For each face in the model, this invention first calculates its parameterized bounding box, which is the smallest rectangle that can completely contain the parameterized plane of that face, providing a quantifiable boundary range for subsequent operations. Then, through carefully designed translation operations, the parameterized bounding boxes of each face are spatially transformed. The purpose of these operations is to readjust the position and orientation of each face's parameterization in parameter space, ensuring that the bounding boxes no longer occlude with each other. In this way, the parameterization results of multiple faces can be smoothly mapped to... Figure 6 In the unified texture space shown. Among them, Figure 7A This is a schematic diagram illustrating the unified parameterization after UV stitching.

[0103] Throughout the process, since the limiting edges of each face remain unchanged, this ensures that no triangles spanning the faces are generated during the subsequent Delaunay triangulation process.

[0104] Input: Independent parametric coordinates of each facet.

[0105] Output: A globally non-overlapping UV layout.

[0106] Step 1: Perform bounding box feature extraction in parallel on a per-patch basis. For each patch, calculate the axis-aligned bounding box (AABB) and record the extreme coordinates of the bounding box, U_min / U_max (horizontal extreme) and V_min / V_max (vertical extreme).

[0107] Step 2: Parallel processing is performed on a per-face-by-face basis. Each GPU thread performs vertical offset preprocessing and generates a vertical base value for each face: V_base = V_max + face_index × ε (ε = 1e-6 to prevent numerical conflicts, face_index is the processing order index).

[0108] Step 3: Spatial cumulative calculation. Calculate the prefix sum array of the vertical reference values ​​in the processing order. Use the classic prefix sum calculation algorithm on the GPU to obtain the total offset S[i] = Σ(V_base[0…i]) of the first i faces, and construct the cumulative height reference system.

[0109] Step 4: Perform parallel processing on a per-face-by-face basis. Each GPU thread performs coordinate space transformation and vertical translation on the i-th face: v' = v + (S[i-1] - V_min) (S[i-1] represents the total offset of the previous face, and V_min is the original lower boundary of the current face). Keep the horizontal U coordinate unchanged, and v represents the coordinate of the point on the face in the V direction in the UV parameter space.

[0110] Experiments have verified that when processing data points with a scale of tens of millions, the more faces a method has, the more its advantage in improving computational efficiency becomes. This is mainly because as the number of faces increases, without using the Delaunay algorithm for UV stitching, the small data size of a single face cannot fully utilize the GPU's computing cores, resulting in a significant decrease in GPU utilization. At the same time, the time consumed by I / O operations due to transferring data to the GPU multiple times for each face also increases.

[0111] II. Parallel processing of cavities.

[0112] 2.1 Cavity.

[0113] Existing Delaunay triangulation algorithms on GPUs, when processing surface models containing cavities, inevitably produce errors at the boundaries of adjacent surfaces due to the lack of effective cavity identification and boundary constraint mechanisms. Figure 7BThe additional triangles shown within the blue box. These triangles can be considered as triangles existing within cavities. However, this result is not accurate for special curved surfaces with internal cavities, such as... Figure 5 As shown. This invention proposes a method for parallel removal of triangles within cavities based on parallel Delaunay triangulation. This method can not only accurately generate internal edges but also eliminate cross-face triangles caused by UV splicing.

[0114] 2.2 Cavity Parallel Processing Algorithm.

[0115] Current mainstream cavity detection algorithms primarily implement their core decision-making logic using a CPU, specifically based on the principle of ray projection. Figure 8 As shown, an arbitrary point is selected inside the triangle to be tested, and a ray is constructed pointing to the point p at infinity. The cavity is determined by the parity of the number N of intersections between the ray and the model boundary (if N is even, it is determined to be an internal triangle of the cavity; if N is odd, it is a normal surface). However, traditional implementations require all geometric data generated by the GPU to be sent back to the CPU for processing. This not only incurs significant I / O overhead due to frequent CPU-GPU data transfer, but also wastes the hardware computing potential by failing to effectively utilize the GPU's stream processor architecture, severely restricting the algorithm's execution efficiency. To address this bottleneck, this invention proposes a parallelized cavity processing framework based on GPU hardware characteristics. By reconstructing the data structure and computational paradigm of ray intersection testing, the entire cavity determination process is computed on the GPU, fully leveraging the large-scale parallel computing advantages of modern graphics processors.

[0116] The specific algorithm steps are as follows:

[0117] Input: Original triangular mesh model, set of boundary edges.

[0118] Output: Clean mesh after cavity filtration.

[0119] Step 1: Using triangular units as units, each GPU thread generates the centroid coordinates, synchronously calculates the centroid coordinates for each triangular unit, and constructs a centroid-triangle index mapping table.

[0120] Step 2: Dynamic construction of the far endpoint, calculate the mesh axis aligned bounding box (AABB), and select the outer point as the ray endpoint along the diagonal extension direction of the bounding box.

[0121] Step 3: Accelerate structure-assisted intersection testing by establishing a boundary edge quadtree spatial partitioning structure and performing ray-edge intersection detection in parallel.

[0122] (1)

[0123] Where Q represents the quadtree query result. For intersection indicator functions, Indicates the starting point is The destination is ray.

[0124] Step 4: Parallel parity and evenness determination, performing Boolean determination based on intersection count:

[0125] (2)

[0126] Generate a triangle-preserving bitmap.

[0127] Step 5: Mesh reconstruction, performing parallel reduction operations. Based on the flag bitmap compressed storage structure, and using the centroid-triangle index mapping table to find the corresponding triangle index, triangles with a flag bit of 0 are deleted, outputting a topologically coherent cavity filter mesh. Among these steps... Figure 9 (b) in the text is a pair Figure 9 The diagram shows the effect obtained by executing the cavity detection algorithm of the present invention on the original model in (a).

[0128] III. Parallel solution of topology.

[0129] Complete topological information is crucial when processing mesh data. Since the definition of a frame field depends on the geometry and connectivity of mesh edges, key topological data such as edge topology, adjacent triangle information, and vertex adjacent edges are required. However, the mesh data structure generated by the commonly used Delaunay triangulation algorithm is relatively basic, typically only recording basic information such as triangle vertex indices. It neither explicitly stores edge adjacency relationships nor effectively identifies boundary edges, making it difficult to directly meet the topological support required for frame field construction.

[0130] Key-value pair map data structures can efficiently solve network topology on the CPU, conveniently storing and querying the relationships between vertices and triangles, thus easily constructing complete topological information. However, when migrating to GPUs for processing, the situation becomes much more complex. The architecture of GPUs is designed for parallel computing, and its hardware characteristics limit its ability to handle data structures. Currently, the industry commonly uses two-dimensional arrays to simulate map structures, cleverly designing array indices to simulate the storage and access of key-value pairs. However, this method has significant drawbacks, consuming a large amount of storage space. In GPUs, video memory resources are relatively expensive and have limited capacity; such a large-scale waste of storage space is undoubtedly unreasonable. This not only increases hardware costs but may also lead to insufficient video memory when processing large-scale mesh data, causing the system to fail to run properly, greatly limiting the application scope and efficiency improvement of GPU-based mesh processing algorithms.

[0131] This invention implements the topology solution process on a GPU, with Table 1 listing the data structures used in the process. This method exhibits excellent space complexity, at only O(N) (where N is the number of points), significantly optimizing GPU memory usage. During computation, the multi-threaded parallel mechanism of the GPU is fully utilized, enabling extremely fast result acquisition. Under normal circumstances, the time consumed by topology lookup operations is consistently O(1). Even in extreme cases, the complexity of some lookup operations is only O(N) (where N is the number of points). This method demonstrates good stability and efficiency; experiments show that it achieves a speedup of 2-3 orders of magnitude compared to traditional methods.

[0132] According to Table 1, the topological structure of the edges can be obtained through E_Fir_Point and E_Sec_Point, the adjacent triangles of the edges can be obtained through E_Tris_Num_Prefix_Sum and E_Tris, and the adjacent edges of the vertices can be obtained through P_Edges_Num_Prefix_Sum and P_Edges. For the specific algorithm, see 3.2.

[0133] 3.1: UV topology relationship construction process.

[0134] Input: triangular mesh .

[0135] Output: Complete topology graph.

[0136] Phase 1: Vertex-Triangle Adjacency Construction.

[0137] Step 1: Parallelism statistics.

[0138] Step 1.1: Allocate the P_Tris_Num array, and the GPU thread traverses the triangles in parallel. .

[0139] Step 1.2: For The atomic addition operation atomicAdd(&P_Tris_Num[v_i], 1) is performed on the three vertices.

[0140] Step 2: Parallel prefix sum calculation generates the P_Tris_Num_Prefix_Sum array.

[0141] Step 3: Fill in the adjacency relationships.

[0142] Step 3.1: Allocate storage space for P_Tris based on the prefix sum.

[0143] Step 3.2: Write the triangle index using multiple threads to ensure vertex-level data locality.

[0144] Phase Two: Edge Topology Derivation.

[0145] Step 1: Check edge existence, vertex The number of adjacent edges satisfies:

[0146] (3)

[0147] Step 2: Parallel prefix sum calculation generates the P_Edges_Num_Prefix_Sum array.

[0148] Step 3: Fill in the adjacency relationships.

[0149] Step 3.1: Allocate storage space for P_Edges based on the prefix sum.

[0150] Step 3.2: Multi-threaded writing to ensure vertex-level data locality.

[0151] Step 4: Compress and store undirected edges.

[0152] Step 4.1: Remove duplicates from adjacent edges (keep) (The edges), calculate Point_Start_Edge_Num.

[0153] Step 4.2: Parallel prefix sum calculation generates the P_Start_Edge_Num_Prefix_Sum array.

[0154] Step 4.3: Write E_Fir_Point and E_Sec_Point using multiple threads.

[0155] Phase 3: Derivation of edge-triangle adjacency.

[0156] Step 1: Parallel edge traversal, that is, for each edge Search The set of adjacent triangles P_Tris[ ].

[0157] Step 2: Triangle containment detection.

[0158] Step 2.1: Perform bitmask detection.

[0159]

[0160] Step 2.2: Count the number of triangles that meet the conditions (1 / 2).

[0161] Stpe3: Topology tag storage: Fill E_Tris_Num based on the detection results.

[0162] Step 4: Fill E_Tris.

[0163] Table 1. Data structures used in the topology solution process.

[0164]

[0165] 3.2 Topology query acceleration system.

[0166] The query operation has a unified normal form. An example of an edge existence query is as follows:

[0167] Input: Vertex v1, Vertex v2.

[0168] Output: edge index / -1.

[0169] Step 1: Vertex order normalization, that is, if the index of v1 is greater than that of v2, then swap their values.

[0170] Step 2: Locating candidate edge intervals.

[0171] Step 2.1: Prefix sum fast addressing, that is, directly obtain the storage start position start of vertex v1 as the first node of the edge through the P_Start_Edge_Num_Prefix_Sum array.

[0172] Step 2.2: Determine the out-degree range, that is, calculate the termination position end = start + out-degree based on the Point_Start_Edge_Num[v1] value, and lock the candidate edge set E_Sec_Point[start : end].

[0173] Step 3: Sequential Search Execution

[0174] Starting from the initial position `start`, visit each edge associated with vertex `v1` sequentially in memory order. Read the index of the secondary endpoint of the current edge, `current_v2 = E_Sec_Point[idx]`. If `current_v2 == v2`, immediately return the current global index `idx`. The search ends when the endpoint `end` is reached. If no match is found, return -1.

[0175] IV. Parallel solution of the standard field.

[0176] Because the frame field has fourfold symmetry, to ensure numerical continuity, we can use...

[0177] (4)

[0178] The frame field is represented by this, ensuring numerical continuity while strictly satisfying the physical requirement of four-fold symmetry. To further analyze the transformation characteristics of the field, this invention decouples the frame field into two independent components:

[0179] (5)

[0180] in,

[0181] (6)

[0182] To make the transition of the frame field smoother, it is necessary to find a solution that satisfies...

[0183] (7)

[0184] of and Where S represents the surface. Because it is separated... and Direct solution cannot guarantee

[0185] (8)

[0186] Therefore, the above equation (7) is adjusted to be:

[0187] (9)

[0188] By adjusting an adjustable parameter To what extent should the requirements be adjusted? and The square of is 1. Where, This indicates an adjustable parameter. Represents a curved surface.

[0189] Reberol et al. used the thermal diffusion system to derive equation (9) for

[0190] (10)

[0191] in, It is the number of iterations. It is a constant, and is related to the length of the diagonal of the bounding box of the surface and the length of the shortest side. It is a diagonal matrix. The identity matrix can be represented as:

[0192] (11)

[0193] , For the edge The area of ​​the adjacent triangles, The Crouzeix-Raviart stiffness matrices. It can be represented as,

[0194] (12)

[0195] Where k represents the k-th component. Initial condition matrix The construction follows the boundary distinction principle.

[0196] (13)

[0197] Where index .

[0198] To ensure equation (8), in each solution to equation (10), it is also necessary to... , Mapped onto the unit circle, the solution of equation (10) often needs to be performed multiple times, consuming the most time in the entire pricing field solution process.

[0199] 4.1: and Parallel computing.

[0200] According to equation (11), the matrix The construction of the triangle is closely related to its area. Thanks to the advantages of GPUs in parallel computation of geometric quantities, the efficient calculation of the triangle area can be directly accelerated using GPUs. Combining the aforementioned topological information of edge-adjacent triangles constructed using GPUs, the matrix... Each element can be computed synchronously through parallel threads.

[0201] matrix The dimension is 2N, where N is the number of edges. For example... Figure 10 As shown, taking the calculation of a single edge as an example, the edge... With edge In the matrix The elements in can be represented as,

[0202] (14)

[0203] in,

[0204] (15)

[0205] like Figure 11 As shown, the edges can be calculated similarly. side ,side side ,side side In the matrix The elements in.

[0206] Due to the different weights of the edges and The calculations do not have any interdependent relationships, therefore the matrix The calculation steps are as follows:

[0207] Input: Mesh topology information, mesh geometry information V

[0208] Output: Matrix

[0209] Step 1: Traverse each edge in parallel and calculate... .

[0210] Step 1.1: Find the adjacent triangles t1 and t2 of the current edge in E_Tris.

[0211] Step 1.2: In t1 and t2, find the four adjacent edges of the current edge and calculate the included angle. .

[0212] Step 1.3: According to Equation 15, we get .

[0213] Step 2: Traverse each edge in parallel and calculate...

[0214] Step 2.1: Calculate the local coordinate system in t1 and t2.

[0215] Step 2.2: According to Figure 11 Calculate the included angle .

[0216] Step 3: Calculate according to Equation 14

[0217] 4.2: Parallel solution of the system of equations.

[0218] Solving Equation 10 involves solving a system of linear equations, according to Reberol et al. The invariant properties allow for a direct solution. However, when the matrix is ​​extremely large, the direct solution consumes a significant amount of memory, which is unfriendly to GPUs with limited video memory.

[0219] In solving sparse linear equations, the choice between direct and iterative methods requires comprehensive consideration of matrix size and hardware characteristics. For small matrices (<100,000 degrees of freedom), direct methods (such as LU decomposition) can provide exact solutions, and CPUs typically perform better due to their memory capacity advantage. However, when the matrix size expands to 100,000-1,000,000 degrees of freedom, GPU memory limitations (usually less than 48GB) prevent the intermediate storage required by direct methods from being fully available, making CPU memory access efficiency more competitive. When the data size exceeds CPU memory capacity, direct methods fail due to memory limitations, and iterative methods (such as preprocessed conjugate gradient methods) become the only feasible solution with O(N) memory complexity. After optimization using preprocessing techniques, iterative methods can achieve speedups of more than 10 times that of CPUs on GPU parallel architectures. This combination of memory efficiency and parallel computing advantages makes iterative methods the core technology path for GPU acceleration in large-scale standard field computing.

[0220] This paper uses the parallel preconditional conjugate gradient iteration method to solve equation (10). The specific algorithm steps are as follows.

[0221] Input: The triangular mesh after partitioning and its topological relationships.

[0222] Output: The intersection field on each edge.

[0223] Step 1: Calculate the matrix , .

[0224] Step 2: Calculate the matrix .

[0225] Step 3: Calculation , ,in The length of the grid bounding box diagonal. This is the shortest side length of the grid.

[0226] Step 4: Set the total number of iterations N, and the current number of iterations. Execute Step5-Step9 N times, in each loop. .

[0227] Step 5: Calculation .

[0228] Step 6: Parallel Update ,make .

[0229] Step 7: Parallel Computing .

[0230] Step 8: Solve using the parallel preconditioning conjugate gradient method .

[0231] Step 9: Parallel Update , ,if Then proceed to Step 7.

[0232] Step 10: Calculate the field of the marker frame on the side.

[0233] V. Model mesh structure generation.

[0234] After obtaining the benchmark field, the mesh structure of the model can be generated based on the benchmark field. The method for generating the mesh structure can employ any existing related technology, and this invention is not limited thereto.

[0235] The following is a specific experiment illustrating the fast computation of the surface frame field in the GPU-based parallel model mesh structure generation method provided by this invention.

[0236] This paper conducts experiments on a computer primarily configured with an i7-10700K and RTX 3080. Using a surface model from the Mambo dataset, the performance of three key steps—initial triangulation of the surface, parallel solution of the topology, and parallel solution of the frame field—was tested. First, 100,000, 1,000,000 points were sampled on the model, and then divided into approximately 10, 100, and 1,000 faces, respectively. The Delaunay method on the CPU (CDT library), the GPU Delaunay method without UV stitching (GPU-DT library), and the method presented in this paper were compared. The results are shown in Table 2. When the number of points per face is small but the number of faces increases, the process of transferring data from the CPU (CDT) to the GPU consumes more time, thus the GPU (GPU-DT) may be slower than the CPU.

[0237] Table 2. Delaunay time consumption for different methods

[0238]

[0239] The Delaunay mesh obtained using GPU-DT and the method of this invention is as follows: Figure 12 As shown in the figure, (a) is the original model, (b) is the Delaunay mesh obtained using the GPU-DT method, and (c) is the Delaunay mesh obtained using the method of this invention. Because GPU-DT does not handle cavities, the resulting mesh is inconsistent with the original surface model.

[0240] The topology of the triangular mesh after Delaunay was obtained using the method in this paper and the traditional CPU-based method, and the comparison results of the time consumption are shown in Table 3.

[0241] Table 3. Topology Construction Time Comparison Chart

[0242]

[0243] In the final solution stage, models with approximately 100,000 edges, 1 million edges, and 10 million edges were tested. When the number of edges reached 100,000, the preconditional conjugate gradient solver in the Eigen library failed to iterate for more than 1 hour without producing a result. The direct method on the CPU exceeded the device memory limit when the data volume exceeded 1 million. The final results are shown in Table 4.

[0244] Table 4 Comparison of solution time for cross-fields

[0245]

[0246] Experiments were conducted using several models from the Mambo dataset to obtain partial frame field calculation results, such as... Figure 13 As shown.

[0247] This paper successfully achieves efficient solution of the frame field of surface models on a GPU architecture. It innovatively employs a parallel Delaunay algorithm based on UV stitching and a GPU-parallel topology algorithm, achieving a speedup of 1 to 2 orders of magnitude compared to traditional methods. This achievement not only solidifies the technical support for parallel solution of the frame field of surface models on GPUs but also provides a practical solution for migrating many surface model algorithms that were originally only able to run on CPUs to the GPU platform, significantly promoting a substantial improvement in computational efficiency in related fields.

[0248] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can make modifications and changes to the above embodiments without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be as set forth in the claims.

Claims

1. A GPU-parallel method for generating quadrilateral meshes for geometric models, characterized in that, The method includes: For a model composed of multiple faces, each GPU thread acquires the parametric coordinates of the faces in the UV coordinate system in parallel, and performs a spatial transformation on the parametric coordinates of the faces by establishing a bounding box to obtain the face stitching result; wherein, the parallel acquisition of the parametric coordinates of the faces in the UV coordinate system by each GPU thread, and the spatial transformation on the parametric coordinates of the faces by establishing a bounding box to obtain the face stitching result, includes: Each GPU thread acquires the parametric coordinates of all points in the UV coordinate system in parallel. , This represents the parameterized coordinate value of a point in the UV coordinate system in the horizontal direction. This represents the parameterized coordinate value of a point in the UV coordinate system in the vertical direction. For each face of the model, a bounding box is used to enclose the face; wherein, the bounding box is the smallest rectangle that can contain the parameterized plane of the face, and the extreme coordinates of the bounding box include: horizontal extreme value U_min, horizontal extreme value U_max, vertical extreme value V_min, and vertical extreme value Vmax. Parallel processing is performed on a per-patch basis. Each GPU thread performs vertical offset preprocessing based on the vertical extremum Vmax and the patch processing order index to obtain the vertical reference value of the patch. Each GPU thread retrieves the position of the corresponding face in the face queue based on the face processing order index, and obtains the total offset of the preceding face based on the vertical reference value of all faces before the face. Each GPU thread is based on the total offset of the preceding facets and the parameterized coordinate values ​​of this facet. Perform a vertical spatial transformation on all points in the image and the vertical extremum V_min to obtain the transformed parameterized coordinates of the corresponding points. ; Obtain the parametric coordinates of all points in the patch after spatial transformation. ; The original triangular mesh model is generated based on the patch stitching result, and each triangular unit in the original triangular mesh model is processed in parallel by each GPU thread to obtain the cavity-filtered triangular mesh and the network geometry information of the triangular mesh. The network geometry information includes: vertices and triangles. Each GPU thread solves the network topology of the triangular mesh in parallel; wherein, the network topology includes: the topological composition of the edges, the adjacent triangles of the edges, and the adjacent edges of the vertices; Each GPU thread performs parallel solution of the frame field based on the network geometry and topology information of the triangular mesh; The quadrilateral mesh structure of the geometric model is generated by combining the aforementioned frame field.

2. The method according to claim 1, characterized in that, Methods for generating original triangular mesh models based on patch stitching results include: executing the Delaunay subdivision algorithm in parallel using GPU threads.

3. The method according to claim 1, characterized in that, Each triangular element in the original triangular mesh model is processed in parallel using GPU threads to obtain the cavity-filtered triangular mesh and its network geometry information, including: Each GPU thread calculates the centroid coordinates of different triangulation units in parallel and constructs a centroid-triangulation unit index mapping table. Construct a first ray along the diagonal extension of the bounding box, and select an external point as the endpoint of the first ray; Generate a second ray that starts at the centroid of the triangular unit and ends at that external point; Establish a boundary edge quadtree spatial partitioning structure, and combine the boundary edge quadtree spatial partitioning structure with the intersection detection of the second ray and the edge of the triangular unit to obtain the intersection count of the triangular unit; Perform Boolean determination on the intersection count of each triangular unit to obtain the retained flag bitmap of the triangular unit; The original triangular mesh model is compressed based on the retained flag bitmap of the triangular unit, and after looking up the corresponding triangle index using the centroid-triangle index mapping table, the triangles with the flag bit of 0 in the retained flag bitmap are deleted to obtain the cavity filtered triangular mesh. Extract the network geometry information of the triangular mesh ;in, Represents a vertex. It represents a triangle.

4. The method according to claim 1, characterized in that, Each GPU thread solves the network topology of the triangular mesh in parallel, including: For each vertex in the triangular mesh The triangle is traversed in parallel using GPU threads. To generate the P_Tris array, which is used to store the set of adjacent triangle indices of vertices; Vertex determination based on the P_Tris array Does there exist an adjacent edge at that vertex? In the case of adjacent edges, parallel prefix sum calculation is performed based on the P_Tris array to generate the P_Edges_Num_Prefix_Sum array, which is used to store the prefix sum of adjacent edges of vertices; Allocate storage space for the P_Edges array based on the adjacent edge prefix sum, and write the vertices using multi-threading. The adjacent edge indices are written into the P_Edges array, which is used to store the set of adjacent edge indices of vertices; Remove duplicates from the adjacent edges involved in the P_Edges array, and write the set of indices of the deduplicated adjacent edges into the Point_Start_Edge_Num array; Parallel prefix sum calculation is performed based on the Point_Start_Edge_Num array to generate the P_Start_Edge_Num_Prefix_Sum array, which is used to store the prefix sums of adjacent edge endpoints; Based on the prefix sum of the adjacent edge endpoints, the adjacent edge endpoints are written into the E_Fir_Point array and the E_Sec_Point array respectively; wherein, for any adjacent edge, the index value of the adjacent edge endpoint in the E_Fir_Point array is less than the index value of the adjacent edge endpoint in the E_Sec_Point array. Perform parallel edge traversal on the triangular mesh, and process each edge... , retrieve vertex The set of adjacent triangles P_Tris[ ];in, Representing an edge Another vertex; Based on the set of adjacent triangles P_Tris[ Perform triangle containment detection, and based on the detection results, store the number of triangles adjacent to the edge and the index of the triangles adjacent to the edge in the E_Tris_Num array and the E_Tris array, respectively; By using the E_Fir_Point array, E_Sec_Point array, E_Tris_Num_Prefix_Sum array, E_Tris array, P_Edges_Num_Prefix_Sum array, and P_Edges array, respectively, we can obtain the topological structure of the edges, the adjacent triangles of the edges, and the adjacent edges of the vertices.

5. The method according to claim 4, characterized in that, Implement vertices through the following steps. and vertex The query operation for the network topology between them: Based on the vertex index value, for the vertex and vertex Perform sequence normalization; Obtain the vertices using the P_Start_Edge_Num_Prefix_Sum array. The starting position for storing the edge's first node; According to Point_Start_Edge_Num[ The value calculation terminates at the position end = start + out-degree, locking the candidate edge set E_Sec_Point[start : end]. Starting from the beginning position, visit each vertex sequentially according to memory order. For associated edges, read the index of the secondary endpoint of the current edge, current_ = E_Sec_Point[idx], if current_ == : Immediately return the current global index idx, and end the search when the position end is reached; if no match is found, return -1.

6. The method according to claim 4, characterized in that, Each GPU thread performs parallel solution of the frame field based on the network geometry and topology information of the triangular mesh, including: Construct the optimization problem: Among them, the first component The second component , Indicates the signage area, Represents a curved surface. Indicates an adjustable parameter; Using the thermal diffusion system, the optimization problem is derived, yielding the equation: ;in, Indicates the number of iterations. Let be a constant relating to the length of the diagonal and the shortest side of the bounding box of the surface. For a diagonal matrix, the elements in the diagonal matrix , , Representing edges respectively The area of ​​an adjacent triangle, Represents the stiffness matrix and condition matrix. It is by A single-column matrix composed of Indicates the first The first component in the next iteration The first in Quantity, Indicates the first The first component in the next iteration The first in Components, initial condition matrix The construction follows the boundary distinction principle; Calculate the diagonal matrix based on the mesh topology and geometry information. and stiffness matrix The values ​​of each element in the table; Diagonal matrix and stiffness matrix Substitute the values ​​of each element into the equation to solve for the conditional frame field.

7. The method according to claim 6, characterized in that, Calculate the diagonal matrix based on the mesh topology and geometry information. and stiffness matrix The values ​​of each element in the table include: Parallel thread synchronous computation is performed based on the adjacent triangles of the edges to obtain the diagonal matrix. The values ​​of each element in the table; Iterate through each edge and find the adjacent triangle of the current edge based on the E_Tris array. and adjacent triangles ; In adjacent triangles and adjacent triangles Find the four adjacent edges of the current edge and calculate the angle formed by the four adjacent edges and the current edge. Angle Angle and included angle Then, based on the included angle Angle Angle and included angle Calculate the weight of the current edge; Calculate adjacent triangles and adjacent triangles The local coordinate system is used to calculate the included angle of the current side based on the local coordinate system. ; Based on the included angle of the current edge And weights, calculate the stiffness matrix The value of the corresponding element in the middle.

8. The method according to claim 6, characterized in that, Diagonal matrix and stiffness matrix Substituting the values ​​of each element into the equation, the solution for the conditional frame field is obtained, including: Step 1: Calculate the matrix ; Step 2: Based on the diagonal length of the bounding box and the shortest side length of the grid Calculate the initial included angle and the final angle XX ; Step 3: Set the total number of loops Current loop count and execute Repeat Steps 4-8, each time in a loop. ; Step 4: Based on the initial included angle Final angle Current loop count Total number of loops Calculate the current included angle ; Step 5: Based on the current angle diagonal matrix and stiffness matrix Parallel Matrix Update And let the number of iterations ; Step 6: Based on the current angle and condition matrix Calculate the matrix ; Step 7: Solve using the parallel preconditioning conjugate gradient method ; Step 8: Parallel Update , ; Step 9: If Then proceed to Step 7; where c represents a set threshold. Step 10: If Then calculate the field of the marker frame on the side.

9. A GPU-parallel quadrilateral mesh generation system for geometric models, characterized in that, The system includes: The UV stitching module is used to, for a model composed of multiple faces, have each GPU thread acquire the parametric coordinates of a face in the UV coordinate system in parallel, and perform spatial transformation on the parametric coordinates of the face by establishing a bounding box to obtain the face stitching result; wherein, the parallel acquisition of the parametric coordinates of the face in the UV coordinate system by each GPU thread, and the spatial transformation on the parametric coordinates of the face by establishing a bounding box to obtain the face stitching result, includes: Each GPU thread acquires the parametric coordinates of all points in the UV coordinate system in parallel. , This represents the parameterized coordinate value of a point in the UV coordinate system in the horizontal direction. This represents the parameterized coordinate value of a point in the UV coordinate system in the vertical direction. For each face of the model, a bounding box is used to enclose the face; wherein, the bounding box is the smallest rectangle that can contain the parameterized plane of the face, and the extreme coordinates of the bounding box include: horizontal extreme value U_min, horizontal extreme value U_max, vertical extreme value V_min, and vertical extreme value Vmax. Parallel processing is performed on a per-patch basis. Each GPU thread performs vertical offset preprocessing based on the vertical extremum Vmax and the patch processing order index to obtain the vertical reference value of the patch. Each GPU thread retrieves the position of the corresponding face in the face queue based on the face processing order index, and obtains the total offset of the preceding face based on the vertical reference value of all faces before the face. Each GPU thread is based on the total offset of the preceding facets and the parameterized coordinate values ​​of this facet. Perform a vertical spatial transformation on all points in the image and the vertical extremum V_min to obtain the transformed parameterized coordinates of the corresponding points. ; Obtain the parametric coordinates of all points in the patch after spatial transformation. ; The triangular mesh generation module is used to generate an original triangular mesh model based on the patch stitching result, and to process each triangular unit in the original triangular mesh model in parallel using each GPU thread to obtain the cavity-filtered triangular mesh and the network geometry information of the triangular mesh. The network geometry information includes: vertices and triangles. A topology generation module is used for each GPU thread to solve the network topology of the triangular mesh in parallel; wherein, the network topology includes: the topological composition of the edges, the adjacent triangles of the edges, and the adjacent edges of the vertices; The frame field generation module is used by each GPU thread to solve the frame field in parallel based on the network geometry and network topology information of the triangular mesh; The quadrilateral mesh generation module is used to generate a quadrilateral mesh structure for the geometric model in conjunction with the frame field.

Citation Information

Patent Citations

  • Structure domination surface grid generation method based on frame field guidance

    CN119167580A

  • GPU-based parallel tetrahedral mesh generation method and aircraft profile design method

    CN120124181A