Mesh generation method
Through bottom-up octree mesh and distance field search technology, combined with bi-mapping and topological transfer, the problem of insufficient generation speed and geometric matching performance of hexahedral mesh in the existing technology is solved, and high-quality hexahedral mesh is achieved efficiently.
Patent Information
- Application Number
- CN202411566450.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art generates high-quality conformal hexahedral mesh in the three-dimensional domain, especially in complex geometric shapes and advanced numerical simulations, where the generation speed and geometric matching performance of hexahedral mesh are insufficient.
The bottom-up octree hexahedral mesh is used as the background mesh. By defining the distance field and searching the boundary mesh, combined with bi-mapping and topological transfer techniques, a body-hexahedral mesh is generated.
It improves the calculation speed and geometric matching performance of mesh generation, and can quickly generate high-quality all-hexahedral mesh and body-hexahedral mesh, suitable for complex models and large-scale engineering needs.
Smart Images

Figure CN119540493A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the technical field of three-dimensional modeling. In particular, the embodiments disclosed herein relate to a mesh generation method for generating a body-fitting hexahedral mesh based on an octree hexahedral mesh. Background Art
[0002] Computational Fluid Dynamics (CFD) is a method of numerically solving the governing equations of fluid mechanics using computers. At present, CFD software has been widely used in simulation and design in the fields of machinery, chemical engineering, pharmacy, aerospace, etc. The essence of numerical calculation of CFD software is to abandon the search for analytical solutions to the governing equations, but to divide the entire flow field into several grid units and perform numerical calculations on each grid unit. Therefore, spatial grid division is an important part of CFD software.
[0003] In recent years, many mesh generation methods have been proposed. The key requirement for mesh generation methods is that the computational domain mesh needs to be able to fully fit the geometric surface and accurately capture the edges of geometric features. In other words, no matter how complex the geometry is, an acceptable mesh can be generated, that is, it can accurately express the spatial shape of the computational domain. Although tetrahedral meshes are easier to generate, hexahedral meshes are the first choice for advanced numerical simulations such as large deformations or computational fluid dynamics. For example, for the simulation of wall boundary flows, hexahedral meshes far outperform tetrahedral meshes because the hexahedral topology allows orthogonal mesh alignment in the wall normal direction.
[0004] Currently, how to generate high-quality conformal hexahedral meshes in arbitrary three-dimensional (3D) domains remains one of the most challenging open problems in mesh generation.
[0005] The above information disclosed in this Background section is only for understanding the background of the present inventive concept and therefore it may contain information that does not constitute prior art. Summary of the invention
[0006] A brief overview of the disclosure will be given below in order to provide a basic understanding of certain aspects of the disclosure. It should be understood that this overview is not an exhaustive overview of the disclosure. It is not intended to identify key or important parts of the disclosure, nor is it intended to limit the scope of the disclosure. Its purpose is simply to give certain concepts in a simplified form as a prelude to a more detailed description discussed later.
[0007] In order to solve the problems existing in the prior art, it is necessary to provide a mesh generation technology for generating body-fitting hexahedral mesh based on octree hexahedral mesh.
[0008] To achieve the purpose of the present disclosure, according to one aspect of the present disclosure, a mesh generation method is provided for generating a body-fitting hexahedral mesh based on an octree hexahedral mesh, comprising: constructing a bottom-up octree hexahedral mesh as a background mesh; defining a distance field of the background mesh according to a surface of an input object; searching the background mesh according to the distance field to determine a boundary mesh; and generating a body-fitting hexahedral mesh by establishing a bijective mapping between a mesh of the input object and a boundary mesh.
[0009] According to another aspect of the present disclosure, a computer program capable of implementing the above-mentioned mesh generation method is provided.
[0010] In addition, a computer program product in the form of at least a computer-readable storage medium is also provided, on which a computer program code for implementing the above-mentioned grid generation method is recorded. Specifically, according to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a computer, the above-mentioned grid generation method can be implemented.
[0011] According to the mesh generation method disclosed in the present invention, by adding a geometric feature capture function, good geometric matching performance can be achieved for input objects with sharp features, and a full hexahedral mesh can be directly generated for common three-dimensional models.
[0012] In addition, according to the mesh generation method disclosed in the present invention, the calculation speed of mesh generation is improved, which can meet the actual engineering needs. Even for large models such as aircraft and ships, full hexahedral meshes can be quickly generated, and good body-fitting hexahedral meshes can be generated for complex models.
[0013] However, the effects of the present disclosure are not limited to the above effects, and various extensions can be made without departing from the spirit and scope of the present disclosure. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory, and are intended to provide further explanation of the present disclosure claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and other objects, features and advantages of the present disclosure will be more easily understood with reference to the following description of the embodiments of the present disclosure in conjunction with the accompanying drawings, in which:
[0015] Figure 1 is a schematic diagram showing a mesh generation method for generating a body-fitting hexahedral mesh based on an octree hexahedral mesh according to the prior art;
[0016] Figure 2 is a flow chart showing a mesh generation method according to an embodiment of the present disclosure;
[0017] Figure 3is a flow chart showing a method for generating a body-fitting hexahedral mesh based on topology transfer according to an embodiment of the present disclosure;
[0018] Figure 4 is a schematic diagram showing a characteristic line topology transfer according to an embodiment of the present disclosure;
[0019] Figure 5 is a schematic diagram showing edge scoring of a target quadrilateral mesh according to an embodiment of the present disclosure;
[0020] Figure 6 is a schematic diagram showing a mesh generated using a mesh generation method according to an embodiment of the present disclosure; and
[0021] Figure 7 is a simplified structural diagram showing a general machine that can be used to implement the mesh generation method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Hereinafter, some embodiments of the present disclosure will be described in detail with reference to the attached illustrative diagrams. When the elements of the drawings are indicated by reference numerals, the same elements will be represented by the same reference numerals even though they are shown in different drawings. In addition, in the following description of the present disclosure, in the case where it is possible to make the subject matter of the present disclosure unclear, the detailed description of the known functions and configurations incorporated herein will be omitted.
[0023] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used herein, unless the context otherwise indicates, the singular form is intended to also include the plural form. It will also be understood that the terms "comprises," "comprising," and "having" used in the specification are intended to specify the presence of stated features, entities, operations, and / or components, but do not exclude the presence or addition of one or more other features, entities, operations, and / or components.
[0024] Unless otherwise defined, all terms used herein, including technical and scientific terms, have the same meaning as those commonly understood by those skilled in the art to which the inventive concept of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and should not be interpreted in an idealized or overly formal sense unless explicitly defined herein.
[0025] In the following description, many specific details are set forth to provide a comprehensive understanding of the present disclosure. The present disclosure may be implemented without some or all of these specific details. In other examples, in order to avoid obscuring the present disclosure due to unnecessary details, only components closely related to the scheme according to the present disclosure are shown in the accompanying drawings, while other details that are not closely related to the present disclosure are omitted.
[0026] Figure 1 A schematic diagram of a mesh generation method based on an octree hexahedral mesh to generate a body-fitting hexahedral mesh according to the prior art is shown.
[0027] Octree is a tree-like data structure used to represent three-dimensional space. In computer graphics, octrees are often used to partition space, creating a data structure called an octree grid.
[0028] Each node of the octree represents a cubic space area. This node can have eight child nodes, each of which represents one eighth of the parent node's space area. The space areas of these eight child nodes are obtained by dividing the parent node's space area into two halves along the x, y, and z directions. In this way, each layer of the octree corresponds to a subdivision of the space.
[0029] Octree grid is a very efficient data structure that can be used to represent complex 3D shapes and can also be used for efficient spatial queries, such as collision detection, line of sight queries, etc. Octree grids are widely used in many applications, such as computational fluid dynamics (CFD), computer graphics, robot navigation, etc.
[0030] A body-fitting grid is a special type of grid that is mainly used in computational fluid dynamics to more accurately simulate the behavior of fluids near the surface of an object. In many fluid dynamics problems, the behavior of the fluid near the surface of an object (such as turbulence, shear stress, etc.) is very different from the behavior far away from the surface of the object, so a finer grid is needed for simulation. The determination of body-fitting grid cells usually depends on the specific application scenario and requirements. In general, body-fitting grid cells are those that fit the surface of the object.
[0031] Since the octree grid and the body-fitting grid are well known to those skilled in the art, they are not described in further detail here for the sake of brevity.
[0032] It should be noted that in the context of this article, both octree grid cells and body-fitted grid cells are hexahedral grid cells.
[0033] like Figure 1As shown in (a) and (b) in the figure, the mesh generation method according to the prior art first uses geometric cutting to cut the original octree mesh to obtain a background mesh containing various shapes. Background Mesh is a concept commonly used in computer graphics and computational fluid dynamics, mainly used to assist in the generation and optimization of meshes. The background mesh is usually a regular mesh covering the entire computational domain, such as an octree mesh. The mesh does not need to exactly match the shape of the object, but provides a "background" or "reference" for generating and optimizing the actual computational mesh.
[0034] When generating the actual computational mesh, the background mesh can be used to guide the generation of the mesh. For example, based on the background mesh, the mesh can be refined, coarsened, or deformed according to the shape of the object and the requirements of the computation. When optimizing the mesh, the background mesh can also be used to evaluate the quality of the mesh. For example, the difference between the actual computational mesh and the background mesh can be compared to evaluate the quality of the mesh.
[0035] Then, if Figure 1 As shown in (c) and (d) in FIG. , the background mesh is further refined (encrypted) to generate a body-fitting hexahedral mesh. In other words, Figure 1 As shown in (c) and (d) in FIG. 5 , the body-fitting hexahedral mesh of the object is obtained by encrypting the octree hexahedral mesh.
[0036] However, for reference Figure 1 The mesh generation method described in the prior art, this hexahedral meshing based on octree ignores the geometric features of the object, and due to the lack of geometric feature capture, meshes that deviate from the original geometric features often appear, resulting in poor geometric matching. Furthermore, the calculation speed of this mesh generation method still cannot meet the actual engineering requirements.
[0037] To this end, the inventors propose a novel mesh generation method for generating a body-fitting hexahedral mesh based on an octree hexahedral mesh.
[0038] According to the mesh generation method of the present disclosure, a bottom-up octree is first used as a background mesh with variable depth refinement to match the variable geometric curvature. Subsequently, a distance field based on the geometric surface is defined according to the surface of the input object. Subsequently, based on the defined distance field, the mesh cells in the octree background mesh are globally searched to determine the boundary of the octree mesh. Finally, a body-fitting mesh with hexahedral mesh cells is constructed by shape insertion and mesh deformation based on continuous control of mesh quality through an optimization algorithm of a set of mesh indicators (e.g., warping, tilt, smoothness).
[0039] Combine the following Figures 2 to 5The mesh generating method 100 according to the embodiment of the present disclosure is described in more detail.
[0040] Figure 2 A flow chart of a mesh generation method 100 according to an embodiment of the present disclosure is shown.
[0041] like Figure 2 As shown, according to an embodiment of the present disclosure, the grid generation method 100 may include the following steps:
[0042] Step S110: constructing a bottom-up octree grid as a background grid.
[0043] The bottom-up octree is a special octree construction method. Referring to the mesh generation method according to the prior art described above, in the traditional octree construction method, the octree is usually constructed from top to bottom, that is, starting from a large spatial area and then gradually subdividing it into small spatial areas. This method is usually called a top-down octree construction method.
[0044] According to the embodiments of the present disclosure, in the bottom-up octree construction method, the construction process is just the opposite. Specifically, according to the embodiments of the present disclosure, the space is first divided into many small cubes, i.e., the child nodes of the octree, and then these small cubes are gradually merged according to their spatial relationship to construct the parent nodes of the higher level of the octree. This method is generally referred to as the bottom-up octree construction method.
[0045] According to the embodiments of the present disclosure, the bottom-up octree construction method has the following advantages. First, since the octree can be constructed according to the actual spatial relationship, rather than being forced to be constructed according to the predefined spatial division, irregular spatial distribution can be better handled. In addition, the bottom-up octree construction method is also more suitable for parallel computing because it can merge small cubes in parallel on a multi-core computer cluster, thereby achieving efficient dynamic load balancing.
[0046] Step S120: defining a distance field of a background grid according to the surface of the input object.
[0047] According to an embodiment of the present disclosure, the input object may be a geometric figure represented in any subdivision format (e.g., STL or OBJ). These subdivision formats are commonly used 3D model formats that can be used to represent various complex 3D shapes. In these formats, a 3D model is usually represented as a set of triangles or polygons, and the vertices and connection relationships of these triangles or polygons define the shape of the model.
[0048] More specifically, STL (Stereolithography) is a widely used 3D model format, mainly used for 3D printing and computer-aided design (CAD). In an STL file, a 3D model is represented as a collection of triangles. In addition, OBJ is a more general 3D model format that can represent not only triangles but also more complex polygons. In addition, OBJ files can also contain material and texture information, making it more suitable for computer graphics applications.
[0049] According to an embodiment of the present disclosure, the input object can be preferably exported from the CAD solid modeler as a set of parts. This is because CAD software can usually provide a more accurate and detailed three-dimensional model, and can also maintain the topological information of the model, such as the associativity of the boundaries. This information can be used to improve the efficiency of the simulation. For example, the associativity of the boundaries can be used to generate a mesh more accurately, or to perform collision detection more efficiently.
[0050] According to an embodiment of the present disclosure, the distance from each grid unit in the background grid constructed in step S110 to the geometric surface of the input object can be calculated. According to an embodiment of the present disclosure, for each grid unit, the shortest distance from the center or vertex of the grid unit to the geometric surface of the input object can be calculated. Subsequently, the calculated distance value can be stored in a specific data structure, such as a three-dimensional array or a sparse data structure. The data structure is a distance field.
[0051] Step S130: Search the background mesh according to the distance field to determine the boundary mesh.
[0052] According to an embodiment of the present disclosure, all grid cells in the background grid can be detected based on the distance field to determine whether to delete them. Specifically, if it is confirmed based on the distance field that the distance from the grid cell to the geometric surface of the object is less than a certain threshold, it can be considered that the grid cell has an intersection with the geometric surface of the input object, or the grid cell is near the geometric surface. Therefore, the grid cell can be deleted so that a finer grid cell can be used for simulation near the geometric surface later.
[0053] In the above manner, the boundary of the octree grid relative to the input object can be determined, and the background grid processed in this way is a full hexahedral grid aligned with the global coordinate system.
[0054] Step S140: Generate a body-fitting hexahedral mesh by establishing a bijective mapping between the mesh of the input object and the boundary mesh.
[0055] The surface of the input object usually has sharp features, that is, some parts of the input object have obvious edges or angles. These sharp features can be lines, corners, or other shapes with clearly defined and prominent features. For example, each corner of a cube is a sharp feature because they form a clear visual boundary. Similarly, a complex mechanical part may have many sharp edges and angles, which are important features of its design. Therefore, in order to achieve a more accurate simulation, it is necessary to make the body-fitting mesh elements accurately match these sharp features.
[0056] Specifically, according to an embodiment of the present disclosure, each sharp feature of the input surface can be defined as a set of edges. For the model mesh of the input object derived from CAD, according to an embodiment of the present disclosure, a dihedral angle threshold (EdgeAngle Threshold) is used to automatically extract sharp features. The dihedral angle threshold may refer to the maximum angle between two adjacent faces, exceeding which the two faces are considered to have "sharp edges", that is, sharp features. According to an embodiment of the present disclosure, the dihedral angle threshold may be, for example, 140 degrees.
[0057] In particular, according to the inventive concept of the present disclosure, by calculating the bijective mapping between the source triangular mesh and the target quadrilateral mesh (i.e., the boundary mesh) of the input object, the sharp features can be transferred to the surface of the body-fitting mesh unit, thereby constructing a body-fitting hexahedral mesh. According to an embodiment of the present disclosure, the source triangular mesh can be a set of triangles representing the input object as described above, and the target quadrilateral mesh can be the boundary of the octree mesh generated in step S130. According to an embodiment of the present disclosure, calculating the bijective mapping between the source triangular mesh and the target quadrilateral mesh is to establish a one-to-one correspondence between the source triangular mesh unit and the target quadrilateral mesh unit, and no mesh unit is omitted or repeated. Therefore, establishing a bijective mapping between the source triangular mesh unit and the target quadrilateral mesh unit can be regarded as transferring the sharp features of the input object, including feature angles and feature lines, to the target quadrilateral mesh, and can therefore also be referred to as topological transfer.
[0058] Figure 3 A flow chart of a method 200 for generating a body-fitting hexahedral mesh based on topology transfer according to an embodiment of the present disclosure is shown.
[0059] like Figure 3 As shown, according to an embodiment of the present disclosure, method 200 may include the following steps:
[0060] Step S210: Mapping the characteristic angle of the input object to the (spatially) nearest vertex in the target quadrilateral mesh.
[0061] Step S220: Mapping the feature lines of the input object to the edge lines of the quadrilateral mesh.
[0062] According to an embodiment of the present disclosure, a characteristic line of the input object may be connected between two characteristic angles of the input object.
[0063] Figure 4 A schematic diagram of characteristic line topology transfer, namely step S220 , according to an embodiment of the present disclosure is shown. Figure 4 (a) in FIG. 5 shows a feature line connecting two feature corners on the input object.
[0064] like Figure 4 As shown in (b), according to an embodiment of the present disclosure, the feature lines can be uniformly sampled, the edge line of the target quadrilateral mesh unit closest in space is found for the sampling point, and the edge line of the target quadrilateral mesh is scored accordingly.
[0065] According to an embodiment of the present disclosure, the sampling distance for uniformly sampling the feature lines can be determined empirically. However, in order to ensure accuracy, according to an embodiment of the present disclosure, the sampling distance can be less than the edge length of the target quadrilateral mesh. Preferably, according to an embodiment of the present disclosure, the sampling distance can be less than 1 / 2 of the edge length of the target quadrilateral mesh. Preferably, according to an embodiment of the present disclosure, the sampling distance can be less than 1 / 4 of the edge length of the target quadrilateral mesh.
[0066] Figure 5 A schematic diagram of scoring edges of a target quadrilateral mesh according to an embodiment of the present disclosure is shown. Figure 5 9 target quadrilateral grid cells 11, 12, 13, 21, 22, 23, 31, 32 and 33 and a feature line AB of the input object are shown. Figure 5 As shown, the feature line AB is uniformly sampled according to the sampling distance, and for each sampling point, the edge line of the target quadrilateral grid unit closest to it in space is found, and 1 point is given to the corresponding edge line accordingly, and then the score of the edge line of the target quadrilateral grid is counted.
[0067] For example, Figure 5 As shown, the score of the left side line of the target quadrilateral mesh unit 31 is 1, the score of the upper side line of the target quadrilateral mesh unit 31 is 2, and the score of the lower side line of the target quadrilateral mesh unit 31 is 1. In addition, the score of the left side line of the target quadrilateral mesh unit 22 is 3, and the score of the upper side line of the target quadrilateral mesh unit 22 is 2. In addition, the score of the lower side line of the target quadrilateral mesh unit 13 is 3. The score of the side line of the target quadrilateral mesh unit that is not projected by the sampling point is 0. In this way, the scores of all the side lines of the target quadrilateral mesh can be obtained.
[0068] Then, if Figure 4 As shown in (c) in FIG. 1 , the feature line can be tracked by an algorithm for finding the shortest path in the graph, such as the Dijkstra algorithm, and the topological transfer of the feature line of the input object on the target quadrilateral mesh is determined according to the scores of all the edges of the target quadrilateral mesh. Since the Dijkstra algorithm is well known to those skilled in the art, it is not described in further detail here for the sake of brevity.
[0069] In addition, for the convenience of subsequent processing, the feature lines of the input object should not cross. Therefore, according to the embodiment of the present disclosure, each time a mapping is established for a new feature line to the edge line of the target quadrilateral mesh, the feature line that has been mapped is used as a cutout for introducing the new feature line, thereby ensuring that no intersection occurs in the target quadrilateral mesh.
[0070] Step S230: extracting the feature map of the source triangular mesh and the target quadrilateral mesh, ie, the patch segmented by the feature angles and feature lines, through the bijective mapping of the feature angles and feature lines established in steps S210 and S220.
[0071] According to an embodiment of the present disclosure, a patch may be a small identifiable feature region formed by a source triangular mesh unit and a target quadrilateral mesh unit. According to an embodiment of the present disclosure, for each patch, its correspondence is searched by comparing the vertices and lines that constitute it.
[0072] In addition, according to an embodiment of the present disclosure, for a patch found in the target quadrilateral mesh based on a patch of the source triangular mesh of the input object, a reverse search is performed again to ensure that the corresponding patch in the source triangular mesh is the same, thereby ensuring the bijectivity of the patch. That is, each patch of the source triangular mesh of the input object has a corresponding patch in the target quadrilateral mesh, and vice versa.
[0073] Step S240: Based on the patches extracted in step S230, connection of body-fitting hexahedral meshes is performed to obtain a body-fitting hexahedral mesh.
[0074] Figure 6 FIG. 2 shows a schematic diagram of a mesh generated using a mesh generation method according to an embodiment of the present disclosure. Figure 6 As shown, according to the mesh generation method disclosed in the present invention, by adding a geometric feature capture function, good geometric matching performance can be achieved for input objects with sharp features, and a full hexahedral mesh can be directly generated for common CAD export models.
[0075] In addition, according to the mesh generation method disclosed in the present invention, the calculation speed of mesh generation is improved, which can meet the actual engineering needs. Even for large models such as aircraft and ships, full hexahedral meshes can be quickly generated, and good body-fitting hexahedral meshes can be generated for complex models.
[0076] Figure 7 is a simplified structural diagram of a general-purpose machine 700 that can be used to implement the mesh generation method 100 according to an embodiment of the present disclosure. The general-purpose machine 700 can be, for example, a computer system. It should be noted that the general-purpose machine 700 is only an example and does not imply any limitation on the scope of use or function of the mesh generation method of the present disclosure. The general-purpose machine 700 should also not be interpreted as having a dependency or requirement on any of the steps or combinations thereof shown in the above-mentioned mesh generation method 100.
[0077] exist Figure 7 In the embodiment, a central processing unit (CPU) 701 performs various processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 to a random access memory (RAM) 703. In the RAM 703, images required when the CPU 701 performs various processes and the like are also stored as needed. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output interface 705 is also connected to the bus 704.
[0078] The following components are also connected to the input / output interface 705: an input section 706 (including a keyboard, a mouse, etc.), an output section 707 (including a display, such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.), a storage section 708 (including a hard disk, etc.), a communication section 709 (including a network interface card such as a LAN card, a modem, etc.). The communication section 709 performs communication processing via a network such as the Internet. A drive 710 may also be connected to the input / output interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. may be installed on the drive 710 as needed, so that a computer program read therefrom may be installed in the storage section 708 as needed.
[0079] In the case where the above-described series of processing is implemented by software, a program constituting the software can be installed from a network such as the Internet or from a storage medium such as the removable medium 711 .
[0080] It should be understood by those skilled in the art that such storage media is not limited to Figure 7The removable medium 711 shown has a program stored therein and is distributed separately from the device to provide the program to the user. Examples of the removable medium 711 include magnetic disks (including floppy disks), optical disks (including compact disk read-only memory (CD-ROM) and digital versatile disks (DVD)), magneto-optical disks (including minidiscs (MD) (registered trademark)), and semiconductor memories. Alternatively, the storage medium may be a ROM 702, a hard disk included in the storage portion 708, or the like, in which the program is stored and distributed to the user together with the device containing them.
[0081] In addition, the present disclosure also proposes a program product storing a machine-readable instruction code. When the instruction code is read and executed by a machine, the above-mentioned grid generation method according to the present disclosure can be executed. Accordingly, the various storage media listed above for carrying such a program product are also included in the scope of the present disclosure.
[0082] The above has been described in detail through block diagrams, flow charts and / or embodiments, illustrating the specific embodiments of the device and / or method according to the embodiments of the present disclosure. When these block diagrams, flow charts and / or embodiments include one or more functions and / or operations, it is understood by those skilled in the art that each function and / or operation in these block diagrams, flow charts and / or embodiments can be implemented individually and / or collectively by various hardware, software, firmware or substantially any combination thereof. In one embodiment, several parts of the subject matter described in this specification can be implemented by application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs) or other integrated forms. However, those skilled in the art will recognize that some aspects of the embodiments described in this specification can be equivalently implemented in whole or in part in the form of one or more computer programs running on one or more computers (for example, in the form of one or more computer programs running on one or more computer systems), in the form of one or more programs running on one or more processors (for example, in the form of one or more programs running on one or more microprocessors), in the form of firmware, or in substantially any combination thereof, and that, based on the contents disclosed in this specification, designing circuits for the present disclosure and / or writing code for software and / or firmware for the present disclosure is well within the capabilities of those skilled in the art.
[0083] Although the present disclosure has been disclosed above by describing the specific embodiments of the present disclosure, it should be understood that those skilled in the art can design various modifications, improvements or equivalents to the embodiments of the present disclosure within the spirit and scope of the appended claims. These modifications, improvements or equivalents should also be considered to be included in the protection scope of the present disclosure.
Claims
1. A mesh generation method for generating a body-fitting hexahedral mesh based on an octree hexahedral mesh, comprising: Construct a bottom-up octree hexahedral mesh as the background mesh; Defining a distance field of the background mesh according to a surface of an input object; searching the background mesh according to the distance field to determine a boundary mesh; as well as The body-fitting hexahedral mesh is generated by establishing a bijective mapping between the mesh of the input object and the boundary mesh.
2. The grid generation method according to claim 1, wherein: The mesh of the input object is a triangular mesh, and the boundary mesh is a quadrilateral mesh.
3. The grid generation method according to claim 1, wherein: The distance field is defined by calculating the shortest distance from the center or vertex of each background grid cell to the geometric surface of the input object.
4. The grid generation method according to claim 3, wherein: The boundary mesh is determined by removing mesh cells in the background mesh that intersect with the surface of the input object according to the distance field.
5. The grid generation method according to claim 1, wherein: Generating the body-fitting hexahedral mesh by establishing a bijective mapping between the mesh of the input object and the boundary mesh comprises: Mapping characteristic corners of the input object to the nearest vertices in the boundary mesh; Mapping feature lines of the input object to edge lines of the boundary grid; extracting patches segmented by characteristic corners and characteristic lines of the triangular mesh of the input object and the boundary mesh; and Based on the patch, the body-fitting hexahedral mesh is generated.
6. The grid generation method according to claim 5, wherein: The characteristic line of the input object is connected between two characteristic corners of the input object.
7. The grid generation method according to claim 5, wherein: Mapping the feature lines of the input object to the edge lines of the boundary grid includes: uniformly sampling the characteristic lines; Find the edge of the nearest boundary grid cell for the sampling point; scoring edges of the boundary grid; and The feature lines are mapped to edge lines of the boundary grid according to the scored scores.
8. The grid generation method according to claim 7, wherein: The sampling distance of the uniform sampling is smaller than the sideline length of the boundary grid unit.
9. The grid generation method according to claim 7, wherein: Mapping the feature lines of the input object to the edge lines of the boundary grid further includes: Each time a mapping is established for a new feature line to an edge line of the boundary grid, the feature line for which the mapping has been established is used as a cutout for introducing the new feature line.
10. The grid generation method according to claim 5, wherein: Generating the body-fitting hexahedral mesh by establishing a bijective mapping between the mesh of the input object and the boundary mesh also includes: For patches found in the boundary mesh based on the triangle mesh, a back search is again performed to ensure that the corresponding patches in the triangle mesh are the same. 11 . A computer-readable storage medium having stored thereon a program executable by a computer, wherein when the program is executed by the computer, the computer executes the mesh generation method according to claim 1 . 12 . A computer program, which, when executed by the computer, can implement the mesh generation method according to claim 1 .