Method for optimizing quadrilateral mesh, electronic equipment and storage medium
By extracting the initial singular graph and performing recursive segmentation and splicing, the singular graph of the quadrilateral mesh is optimized, which solves the problem of low mesh segmentation structure and improves the regularity and accuracy of the mesh, making it suitable for engineering simulation and medical modeling.
Patent Information
- Application Number
- CN202510557600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-06-19
- Filing Date
- 2025-04-29
- Publication Date
- 2025-09-19
AI Technical Summary
Existing quadrilateral mesh generation technology has difficulty in systematically optimizing singular graphs, resulting in a low degree of mesh structuring and difficulty in balancing geometric fit and topological regularity, affecting the accuracy and reliability of engineering simulation and medical modeling.
By extracting the initial singular graph from the original quadrilateral mesh, recursively splitting the sub-network so that the singular points are included in the sub-grid, and then splicing the sub-grids in the reverse splitting order to form a new singular graph, the topological connection of the original mesh is finally corrected.
It effectively improves the regularity and structure of the singular graph of the quadrilateral mesh, reduces the problems of calculation errors and low processing efficiency, and provides a more reliable mesh foundation.
Smart Images

Figure CN120671428A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mesh optimization. More specifically, the present application relates to a method, electronic device, and computer-readable storage medium for optimizing a quadrilateral mesh. Background Art
[0002] As a common form of three-dimensional space discretization, quadrilateral meshes are widely used in engineering simulation (such as structural mechanics and fluid analysis), medical image processing (such as surgical planning), and computer graphics (such as three-dimensional model rendering). The quality of quadrilateral meshes directly affects the accuracy and efficiency of subsequent analysis. For example, in engineering simulation, low-quality meshes (such as singular line staggering and unit distortion) can lead to stress calculation errors, flow field simulation distortion, and even solver divergence. In medical applications, unoptimized meshes may not accurately fit the complex morphology of organs, affecting the reliability of biomechanical analysis or surgical simulation.
[0003] While traditional quadrilateral mesh generation techniques (such as parameterization and paving) can generate meshes, they suffer from the following issues: singular points in the mesh with degrees other than 4 (such as nodes with degrees 3 or 5) are connected by singular lines, forming a "spiral structure" or a dislocated distribution. This results in a poorly structured mesh. Directly processing complex global singular graphs can easily lead to local optima, making it difficult to balance geometric conformity with topological regularity. Currently, existing methods focus on optimizing local mesh quality (such as Laplace smoothing) and lack systematic optimization of the global structure of the singular graph.
[0004] In view of this, the present application provides a solution for optimizing quadrilateral meshes, which can systematically improve the regularity of the singular graphs of the meshes, thereby improving the overall quality of the quadrilateral meshes and reducing the complexity of the optimization. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a solution for optimizing quadrilateral meshes in multiple aspects.
[0006] In a first aspect, the present application provides a method for optimizing a quadrilateral mesh, comprising: extracting an initial singular graph from an original quadrilateral mesh of target data; recursively dividing the original quadrilateral mesh into subnetworks based on the initial singular graph, so that each singular point of the initial singular graph is contained in each subgrid; merging the subgrids containing each singular point in a reverse splitting order according to the splitting information, so that the lateral offset sum of each singular line after the singular points are connected is the shortest, so as to obtain a new singular graph; and correcting the original quadrilateral mesh based on the new singular graph to optimize the quadrilateral mesh.
[0007] In some embodiments, extracting an initial singular graph from an original quadrilateral mesh of target data includes: traversing all nodes of the original quadrilateral mesh and identifying singular points whose degrees are not the target value; starting from each singular point, tracing edges along an orthogonal direction of the original quadrilateral mesh until reaching another singular point or a mesh boundary to form a singular line; the singular line and the singular point constitute the initial singular graph.
[0008] In some embodiments, recursively dividing the original quadrilateral mesh into subnetworks based on the initial singular graph so that each singular point of the initial singular graph is contained in each subgrid includes: determining the division position of the widest quadrilateral piece of the initial singular graph; further dividing the original quadrilateral mesh into two parts along the division position of the widest quadrilateral piece to obtain two subgrids; and recursively dividing the two subgrids respectively until there is no more divisible mesh, so that each singular point of the initial singular graph is contained in each subgrid.
[0009] In some embodiments, the splitting position of the widest quadrilateral piece of the initial singular graph is determined by the following operations: dividing the original quadrilateral grid into multiple quadrilateral patches based on the initial singular graph; traversing the length and width of the multiple quadrilateral patches; and determining a series of parallel edges with the largest number of quadrilateral grids based on the length and width to determine the splitting position of the widest quadrilateral piece of the initial singular graph.
[0010] In some embodiments, the sub-grids containing the singular points are spliced in reverse splitting order according to the splitting information so that the lateral offset and sum of each singular line after the singular points are connected are the shortest to obtain a new singular graph, including: tracing the singular lines from the singular points of each sub-grid according to the splitting information, stopping at the splitting position, and determining the endpoints of the singular lines at the splitting position; splicing the sub-grids in reverse splitting order, and matching the endpoints of the singular lines on both sides of the splitting position during the splicing; selecting the shortest lateral offset and sum of each singular line after the singular points are connected to obtain a new singular graph.
[0011] In some embodiments, the segmentation information includes segmentation order, location, and sub-network association information.
[0012] In some embodiments, correcting the original quadrilateral mesh based on the new singular graph to optimize the quadrilateral mesh includes: correcting topological connectivity of the original quadrilateral mesh based on the new singular graph to optimize the quadrilateral mesh.
[0013] In some embodiments, the topological connection of the original quadrilateral mesh includes connection relationships of singular points or non-singular points.
[0014] In a second aspect, the present application provides an electronic device comprising: a processor configured to execute program instructions for optimizing a quadrilateral mesh; and a memory configured to store the program instructions, so that when the program instructions are loaded and executed by the processor, the processor executes one or more embodiments of the aforementioned first aspect.
[0015] In a third aspect, the present application provides a computer-readable storage medium storing program instructions for optimizing a quadrilateral mesh. When the program instructions are loaded and executed by a processor, the processor executes one or more embodiments of the first aspect.
[0016] The present application provides a solution for optimizing quadrilateral meshes. The present application extracts an initial singular graph from the original quadrilateral mesh, recursively divides the mesh based on the singular graph so that each singular point is contained in an independent sub-mesh, then splices the sub-meshes in the reverse division order to obtain a new singular graph, and finally corrects the original mesh based on the new singular graph. The solution can decompose the complex quadrilateral mesh singular graph optimization problem into sub-mesh processing and splicing matching, effectively isolate singular points and optimize their connection relationships, thereby improving the regularity and structured degree of the singular graph of the quadrilateral mesh, so that the optimized mesh can significantly improve the problem of chaotic connection of singular points while maintaining the original geometric shape, providing a more reliable mesh foundation for scenarios requiring high-quality quadrilateral meshes such as engineering simulation and medical modeling, and reducing calculation errors and low processing efficiency caused by unreasonable singular graph layout. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0018] Figure 1 is an exemplary flow chart illustrating a method 100 for optimizing a quadrilateral mesh according to an embodiment of the present application;
[0019] Figure 2 is an exemplary schematic diagram showing a cut molecular grid according to an embodiment of the present application;
[0020] Figure 3 is another exemplary schematic diagram illustrating a cut molecular grid according to an embodiment of the present application;
[0021] Figure 4 is an exemplary schematic diagram illustrating tracking of singular lines according to an embodiment of the present application;
[0022] Figure 5is an exemplary schematic diagram showing a quadrilateral mesh before and after optimization according to an embodiment of the present application;
[0023] Figure 6 FIG. 6 is a block diagram showing an exemplary structure of an electronic device 600 according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0025] It should be understood that the terms "include" and "comprising" used in the description and claims of this application indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0026] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this specification and claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" as used in this specification and claims refers to any and all possible combinations of one or more of the associated listed items, including and including these combinations.
[0027] As used in this specification and claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0028] The specific implementation of the present application will be described in detail below with reference to the accompanying drawings.
[0029] Figure 1 FIG. 1 is an exemplary flow chart illustrating a method 100 for optimizing a quadrilateral mesh according to an embodiment of the present application. Figure 1As shown in , the method 100 includes step S101: extracting an initial singular graph from an original quadrilateral mesh of target data; step S102: recursively dividing the original quadrilateral mesh into subnetworks based on the initial singular graph, so that each singular point of the initial singular graph is contained in each subgrid; step S103: according to the division information, the subgrids containing each singular point are spliced in an inverse division order, so that the lateral offset sum of each singular line after the singular points are connected is the shortest, so as to obtain a new singular graph; step S104: correcting the original quadrilateral mesh based on the new singular graph to optimize the quadrilateral mesh.
[0030] First, in step S101, an initial singular graph is extracted from the original quadrilateral mesh of the target data. In some embodiments, the target data may include, but is not limited to, CAD models of mechanical parts (e.g., aircraft engine impellers) in engineering simulations, finite element models of architectural structures (e.g., large-span spatial grids), image data (e.g., CT / MRI tomographic images) in the medical field, and data used in geometric modeling in computer graphics.
[0031] In some implementation scenarios, based on the aforementioned target data, the original quadrilateral mesh can be generated by, for example, parameterization, voxelization, the Advancing Front Method (AFM), geometric decomposition or deep learning methods. Among them, the aforementioned frontier advancing method refers to starting from the geometric boundary and gradually advancing inward to generate quadrilaterals, and controlling the mesh density and direction by maintaining the "frontier surface" (the triangular surface to be filled) to generate the original quadrilateral mesh. The aforementioned geometric decomposition method refers to decomposing a complex geometric body into regular sub-regions (such as blocks, cylinders), generating a structured or semi-structured quadrilateral mesh for each sub-region, and then splicing them into a whole to generate the original quadrilateral mesh. The deep learning method refers to taking the target data as input and directly generating the original quadrilateral mesh through, for example, a deep learning model.
[0032] After obtaining the original quadrilateral mesh, in some embodiments, it is possible to traverse all nodes of the original quadrilateral mesh, identify singular points whose degrees are not the target value, and then start from each singular point and trace the edge in the orthogonal direction of the original quadrilateral mesh until reaching another singular point or the mesh boundary, forming a singular line, and then the singular line and the singular point constitute an initial singular graph. Among them, the aforementioned target value is 4, that is, the node with the number of connected edges ≠ 4 is a singular point. Starting from the singular point, the edge is traced in the orthogonal direction of the mesh surface (that is, the direction perpendicular to the current edge) until reaching another singular point or the mesh boundary, which is a singular line. The singular line does not pass through non-singular points (nodes with degree = 4), only connects singular points or terminates at the boundary, forming a connection relationship between the singular points, thereby obtaining an initial singular graph.
[0033] The extracted initial singular graph describes the irregularities in node connectivity within a quadrilateral mesh. The regularity of the singular graph directly determines the mesh's degree of structure. For example, in a low-structured mesh, singular lines intersect and spiral, resulting in uneven patch widths and low storage and computational efficiency. In a high-structured mesh, singular lines are aligned parallel or orthogonally, resulting in regular patching and facilitating slicing. Therefore, identifying topologically irregular regions within a mesh (the distribution and connectivity of singular points) provides a key foundation for subsequent slicing and optimization.
[0034] Then, at step S102, the original quadrilateral mesh is recursively divided into subnetworks based on the initial singular graph, so that each singular point of the initial singular graph is included in each subgrid. In some embodiments, the cutting position of the widest quadrilateral piece of the initial singular graph can be determined first, and then the original quadrilateral mesh is further divided into two parts along the cutting position of the widest quadrilateral piece to obtain two subgrids, and then the two subgrids are recursively divided respectively until there is no split grid, so that each singular point of the initial singular graph is included in each subgrid. That is, the original mesh is decomposed into several connected sub-regions (subgrids) by recursive bisection, each subgrid contains an independent set of singular points (single or no singular point), and the cutting line is set along the orthogonal direction of the singular graph (perpendicular to the singular line).
[0035] In some embodiments, the splitting position of the widest quadrilateral piece of the initial singular graph can be determined by the following operations: based on the initial singular graph, the original quadrilateral mesh is divided into multiple quadrilateral patches, the length and width of the multiple quadrilateral patches are traversed, and then based on the length and width, a series of parallel edges with the largest number of quadrilateral grids are determined to determine the splitting position of the widest quadrilateral piece of the initial singular graph. That is, the singular graph divides the mesh into multiple regular regions, and the tetrahedrons in each region are arranged along parallel planes to form "patches." The "widest" refers to the patch with the largest number of tetrahedral grids along the parallel planes, and the splitting line is located at the center of its longest side, so that the number of grids on both sides is equally divided.
[0036] In some exemplary implementation scenarios, if the current subgrid contains ≥2 singular points or has an identifiable widest patch, a split is performed: the widest patch is located, border patches are ignored, internal patches are traversed, the number of grid cells in the parallel plane direction is calculated, and the patch with the largest number of grid cells is selected; a split line is determined, and the patch is cut orthogonally at the center of the longest side, ensuring that the difference in the number of grid cells on both sides is ≤1. Furthermore, the split left and right subgrids are recursively split until only one singular point remains in the subgrid or no splittable patches are left. This ensures that all singular points of the initial singular graph are included in each subgrid, forming a split tree structure that records the split order, location, and subgrid associations.
[0037] Based on this, the singular points of each sub-grid are divided independently to avoid interference from cross-regional singular lines, simplify the difficulty of subsequent local optimization, and decompose the global complex singular graph into multiple simple sub-problems, reducing the algorithm complexity and facilitating parallel processing.
[0038] Furthermore, at step S103, the subgrids containing the singular points are spliced in the reverse order of the splitting information, so that the lateral offset sum of each singular line after the singular points are connected is minimized, thereby obtaining a new singular graph. In some embodiments, the singular lines can be traced starting from the singular points of each subgrid according to the splitting information, stopping at the split position, and the endpoints of the singular lines at the split position are determined. The subgrids are spliced in the reverse order of the splitting, and the endpoints of the singular lines on both sides of the split position are matched during the splicing, and the lateral offset sum of each singular line after the singular points are connected is selected to obtain a new singular graph.
[0039] It is understood that the above segmentation information may include segmentation order, location, and sub-network association information. The singularity line endpoints are the endpoints where singular points within the sub-grid trace the singularity line to the segmentation line. The locations and directions are recorded and used as matching objects during the splicing process. The minimum lateral offset and shortest lateral offset, i.e., the sum of the absolute values of the coordinate differences of the singularity line endpoints in the segmentation direction, is minimized to ensure minimal overall offset and maximum alignment of the singularity lines after connection.
[0040] Specifically, the singularity line is traced from the singular point of each sub-grid, and stops when it reaches the split line. The endpoint is recorded as the frontier, and the split tree is traversed in post-order order (leaf nodes are merged first). Each time the frontier is merged, the frontier sets on both sides of the split line are extracted, the lateral offsets of all possible matching pairs are calculated, and the combination with the smallest total offset is selected. The unmatched frontiers are continued to the upper layer for merging.
[0041] Based on this, through the cumulative effect of local matching, the singular line misalignment is systematically reduced, making the connection relationship of the new singular graph more regular (such as eliminating spiral structures and straightening the singular lines). In addition, the reverse operation based on the segmentation information ensures that the optimization process traces back to the original structure, avoiding global deformation and maintaining the local consistency of the grid tile structure.
[0042] Finally, at step S104, the original quadrilateral mesh is corrected based on the new singular graph to optimize the quadrilateral mesh. In some embodiments, the topological connection of the original quadrilateral mesh can be corrected based on the new singular graph to optimize the quadrilateral mesh. The topological connection of the original quadrilateral mesh includes the connection relationship of singular points or non-singular points. That is, the connection relationship of the mesh nodes is adjusted so that the adjacency relationship between the singular points and the non-singular points conforms to the new singular graph, while maintaining the geometric coordinates and shape of the original mesh. Without changing the shape of the mesh boundary, the node connection is reconstructed according to the optimized singular graph to generate a new quadrilateral mesh. In other words, the quadrilateral mesh is optimized by topological structure optimization.
[0043] It is understood that topology optimization, also known as topology optimization, does not seek to optimize the mesh by changing the geometric positions of nodes, but rather by changing the topological structure within the mesh (i.e., the connection relationship between nodes). Preferably, embodiments of the present application aim to optimize the overall properties of the mesh (i.e., the singular graph) to achieve optimization of quadrilateral meshes.
[0044] In some implementation scenarios, for singular points, the connection paths are updated according to the new singular graph (e.g., disconnecting misaligned singular lines and re-establishing aligned connections); for non-singular points, the degree is ensured to be 4 and the adjacency relationship conforms to the tile structure rules (e.g., uniform arrangement of parallel planes). Preferably, the node micro-displacements can be adjusted within the original mesh boundaries by using parameterized methods or solving partial differential equations to ensure that the new mesh is geometrically consistent with the original mesh.
[0045] Based on this, the mesh's singular graph segmentation rules are optimized, significantly improving singular line alignment and visually presenting a neat quadrilateral patch. Furthermore, the original mesh geometry is preserved, making it suitable for use in engineering simulations (such as FEA / CFD) and medical modeling, while reducing computational errors caused by chaotic mesh topology (such as distortion in simulations of stress concentration areas and misjudgment of flow field boundary layer parameters).
[0046] In combination with the above description, it can be seen that the embodiment of the present application transforms the complex global singular graph optimization into sub-problems that can be processed locally through a systematic method of divide-and-conquer segmentation-reverse order splicing-optimal matching, effectively solving the problems of singular line misalignment and fragmentation chaos in traditional methods, and providing core technical support for high-quality quadrilateral mesh generation.
[0047] Figure 2 : is an exemplary schematic diagram showing a cut-out molecular grid according to an embodiment of the present application. Figure 2 The left side of the figure shows a singular graph of a portion of a quadrilateral mesh. As previously mentioned, when slicing a subgrid, the first step is to determine the location of the widest quadrilateral patch in the singular graph. For example, the dotted line on the left side of the figure indicates the widest quadrilateral patch. This is done by dividing the quadrilateral mesh into several quadrilateral patches, ignoring those patches adjacent to the mesh boundary and only considering those within the mesh. The length and width of these patches are then traversed to find the series of parallel edges with the largest number of quadrilateral cells, which is the widest quadrilateral patch.
[0048] Furthermore, the center position of the longest side of this series of parallel lines is the dividing position. Based on this dividing position, the number of grids with the longest side can be equally divided on both sides of the tangent line, for example Figure 2 As shown by the thick solid line on the right side of the figure.
[0049] Figure 3FIG. 1 is another exemplary schematic diagram showing a cut-out molecular grid according to an embodiment of the present application. Figure 3 The left side of the figure shows a partial quadrilateral mesh. In the implementation scenario, recursive segmentation is performed until there is no more segmentable mesh, so that the singular points of the initial singular graph are contained in each sub-mesh. For example, Figure 3 The right side of the figure shows the multiple sub-grids after segmentation.
[0050] Figure 4 FIG. 1 is an exemplary schematic diagram illustrating tracking singular lines according to an embodiment of the present application. Figure 4 The figure shows the sub-grids after segmentation. Based on the segmentation information, singular lines are then traced from the singular points of each sub-grid, stopping at the segmentation location and determining the endpoints of the singular lines at the segmentation location, such as points 1, 2, 3, and 4 shown in the figure. The bold short solid lines in the figure are the traced singular line fronts. In the implementation scenario, the segmentation tree is traversed in post-order (leaf nodes are merged first). During each merge, the set of singular line fronts on both sides of the segmentation line is extracted, the lateral offsets of all possible matching pairs are calculated, and the combination with the smallest total offset is selected to obtain a new singular graph.
[0051] Figure 5 5 is an exemplary schematic diagram showing the quadrilateral mesh before and after optimization according to an embodiment of the present application. As shown in FIG5 , the left side is a schematic diagram before optimization. Figure 5 As shown in FIG, a schematic diagram after optimization by the solution of the embodiment of the present application is shown. As can be seen from the figure, through the optimization solution of the embodiment of the present application, the singular lines in the obtained quadrilateral mesh are parallel or orthogonally aligned, the patching is regular, and the quadrilateral mesh quality is high.
[0052] Based on the foregoing, it can be seen that the embodiment of the present application extracts an initial singular graph from the original quadrilateral mesh, accurately identifies singular points with a degree not equal to 4 and their connected singular lines, provides a core topological basis for mesh optimization, and effectively locates irregular areas that need to be processed; based on the initial singular graph, the mesh is recursively divided, and the sub-grid containing multiple singular points is orthogonally cut along the center of the longest side of the widest tetrahedral patch, so that each singular point is gradually isolated to an independent sub-grid, forming a split tree structure, and the complex global singular graph optimization problem is decomposed into sub-problems that can be processed locally, reducing the algorithm complexity and avoiding cross-regional singular line interference; when the sub-grids are spliced in reverse order according to the split information, the singular lines are traced from the singular points of each sub-grid to the split line to form the front end point, and by selecting the lateral offset after each singular line is connected and the shortest matching pair, the singular line misalignment is systematically reduced, so that the singular lines in the optimized new singular graph are regularly aligned, and the degree of structuring of the mesh is significantly improved.
[0053] Furthermore, when correcting the original mesh based on the new singular graph, the node connection relationship is adjusted while maintaining the original mesh's geometric shape and boundary characteristics, so that the non-singular point degree is 4 and the singular point connection conforms to the optimized singular line. The resulting quadrilateral mesh has regular segmentation and high singular line alignment, which effectively reduces engineering simulation calculation errors (such as finite element analysis stress distortion, fluid dynamics boundary layer misjudgment) and low processing efficiency caused by chaotic singular graph layout. It is suitable for scenarios such as medical imaging modeling with complex geometry and high-precision engineering simulation, and can achieve systematic optimization of the topological structure while maintaining mesh geometric consistency.
[0054] The above-mentioned solution of the embodiment of the present application can be implemented with the help of program instructions. Therefore, the present application also provides an electronic device.
[0055] Figure 6 FIG. 6 is a block diagram showing an exemplary structure of an electronic device 600 according to an embodiment of the present application. Figure 6 As shown in , the electronic device 600 includes a processor 601, which is configured to execute program instructions for optimizing a quadrilateral mesh; and a memory 602, which is configured to store program instructions. When these program instructions are loaded and executed by the above-mentioned processor, the processor executes: extracting an initial singular graph from the original quadrilateral mesh of the target data; recursively dividing the original quadrilateral mesh into subnetworks based on the initial singular graph, so that each singular point of the initial singular graph is included in each subgrid; according to the division information, the subgrids containing each singular point are spliced in an inverse division order, so that the lateral offset of each singular line after the singular points are connected is the shortest, so as to obtain a new singular graph; based on the new singular graph, the original quadrilateral mesh is corrected to optimize the quadrilateral mesh.
[0056] The electronic device may correspond to a computing device having various processing functions. For example, the electronic device may be implemented as various types of devices, including but not limited to a personal computer (PC), a server device, a mobile device, etc.
[0057] The processor is configured to execute program instructions to control all functions of the electronic device. For example, the processor controls all functions of the electronic device by executing a program stored in a memory on the electronic device. The processor can be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device. However, the present application is not limited thereto.
[0058] The memory is used to store various data processed by the electronic device. For example, the memory can store processed data and data to be processed by the electronic device. The memory can also store data that has been processed or is to be processed by the processor. Furthermore, the memory can store program instructions such as applications and driver programs to be driven by the electronic device. For example, the memory can store various programs related to operations performed on encrypted data by the processor. The memory can be DRAM, but the present application is not limited thereto. The memory can include at least one of volatile memory and non-volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, phase change RAM (PRAM), magnetic RAM (MRAM), resistive RAM (RRAM), ferroelectric RAM (FRAM), etc. Volatile memory can include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.
[0059] In summary, the specific functions implemented by the memory and processor of the electronic device provided in the embodiments of this specification can be interpreted in comparison with the aforementioned embodiments in this specification, and can achieve the technical effects of the aforementioned embodiments, so they will not be repeated here.
[0060] In an embodiment of the present application, a computer-readable storage medium is further provided, wherein a program instruction for optimizing a quadrilateral mesh is stored. When the program instruction is loaded and executed by a processor, the processor executes the method of the embodiment of the present application in combination with Figure 1 The described method for optimizing quadrilateral meshes.
[0061] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples (non-exhaustive examples) of computer-readable storage media can include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. As used herein, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component.
[0062] Although multiple embodiments of the present application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art can conceive of many changes, modifications, and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The accompanying claims are intended to define the scope of protection of the present application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for optimizing a quadrilateral mesh, comprising: Extracting initial singular maps from the original quadrilateral mesh of the target data; recursively dividing the original quadrilateral grid into sub-networks based on the initial singular graph, so that each singular point of the initial singular graph is contained in each sub-grid; According to the segmentation information, the subgrids containing the singular points are combined in an inverse segmentation order so that the sum of the lateral offsets of each singular line after the singular points are connected is the shortest, so as to obtain a new singular graph; The original quadrilateral mesh is corrected based on the new singular graph to optimize the quadrilateral mesh.
2. The method according to claim 1, wherein extracting the initial singular graph from the original quadrilateral mesh of the target data comprises: Traversing all nodes of the original quadrilateral mesh and identifying singular points whose degrees are not equal to the target value; Starting from each singular point, trace the edge along the orthogonal direction of the original quadrilateral mesh until it reaches another singular point or the mesh boundary, forming a singular line; The singular lines and the singular points constitute the initial singular graph.
3. The method according to claim 1, wherein recursively dividing the original quadrilateral mesh into subnetworks based on the initial singular graph so that each singular point of the initial singular graph is included in each subgrid comprises: Determining the cutting position of the widest quadrilateral piece of the initial singular graph; The original quadrilateral mesh is further divided into two parts along the cutting position of the widest quadrilateral piece to obtain two sub-meshes; The two subgrids are recursively divided until no more split grids remain, so that each singular point of the initial singular graph is contained in each subgrid.
4. The method according to claim 3, wherein the splitting position of the widest quadrilateral piece of the initial singular graph is determined by the following operations: Separating the original quadrilateral mesh into a plurality of quadrilateral patches based on the initial singular graph; Traversing the lengths and widths of the plurality of quadrilateral patches; A series of parallel sides with the largest number of quadrilateral grids is determined based on the length and width to determine the cutting position of the widest quadrilateral piece of the initial singular graph.
5. The method according to claim 1, wherein the subgrids containing the singular points are merged in reverse order according to the segmentation information so that the sum of the lateral offsets of each singular line after the singular points are connected is the shortest to obtain a new singular graph, comprising: Tracing the singular line from the singular point of each sub-grid according to the segmentation information, stopping at the segmentation position, and determining the endpoint of the singular line at the segmentation position; The subgrids are merged in the reverse splitting order, and the endpoints of the singular lines on both sides of the splitting position are matched during the merging; The lateral offset sum of each singular line after the singular points are connected is selected to be the shortest to obtain a new singular diagram. The method according to claim 5 , wherein the segmentation information includes segmentation order, location, and sub-network association information.
7. The method according to claim 1 , wherein correcting the original quadrilateral mesh based on the new singular map to optimize the quadrilateral mesh comprises: The topological connection of the original quadrilateral mesh is corrected based on the new singular graph to optimize the quadrilateral mesh. The method according to claim 1 , wherein the topological connection of the original quadrilateral mesh includes a connection relationship of singular points or non-singular points.
9. An electronic device comprising: a processor configured to execute program instructions for optimizing a quadrilateral mesh; as well as A memory configured to store the program instructions, which, when loaded and executed by the processor, enables the processor to execute the method for optimizing a quadrilateral mesh according to any one of claims 1 to 8.
10. A computer-readable storage medium storing program instructions for optimizing a quadrilateral mesh, wherein when the program instructions are loaded and executed by a processor, the processor executes the method for optimizing a quadrilateral mesh according to any one of claims 1 to 8.