CN116401916B - Method, device, medium and equipment for generating high-quality three-dimensional grid - Google Patents

Method, device, medium and equipment for generating high-quality three-dimensional grid Download PDF

Info

Publication number
CN116401916B
CN116401916B CN202310318855.8A CN202310318855A CN116401916B CN 116401916 B CN116401916 B CN 116401916B CN 202310318855 A CN202310318855 A CN 202310318855A CN 116401916 B CN116401916 B CN 116401916B
Authority
CN
China
Prior art keywords
dimensional
level
quality
dimensional grid
grid cell
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310318855.8A
Other languages
Chinese (zh)
Other versions
CN116401916A (en
Inventor
高见
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Yunjing Zhifang Information Technology Co ltd
Original Assignee
Beijing Yunjing Zhifang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yunjing Zhifang Information Technology Co ltd filed Critical Beijing Yunjing Zhifang Information Technology Co ltd
Publication of CN116401916A publication Critical patent/CN116401916A/en
Application granted granted Critical
Publication of CN116401916B publication Critical patent/CN116401916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method, a device, a medium and equipment for generating a high-quality three-dimensional grid, and belongs to the technical field of computer simulation. Which comprises the following steps: identifying a low quality three-dimensional volume grid cell region in the legacy three-dimensional volume grid; removing low-quality three-dimensional grid cells in old three-dimensional grids to obtain a cavity to be filled; generating a high-quality three-dimensional grid unit according to the shape of the cavity to be filled; and filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid. The apparatus, medium, and device can be used to implement the method. The high-quality three-dimensional grid can be obtained rapidly, and the same result is output for the same input, so that simulation conclusion obtained after simulation of three-dimensional body mechanics, thermal and the like is realized through the high-quality three-dimensional grid is more accurate and reliable.

Description

Method, device, medium and equipment for generating high-quality three-dimensional grid
Technical Field
The present invention relates to the field of computer simulation technologies, and in particular, to a method, an apparatus, a medium, and a device for generating a high-quality three-dimensional grid.
Background
The three-dimensional grid has a great deal of application in the aspects of virtual display, computer aided engineering simulation and the like, such as the inability to intuitively express three-dimensional body mechanics, thermal and the like. The simulation field generally has certain requirements on the density and quality of the grid. However, the computational effort required to generate a fine grid is very large, and conventional serial programs are time consuming, and simply modifying a serial program to a parallel program makes it difficult to guarantee the stability of the algorithm, i.e., using the same inputs multiple times, the program may give different results. Therefore, it is necessary to seek a parallel method of high quality three-dimensional volume mesh generation so that the same result is always output for the same input.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus, medium and device for generating a high-quality three-dimensional grid, which can utilize multiple cores of a processor to quickly obtain the high-quality three-dimensional grid, so that simulation results obtained after simulation of three-dimensional body mechanics, thermal and the like are realized by using the high-quality three-dimensional grid are more accurate and reliable, and are more suitable for practical use.
In order to achieve the first object, the technical scheme of the method for generating the high-quality three-dimensional grid provided by the invention is as follows:
The method for generating the high-quality three-dimensional grid provided by the invention comprises the following steps of:
identifying a low quality three-dimensional volume grid cell region in the legacy three-dimensional volume grid;
removing low-quality three-dimensional grid cells in the old three-dimensional grid to obtain a cavity to be filled;
generating a high-quality three-dimensional grid unit to be filled according to the shape of the cavity to be filled;
and filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid.
The method for generating the high-quality three-dimensional grid can be further realized by adopting the following technical measures.
Preferably, the identifying the low-quality three-dimensional volume grid cell region in the legacy three-dimensional volume grid specifically includes the steps of:
identifying an initial low quality three-dimensional volume grid cell in the legacy three-dimensional volume grid;
selecting a vertex based on the initial low-quality three-dimensional grid cell;
determining a 1 st-level three-dimensional grid cell group in direct contact with each surface of the initial low-quality three-dimensional grid cell and marking a 1 st-level three-dimensional grid cell to be cleaned in the 1 st-level three-dimensional grid cell group, wherein an outer sphere of the 1 st-level three-dimensional grid cell to be cleaned contains the vertex;
Determining a 2 nd-level three-dimensional grid cell group which is in direct contact with each surface of the 1 st-level three-dimensional grid cell to be cleaned, and marking the 2 nd-level three-dimensional grid cell to be cleaned in the 2 nd-level three-dimensional grid cell group, wherein an outer sphere of the 2 nd-level three-dimensional grid cell to be cleaned contains the vertex;
and so on, determining an nth level three-dimensional grid cell group which is in direct contact with each surface of the nth level three-dimensional grid cell to be cleared and marking the nth level three-dimensional grid cell to be cleared in the nth level three-dimensional grid cell group, wherein an outer sphere of the nth level three-dimensional grid cell to be cleared contains the vertex;
determining an n+1-level three-dimensional grid cell group which is in direct contact with each surface of the n-level three-dimensional grid cell to be cleaned, and if the externally connected ball of each three-dimensional grid cell in the n+1-level three-dimensional grid cell group does not contain the vertex, ending the step of identifying the low-quality three-dimensional grid cell area in the old three-dimensional grid;
wherein n is a natural number.
As a preferred alternative to this,
determining a 1 st-level three-dimensional volume grid cell group in direct contact with each face of the initial low-quality three-dimensional volume grid cell and marking 1 st-level three-dimensional volume grid cells to be cleaned in the 1 st-level three-dimensional volume grid cell group specifically comprises the following steps:
Planning an outer ball of each three-dimensional grid cell in the 1 st-level three-dimensional grid cell group;
when the circumscribed sphere of the 1 st-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as a 1 st-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional grid unit as a three-dimensional grid unit to be reserved in the 1 st level, or not performing marking treatment;
determining a 2 nd-level three-dimensional volume grid cell group which is in direct contact with each surface of the 1 st-level three-dimensional volume grid cell to be cleaned, and marking the 2 nd-level three-dimensional volume grid cell in the 2 nd-level three-dimensional volume grid cell group specifically comprises the following steps:
planning an outer ball of each three-dimensional grid cell in the 2 nd-level three-dimensional grid cell group;
when the outer sphere of the 2 nd-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as a 2 nd-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional grid unit as a 2 nd-level three-dimensional grid unit to be reserved, or not performing marking treatment;
determining an nth level three-dimensional volume grid cell group which is in direct contact with each surface of the nth level three-dimensional volume grid cell to be cleaned, and marking the nth level three-dimensional volume grid cell to be cleaned in the nth level three-dimensional volume grid cell group specifically comprises the following steps:
Planning an outer ball of each three-dimensional grid cell in the nth-level three-dimensional grid cell group;
when the outer sphere of the nth-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as an nth-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional volume grid cell as an nth-level three-dimensional volume grid cell to be reserved, or not performing marking processing.
Preferably, selecting a vertex based on the initial low-quality three-dimensional grid unit comprises the steps of:
judging defect properties of the initial low-quality three-dimensional grid unit, wherein the defect properties of the initial low-quality three-dimensional grid unit comprise one of shape defects or oversized;
selecting a vertex based on the initial low-quality three-dimensional volume grid cell:
when the defect property of the initial low-quality three-dimensional grid unit is a shape defect, taking the sphere center of the outer sphere of the initial low-quality three-dimensional grid unit of the shape defect as a selected vertex;
when the defect property of the initial low-quality three-dimensional grid unit is that the size is oversized, taking the midpoint of the longest side of the oversized initial low-quality three-dimensional grid unit as a selected vertex.
Preferably, when the number of the initial low-quality three-dimensional volume grid units in the legacy three-dimensional volume grid is more than 2, the number of the selected vertices is the same as the number of the initial low-quality three-dimensional volume grid units, the priorities of the selected vertices of the initial low-quality three-dimensional volume grid units are distributed from high to low according to the volumes, if the volumes of the initial low-quality three-dimensional volume grid units are the same, the priorities of the selected vertices of the initial low-quality three-dimensional volume grid units are distributed from high to low according to the numbers, and at this time, the method for identifying the low-quality three-dimensional volume grid unit area in the legacy three-dimensional volume grid further comprises the following steps:
when a first level marks a three-dimensional body unit to be cleared, if an externally-connected ball of one three-dimensional body unit contains a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes;
after the first-level mark is finished for eliminating the three-dimensional body unit, judging whether vertexes corresponding to the marks of all the three-dimensional bodies with the marks fail or not, and eliminating the marks on the three-dimensional bodies if the vertexes fail;
when the three-dimensional body units to be cleared are marked at the second level, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked at the first level, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
After the second-level mark is finished, judging whether vertexes corresponding to the marks of all the three-dimensional bodies with the marks fail or not, and if so, clearing the marks on the three-dimensional bodies;
when the third level marks the three-dimensional body units to be cleared, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked at the first or second level, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
after the third-level mark is finished, judging whether vertexes corresponding to all the marked three-dimensional bodies fail or not, and if so, clearing the marks on the three-dimensional bodies;
and so on, when the three-dimensional body unit to be cleared is marked at the nth level, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body. Meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked on the first layer, the second layer, the … … layer or the n-1 layer, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
And after the three-dimensional body unit to be cleared is marked at the nth level, judging whether the vertex corresponding to the mark of all the three-dimensional bodies with the marks is invalid, and if so, clearing the mark on the three-dimensional body.
Preferably, the three-dimensional grid is tetrahedral in shape;
the tetrahedral mesh cells in the 1 st hierarchy tetrahedral mesh cell group in direct contact with each face of the initial low quality tetrahedral mesh cell are tetrahedral mesh cells in direct contact with four faces of the initial low quality tetrahedral mesh cell;
the tetrahedral grid cells in the 2 nd-level tetrahedral grid cell group which are in direct contact with each face of the 1 st-level tetrahedral grid cell to be cleaned are tetrahedral grid cells which are in direct contact with each face of the 1 st-level tetrahedral grid cell to be cleaned;
with this, the nth level tetrahedral mesh unit group is obtained.
Preferably, the generating a high-quality three-dimensional grid unit according to the shape of the cavity to be filled comprises the following steps:
connecting the selected vertexes with the vertexes of the edge triangle of the cavity to be filled respectively to obtain a plurality of tetrahedron shapes; and constructing tetrahedrons to be filled in a 1:1 mode based on the tetrahedron shapes, and generating a high-quality three-dimensional grid unit to be filled.
In order to achieve the second object, the technical scheme of the high-quality three-dimensional grid generating device provided by the invention is as follows:
the device for generating the high-quality three-dimensional body grid provided by the invention comprises the following components:
the identification module is used for identifying low-quality three-dimensional grid cell areas in the old three-dimensional grid;
the removing module is used for removing low-quality three-dimensional grid cells in the old three-dimensional grid to obtain a cavity to be filled;
the three-dimensional grid unit generating module is used for generating a high-quality three-dimensional grid unit to be filled according to the shape of the cavity to be filled;
and the filling module is used for filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid.
In order to achieve the third object, the technical solution of the present invention for a computer readable storage medium is as follows:
the computer readable storage medium provided by the invention stores a high-quality three-dimensional grid generation program, and when the high-quality three-dimensional grid generation program is executed by a processor, the steps of the high-quality three-dimensional grid generation method provided by the invention are realized.
In order to achieve the fourth object, the technical scheme of the electronic device provided by the invention is as follows:
The electronic equipment provided by the invention comprises a memory and a processor, wherein the memory is stored with a high-quality three-dimensional grid generation program, and when the high-quality three-dimensional grid generation program is executed by the processor, the steps of the high-quality three-dimensional grid generation method provided by the invention are realized.
The method, the device, the medium and the equipment for generating the high-quality three-dimensional grid provided by the invention firstly remove the low-quality three-dimensional grid cells in the identified old three-dimensional grid, and then make the generated high-quality three-dimensional grid cells deficient, thus obtaining the high-quality three-dimensional grid. The three-dimensional grid cells in the high-quality three-dimensional grid are regular in shape and stable in size, and simulation conclusion obtained after simulation of three-dimensional mechanics, thermal and the like is realized by using the high-quality three-dimensional grid.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of the steps of a method for generating a high-quality three-dimensional grid according to an embodiment of the present invention;
FIG. 2 is a flowchart showing the steps involved in the method for producing a high-quality three-dimensional grid according to an embodiment of the present invention for cleaning a failed cavity;
FIG. 3 is a detailed step flowchart of a cavity reserving method when different vertices to be inserted of the same low-quality three-dimensional grid unit compete according to the generating method of the high-quality three-dimensional grid provided by the embodiment of the invention;
FIG. 4 is a flowchart of the detailed steps of cavity expansion involved in the method for generating a high-quality three-dimensional grid according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating in detail a cavity expansion competition process related to a method for generating a high-quality three-dimensional grid according to an embodiment of the present invention, taking a two-dimensional grid as an example;
FIG. 6 is a schematic diagram of a signal flow relationship between functional modules in the apparatus for generating a high-quality three-dimensional grid according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a generating device of a high-quality three-dimensional grid in a hardware running environment according to an embodiment of the present invention.
Detailed Description
In view of the above, the present invention provides a method for generating a high-quality three-dimensional grid, which can quickly obtain a high-quality three-dimensional grid by using multiple cores of a processor, so that simulation results obtained after simulation of three-dimensional mechanics, thermal, etc. are more accurate and reliable, and thus the method is more suitable for practical use.
The inventor has made hard efforts, and found that,
with the popularization of multi-core computers, some parallelization algorithms also appear in the grid generation field, so that the grid generation speed is improved. In the prior art, aiming at more, larger and more complex models, multi-CPU core parallelism is gradually difficult to meet the speed requirement, and a general purpose computing graphics processor (GPGPU) with the core number far exceeding that of the CPU provides possibility for larger-scale parallel computing.
At present, the generation of a volumetric mesh on a GPU is not yet well studied. Some multi-CPU core parallel algorithms employ a method of dividing the model into multiple parts, but these algorithms have difficulty in fully utilizing the large number of computing cores of the GPU.
In the existing research results, the parallel three-dimensional constraint-contained deluo internal subdivision algorithm of the GPU, which is proposed by Chen Zhenghai and the like based on the Bowyer-Watson algorithm, can more effectively utilize GPU computing resources, and can realize performance improvement of tens of times compared with the traditional algorithm under the condition that the quality of generated grids is similar. However, the algorithm is unstable, different subdivision results are given for each operation of the same model input, and the corresponding operation time also has larger fluctuation.
In the simulation, the instability of the algorithm means that the calculation result is difficult to reproduce, so that the problem is difficult to locate when the problem occurs, and the algorithm is not beneficial to multi-person cooperation. The work provides a stable high-quality three-dimensional grid parallel generation algorithm which is suitable for a large class of grid generation methods based on cavity expansion, and the algorithm idea can be used for generating tetrahedral grids and generating grids of other unit types such as hexahedrons.
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following description refers to a method, a device, a medium and equipment for generating a high-quality three-dimensional grid according to the present invention, and specific implementation, structure, characteristics and effects thereof, with reference to the accompanying drawings and preferred embodiments. In the following description, different "an embodiment" or "an embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
The term "and/or" is herein merely an association relation describing an associated object, meaning that three relations may exist, e.g. a and/or B, specifically understood as: the composition may contain both a and B, and may contain a alone or B alone, and any of the above three cases may be provided.
Method for generating high-quality three-dimensional grid
Referring to fig. 1, the method for generating a high-quality three-dimensional grid according to the embodiment of the invention includes the following steps:
step S1: a low quality three-dimensional volume mesh cell region in the legacy three-dimensional volume mesh is identified.
Specifically, the old three-dimensional grid refers to an original three-dimensional grid, and since the three-dimensional grid cells are not optimized or identified, the existing three-dimensional grid cells have a sudden shape or an oversized three-dimensional grid cell, so that if the existing three-dimensional grid is to be improved, the low-quality three-dimensional grid cells in the existing three-dimensional grid need to be identified first, and in this embodiment, the low-quality three-dimensional grid in the existing three-dimensional grid is generally identified by artificial observation or a streaking method, a sizing method, or the like in an existing three-dimensional grid picture.
Step S2: removing low-quality three-dimensional grid cells in old three-dimensional grids to obtain a cavity to be filled;
specifically, after the low-quality three-dimensional grid cells in the old three-dimensional grid are identified, if the cleaning operation is performed only on the identified single low-quality three-dimensional grid cell, then the cavity to be filled is completely matched with the shape of the cleaned low-quality three-dimensional grid cell, and the quality of the whole three-dimensional grid still cannot be changed, so that the situation is changed, the peripheral associated three-dimensional grid cells associated with the identified single low-quality three-dimensional grid cell are cleaned together to obtain a larger cavity, and at the moment, the volume of the cavity is increased, and more operations can be performed, so that the old three-dimensional grid can be thoroughly improved, and finally the target high-quality three-dimensional grid can be obtained.
Step S3: and generating a high-quality three-dimensional grid unit to be filled according to the shape of the cavity to be filled.
Specifically, in the cavity formed after the low-quality three-dimensional volume mesh unit has been cleared, it is necessary to fill in the high-quality three-dimensional volume mesh unit of an appropriate shape and size so that the cavity is occupied by the high-quality three-dimensional volume mesh unit to finally generate the high-quality three-dimensional volume mesh unit.
Step S4: and filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid.
Specifically, since the cavity in the low-quality three-dimensional body mesh needs to be completely filled with the high-quality three-dimensional body mesh unit, the specific shape and the dimensional parameter of the high-quality three-dimensional body mesh unit need to be replaced according to the shape of the cavity to be filled.
The method for generating the high-quality three-dimensional body grid provided by the embodiment of the invention firstly eliminates the low-quality three-dimensional body grid cells in the identified old three-dimensional body grid, and then makes the generated high-quality three-dimensional body grid cells deficient, thus obtaining the high-quality three-dimensional body grid. The three-dimensional grid cells in the high-quality three-dimensional grid are regular in shape and stable in size, and simulation conclusion obtained after simulation of three-dimensional mechanics, thermal and the like is realized by using the high-quality three-dimensional grid.
Wherein, referring to fig. 2-5, identifying a low quality three-dimensional volume mesh cell region in a legacy three-dimensional volume mesh specifically comprises the steps of:
identifying an initial low quality three-dimensional volume grid cell in the legacy three-dimensional volume grid;
selecting a vertex based on the initial low-quality three-dimensional grid unit;
determining a 1 st-level three-dimensional grid cell group which is in direct contact with each surface of the initial low-quality three-dimensional grid cell, and marking a 1 st-level three-dimensional grid cell to be cleaned in the 1 st-level three-dimensional grid cell group, wherein an outer sphere of the 1 st-level three-dimensional grid cell to be cleaned contains the vertex;
determining a 2 nd-level three-dimensional grid cell group which is in direct contact with each surface of the 1 st-level three-dimensional grid cell to be cleared, and marking the 2 nd-level three-dimensional grid cell to be cleared in the 2 nd-level three-dimensional grid cell group, wherein an externally connected sphere of the 2 nd-level three-dimensional grid cell to be cleared contains the vertex;
similarly, determining an nth level three-dimensional grid cell group which is in direct contact with each surface of the nth level three-dimensional grid cell to be cleared, and marking the nth level three-dimensional grid cell to be cleared in the nth level three-dimensional grid cell group, wherein the outer sphere of the nth level three-dimensional grid cell to be cleared contains the vertex;
Determining an n+1-level three-dimensional grid cell group which is in direct contact with each surface of the n-level three-dimensional grid cell to be cleaned, and if the outer sphere of each three-dimensional grid cell in the n+1-level three-dimensional grid cell group does not contain a vertex, ending the step of identifying a low-quality three-dimensional grid cell area in the old three-dimensional grid;
wherein n is a natural number.
In this case, since the outer sphere of each three-dimensional grid cell to be cleaned contains the vertex, a cavity is obtained after the three-dimensional grid cells to be cleaned are cleaned, the shape of a new three-dimensional grid cell made by leading the vertex to the edge of the cavity is more regular, the size is more suitable, and after the three-dimensional grid obtained based on the vertex and the leading wire is generated, the three-dimensional grid is filled into the cavity, and the obtained three-dimensional grid shape is more regular.
Wherein,
determining a 1 st-level three-dimensional volume grid cell group in direct contact with each face of the initial low-quality three-dimensional volume grid cell and marking the 1 st-level three-dimensional volume grid cell to be cleaned in the 1 st-level three-dimensional volume grid cell group specifically comprises the following steps:
planning the outer ball of each three-dimensional grid unit in the 1 st-level three-dimensional grid unit group;
When the outer sphere of the 1 st-level three-dimensional grid unit contains a selected vertex, marking the current three-dimensional grid unit as a 1 st-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional grid unit as a three-dimensional grid unit to be reserved in the 1 st level, or not performing marking treatment;
the method for determining the 2 nd-level three-dimensional volume grid cell group directly contacted with each surface of the 1 st-level three-dimensional volume grid cell to be cleaned and marking the 2 nd-level three-dimensional volume grid cell in the 2 nd-level three-dimensional volume grid cell group specifically comprises the following steps:
planning the outer ball of each three-dimensional grid unit in the 2 nd-level three-dimensional grid unit group;
when the outer sphere of the 2 nd-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as a 2 nd-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional grid unit as a 2 nd-level three-dimensional grid unit to be reserved, or not performing marking treatment;
the method for determining the nth level three-dimensional body grid cell group directly contacted with each surface of the nth-1 level three-dimensional body grid cell to be cleaned and marking the nth level three-dimensional body grid cell in the nth level three-dimensional body grid cell group specifically comprises the following steps:
Planning the outer ball of each three-dimensional grid cell in the nth-level three-dimensional grid cell group;
when the outer sphere of the three-dimensional grid unit of the nth level contains the selected vertex, marking the current three-dimensional grid unit as the three-dimensional grid unit to be cleaned of the nth level; otherwise, marking the current three-dimensional volume grid cell as an nth-level three-dimensional volume grid cell to be reserved, or not performing marking processing.
In this case, the three-dimensional volume grid cells to be purged are not purged directly, but are first subjected to global marking and finally purged globally, which is more efficient and provides a basis for processing the filling of a plurality of low-quality three-dimensional volume grid cells at a time in parallel.
Wherein, based on the initial low-quality three-dimensional grid unit, selecting a vertex specifically comprises the following steps:
judging the defect property of the initial low-quality three-dimensional grid unit, wherein the defect property of the initial low-quality three-dimensional grid unit comprises one of shape defect or oversized;
selecting a vertex based on the initial low-quality three-dimensional volume grid cell:
when the defect property of the initial low-quality three-dimensional grid unit is a shape defect, taking the sphere center of the outer sphere of the initial low-quality three-dimensional grid unit of the shape defect as a selected vertex;
When the defect property of the initial low-quality three-dimensional volume grid cell is oversized, the midpoint of the longest side of the oversized initial low-quality three-dimensional volume grid cell is taken as the selected vertex.
When the number of the initial low-quality three-dimensional grid cells in the old three-dimensional grid is more than 2, the number of the selected vertexes is the same as that of the initial low-quality three-dimensional grid cells, the priorities of the selected vertexes of the initial low-quality three-dimensional grid cells are distributed from high to low according to the volume from high to low, if the volumes of the initial low-quality three-dimensional grid cells are the same, the priorities of the selected vertexes of the initial low-quality three-dimensional grid cells are distributed from high to low according to the number from high to low, and at the moment, the method for identifying the low-quality three-dimensional grid cell areas in the old three-dimensional grid further comprises the following steps:
when a first level marks a three-dimensional body unit to be cleared, if an externally-connected ball of one three-dimensional body unit contains a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes;
after the first-level mark is finished for eliminating the three-dimensional body unit, judging whether vertexes corresponding to the marks of all the three-dimensional bodies with the marks fail or not, and eliminating the marks on the three-dimensional bodies if the vertexes fail;
When the three-dimensional body units to be cleared are marked at the second level, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked at the first level, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
after the second-level mark is finished, judging whether vertexes corresponding to the marks of all the three-dimensional bodies with the marks fail or not, and if so, clearing the marks on the three-dimensional bodies;
when the third level marks the three-dimensional body units to be cleared, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked at the first or second level, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
After the third-level mark is finished, judging whether vertexes corresponding to all the marked three-dimensional bodies fail or not, and if so, clearing the marks on the three-dimensional bodies;
and so on, when the three-dimensional body unit to be cleared is marked at the nth level, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body. Meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked on the first layer, the second layer, the … … layer or the n-1 layer, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
and after the three-dimensional body unit to be cleared is marked at the nth level, judging whether the vertex corresponding to the mark of all the three-dimensional bodies with the marks is invalid, and if so, clearing the mark on the three-dimensional body.
Specifically, initially for three-dimensional volume grid cells to be purged, there may be multiple markers during the parallel algorithm due to the presence of multiple threads of markers, at which point it is desirable to preserve the top-prioritised marker where each initial low quality three-dimensional volume grid cell is causing, while the remaining markers are purged. Suppose there are now eight marked low-quality three-dimensional volume grid cells, 1,2,3,4,5,6,7,8, with the high numbered marked low-quality three-dimensional volume grid cells having a higher priority. If 2 and 3 compete, 3 and 4 compete, and 6 and 7 compete, the end result is 1,4,5,7,8 label retention for five labeled low quality three-dimensional volume grid cells, with 2,3 and 6 labels cleared.
The overall procedure should be dilation-contention- … …, e.g.,
assuming 3 bad units (A0, B0, C0), the flow is as follows:
a. first, it is determined that the corresponding three vertices PA, PB, PC are found.
b. For the four tetrahedrons (A1, A2, A3, A4) around A0, it is determined whether the outer sphere contains PA, the four tetrahedrons (B1, B2, b3, B4) determines whether the outer ball contains PB, and four sides (C1, C2, C3, C4) around C0 determine whether the outer ball contains PC.
c. Assuming that the tetrahedrons to be marked are judged to be A1, A2, A3, B1, B3, C2, C4, an attempt is made to mark them. In this case, if A2 and B1 are the same tetrahedron, competition will occur when marking the tetrahedron, and if A0 has a priority greater than B0, A2 (i.e., B1) will be marked with the corresponding A0.
d. After c, marking, B0 finds that the competition fails once, and all the marks on the tetrahedrons marked with the corresponding B0 are eliminated.
e. The new tetrahedra marked here are A1, A2 (=b1), A3, C2, C4. It is then necessary to determine whether the tetrahedrons adjacent to these tetrahedrons need to be marked (corresponding to step b): whether the outer sphere contains PA is determined for the tetrahedron adjacent to A1, A2 or A3, and whether the outer sphere contains PC is determined for the tetrahedron adjacent to C2 or C4.
That is, the present embodiment is characterized by "parallel generation", which is characterized by: the work inside each step is done in parallel, relying on multiple cores of the CPU or GPU to work simultaneously (multithreading). In the embodiment, in step a, a total of 3 threads work, one is responsible for searching for PA according to A0, one is responsible for searching for PB according to B0, and one is responsible for searching for PC according to C0; step b starts after step a is completed, and there are a total of 12 threads in operation in step b, one is responsible for determining whether the A1 ball contains PA, one is responsible for determining whether the A2 ball contains PB … …, and so on. Step c, working by 12 threads, respectively trying to mark the corresponding tetrahedrons. In this embodiment, since A2 and B1 are the same tetrahedron, there will be two threads that want to mark this tetrahedron, which is a competing source; when competition occurs, marking the target tetrahedron (A2) successfully with high priority, and recording that the corresponding task fails (the thread corresponding to B1 records that B0 fails) if the failure occurs; step c is completed, and step d is also carried out, wherein, step d is provided with 12 threads, each thread judges whether the corresponding initial task fails, if the initial task fails and the corresponding tetrahedron is marked by the user, the mark is deleted: for example, the thread corresponding to B1 finds B0 to be marked as failed in the previous step, but the mark on the B1 tetrahedron (i.e. A2 tetrahedron) is not the mark corresponding to B0, so nothing is directly exited, the thread corresponding to B3 finds B0 to be failed, the mark on B3 is the mark corresponding to B0, the mark is cleared, the threads corresponding to A1, A2 and A3 respectively find A0 to be not failed, then the threads corresponding to C2 and C4 directly exit, and the threads corresponding to C2 and C4 find C0 to be not failed; step e thereafter corresponds to step b, but the number of threads is determined based on the number of tetrahedrons adjacent to A1, A2, A3, C2, C4.
For simplicity of description, the cavity expansion in the two-dimensional case is exemplified here.
Referring to fig. 5, in an attempt to expand, the cavities a, b, c need to expand in the direction indicated by the arrows, and the priorities a > b > c of the three cavities, in the figure, (1) (2) (3) (4) represent four threads.
If threads (1) and (2) execute prior to threads (3) and (4), then the b-cavity is marked as invalid during execution of either (1) or (2), and the b-cavity is found to be invalid during execution of threads (3) and (4), whereupon the c-cavity can be successfully expanded. The cavities a and c remain after the expansion is completed.
Conversely, if threads (3) and (4) execute prior to threads (1) and (2), then cavity c is marked as invalid during execution of either (3) or (4), and thereafter cavity b is marked as invalid during execution of either thread (1) or (2). After the expansion is completed, only the a cavity is reserved.
To ensure that the algorithm produces the same result in any thread scheduling order, the determination of the validity of the cavity is removed during the try-and-expand phase, and a round of try-and-expand is still completed for the cavity that must fail (see cavity b of fig. 5), so that the cavity that would otherwise likely fail in competition must fail.
Referring to fig. 5, the situation corresponding to fig. 5 will necessarily only leave cavity a. The situation is the same as before if threads (3) and (4) were executed prior to threads (1) and (2). If threads (1) and (2) execute before threads (3) and (4), the cavity b is marked as invalid in the execution process of (1) or (2), and then the thread (3) can continue to compete with the thread (4) and make the cavity c invalid because the validity of the cavity is not judged, and the final result is that only the cavity a is reserved.
In this embodiment, the three-dimensional grid is tetrahedral;
the tetrahedral mesh cells in the 1 st hierarchy tetrahedral mesh cell group in direct contact with each face of the initial low quality tetrahedral mesh cell are tetrahedral mesh cells in direct contact with four faces of the initial low quality tetrahedral mesh cell;
the tetrahedral grid cells in the 2 nd-level tetrahedral grid cell group which are in direct contact with each surface of the 1 st-level tetrahedral grid cell to be cleaned are tetrahedral grid cells which are in direct contact with each surface of the 1 st-level tetrahedral grid cell to be cleaned;
with this, the nth level tetrahedral mesh unit group is obtained.
Wherein generating a high quality three-dimensional volume grid cell according to the shape of the cavity to be filled comprises the steps of:
respectively connecting the selected vertexes with the vertexes of the edge triangle of the cavity to be filled to obtain a plurality of tetrahedron shapes; and constructing a tetrahedron to be filled in a 1:1 mode based on the shapes of the multiple tetrahedrons, and generating a high-quality three-dimensional grid unit to be filled.
High-quality three-dimensional grid generating device
Referring to fig. 6, a generating device for a high-quality three-dimensional grid according to an embodiment of the present invention includes:
and the identification module is used for identifying the low-quality three-dimensional grid cell area in the old three-dimensional grid.
Specifically, the old three-dimensional grid refers to an original three-dimensional grid, and since the three-dimensional grid cells are not optimized or identified, the existing three-dimensional grid cells have a sudden shape or an oversized three-dimensional grid cell, so that if the existing three-dimensional grid is to be improved, the low-quality three-dimensional grid cells in the existing three-dimensional grid need to be identified first, and in this embodiment, the low-quality three-dimensional grid in the existing three-dimensional grid is generally identified by artificial observation or a streaking method, a sizing method, or the like in an existing three-dimensional grid picture.
And the removing module is used for removing the low-quality three-dimensional grid cells in the old three-dimensional grid to obtain the cavity to be filled.
Specifically, after the low-quality three-dimensional grid cells in the old three-dimensional grid are identified, if the cleaning operation is performed only on the identified single low-quality three-dimensional grid cell, then the cavity to be filled is completely matched with the shape of the cleaned low-quality three-dimensional grid cell, and the quality of the whole three-dimensional grid still cannot be changed, so that the situation is changed, the peripheral associated three-dimensional grid cells associated with the identified single low-quality three-dimensional grid cell are cleaned together to obtain a larger cavity, and at the moment, the volume of the cavity is increased, and more operations can be performed, so that the old three-dimensional grid can be thoroughly improved, and finally the target high-quality three-dimensional grid can be obtained.
And the three-dimensional grid unit generating module is used for generating a high-quality three-dimensional grid unit to be filled according to the shape of the cavity to be filled.
Specifically, in the cavity formed after the low-quality three-dimensional volume mesh unit has been cleared, it is necessary to fill in the high-quality three-dimensional volume mesh unit of an appropriate shape and size so that the cavity is occupied by the high-quality three-dimensional volume mesh unit to finally generate the high-quality three-dimensional volume mesh unit.
And the filling module is used for filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid.
Specifically, since the cavity in the low-quality three-dimensional body mesh needs to be completely filled with the high-quality three-dimensional body mesh unit, the specific shape and the dimensional parameter of the high-quality three-dimensional body mesh unit need to be replaced according to the shape of the cavity to be filled.
Computer readable storage medium
The computer readable storage medium provided by the invention stores a high-quality three-dimensional grid generation program, and when the high-quality three-dimensional grid generation program is executed by a processor, the steps of the high-quality three-dimensional grid generation method provided by the invention are realized.
The computer readable storage medium provided by the invention firstly clears the low-quality three-dimensional grid cells in the identified old three-dimensional grid, and then makes the generated high-quality three-dimensional grid cells deficient, thus obtaining the high-quality three-dimensional grid. The three-dimensional grid cells in the high-quality three-dimensional grid are regular in shape and stable in size, and simulation conclusion obtained after simulation of three-dimensional mechanics, thermal and the like is realized by using the high-quality three-dimensional grid.
Electronic equipment
The electronic equipment provided by the invention comprises a memory and a processor, wherein the memory stores a high-quality three-dimensional grid generation program, and when the high-quality three-dimensional grid generation program is executed by the processor, the steps of the high-quality three-dimensional grid generation method provided by the invention are realized.
The electronic equipment provided by the invention firstly clears the low-quality three-dimensional grid cells in the identified old three-dimensional grid, and then makes the generated high-quality three-dimensional grid cells deficient, so that the high-quality three-dimensional grid can be obtained. The three-dimensional grid cells in the high-quality three-dimensional grid are regular in shape and stable in size, and simulation conclusion obtained after simulation of three-dimensional mechanics, thermal and the like is realized by using the high-quality three-dimensional grid.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a generating device of a high-quality three-dimensional body grid of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 7, the high-quality three-dimensional volume mesh generating apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 does not constitute a limitation of the generation apparatus of the high quality three-dimensional volume grid, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 7, an operating system, a data storage module, a network communication module, a user interface module, and a high-quality three-dimensional volume mesh generation program may be included in the memory 1005 as one type of storage medium.
In the high-quality three-dimensional mesh generation apparatus shown in fig. 7, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the high-quality three-dimensional mesh generation apparatus of the present invention may be provided in the high-quality three-dimensional mesh generation apparatus, and the high-quality three-dimensional mesh generation apparatus calls the high-quality three-dimensional mesh generation program stored in the memory 1005 through the processor 1001 and executes the high-quality three-dimensional mesh generation method provided by the embodiment of the present invention.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method for generating a high quality three-dimensional volumetric mesh, comprising the steps of:
identifying low quality three-dimensional volume mesh cell regions in a legacy three-dimensional volume mesh, comprising: identifying an initial low quality three-dimensional volume grid cell in the legacy three-dimensional volume grid; selecting a vertex based on the initial low-quality three-dimensional grid cell; determining a 1 st-level three-dimensional grid cell group in direct contact with each surface of the initial low-quality three-dimensional grid cell and marking a 1 st-level three-dimensional grid cell to be cleaned in the 1 st-level three-dimensional grid cell group, wherein an outer sphere of the 1 st-level three-dimensional grid cell to be cleaned contains the vertex; determining a 2 nd-level three-dimensional grid cell group which is in direct contact with each surface of the 1 st-level three-dimensional grid cell to be cleaned, and marking the 2 nd-level three-dimensional grid cell to be cleaned in the 2 nd-level three-dimensional grid cell group, wherein an outer sphere of the 2 nd-level three-dimensional grid cell to be cleaned contains the vertex; similarly, determining an nth level three-dimensional grid cell group which is in direct contact with each surface of the nth level three-dimensional grid cell to be cleaned, and marking the nth level three-dimensional grid cell to be cleaned in the nth level three-dimensional grid cell group, wherein an outer sphere of the nth level three-dimensional grid cell to be cleaned contains the vertex; determining an n+1-level three-dimensional grid cell group which is in direct contact with each surface of the n-level three-dimensional grid cell to be cleaned, and if the externally connected ball of each three-dimensional grid cell in the n+1-level three-dimensional grid cell group does not contain the vertex, ending the step of identifying the low-quality three-dimensional grid cell area in the old three-dimensional grid; wherein n is a natural number;
Removing low-quality three-dimensional grid cells in the old three-dimensional grid to obtain a cavity to be filled;
generating a high-quality three-dimensional grid unit to be filled according to the shape of the cavity to be filled;
and filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid.
2. The method for generating a high-quality three-dimensional volumetric mesh according to claim 1, wherein,
determining a 1 st-level three-dimensional volume grid cell group in direct contact with each face of the initial low-quality three-dimensional volume grid cell and marking 1 st-level three-dimensional volume grid cells to be cleaned in the 1 st-level three-dimensional volume grid cell group specifically comprises the following steps:
planning an outer ball of each three-dimensional grid cell in the 1 st-level three-dimensional grid cell group;
when the circumscribed sphere of the 1 st-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as a 1 st-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional grid unit as a three-dimensional grid unit to be reserved in the 1 st level, or not performing marking treatment;
determining a 2 nd-level three-dimensional volume grid cell group which is in direct contact with each surface of the 1 st-level three-dimensional volume grid cell to be cleaned, and marking the 2 nd-level three-dimensional volume grid cell in the 2 nd-level three-dimensional volume grid cell group specifically comprises the following steps:
Planning an outer ball of each three-dimensional grid cell in the 2 nd-level three-dimensional grid cell group;
when the outer sphere of the 2 nd-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as a 2 nd-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional grid unit as a 2 nd-level three-dimensional grid unit to be reserved, or not performing marking treatment;
determining an nth level three-dimensional volume grid cell group which is in direct contact with each surface of the nth level three-dimensional volume grid cell to be cleaned, and marking the nth level three-dimensional volume grid cell to be cleaned in the nth level three-dimensional volume grid cell group specifically comprises the following steps:
planning an outer ball of each three-dimensional grid cell in the nth-level three-dimensional grid cell group;
when the outer sphere of the nth-level three-dimensional grid unit contains the selected vertex, marking the current three-dimensional grid unit as an nth-level three-dimensional grid unit to be cleaned; otherwise, marking the current three-dimensional volume grid cell as an nth-level three-dimensional volume grid cell to be reserved, or not performing marking processing.
3. The method of claim 1, wherein selecting a vertex based on the initial low-quality three-dimensional volume mesh unit comprises:
Judging defect properties of the initial low-quality three-dimensional grid unit, wherein the defect properties of the initial low-quality three-dimensional grid unit comprise one of shape defects or oversized;
selecting a vertex based on the initial low-quality three-dimensional volume grid cell:
when the defect property of the initial low-quality three-dimensional grid unit is a shape defect, taking the sphere center of the outer sphere of the initial low-quality three-dimensional grid unit of the shape defect as a selected vertex;
when the defect property of the initial low-quality three-dimensional grid unit is that the size is oversized, taking the midpoint of the longest side of the oversized initial low-quality three-dimensional grid unit as a selected vertex.
4. The method of generating a high-quality three-dimensional volume mesh according to claim 1, wherein when an initial low-quality three-dimensional volume mesh unit in the legacy three-dimensional volume mesh is more than 2, the number of the selected vertices is the same as the number of the initial low-quality three-dimensional volume mesh units, the initial low-quality three-dimensional volume mesh units are distributed from high to low in terms of the priorities of the vertices selected from large to small, and if the initial low-quality three-dimensional volume mesh units are the same in terms of the volumes, the priorities of the vertices selected from large to small are distributed from high to low in terms of the numbers, the step of identifying the low-quality three-dimensional volume mesh unit region in the legacy three-dimensional volume mesh further comprises:
When a first level marks a three-dimensional body unit to be cleared, if an externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes;
after the first-level mark is finished for eliminating the three-dimensional body unit, judging whether vertexes corresponding to the marks of all the three-dimensional bodies with the marks fail or not, and eliminating the marks on the three-dimensional bodies if the vertexes fail;
when the three-dimensional body units to be cleared are marked at the second level, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked at the first level, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
after the second-level mark is finished, judging whether vertexes corresponding to the marks of all the three-dimensional bodies with the marks fail or not, and if so, clearing the marks on the three-dimensional bodies;
When the third level marks the three-dimensional body units to be cleared, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked at the first or second level, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
after the third-level mark is finished, judging whether vertexes corresponding to all the marked three-dimensional bodies fail or not, and if so, clearing the marks on the three-dimensional bodies;
and so on, when the three-dimensional body unit to be cleared is marked at the nth level, if the externally-connected ball of one three-dimensional body unit comprises a plurality of vertexes to be inserted, only the mark of the vertex with the highest priority is reserved on the three-dimensional body; meanwhile, marking other vertexes to be inserted contained in the three-dimensional external ball as failure vertexes; if a three-dimensional body to be marked is marked on the first layer, the second layer, the … … layer or the n-1 layer, judging the priority of the new mark and the old mark, and marking the vertex with lower priority as a failure vertex;
And after the three-dimensional body unit to be cleared is marked at the nth level, judging whether the vertex corresponding to the mark of all the three-dimensional bodies with the marks is invalid, and if so, clearing the mark on the three-dimensional body.
5. The method of generating a high quality three-dimensional volumetric mesh according to claim 1, wherein the shape of the three-dimensional volumetric mesh is tetrahedral;
the tetrahedral mesh cells in the 1 st hierarchy tetrahedral mesh cell group in direct contact with each face of the initial low quality tetrahedral mesh cell are tetrahedral mesh cells in direct contact with four faces of the initial low quality tetrahedral mesh cell;
the tetrahedral grid cells in the 2 nd-level tetrahedral grid cell group which are in direct contact with each face of the 1 st-level tetrahedral grid cell to be cleaned are tetrahedral grid cells which are in direct contact with each face of the 1 st-level tetrahedral grid cell to be cleaned;
with this, the nth level tetrahedral mesh unit group is obtained.
6. The method of generating a high quality three-dimensional volumetric mesh according to claim 5, wherein said generating a high quality three-dimensional volumetric mesh unit according to the shape of the cavity to be filled comprises the steps of:
Connecting the selected vertexes with the vertexes of the edge triangle of the cavity to be filled respectively to obtain a plurality of tetrahedron shapes; and constructing tetrahedrons to be filled in a 1:1 mode based on the tetrahedron shapes, and generating a high-quality three-dimensional grid unit to be filled.
7. A high-quality three-dimensional grid generation device, comprising:
an identification module for identifying low quality three-dimensional volume mesh cell regions in a legacy three-dimensional volume mesh, comprising: identifying an initial low quality three-dimensional volume grid cell in the legacy three-dimensional volume grid; selecting a vertex based on the initial low-quality three-dimensional grid cell; determining a 1 st-level three-dimensional grid cell group in direct contact with each surface of the initial low-quality three-dimensional grid cell and marking a 1 st-level three-dimensional grid cell to be cleaned in the 1 st-level three-dimensional grid cell group, wherein an outer sphere of the 1 st-level three-dimensional grid cell to be cleaned contains the vertex; determining a 2 nd-level three-dimensional grid cell group which is in direct contact with each surface of the 1 st-level three-dimensional grid cell to be cleaned, and marking the 2 nd-level three-dimensional grid cell to be cleaned in the 2 nd-level three-dimensional grid cell group, wherein an outer sphere of the 2 nd-level three-dimensional grid cell to be cleaned contains the vertex; similarly, determining an nth level three-dimensional grid cell group which is in direct contact with each surface of the nth level three-dimensional grid cell to be cleaned, and marking the nth level three-dimensional grid cell to be cleaned in the nth level three-dimensional grid cell group, wherein an outer sphere of the nth level three-dimensional grid cell to be cleaned contains the vertex; determining an n+1-level three-dimensional grid cell group which is in direct contact with each surface of the n-level three-dimensional grid cell to be cleaned, and if the externally connected ball of each three-dimensional grid cell in the n+1-level three-dimensional grid cell group does not contain the vertex, ending the step of identifying the low-quality three-dimensional grid cell area in the old three-dimensional grid; wherein n is a natural number;
The removing module is used for removing low-quality three-dimensional grid cells in the old three-dimensional grid to obtain a cavity to be filled;
the three-dimensional grid unit generating module is used for generating a high-quality three-dimensional grid unit to be filled according to the shape of the cavity to be filled;
and the filling module is used for filling the high-quality three-dimensional grid unit into the cavity to be filled to obtain the high-quality three-dimensional grid.
8. A computer-readable storage medium, wherein a high-quality three-dimensional volume mesh generation program is stored on the computer-readable storage medium, and when executed by a processor, the high-quality three-dimensional volume mesh generation program realizes the steps of the high-quality three-dimensional volume mesh generation method according to any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, wherein the memory has stored thereon a high quality three-dimensional volume mesh generation program, which when executed by the processor, implements the steps of the high quality three-dimensional volume mesh generation method of any one of claims 1-6.
CN202310318855.8A 2023-03-20 2023-03-28 Method, device, medium and equipment for generating high-quality three-dimensional grid Active CN116401916B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2023102750923 2023-03-20
CN202310275092 2023-03-20

Publications (2)

Publication Number Publication Date
CN116401916A CN116401916A (en) 2023-07-07
CN116401916B true CN116401916B (en) 2024-01-26

Family

ID=87019216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310318855.8A Active CN116401916B (en) 2023-03-20 2023-03-28 Method, device, medium and equipment for generating high-quality three-dimensional grid

Country Status (1)

Country Link
CN (1) CN116401916B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5214752A (en) * 1991-01-22 1993-05-25 International Business Machines Corporation Point placement method for use in a three-dimensional automatic mesh generation system
CN110633282A (en) * 2019-09-18 2019-12-31 四川九洲空管科技有限责任公司 Airspace resource multistage three-dimensional gridding method and tool
CN113128095A (en) * 2021-04-27 2021-07-16 中国科学院武汉岩土力学研究所 Method and device for constructing three-dimensional grid model
CN114494649A (en) * 2022-04-06 2022-05-13 中汽研(天津)汽车工程研究院有限公司 Finite element meshing geometric cleaning method, device and storage medium
CN114510775A (en) * 2021-12-30 2022-05-17 电子科技大学 Complex model three-dimensional space curved grid division method
CN114970216A (en) * 2022-07-29 2022-08-30 中国人民解放军战略支援部队航天工程大学 Electromagnetic environment visual expression method based on subdivision grids
CN115564923A (en) * 2022-09-28 2023-01-03 度小满科技(北京)有限公司 Three-dimensional model processing method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019161218A1 (en) * 2018-02-16 2019-08-22 Coventor, Inc. System and method for multi-material mesh generation from fill-fraction voxel data
US11409024B2 (en) * 2018-06-22 2022-08-09 Exxonmobil Upstream Research Company Methods and systems for generating simulation grids via zone by zone mapping from design space

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5214752A (en) * 1991-01-22 1993-05-25 International Business Machines Corporation Point placement method for use in a three-dimensional automatic mesh generation system
CN110633282A (en) * 2019-09-18 2019-12-31 四川九洲空管科技有限责任公司 Airspace resource multistage three-dimensional gridding method and tool
CN113128095A (en) * 2021-04-27 2021-07-16 中国科学院武汉岩土力学研究所 Method and device for constructing three-dimensional grid model
CN114510775A (en) * 2021-12-30 2022-05-17 电子科技大学 Complex model three-dimensional space curved grid division method
CN114494649A (en) * 2022-04-06 2022-05-13 中汽研(天津)汽车工程研究院有限公司 Finite element meshing geometric cleaning method, device and storage medium
CN114970216A (en) * 2022-07-29 2022-08-30 中国人民解放军战略支援部队航天工程大学 Electromagnetic environment visual expression method based on subdivision grids
CN115564923A (en) * 2022-09-28 2023-01-03 度小满科技(北京)有限公司 Three-dimensional model processing method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Yang Jun.The_study_and_realization_of_automatic_mesh_generation_based_on_electromagnetic_simulation_of_FDTD.《2009 3rd IEEE International Symposium on Microwave, Antenna, Propagation and EMC Technologies for Wireless Communications》.2009,第1242-1245页. *
刘飞 ; 钟易成 ; .面向对象的三维非结构网格生成软件实现.机械制造与自动化.2010,(第04期),全文. *

Also Published As

Publication number Publication date
CN116401916A (en) 2023-07-07

Similar Documents

Publication Publication Date Title
US11275353B2 (en) Creating a voxel representation of a three dimensional (3-D) object
Zhou et al. Multiresolution tetrahedral framework for visualizing regular volume data
Lauterbach et al. Fast BVH construction on GPUs
JP4463948B2 (en) Programmable visualization device for processing graphic data
US20170015057A1 (en) Preparing a Polygon Mesh for Printing
US20080246766A1 (en) Numerical analysis mesh generating method and apparatus
US8773422B1 (en) System, method, and computer program product for grouping linearly ordered primitives
CN105389850A (en) Novel visibility generation method for large-scale three-dimensional scene
US20140306955A1 (en) Voxelization techniques
CN105405166A (en) LOD model generation method based on linear quadtree
KR20130016120A (en) System, method, and computer-readable recording medium for constructing an acceleration structure
KR100959349B1 (en) A method for accelerating terrain rendering based on quadtree using graphics processing unit
CN114490011A (en) Parallel acceleration implementation method of N-body simulation in heterogeneous architecture
CN111489447A (en) Right-angle grid adaptive modeling method suitable for lattice Boltzmann method
JP5372241B2 (en) Image display device
CN115601523A (en) Lightweight processing method, system, equipment and storage medium for building information model
Drees et al. Hierarchical random walker segmentation for large volumetric biomedical images
CN117315192B (en) Three-dimensional grid model simplification method for Chinese space station
CN116401916B (en) Method, device, medium and equipment for generating high-quality three-dimensional grid
CN112862942B (en) Physical special effect simulation method, device, electronic equipment and storage medium
CN111599015B (en) Spatial polygon gridding filling method and device under constraint condition
JP7177020B2 (en) Image processing device, method and program
CN109741421B (en) GPU-based dynamic graph coloring method
CN112989746B (en) Integrated circuit simulation coarse grain parallel method and device for multi-thread management
Doyle et al. Evaluation of a BVH construction accelerator architecture for high-quality visualization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant