A method, device, equipment and medium for generating a structure-dominant hexahedral mesh based on a two-part label
By using a structure-dominant hexahedral mesh generation method based on bipartite markers, and employing a breadth-first search algorithm and a tetrahedral mesh generation tool, the problem of low efficiency in generating hexahedral meshes for complex geometries is solved, achieving efficient generation of high-quality meshes and reducing labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing hexahedral mesh generation techniques are inefficient when dealing with complex geometries, struggle to generate high-quality meshes, and are costly to produce manually.
A structure-dominant hexahedral mesh generation method based on bipartite labeling is adopted. The quadrilateral mesh is colored and labeled by a breadth-first search algorithm to generate a triangular mesh. A spatial frame field is constructed using a tetrahedral mesh generation tool. The collision of position points is judged by a preset index library, a lattice-like tetrahedral mesh is generated, and the mesh edges are classified and tetrahedrals are combined.
It improves the efficiency of hexahedral mesh generation, reduces labor costs, and can generate high-quality hexahedral meshes that fit complex structures.
Smart Images

Figure CN121661293B_ABST
Abstract
Description
A method, apparatus, device, and medium for generating structure-dominant hexahedral meshes based on bipartite markers. Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for generating structure-dominant hexahedral meshes based on bipartite markers. Background Technology
[0002] In the fields of Computer-Aided Design (CAD) and Computer-Aided Engineering (CAE), mesh generation technology serves as a core bridge between geometric models and numerical analysis. Its goal is to discretize complex, continuous geometric or computational domains into a set of basic units (such as tetrahedrons and hexahedrons) with defined topological relationships, providing a discretization foundation for subsequent numerical simulations such as Finite Element Analysis (FEA) and Computational Fluid Dynamics (CFD). Among volume mesh types, hexahedral meshes, due to their inherent tensor product structure, possess unique advantages in numerical accuracy and computational efficiency, making them a preferred mesh type in simulation. However, limitations in geometric complexity and automation requirements still present challenges in their generation technology.
[0003] Current hexahedral mesh generation techniques can be categorized into three main types: direct methods, indirect methods, and hexahedral-dominant mesh generation. In direct methods, the leading-edge method advances layer by layer from the boundary inwards, inserting hexahedral elements. While it can generate high-quality mesh elements near the boundary, it is prone to topological conflicts during internal leading-edge collisions, making it difficult to fill the hexahedral mesh. Dual methods generate hexahedral meshes by constructing dual topologies, and are divided into dual-leading-edge methods and piecewise dual methods. The former constructs the mesh by fixing the intersection of dual pieces or shrinking the boundary, while the latter generates meshes using dual pieces as atomic increments. Both methods struggle to handle self-intersecting dual loops and complex topologies. In indirect methods, the domain decomposition method breaks down a complex domain into sweepable subdomains through geometric decomposition, and then generates hexahedrons using sweeping operations. This method is only applicable to decomposable CAD models, and automatic segmentation of sweepable volumes still faces many challenges. The mesh basis method, based on voxelization or adaptive meshes (such as octrees), ensures geometric fidelity by removing dangling nodes and boundary projections. Although it can handle arbitrarily complex shapes, it is prone to generating a large number of irregular vertices. The multi-cube mapping method decomposes the geometric domain into multiple logical cube blocks and generates a mesh through structure definition, volume mapping, and mesh sampling, but it needs to solve the tricky problems of mapping without flipping and feature preservation. The frame field method solves the frame field aligned with the geometric boundary and then extracts integer mesh mappings to generate hexahedral meshes, which can flexibly align internal structures. However, current frame field solving methods cannot well solve the problem of non-meshable singular structures in most complex models, resulting in the inability to generate effective integer mesh mappings for further mesh extraction. Automatic hexahedral mesh generation technology is immature, difficult to generate complex geometric shapes, and limited by experience and high time and manpower costs.
[0004] As can be seen from the above, how to improve the efficiency of hexahedral mesh generation in large-scale mesh generation scenarios is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for generating structure-dominant hexahedral meshes based on bipartite markers, which can improve the efficiency of hexahedral mesh generation in large-scale mesh generation scenarios. The specific solution is as follows:
[0006] In a first aspect, this application provides a method for generating structure-dominant hexahedral meshes based on bipartite markers, including:
[0007] The target size is determined based on the average side length of each grid in the quadrilateral-dominated grid corresponding to the mechanical structural components of the target aircraft. The breadth-first search algorithm is used to perform bisection coloring on each vertex in the quadrilateral-dominated grid to obtain the corresponding coloring results. The quadrilateral grid in the quadrilateral-dominated grid is diagonally divided to obtain a triangular grid.
[0008] Based on the triangular mesh, a tetrahedral mesh is generated using a tetrahedral mesh generation tool, and a corresponding spatial frame field is generated using each vertex in the quadrilateral-dominant mesh.
[0009] Arrange the stained vertices in the staining and marking results to obtain a vertex queue. Take the first stained vertex from the vertex queue as the target vertex. Generate a target position point based on the target size, the target vertex and the corresponding spatial frame field. Use a preset spatial index library to determine whether the target position point meets the preset position collision conditions.
[0010] If the target position does not meet the preset position collision condition, the target position is colored and added to the vertex queue. Then, the process jumps to the step of taking the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, so as to obtain several target position points. The color of the colored position point is different from the color of the target vertex.
[0011] Based on the tetrahedral mesh and the target location point, a lattice-like tetrahedral mesh is generated using a tetrahedral mesh generation tool. The mesh edges in the lattice-like tetrahedral mesh are classified based on the coloring label results of each vertex in the lattice-like tetrahedral mesh. The target tetrahedron is determined based on the classification results, and the target tetrahedrons are combined to obtain the target hexahedral dominant mesh corresponding to the target aircraft mechanical structural component.
[0012] Optionally, the step of using a breadth-first search algorithm to perform binary coloring on each vertex in the quadrilateral-dominant mesh to obtain the corresponding coloring results includes:
[0013] Determine any vertex in the quadrilateral-dominant mesh as the starting point, and color the starting point to obtain the colored starting point;
[0014] Color the neighboring vertices directly connected to the colored starting point to obtain the colored neighboring vertices; the color of the starting point and the corresponding neighboring vertex are different;
[0015] The neighboring vertices after the coloring are determined as the new starting point, and then the process jumps to the step of coloring the starting point until all vertices in the quadrilateral dominant grid are colored to obtain the corresponding coloring label results.
[0016] Optionally, the step of generating a tetrahedral mesh based on the triangular mesh using a tetrahedral mesh generation tool, and generating a corresponding spatial frame field using each vertex in the quadrilateral-dominant mesh, includes:
[0017] Based on the triangular mesh, a tetrahedral mesh is generated using TetGen;
[0018] Based on the assignment of corresponding frames to each vertex in the quadrilateral dominant grid, a spatial frame field is constructed using the frames corresponding to each vertex.
[0019] Optionally, arranging the stained vertices in the staining and marking results to obtain a vertex queue, taking the first stained vertex from the vertex queue as the target vertex, and generating a target location point based on the target size, the target vertex, and the corresponding spatial frame field includes:
[0020] Arrange the stained vertices in the staining and marking results to obtain the arranged vertices, and construct a vertex queue based on the arranged vertices;
[0021] The first stained vertex is taken from the vertex queue as the target vertex, and the target frame corresponding to the target vertex is obtained based on the spatial frame field;
[0022] The target position point is generated using the orientation of the target frame, the coordinates of the target vertex, and the target size.
[0023] Optionally, determining whether the target location point meets the preset location collision condition using a preset spatial index library includes:
[0024] The R-tree is used to find the reference points already generated within the target range corresponding to the target location point, and it is determined whether the distance between the target location point and the reference location point is less than the target distance threshold; the target distance threshold is a distance threshold determined based on the target size;
[0025] Accordingly, if the target location does not meet the preset location collision condition, it includes:
[0026] If the distance between the target location and the reference location is not less than the target distance threshold, then the target location does not meet the preset location collision condition.
[0027] Optionally, classifying the mesh edges in the lattice-like tetrahedral mesh based on the coloring results of each vertex in the lattice-like tetrahedral mesh includes:
[0028] If the coloring results of the two vertices corresponding to the grid edge in the lattice-like tetrahedral grid are consistent, then the grid edge is determined as the outer diagonal of the hexahedral unit;
[0029] If the coloring results of the two vertices corresponding to the grid edge in the lattice tetrahedral grid are inconsistent, and the length of the grid edge is greater than the target length threshold, then the grid edge is determined as the diagonal of the hexahedral cell;
[0030] If the coloring results of the two vertices corresponding to the grid edge in the lattice tetrahedral mesh are inconsistent, and the length of the grid edge is less than the target length threshold, then the grid edge is determined to be a hexahedral cell edge.
[0031] Optionally, the step of determining the target tetrahedron based on the classification result and combining the target tetrahedrons to obtain the target hexahedral dominant mesh corresponding to the target aircraft mechanical structural component includes:
[0032] If there are no diagonal mesh edges within hexahedral cells in the lattice-like tetrahedral mesh, then the first target tetrahedron is determined based on the lattice-like tetrahedral mesh; the coloring labels corresponding to each vertex of the first target tetrahedron are all consistent;
[0033] A second target tetrahedron is determined from the lattice-like tetrahedral mesh that is adjacent to each of the triangular faces in the first target tetrahedron; there is a vertex in the second target tetrahedron that is not on the first target tetrahedron, and the coloring mark result corresponding to the vertex that is not on the first target tetrahedron is inconsistent with the coloring mark result corresponding to each vertex of the first target tetrahedron;
[0034] The first target tetrahedron and the second target tetrahedron are combined to obtain the first hexahedron;
[0035] If there is a grid edge on the diagonal of a hexahedral cell in the lattice-like tetrahedral grid, then the tetrahedron adjacent to the diagonal of the hexahedral cell is determined as a candidate tetrahedron.
[0036] If the coloring results of each vertex on the triangular face of the candidate tetrahedron are consistent, the candidate tetrahedron is determined as the third target tetrahedron, and the tetrahedron adjacent to the triangular face of the candidate tetrahedron is determined as the fourth target tetrahedron.
[0037] The third target tetrahedron and the fourth target tetrahedron are combined to obtain a second hexahedron, and the target hexahedron dominant mesh corresponding to the mechanical structural component of the target aircraft is constructed based on the first hexahedron and the second hexahedron.
[0038] Secondly, this application provides a structure-dominant hexahedral mesh generation device based on bipartite markers, comprising:
[0039] The mesh segmentation module is used to determine the target size based on the average side length of each mesh in the quadrilateral-dominant mesh corresponding to the mechanical structural component of the target aircraft. It uses a breadth-first search algorithm to perform bisection coloring on each vertex in the quadrilateral-dominant mesh to obtain the corresponding coloring results. It also performs diagonal segmentation on the quadrilateral mesh in the quadrilateral-dominant mesh to obtain a triangular mesh.
[0040] The frame field generation module is used to generate a tetrahedral mesh based on the triangular mesh and using a tetrahedral mesh generation tool, and to generate a corresponding spatial frame field using each vertex in the quadrilateral dominant mesh.
[0041] The position point determination module is used to arrange each stained vertex in the staining and marking result to obtain a vertex queue, take the first stained vertex from the vertex queue as the target vertex, generate a target position point based on the target size, the target vertex and the corresponding spatial frame field, and use a preset spatial index library to determine whether the target position point meets the preset position collision conditions.
[0042] The position point coloring module is used to color the target position point if the target position point does not meet the preset position collision condition, add the colored position point to the vertex queue, and then jump to the step of taking the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, so as to obtain several target position points; the color corresponding to the colored position point is not the same as the color of the target vertex;
[0043] The tetrahedral combination module is used to generate a lattice-like tetrahedral mesh based on the tetrahedral mesh and the target location point using a tetrahedral mesh generation tool. Based on the coloring label results of each vertex in the lattice-like tetrahedral mesh, the mesh edges in the lattice-like tetrahedral mesh are classified to determine the target tetrahedron based on the classification results. The target tetrahedrons are then combined to obtain the target hexahedral dominant mesh corresponding to the target aircraft mechanical structural component.
[0044] Thirdly, this application provides an electronic device, comprising:
[0045] Memory, used to store computer programs;
[0046] A processor is used to execute the computer program to implement the aforementioned method for generating structure-dominant hexahedral meshes based on bipartite markers.
[0047] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned method for generating a structure-dominant hexahedral mesh based on bipartite markers.
[0048] This application determines the target size based on the average side length of each grid in the quadrilateral-dominated grid corresponding to the mechanical structural component of the target aircraft. A breadth-first search algorithm is used to perform bisection coloring on each vertex in the quadrilateral-dominated grid to obtain the corresponding coloring results. The quadrilateral grid in the quadrilateral-dominated grid is then diagonally divided to obtain a triangular grid. Based on the triangular grid, a tetrahedral grid is generated using a tetrahedral grid generation tool. A corresponding spatial frame field is generated using each vertex in the quadrilateral-dominated grid. The colored vertices in the coloring results are arranged to obtain a vertex queue. The first colored vertex is taken from the vertex queue as the target vertex. A target position point is generated based on the target size, the target vertex, and the corresponding spatial frame field. A preset spatial index library is used to determine whether the target position point meets the following criteria. A preset collision condition is established; if the target position point does not meet the preset collision condition, the target position point is colored and added to the vertex queue. Then, the process jumps to the step of retrieving the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, to obtain several target position points; the color corresponding to the colored position point is inconsistent with the color of the target vertex; a lattice-like tetrahedral mesh is generated based on the tetrahedral mesh and the target position point using a tetrahedral mesh generation tool. The mesh edges in the lattice-like tetrahedral mesh are classified based on the coloring mark results of each vertex in the lattice-like tetrahedral mesh, and the target tetrahedron is determined based on the classification results. The target tetrahedrons are then combined to obtain the target hexahedral dominant mesh corresponding to the target aircraft mechanical structure component.
[0049] As can be seen from the above, this application first determines the target size based on the average side length of each grid in the quadrilateral-dominated grid, so that the size of the subsequently generated grid is uniform. The breadth-first search algorithm is used to ensure that the bisection coloring of all vertices is complete and error-free. Then, the quadrilateral is divided diagonally to obtain a triangular grid, and a tetrahedral grid is generated based on the triangular grid. This can completely fill the three-dimensional space of the target aircraft mechanical structure, such as complex areas like holes and slots. A corresponding spatial frame field is generated based on each vertex, which can fit the surface contour and internal force direction of the target aircraft mechanical structure. The spatial frame field is used to ensure that the newly generated target position points are laid out regularly. A lattice-like tetrahedral grid is generated based on the combination of the triangular grid and the target position points. In this way, by classifying the mesh edges of the lattice-like tetrahedral mesh using the coloring results of each vertex, the outer diagonal, inner diagonal, and edges of the hexahedron can be quickly distinguished, and the target tetrahedron can be accurately combined to obtain a hexahedral mesh. This not only reduces manual costs but also improves the generation efficiency of hexahedral meshes. Even for complex structures, hexahedral meshes that fit their characteristics can be generated. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0051] Figure 1 is a flowchart of a method for generating a structure-dominant hexahedral mesh based on bipartite markers disclosed in this application;
[0052] Figure 2 is a schematic diagram of a quadrilateral dominant grid provided in this application;
[0053] Figure 3 is a schematic diagram of a location field visualization provided in this application;
[0054] Figure 4 is a schematic diagram of a hexahedral structure provided in this application;
[0055] Figure 5 is a schematic diagram of another hexahedral structure provided in this application;
[0056] Figure 6 is a schematic diagram of the vertices of a sorted hexahedron provided in this application;
[0057] Figure 7 is a schematic diagram of a target hexahedral dominant mesh structure provided in this application;
[0058] Figure 8 is a detailed schematic diagram of a cross-section of a target hexahedral dominant mesh provided in this application;
[0059] Figure 9 is a flowchart of a specific method for generating a structure-dominant hexahedral mesh based on bipartite markers disclosed in this application;
[0060] Figure 10 is a schematic diagram of a structure-dominant hexahedral mesh generation device based on bipartite markers disclosed in this application.
[0061] Figure 11 is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0063] Current hexahedral mesh generation techniques can be categorized into three main types: direct methods, indirect methods, and hexahedral dominant mesh generation. However, direct methods are prone to topological conflicts during internal frontal collisions, making it difficult to fill hexahedral elements; indirect methods are only applicable to decomposable CAD models, and automatic segmentation of sweepable bodies still faces numerous challenges; furthermore, automatic hexahedral mesh generation technology is immature, presenting significant difficulties in generating complex geometric shapes, and is limited by experience and incurring high time and labor costs. Therefore, this application provides a structure-dominant hexahedral mesh generation method based on bisection marking. This method classifies the mesh edges of lattice-like tetrahedral meshes using the coloring marks of each vertex, quickly distinguishing the outer diagonals, inner diagonals, and edges of a hexahedron, and accurately combining the target tetrahedrons to obtain a hexahedral mesh. This not only reduces labor costs but also improves the generation efficiency of hexahedral meshes, enabling the generation of hexahedral meshes that closely match the characteristics of even complex structures.
[0064] Referring to Figure 1, this embodiment of the invention discloses a method for generating structure-dominant hexahedral meshes based on bipartite markers, comprising:
[0065] Step S11: Determine the target size based on the average side length of each grid in the quadrilateral-dominated grid corresponding to the mechanical structural component of the target aircraft. Use the breadth-first search algorithm to perform bisection coloring on each vertex in the quadrilateral-dominated grid to obtain the corresponding coloring results. Diagonally divide the quadrilateral grid in the quadrilateral-dominated grid to obtain a triangular grid.
[0066] In this embodiment, a quadrilateral-dominated mesh corresponding to the mechanical structural component of the target aircraft is obtained. Figure 2 is a schematic diagram of a quadrilateral-dominated mesh provided in this embodiment. The quadrilateral-dominated mesh is a mesh on the surface of the mechanical structural component of the target aircraft, which is mostly composed of quadrilaterals. Then, the side length of each mesh in the quadrilateral-dominated mesh is determined, and the target size is determined based on the average value of the side lengths. Next, a breadth-first search algorithm is used to perform bisection coloring on each vertex in the quadrilateral-dominated mesh. In one specific implementation, all vertices in the quadrilateral-dominated mesh are marked as 0 or 1, where 0 is blue and 1 is red, to obtain the coloring results of each vertex. For each quadrilateral mesh in the quadrilateral-dominated mesh, it is divided into two triangles along the diagonal to obtain a triangular mesh.
[0067] Specifically, the step of using a breadth-first search algorithm to perform binary coloring on each vertex in the quadrilateral-dominated grid to obtain the corresponding coloring results includes: determining any vertex in the quadrilateral-dominated grid as the starting point, coloring the starting point to obtain the colored starting point; coloring the neighboring vertices directly connected to the colored starting point to obtain the colored neighboring vertices; the color of the starting point and the corresponding neighboring vertex are inconsistent; determining the colored neighboring vertex as the new starting point, and then jumping to the step of coloring the starting point, until all vertices in the quadrilateral-dominated grid are colored to obtain the corresponding coloring results.
[0068] Step S12: Based on the triangular mesh, generate a tetrahedral mesh using a tetrahedral mesh generation tool, and generate a corresponding spatial frame field using each vertex in the quadrilateral-dominant mesh.
[0069] In this embodiment, after obtaining the triangular mesh, the triangular mesh is input into TetGen (a software for generating tetrahedral meshes of three-dimensional polyhedral domains) to generate a tetrahedral mesh. A frame is assigned to each vertex of the tetrahedral mesh using a three-dimensional frame field solving method. The frame consists of three sets of mutually orthogonal direction vectors, such as forward / backward, left / right, and up / down. A spatial frame field is then constructed based on the frames corresponding to the vertices. Specifically, the process of generating a tetrahedral mesh based on the triangular mesh using a tetrahedral mesh generation tool, and generating a corresponding spatial frame field using each vertex of the quadrilateral-dominant mesh, includes: generating a tetrahedral mesh based on the triangular mesh using TetGen; assigning corresponding frames to each vertex of the quadrilateral-dominant mesh; and constructing a spatial frame field using the frames corresponding to each vertex.
[0070] Step S13: Arrange the stained vertices in the staining and marking results to obtain a vertex queue. Take the first stained vertex from the vertex queue as the target vertex. Generate a target position point based on the target size, the target vertex and the corresponding spatial frame field. Use a preset spatial index library to determine whether the target position point meets the preset position collision conditions.
[0071] In this embodiment, a vertex queue is created, and each stained vertex in the coloring and marking results is added to the vertex queue in sequence. First, it is determined whether the vertex queue is empty; if it is not empty, the first vertex in the vertex queue is determined as the target vertex. The target position point is generated using the direction of the target frame corresponding to the target vertex, the coordinates of the target vertex, and the target size. The corresponding formula is as follows:
[0072] ;
[0073] in, The coordinates are those corresponding to the target location point; The coordinates of the target vertex; The target size; The direction of the target frame corresponding to the target vertex. It is worth noting that when generating the corresponding target position point using the direction of the target frame corresponding to the target vertex, the coordinates of the target vertex, and the target size, it is necessary to generate target position points sequentially for all directions included in the target frame.
[0074] Specifically, arranging the stained vertices in the stained marking result to obtain a vertex queue, taking the first stained vertex from the vertex queue as the target vertex, and generating a target position point based on the target size, the target vertex, and the corresponding spatial frame field includes: arranging the stained vertices in the stained marking result to obtain arranged vertices, and constructing a vertex queue based on the arranged vertices; taking the first stained vertex from the vertex queue as the target vertex, obtaining the target frame corresponding to the target vertex based on the spatial frame field; and generating the corresponding target position point using the direction of the target frame, the coordinates corresponding to the target vertex, and the target size.
[0075] Understandably, after obtaining the target location point, it is determined whether the target location point collides with other location points. Specifically, determining whether the target location point meets the preset collision conditions using a preset spatial index library includes: using an R-tree to find reference location points already generated within the target range corresponding to the target location point, and determining whether the distance between the target location point and the reference location points is less than a target distance threshold; the target distance threshold is a distance threshold determined based on the target size. The target distance threshold can be 0.7 × target size, or it can be adjusted according to the actual situation.
[0076] Step S14: If the target position does not meet the preset position collision condition, the target position is colored and the colored position is added to the vertex queue. Then, the process jumps to the step of taking the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, so as to obtain several target position points. The color of the colored position is inconsistent with the color of the target vertex.
[0077] In this embodiment, if the distance between the target position point and the reference position point is not less than the target distance threshold, it indicates that the target position point does not meet the preset position collision condition. The target position point is then colored and added to the tail of the vertex queue. The process then jumps to the step of retrieving the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, thus obtaining several target position points corresponding to each target vertex. If the distance between the target position point and the reference position point is less than the target distance threshold, it indicates that the target position point meets the preset position collision condition. In this case, the generation of the target position point is abandoned, and the process jumps to the step of generating the target position point based on the target size, the target vertex, and the corresponding spatial frame field, thereby obtaining several target position points.
[0078] Step S15: Based on the tetrahedral mesh and the target location point, generate a lattice-shaped tetrahedral mesh using a tetrahedral mesh generation tool. Classify the mesh edges in the lattice-shaped tetrahedral mesh based on the coloring label results of each vertex in the lattice-shaped tetrahedral mesh, determine the target tetrahedron based on the classification results, and combine the target tetrahedrons to obtain the target hexahedral dominant mesh corresponding to the target aircraft mechanical structure component.
[0079] In this embodiment, after obtaining the target location point, the target location point is bisected and colored. Since the color of the target location point is inconsistent with that of its corresponding target vertex, a location field is constructed based on the bisected coloring results of the target location point. Figure 3 is a schematic diagram of a location field visualization provided in this embodiment. Then, the target location point is embedded into the tetrahedral mesh using tetrahedral partitioning, and a lattice-like tetrahedral mesh is generated using a tetrahedral mesh generation tool. The mesh edges of the hexahedral elements are determined based on the coloring results of each vertex in the lattice-like tetrahedral mesh. In one specific embodiment, if the coloring results of the two vertices corresponding to the grid edge in the lattice-like tetrahedral mesh are consistent, then the grid edge is determined as the outer diagonal of a hexahedral cell; if the coloring results of the two vertices corresponding to the grid edge in the lattice-like tetrahedral mesh are inconsistent, and the length of the grid edge is greater than 1.5 × the target size, then the grid edge is determined as the inner diagonal of a hexahedral cell; if the coloring results of the two vertices corresponding to the grid edge in the lattice-like tetrahedral mesh are inconsistent, and the length of the grid edge is less than 1.5 × the target size, then the grid edge is determined as the edge of a hexahedral cell.
[0080] Specifically, the classification of mesh edges in the tetrahedral mesh based on the coloring results of each vertex in the tetrahedral mesh includes: if the coloring results of the two vertices corresponding to the mesh edge are consistent, then the mesh edge is identified as an outer diagonal of a hexahedral cell; if the coloring results of the two vertices corresponding to the mesh edge are inconsistent, and the length of the mesh edge is greater than a target length threshold, then the mesh edge is identified as an inner diagonal of a hexahedral cell; if the coloring results of the two vertices corresponding to the mesh edge are inconsistent, and the length of the mesh edge is less than the target length threshold, then the mesh edge is identified as a hexahedral cell edge. It is worth noting that the target length threshold can also be adjusted according to actual conditions.
[0081] It is understandable that after obtaining the classification result of the grid edges, if there are no grid edges on the diagonal within the hexahedral cells in the classification result, then the tetrahedron with the same coloring result at four vertices in the lattice-like tetrahedral grid is determined as the first target tetrahedron. Then, four tetrahedrons adjacent to the four triangular faces of the first target tetrahedron are determined from the lattice-like tetrahedron grid, and these four tetrahedrons are determined as the second target tetrahedron. Figure 4 is a schematic diagram of a hexahedral structure provided in this embodiment. The first target tetrahedron and the second target tetrahedron are combined to obtain the first hexahedron. In Figure 4, the tetrahedron formed by vertex 1 is the first target tetrahedron, and vertex 0 is the vertex corresponding to the second target tetrahedron. If the classification result has a grid edge on the diagonal of the hexahedral cell, then the tetrahedron adjacent to the diagonal of the hexahedral cell is determined as a candidate tetrahedron. From the candidate tetrahedrons, the tetrahedrons whose coloring labels are consistent for each vertex on the triangular face are selected as the third target tetrahedron, and the tetrahedrons adjacent to the triangular face of the candidate tetrahedrons are determined as the fourth target tetrahedron. Figure 5 is a schematic diagram of another hexahedral structure provided in this embodiment, wherein the inner diagonal of the hexahedron is the grid edge corresponding to vertex 1 and vertex 0, the third target tetrahedron is the tetrahedron in the candidate tetrahedrons whose vertices on the triangular face are all 0 or all 1, the third target tetrahedron and the fourth target tetrahedron are combined to obtain the second hexahedron, the second hexahedron is composed of 6 or more tetrahedrons, and the first tetrahedron is composed of 5 tetrahedrons.
[0082] It is understandable that both the first and second hexahedrons have 8 vertices, each with four color markings, 12 hexahedral edges, and 6 external diagonals. Figure 6 is a schematic diagram of the sorted hexahedron vertices provided in this embodiment. First, find an external diagonal with the same color edge, and mark the two ends as 0 and 2 respectively. Then, find two adjacent triangles. The other two edges of these two triangles, excluding the diagonal, are hexahedral edges, and the corresponding vertices are 1 and 3. The four vertices of the base of the hexahedron are arranged in order. Next, arrange the four vertices of the top face according to the arrangement order of the vertices of the base of the hexahedron. After arranging in order, connect these 8 vertices to form a standard hexahedron, thereby constructing the target hexahedron dominant mesh corresponding to the mechanical structure of the target aircraft based on the hexahedron. Figure 7 is a schematic diagram of a target hexahedron dominant mesh structure provided in this embodiment, and Figure 8 is a schematic diagram of the cross-section details of a target hexahedron dominant mesh provided in this embodiment.
[0083] Specifically, the step of determining the target tetrahedron based on the classification results and combining the target tetrahedrons to obtain the target hexahedron-dominant mesh corresponding to the target aircraft mechanical structural component includes: if there are no diagonal mesh edges within the hexahedron cells in the lattice-like tetrahedron mesh, then a first target tetrahedron is determined based on the lattice-like tetrahedron mesh; the coloring results corresponding to each vertex of the first target tetrahedron are consistent; a second target tetrahedron is determined from the lattice-like tetrahedron mesh that is adjacent to each triangular face in the first target tetrahedron; the second target tetrahedron has a vertex that is not on the first target tetrahedron, and the coloring result corresponding to the vertex that is not on the first target tetrahedron is consistent with the coloring result corresponding to each vertex of the first target tetrahedron. The color marking results are inconsistent; the first target tetrahedron and the second target tetrahedron are combined to obtain the first hexahedron; if there is a grid edge on the diagonal of the hexahedron cell in the lattice tetrahedron grid, the tetrahedron adjacent to the diagonal of the hexahedron cell is determined as a candidate tetrahedron; if the color marking results corresponding to each vertex on the triangular face of the candidate tetrahedron are consistent, the candidate tetrahedron is determined as the third target tetrahedron, and the tetrahedron adjacent to the triangular face of the candidate tetrahedron is determined as the fourth target tetrahedron; the third target tetrahedron and the fourth target tetrahedron are combined to obtain the second hexahedron, and the target hexahedron dominant grid corresponding to the mechanical structure of the target aircraft is constructed based on the first hexahedron and the second hexahedron.
[0084] As can be seen from the above, this application first determines the target size based on the average side length of each grid in the quadrilateral-dominated grid, so that the size of the subsequently generated grid is uniform. The breadth-first search algorithm is used to ensure that the bisection coloring of all vertices is complete and error-free. Then, the quadrilateral is divided diagonally to obtain a triangular grid, and a tetrahedral grid is generated based on the triangular grid. This can completely fill the three-dimensional space of the target aircraft mechanical structure, such as complex areas like holes and slots. A corresponding spatial frame field is generated based on each vertex, which can fit the surface contour and internal force direction of the target aircraft mechanical structure. The spatial frame field is used to ensure that the newly generated target position points are laid out regularly. A lattice-like tetrahedral grid is generated based on the combination of the triangular grid and the target position points. In this way, by classifying the mesh edges of the lattice-like tetrahedral mesh using the coloring results of each vertex, the outer diagonal, inner diagonal, and edges of the hexahedron can be quickly distinguished, and the target tetrahedron can be accurately combined to obtain a hexahedral mesh. This not only reduces manual costs but also improves the generation efficiency of hexahedral meshes. Even for complex structures, hexahedral meshes that fit their characteristics can be generated.
[0085] As can be seen from the above embodiments, this application classifies the mesh edges of the lattice-like tetrahedral mesh based on the coloring label results of each vertex in the quadrilateral mesh, so as to construct a hexahedral mesh using the classification results. Therefore, the process of classifying the mesh edges of the lattice-like tetrahedral mesh based on the coloring label results of each vertex in the quadrilateral mesh and constructing a hexahedral mesh using the classification results is described.
[0086] Referring to Figure 9, this embodiment of the invention discloses a specific method for generating structure-dominant hexahedral meshes based on bipartite markers, including:
[0087] In this embodiment, a breadth-first search algorithm is used to perform bisection coloring on the quadrilateral-dominant mesh corresponding to the mechanical structural components of the target aircraft to obtain the corresponding coloring results. Each quadrilateral mesh in the quadrilateral-dominant mesh is diagonally divided to obtain a triangular mesh, and the target size is determined based on the average side length of each mesh in the quadrilateral-dominant mesh. Based on the triangular mesh and using TetGen to generate a tetrahedral mesh, a frame is assigned to each vertex of the tetrahedral mesh using a 3D frame field solution method to construct a spatial frame field. Then, a vertex queue is initialized, and each stained vertex from the coloring and marking results is added to the vertex queue in sequence. The first vertex in the vertex queue is then selected as the target vertex. Based on the direction of the target frame corresponding to the target vertex, the coordinates of the target vertex, and the target size, a corresponding target position point is generated. It is determined whether the target position point collides with other position points. If a collision exists, the generation of the target position point is abandoned, and the process jumps to the step of generating the corresponding target position point based on the direction of the target frame corresponding to the target vertex, the coordinates of the target vertex, and the target size. If no collision exists, the target position point is bisected and colored, and the color of the target position point is different from the color of the target vertex. The target position point is then added to the tail of the vertex queue until the vertex queue is empty, thus obtaining several target position points.
[0088] Understandably, a lattice-like tetrahedral mesh is generated based on the tetrahedral mesh and the target location point using a tetrahedral mesh generation tool. The mesh edges of the hexahedral cells are classified based on the coloring results of each vertex in the lattice-like tetrahedral mesh. If the classification result indicates that there are no diagonal mesh edges within the hexahedral cells, a first target tetrahedron with consistent coloring results for each vertex is determined based on the lattice-like tetrahedron mesh. The tetrahedrons adjacent to the first target tetrahedron are then identified as second target tetrahedrons, and the first and second target tetrahedrons are combined to obtain a first hexahedron. If the classification result indicates that there are diagonal mesh edges within the hexahedral cells, a second hexahedron is constructed based on the diagonals within the hexahedral cells. The first and second hexahedrons are then used to construct the target hexahedral dominant mesh corresponding to the mechanical structural component of the target aircraft.
[0089] As shown above, this application utilizes a breadth-first search algorithm to perform bipartite coloring on each vertex within the tetrahedral-dominant mesh. Then, it divides the quadrilaterals diagonally to obtain triangular meshes, and generates tetrahedral meshes based on these triangular meshes. Next, it generates corresponding spatial frame fields based on each vertex, and uses these spatial frame fields to generate target position points for each vertex. A lattice-like tetrahedral mesh is then generated based on the triangular meshes and target position points. Finally, the coloring results of each vertex are used to classify the mesh edges of the lattice-like tetrahedral mesh, and a hexahedral mesh is constructed based on the classification results. This not only improves the generation efficiency and accuracy of hexahedral meshes but also reduces manual labor costs.
[0090] Accordingly, referring to Figure 10, this application also provides a structure-dominant hexahedral mesh generation device based on bipartite markers, comprising:
[0091] The mesh segmentation module 11 is used to determine the target size based on the average side length of each mesh in the quadrilateral-dominant mesh corresponding to the mechanical structural component of the target aircraft, and to perform bisection coloring on each vertex in the quadrilateral-dominant mesh using a breadth-first search algorithm to obtain the corresponding coloring results. The quadrilateral mesh in the quadrilateral-dominant mesh is then diagonally segmented to obtain a triangular mesh.
[0092] The frame field generation module 12 is used to generate a tetrahedral mesh based on the triangular mesh and using a tetrahedral mesh generation tool, and to generate a corresponding spatial frame field using each vertex in the quadrilateral dominant mesh.
[0093] The position point determination module 13 is used to arrange each stained vertex in the staining mark result to obtain a vertex queue, take the first stained vertex from the vertex queue as the target vertex, generate a target position point based on the target size, the target vertex and the corresponding spatial frame field, and use a preset spatial index library to determine whether the target position point meets the preset position collision conditions.
[0094] The position point coloring module 14 is used to color the target position point if the target position point does not meet the preset position collision condition, add the colored position point to the vertex queue, and then jump to the step of taking the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, so as to obtain several target position points; the color corresponding to the colored position point is not the same as the color of the target vertex.
[0095] The tetrahedral combination module 15 is used to generate a lattice-like tetrahedral mesh based on the tetrahedral mesh and the target location point using a tetrahedral mesh generation tool, classify the mesh edges in the lattice-like tetrahedral mesh based on the coloring label results of each vertex in the lattice-like tetrahedral mesh, determine the target tetrahedron based on the classification results, and combine the target tetrahedrons to obtain the target hexahedral dominant mesh corresponding to the target aircraft mechanical structural component.
[0096] In some specific embodiments, the grid segmentation module 11 may specifically include:
[0097] A starting point coloring unit is used to determine any vertex in the quadrilateral dominant grid as the starting point, and to color the starting point to obtain the colored starting point;
[0098] A vertex coloring unit is used to color the neighboring vertices directly connected to the colored starting point to obtain the colored neighboring vertices; the color of the starting point and the corresponding neighboring vertex are inconsistent.
[0099] The marking result determination unit is used to determine the neighboring vertices after the coloring as the new starting point, and then jump to the step of coloring the starting point until all vertices in the quadrilateral dominant grid are colored to obtain the corresponding coloring marking result.
[0100] In some specific embodiments, the standard frame generation module 12 may specifically include:
[0101] Tetrahedral mesh generation unit, used to generate tetrahedral meshes based on the triangular mesh and using TetGen;
[0102] The frame field constituting unit is used to assign corresponding frames based on each vertex in the quadrilateral dominant grid, and to form a spatial frame field using the frames corresponding to each vertex.
[0103] In some specific embodiments, the location point determination module 13 may specifically include:
[0104] A vertex arrangement unit is used to arrange each stained vertex in the staining and marking result to obtain arranged vertices, and to construct a vertex queue based on the arranged vertices;
[0105] The target frame acquisition unit is used to extract the first stained vertex from the vertex queue as the target vertex, and acquire the target frame corresponding to the target vertex based on the spatial frame field;
[0106] The target location point generation unit is used to generate a corresponding target location point using the direction of the target frame, the coordinates of the target vertex, and the target size.
[0107] In some specific embodiments, the location point determination module 13 may specifically include:
[0108] The distance determination unit is used to use Rtree to find the reference position points already generated within the target range corresponding to the target position point, and to determine whether the distance between the target position point and the reference position point is less than the target distance threshold; the target distance threshold is a distance threshold determined based on the target size;
[0109] Accordingly, the location point coloring module 14 may specifically include:
[0110] The location point distance determination unit is used to characterize that the target location point does not meet the preset location collision condition if the distance between the target location point and the reference location point is not less than the target distance threshold.
[0111] In some specific embodiments, the tetrahedral assembly module 15 may specifically include:
[0112] An outer diagonal determination unit is used to determine the mesh edge as the outer diagonal of a hexahedral unit if the coloring results of the two vertices corresponding to the mesh edge in the lattice-like tetrahedral mesh are consistent.
[0113] The inner diagonal determination unit is used to determine the mesh edge as the inner diagonal of the hexahedral unit if the coloring results of the two vertices corresponding to the mesh edge in the lattice-like tetrahedral mesh are inconsistent and the length of the mesh edge is greater than the target length threshold.
[0114] The unit edge determination unit is used to determine the mesh edge as a hexahedral unit edge if the coloring results of the two vertices corresponding to the mesh edge in the lattice tetrahedral mesh are inconsistent and the length of the mesh edge is less than the target length threshold.
[0115] In some specific embodiments, the tetrahedral assembly module 15 may specifically include:
[0116] The first tetrahedron determination unit is used to determine a first target tetrahedron based on the lattice-like tetrahedron mesh if there is no diagonal mesh edge in the hexahedron unit; the coloring mark results corresponding to each vertex of the first target tetrahedron are consistent.
[0117] The second tetrahedron determination unit is used to determine, from the lattice-like tetrahedron mesh, a second target tetrahedron that is adjacent to each of the triangular faces in the first target tetrahedron; the second target tetrahedron contains a vertex that is not on the first target tetrahedron, and the coloring mark result corresponding to the vertex that is not on the first target tetrahedron is inconsistent with the coloring mark result corresponding to each vertex of the first target tetrahedron;
[0118] The tetrahedral combination unit is used to combine the first target tetrahedron and the second target tetrahedron to obtain the first hexahedron;
[0119] A candidate tetrahedron determination unit is used to determine the tetrahedron adjacent to the diagonal of the hexahedron unit as a candidate tetrahedron if there is a grid edge of the diagonal of the hexahedron unit in the lattice-like tetrahedron grid.
[0120] The third tetrahedron determination unit is used to determine the candidate tetrahedron as the third target tetrahedron if the coloring results corresponding to each vertex on the triangular face of the candidate tetrahedron are consistent, and to determine the tetrahedron adjacent to the triangular face of the candidate tetrahedron as the fourth target tetrahedron.
[0121] A hexahedral mesh building block is used to combine the third target tetrahedron and the fourth target tetrahedron to obtain a second hexahedron, and to construct the target hexahedron dominant mesh corresponding to the mechanical structural component of the target aircraft based on the first hexahedron and the second hexahedron.
[0122] Furthermore, this application also discloses an electronic device. FIG11 is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the figure should not be considered as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the structure-dominant hexahedral mesh generation method based on bipartite markers disclosed in any of the foregoing embodiments. Additionally, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0123] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0124] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0125] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the structure-dominant hexahedral mesh generation method based on bipartite markers disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0126] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for generating structure-dominant hexahedral meshes based on bipartite markers. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0127] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0128] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0129] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0130] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0131] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for generating structure-dominant hexahedral meshes based on bipartite markers, characterized in that, include: The target size is determined based on the average side length of each grid in the quadrilateral-dominated grid corresponding to the mechanical structural component of the target aircraft. A breadth-first search algorithm is used to perform bisection coloring on each vertex in the quadrilateral-dominated grid to obtain the corresponding coloring results. The quadrilateral grid in the quadrilateral-dominated grid is then diagonally divided to obtain a triangular grid. A tetrahedral grid is generated based on the triangular grid using a tetrahedral grid generation tool. A corresponding spatial frame field is generated using each vertex in the quadrilateral-dominated grid. The colored vertices in the coloring results are arranged to obtain a vertex queue. The first colored vertex is taken from the vertex queue as the target vertex. A target position point is generated based on the target size, the target vertex, and the corresponding spatial frame field. A preset spatial index library is used to determine whether the target position point meets the preset position collision conditions. If the target location does not meet the preset collision condition, the target location is colored and added to the vertex queue. Then, the process jumps to the step of retrieving the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, resulting in several target location points. The color of the colored location point is different from the color of the target vertex. Based on the tetrahedral mesh and the target location points, a lattice-like tetrahedral mesh is generated using a tetrahedral mesh generation tool. The mesh edges in the lattice-like tetrahedral mesh are classified based on the coloring results of each vertex in the lattice-like tetrahedral mesh to determine the target tetrahedron based on the classification results. The tetrahedrons are combined to obtain the target hexahedral dominant mesh corresponding to the mechanical structural component of the target aircraft; wherein, the classification of the mesh edges in the lattice tetrahedral mesh based on the coloring results of each vertex in the lattice tetrahedral mesh includes: if the coloring results of the two vertices corresponding to the mesh edge in the lattice tetrahedral mesh are consistent, then the mesh edge is determined as the outer diagonal of the hexahedral cell; if the coloring results of the two vertices corresponding to the mesh edge in the lattice tetrahedral mesh are inconsistent, and the length of the mesh edge is greater than the target length threshold, then the mesh edge is determined as the inner ... then the mesh edge is determined as the inner diagonal of the hexahedral cell; if the coloring results of the two vertices corresponding to the mesh edge in the lattice tetrahedral mesh are inconsistent, then the mesh edge is determined as the outer diagonal of the hexahedral cell. If the results are inconsistent and the length of the mesh edge is less than the target length threshold, then the mesh edge is determined to be a hexahedral cell edge; wherein, the step of determining the target tetrahedron based on the classification result and combining the target tetrahedrons to obtain the target hexahedral-dominant mesh corresponding to the target aircraft mechanical structure component includes: if there is no mesh edge with a diagonal within a hexahedral cell in the lattice tetrahedral mesh, then a first target tetrahedron is determined based on the lattice tetrahedral mesh; the coloring results corresponding to each vertex of the first target tetrahedron are consistent; a second target tetrahedron is determined from the lattice tetrahedron mesh that is adjacent to each triangular face in the first target tetrahedron; the second target tetrahedron contains A vertex not on the first target tetrahedron, and the coloring result corresponding to the vertex not on the first target tetrahedron is inconsistent with the coloring result corresponding to each vertex of the first target tetrahedron; the first target tetrahedron and the second target tetrahedron are combined to obtain a first hexahedron; if there is a grid edge on the diagonal of the hexahedron cell in the lattice tetrahedron grid, then the tetrahedron adjacent to the diagonal of the hexahedron cell is determined as a candidate tetrahedron; if the coloring results corresponding to each vertex on the triangular face of the candidate tetrahedron are consistent, the candidate tetrahedron is determined as the third target tetrahedron, and the tetrahedron adjacent to the triangular face of the candidate tetrahedron is determined as the fourth target tetrahedron;The third and fourth target tetrahedrons are combined to obtain a second hexahedron, and the dominant target hexahedron mesh corresponding to the mechanical structural components of the target aircraft is constructed based on the first and second hexahedrons.
2. The method for generating structure-dominant hexahedral meshes based on bipartite markers according to claim 1, characterized in that, The step of using a breadth-first search algorithm to perform binary coloring on each vertex in the quadrilateral-dominated grid to obtain the corresponding coloring results includes: determining any vertex in the quadrilateral-dominated grid as the starting point, coloring the starting point to obtain the colored starting point; coloring the neighboring vertices directly connected to the colored starting point to obtain the colored neighboring vertices; the color of the starting point and the corresponding neighboring vertex are inconsistent; determining the colored neighboring vertex as the new starting point, and then jumping to the step of coloring the starting point, until all vertices in the quadrilateral-dominated grid are colored to obtain the corresponding coloring results.
3. The method for generating structure-dominant hexahedral meshes based on bipartite markers according to claim 1, characterized in that, The process of generating a tetrahedral mesh based on the triangular mesh using a tetrahedral mesh generation tool, and generating a corresponding spatial frame field using each vertex of the quadrilateral-dominant mesh, includes: generating a tetrahedral mesh based on the triangular mesh using TetGen; assigning corresponding frames based on each vertex of the quadrilateral-dominant mesh; and generating a spatial frame field using the frames corresponding to each vertex.
4. The method for generating structure-dominant hexahedral meshes based on bipartite markers according to claim 3, characterized in that, The step of arranging the stained vertices in the stained marking result to obtain a vertex queue, taking the first stained vertex from the vertex queue as the target vertex, and generating a target position point based on the target size, the target vertex, and the corresponding spatial frame field includes: arranging the stained vertices in the stained marking result to obtain arranged vertices, and constructing a vertex queue based on the arranged vertices; taking the first stained vertex from the vertex queue as the target vertex, obtaining the target frame corresponding to the target vertex based on the spatial frame field; and generating a corresponding target position point using the direction of the target frame, the coordinates corresponding to the target vertex, and the target size.
5. The method for generating structure-dominant hexahedral meshes based on bipartite markers according to claim 4, characterized in that, The step of determining whether the target location point meets the preset location collision condition using a preset spatial index library includes: using an R-tree to find reference location points already generated within the target range corresponding to the target location point, and determining whether the distance between the target location point and the reference location point is less than a target distance threshold; the target distance threshold is a distance threshold determined based on the target size; correspondingly, if the target location point does not meet the preset location collision condition, it includes: if the distance between the target location point and the reference location point is not less than the target distance threshold, then it indicates that the target location point does not meet the preset location collision condition.
6. A device for generating a structure-dominant hexahedral mesh based on bipartite markers, characterized in that, include: The mesh segmentation module is used to determine the target size based on the average side length of each mesh in the quadrilateral-dominant mesh corresponding to the mechanical structural component of the target aircraft. It uses a breadth-first search algorithm to perform bisection coloring on each vertex in the quadrilateral-dominant mesh to obtain the corresponding coloring results. It also performs diagonal segmentation on the quadrilateral mesh in the quadrilateral-dominant mesh to obtain a triangular mesh. The frame field generation module is used to generate a tetrahedral mesh based on the triangular mesh and using a tetrahedral mesh generation tool, and to generate a corresponding spatial frame field using each vertex in the quadrilateral dominant mesh. The position point determination module is used to arrange each stained vertex in the staining and marking result to obtain a vertex queue, take the first stained vertex from the vertex queue as the target vertex, generate a target position point based on the target size, the target vertex and the corresponding spatial frame field, and use a preset spatial index library to determine whether the target position point meets the preset position collision conditions. The position point coloring module is used to color the target position point if the target position point does not meet the preset position collision condition, add the colored position point to the vertex queue, and then jump to the step of taking the first colored vertex from the vertex queue as the target vertex, until all vertex queues are empty, so as to obtain several target position points; the color corresponding to the colored position point is not the same as the color of the target vertex; The tetrahedral combination module is used to generate a lattice-like tetrahedral mesh based on the tetrahedral mesh and the target location point using a tetrahedral mesh generation tool. It classifies the mesh edges in the lattice-like tetrahedral mesh based on the coloring results of each vertex, determines the target tetrahedron based on the classification results, and combines the target tetrahedrons to obtain the target hexahedral-dominant mesh corresponding to the target aircraft mechanical structural component. Specifically, if the coloring results of two vertices corresponding to a mesh edge in the lattice-like tetrahedral mesh are consistent, the module then combines the mesh edge... The edge is defined as the outer diagonal of a hexahedral unit; if the coloring results of the two vertices corresponding to the edge of the lattice-like tetrahedral mesh are inconsistent, and the length of the edge is greater than the target length threshold, then the edge is defined as the inner diagonal of a hexahedral unit; if the coloring results of the two vertices corresponding to the edge of the lattice-like tetrahedral mesh are inconsistent, and the length of the edge is less than the target length threshold, then the edge is defined as the edge of a hexahedral unit; wherein, the tetrahedral combination module is specifically used to, if there is no inner diagonal of the hexahedral unit in the lattice-like tetrahedral mesh, then based on the lattice-like... A tetrahedral mesh determines a first target tetrahedron; the coloring results corresponding to each vertex of the first target tetrahedron are consistent; a second target tetrahedron is determined from the lattice-like tetrahedron mesh that is adjacent to each triangular face of the first target tetrahedron; the second target tetrahedron contains a vertex that is not on the first target tetrahedron, and the coloring result corresponding to the vertex that is not on the first target tetrahedron is inconsistent with the coloring result corresponding to each vertex of the first target tetrahedron; the first target tetrahedron and the second target tetrahedron are combined to obtain a first hexahedron; if the lattice-like tetrahedron mesh... If a hexahedral cell has a diagonal mesh edge in the volume mesh, then the tetrahedron adjacent to the diagonal of the hexahedral cell is determined as a candidate tetrahedron. If the coloring results of each vertex on the triangular face of the candidate tetrahedron are consistent, the candidate tetrahedron is determined as the third target tetrahedron, and the tetrahedron adjacent to the triangular face of the candidate tetrahedron is determined as the fourth target tetrahedron. The third target tetrahedron and the fourth target tetrahedron are combined to obtain the second hexahedron, and the target hexahedron dominant mesh corresponding to the mechanical structure of the target aircraft is constructed based on the first hexahedron and the second hexahedron.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the structure-dominant hexahedral mesh generation method based on bipartite markers as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the structure-dominant hexahedral mesh generation method based on bipartite markers as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Isogeometric high-order grid generation method based on ring cutting and volume subdivision
CN117576340A
Method, device and equipment for generating curved-surface quadrilateral dominant grid of aircraft and storage medium
CN120832724A