CN118171547A - Automatic grid generation method, device, equipment and storage medium - Google Patents

Automatic grid generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN118171547A
CN118171547A CN202410607641.7A CN202410607641A CN118171547A CN 118171547 A CN118171547 A CN 118171547A CN 202410607641 A CN202410607641 A CN 202410607641A CN 118171547 A CN118171547 A CN 118171547A
Authority
CN
China
Prior art keywords
grid
geometric surface
target object
geometric
obtaining
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.)
Pending
Application number
CN202410607641.7A
Other languages
Chinese (zh)
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.)
Shenzhen Shifeng Technology Co ltd
Original Assignee
Shenzhen Shifeng 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 Shenzhen Shifeng Technology Co ltd filed Critical Shenzhen Shifeng Technology Co ltd
Priority to CN202410607641.7A priority Critical patent/CN118171547A/en
Publication of CN118171547A publication Critical patent/CN118171547A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

The application discloses an automatic grid generation method, device, equipment and storage medium, relating to the technical field of computational mechanics and grid generation, wherein the method comprises the following steps: obtaining a first geometric surface and a second geometric surface of a target object through the target object; obtaining a rotation matrix according to the first geometric surface and the second geometric surface; performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface; an overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface. According to the application, the rotation matrix is automatically constructed by calculating the included angle between the two geometric surfaces, and the grid unit on one geometric surface is mapped to the other geometric surface through the rotation matrix, so that the grid generation of rotation matching control is completed, the problem of automatic grid generation when the rotation matrix is not given is solved, and the efficiency of automatic grid generation based on rotation matching is improved.

Description

Automatic grid generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of computational mechanics and grid generation, and in particular, to an automated grid generation method, apparatus, device, and storage medium.
Background
With the development of the industrial manufacturing field, the computational mechanics plays a key role therein. Computational mechanics is the discipline of applying computational methods to study phenomena that obey the principles of mechanics, and grids play a vital role in computational mechanics. In the existing mainstream numerical simulation method, a grid is used as a calculation object in the manner of finite elements, finite volumes, boundary elements and the like. The success or failure of the simulation calculation, as well as the accuracy, precision and performance of the calculation result are directly determined by the quality of the grid. In finite element analysis, the grids of the different parts may need to be aligned to ensure continuity of the model. For example, in a contact problem, the grid of contact surfaces should be aligned in order to accurately simulate the contact behavior. Therefore, in the rotational symmetry analysis of some rotation models, it is necessary to generate a uniform grid on the periodic surface, that is, grid generation under rotation matching control.
The existing method obtains a consistent grid unit based on grid unit rotation, and a rotation matrix is required to be given to meet rotation conditions, so that automatic grid generation cannot be achieved.
Therefore, how to automatically generate the grid when the rotation matrix is not given is a problem that needs to be solved at present.
Disclosure of Invention
The application mainly aims to provide an automatic grid generation method, an automatic grid generation device, automatic grid generation equipment and a storage medium, and aims to solve the technical problem of how to automatically generate grids when a rotation matrix is not given.
To achieve the above object, the present application proposes an automated mesh generation method, the method comprising:
Obtaining a first geometric surface and a second geometric surface of a target object through the target object, wherein the height of the first geometric surface in a coordinate system is higher than that of the second geometric surface;
obtaining a rotation matrix according to the first geometric surface and the second geometric surface;
performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface;
An overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface.
In an embodiment, the step of obtaining a rotation matrix from the first geometrical plane and the second geometrical plane comprises:
acquiring a coordinate system in the target object;
Taking a geometric point, of which the distance between the first geometric surface and the second geometric surface and the origin of the coordinate system is a preset distance, as a datum point, and obtaining a first geometric surface datum point and a second geometric surface datum point;
a rotation matrix is derived based on the first geometric surface datum and the second geometric surface datum.
In an embodiment, the step of obtaining a rotation matrix based on the first geometric surface datum and the second geometric surface datum comprises:
Obtaining a first vector and a second vector based on the first geometric surface datum point and the second geometric surface datum point;
acquiring a vector included angle between the first vector and the second vector;
and obtaining a rotation matrix according to the vector included angle.
In an embodiment, the step of meshing the first geometric surface to obtain mesh data of the first geometric surface includes:
obtaining boundary points of a first geometric surface, and obtaining a bounding box according to the boundary points;
Generating a hyper triangle based on the bounding box;
obtaining an initial triangular grid according to the hyper triangle;
inserting the boundary points into the initial triangular meshes one by one to obtain target triangular meshes;
And splitting the target triangular mesh through a preset rule to obtain mesh data of the first geometric surface.
In an embodiment, the step of generating the global mesh of the target object based on the mesh data of the rotation matrix, the second geometrical plane and the first geometrical plane comprises:
mapping a first grid point in the grid data of the first geometrical surface to the second geometrical surface according to the rotation matrix to obtain a second grid point on the second geometrical surface;
connecting the second grid points according to the first grid units in the grid data to obtain second grid units of a second geometric surface;
Obtaining a surface grid unit of the target object through the grid data and the second grid unit;
an overall grid of the target object is generated based on the face grid cells.
In an embodiment, the step of obtaining the face grid cell of the target object from the grid data and the second grid cell includes:
obtaining a first boundary point and a first line unit of the first geometrical surface and a second boundary point and a second line unit of the second geometrical surface through the grid data and the second grid unit;
And taking the first boundary point, the first line unit, the second boundary point and the second line unit as constraints, and performing grid subdivision on the rest geometric surfaces of the target object to obtain a surface grid unit of the target object.
In an embodiment, the step of generating the global grid of the target object based on the face grid cells comprises:
And taking the surface grid unit as constraint, and carrying out grid subdivision on the target object to obtain the whole grid of the target object.
In addition, to achieve the above object, the present application also proposes an automated mesh generation apparatus, the apparatus comprising:
the object dividing module is used for obtaining a first geometric surface and a second geometric surface of the target object through the target object, wherein the height of the first geometric surface in a coordinate system is higher than that of the second geometric surface;
The matrix construction module is used for obtaining a rotation matrix according to the first geometric surface and the second geometric surface;
The mesh subdivision module is used for performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface;
and the grid generation module is used for generating an integral grid of the target object based on the rotation matrix, the second geometric surface and the grid data of the first geometric surface.
In addition, to achieve the above object, the present application also proposes an automated mesh generation apparatus, the apparatus comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the automated grid generation method as described above.
Furthermore, to achieve the above object, the present application also proposes a storage medium being a computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the steps of an automated grid generation method as described above.
Furthermore, to achieve the above object, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of an automated grid generation method as described above.
The application provides an automatic grid generation method, which comprises the steps of obtaining a first geometric surface and a second geometric surface of a target object through the target object; obtaining a rotation matrix according to the first geometric surface and the second geometric surface; performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface; an overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface. In summary, the application automatically constructs the rotation matrix by calculating the included angle between the two geometric surfaces, and maps the grid unit on one geometric surface to the other geometric surface through the rotation matrix, thereby completing the grid generation of the rotation matching control, solving the problem of automatically generating the grid when the rotation matrix is not given, and improving the efficiency of automatic grid generation based on the rotation matching.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a first embodiment of an automated grid generation method according to the present application;
FIG. 2 is a flow chart of a second embodiment of an automated grid generation method according to the present application;
FIG. 3 is a schematic diagram of a model of an automated mesh generation target object in an embodiment of a mesh generation method of the present application;
FIG. 4 is a flow chart of a third embodiment of an automated grid generation method according to the present application;
FIG. 5 is a flow chart of a fourth embodiment of an automated grid generation method according to the present application;
FIG. 6 is a schematic diagram of a surface mesh model of an automated mesh generation target object in an embodiment of a mesh generation method of the present application;
FIG. 7 is a schematic diagram of an overall grid model of an automated grid generation target object in an embodiment of a grid generation method of the present application;
FIG. 8 is a schematic block diagram of an automated grid generation apparatus according to an embodiment of the present application;
fig. 9 is a schematic device structure diagram of a hardware running environment related to an automatic grid generating method in an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the technical solution of the present application and are not intended to limit the present application.
For a better understanding of the technical solution of the present application, the following detailed description will be given with reference to the drawings and the specific embodiments.
The main solutions of the embodiments of the present application are: obtaining a first geometric surface and a second geometric surface of a target object through the target object, wherein the height of the first geometric surface in a coordinate system is higher than that of the second geometric surface; obtaining a rotation matrix according to the first geometric surface and the second geometric surface; performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface; an overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface.
In finite element analysis, the grids of the different parts may need to be aligned to ensure continuity of the model. For example, in a contact problem, the grid of contact surfaces should be aligned in order to accurately simulate the contact behavior. Therefore, in the rotational symmetry analysis of some rotation models, it is necessary to generate a uniform grid on the periodic surface, that is, grid generation under rotation matching control. The existing method obtains a consistent grid unit based on grid unit rotation, and a rotation matrix is required to be given to meet rotation conditions, so that automatic grid generation cannot be achieved. Therefore, how to automatically generate the grid when the rotation matrix is not given is a problem that needs to be solved at present.
According to the application, the rotation matrix is automatically constructed by calculating the included angle between the two geometric surfaces, and the grid unit on one geometric surface is mapped to the other geometric surface through the rotation matrix, so that the grid generation of rotation matching control is completed, the problem of automatic grid generation when the rotation matrix is not given is solved, and the efficiency of automatic grid generation based on rotation matching is improved.
The execution subject of the present embodiment may be an automated grid generation system, or may be a computing service device having data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, or an electronic device capable of implementing the above-described automated grid generation function, which is not particularly limited in this embodiment. This embodiment and the following embodiments will be described below by taking an automated grid generation system as an example.
Based on this, an embodiment of the present application provides an automated grid generation method, and referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the automated grid generation method of the present application.
In this embodiment, the automatic grid generation method includes steps S10 to S40:
Step S10: and obtaining a first geometric surface and a second geometric surface of the target object through the target object, wherein the height of the first geometric surface in a coordinate system is higher than that of the second geometric surface.
It should be noted that, the target object in this embodiment generally refers to a geometric object model for performing rotational symmetry processing, and such a model is largely applied to practical engineering. In particular, two main geometrical surfaces of the target object, namely a first geometrical surface and a second geometrical surface, need to be determined before proceeding to the subsequent steps. The first and second geometric surfaces of the target object are selected by a user in an automated grid generation system, wherein the first geometric surface has a height in a coordinate system that is higher than the height of the second geometric surface. The terms "first geometry" and "second geometry" in this step are terms for distinguishing between geometries of different heights or positions, and are not intended to have a particular sequential or fixed meaning, but are used only to describe steps in a method.
Step S20: and obtaining a rotation matrix according to the first geometric surface and the second geometric surface.
It should be noted that the rotation matrix is a concept in linear algebra, and is used to describe the rotation of the direction and angle of one vector or coordinate system relative to another vector or coordinate system, and is represented by a 3x3 matrix in this example, where the rotation matrix is used to describe the relative positional relationship between different geometric surfaces of the target object. Additionally, the rotation matrix may be obtained according to the first geometric surface and the second geometric surface, which may be obtained by a quaternion calculation method after constructing a normal vector between the two geometric surfaces according to the first geometric surface and the second geometric surface, or may be obtained by other methods, which is not limited in this embodiment.
Step S30: and performing grid subdivision on the first geometric surface to obtain grid data of the first geometric surface.
It should be noted that mesh subdivision is a process of discretizing a continuous surface or volume into a series of small cells. The small cells may be triangular, quadrilateral, or other polygonal shapes. In this embodiment, a triangular mesh unit is mainly used (the mesh division method adopted is the Delaunay method), and because the triangular mesh unit has a simpler structure, is easy to process and calculate, and can improve the efficiency of mesh generation.
In addition, the mesh data of the first geometric surface refers to data obtained by performing mesh division processing on the first geometric surface, where the mesh data includes: at least one of grid cells, grid points, grid lines, and grid patches.
In a possible implementation manner, the step S30 specifically includes:
Step S301: obtaining boundary points of a first geometric surface, and obtaining a bounding box according to the boundary points;
The boundary point is a point on the edge of the geometric surface and is obtained from the boundary curve of the target object, and the bounding box is a smallest cuboid that can contain the geometric surface. Additionally, it should be noted that assuming that the object a is created by some CAD (computer aided design) software or modeling tool, its geometric surface will typically have well-defined boundaries. These boundaries may be straight lines, circular arcs, spline curves, or other types of curves. These curves define the boundaries of the aperture that may exist in the interior and exterior shape of object a, from which an automated grid generation system may sample along the curves to generate a series of discrete points. These points will be used in the subsequent triangulation process.
Step S302: generating a hyper triangle based on the bounding box;
after obtaining the bounding box, three non-coplanar vertices of the bounding box are selected as vertices of the hyper-triangle, thereby generating two hyper-triangles. The two supertriangles are used as the basis for the subsequent generation of the initial triangular mesh.
It will be appreciated that the hyper-triangle serves as a starting point for the initial mesh, ensuring that the subsequently generated triangular mesh covers the entire first geometry.
Step S303: obtaining an initial triangular grid according to the hyper triangle;
it should be noted that a super triangle is a special triangle, and its three vertices are not coplanar, so it can be used as a starting patch in a three-dimensional space. The initial triangular mesh refers to a triangular mesh based on two supertriangles.
Step S304: inserting the boundary points into the initial triangular meshes one by one to obtain target triangular meshes;
In this step, the target triangle mesh means that a new Delaunay triangle mesh is obtained by using the Bowyer-Watson algorithm, and the inserted boundary points are deleted, and triangles connected to the inserted boundary points are deleted, so that the Delaunay triangle mesh about all the boundary points is obtained. The Bowyer-Watson algorithm is an incremental algorithm, a specific implementation of the Delaunay algorithm, and both are consistent in the goal, i.e., construct the Delaunay triangulation.
Additionally, it should be noted that for a triangle in triangulation, if its circumscribed circle satisfies the open circle property, it is called a Delaunay triangle. For one edge in triangulation, if a circumscribed circle exists to meet the empty circle property, the edge is called a Delaunay edge. For an edge of one triangle belonging to two triangles, the vertex that does not contain any of the triangles if there is a circumcircle is called a local Delaunay edge. If an edge belongs to only one triangle, the edge also belongs to a local Delaunay edge.
Step S305: and splitting the target triangular mesh through a preset rule to obtain mesh data of the first geometric surface.
It should be noted that, the preset rule refers to inserting the boundary points into the initial triangle mesh one by one, and for each inserted boundary point, adjusting the triangle mesh by applying the Delaunay algorithm to ensure that each formed triangle meets the Delaunay condition. Triangles and vertices associated with the hyper-triangles are deleted, resulting in Delaunay triangulation based only on boundary points, the center of gravity or other internal points of the triangle are selected among the triangles within the geometry according to the size conditions set in the automated mesh generation system (this is not a limitation in this embodiment), and these points are inserted into the triangular mesh. And finally, for each inserted internal point, adjusting the triangular mesh by using a Delaunay algorithm until no internal point needs to be inserted, and obtaining a final Delaunay triangulation result.
In this embodiment, new points are continuously inserted into the triangular mesh and the new triangular mesh is created by reconnecting until all points are added to the mesh. When a new point is inserted each time, all triangles with circumscribed circles containing the newly added nodes are deleted, and the nodes of the triangles are connected with the newly added nodes to form a new Delaunay triangle grid. By continuously repeating the process, the optimization of the quality of the triangular grid is realized, and the quality of grid data is improved.
Step S40: an overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface.
It should be noted that the whole grid of the target object refers to a complete grid model composed of a plurality of interconnected small units (such as triangles), and the model accurately describes the three-dimensional shape and surface details of the target object. The mesh model is obtained by mesh dissection of all geometric surfaces of the target object and transformation and combination (such as rotation, translation, scaling and the like) of the mesh data after dissection.
The embodiment provides an automatic grid generation method, which comprises the steps of obtaining a first geometric surface and a second geometric surface of a target object through the target object; obtaining a rotation matrix according to the first geometric surface and the second geometric surface; performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface; an overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface. As can be seen from the above, in this embodiment, the rotation matrix is automatically constructed by calculating the included angle between two geometric surfaces, and the grid unit on one geometric surface is mapped to the other geometric surface through the rotation matrix, so that the grid generation controlled by rotation matching is completed, the problem of automatically generating the grid when the rotation matrix is not given is solved, and the efficiency of automatic grid generation based on rotation matching is improved.
In the second embodiment of the present application, the same or similar content as in the first embodiment of the present application may be referred to the description above, and will not be repeated. On this basis, please refer to fig. 2, fig. 2 is a flowchart of a second embodiment of the automated grid generation method of the present application, and step S20 further includes:
step S201: and acquiring a coordinate system in the target object.
In this step, a reference coordinate system, such as a cartesian rectangular coordinate system, a planar polar coordinate system, a cylindrical coordinate system, and a spherical coordinate system, of the interior of the target object needs to be determined in the automated grid generating system, which is not limited in this example. This coordinate system may be any three-dimensional coordinate system, and in this example, for ease of description and calculation, cartesian coordinate systems are used below. The process of acquiring the coordinate system involves determining the position of the origin of coordinates, the direction and unit length of coordinate axes, and the like. For example: for a symmetrical object model, we can choose the center of the object model as the origin of coordinates, with the horizontal direction as the X-axis and the Y-axis, and the vertical direction as the Z-axis, to create a cartesian coordinate system. Additionally, it should be noted that, referring to fig. 3, fig. 3 is a schematic diagram of a model of an automated grid generation target object in an embodiment of the grid generation method according to the present application.
It will be appreciated that, because the rotation matrices are calculated in different standard rules, a unified reference frame can be provided for subsequent reference point selection and rotation matrix calculation after the coordinate system is acquired in step S201, so as to determine the positions of the reference points and calculate the rotation matrices.
Step S202: and taking the geometric points, of which the distances between the first geometric surface and the second geometric surface and the origin of the coordinate system are preset, as datum points, and obtaining a first geometric surface datum point and a second geometric surface datum point.
It should be noted that the reference point is a reference point for describing the position and direction of the geometric surface. The preset distance refers to the closest distance, and in this embodiment, the reference point is the geometric point closest to the origin of the coordinate system. For example, in an actual target object, two straight lines perpendicular to the first geometric surface and the second geometric surface are respectively made according to the origin of the coordinate system, and the intersection point between the straight lines and the two planes is the reference point closest to the origin of the coordinate system.
Step S203: a rotation matrix is derived based on the first geometric surface datum and the second geometric surface datum.
In this step, the automated mesh generation system may calculate the rotation matrix of the first geometric surface with respect to the second geometric surface by constructing the quaternion by using the coordinate information of the first geometric surface reference point and the second geometric surface reference point. Assuming that the coordinates of the first geometric surface reference point are (x 1, y1, z 1) and the coordinates of the second geometric surface reference point are (x 2, y2, z 2), the automated mesh generation system may derive a rotation matrix by calculating a vector between the two points and the origin.
In this embodiment, the accuracy and efficiency of the automated grid are improved by determining the first geometric surface reference point and the second geometric surface reference point in the coordinate system and calculating the rotation matrix according to the first geometric surface reference point and the second geometric surface reference point, so that the automated grid generation system can correctly rotate and map the grid data of the first geometric surface onto the second geometric surface.
In the third embodiment of the present application, the same or similar contents as those of the first and second embodiments of the present application will be described with reference to the foregoing, and will not be repeated. On this basis, please refer to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of the automated grid generation method according to the present application, and step S203 further includes:
step A10: a first vector and a second vector are derived based on the first geometric surface datum and the second geometric surface datum.
It should be noted that, since the coordinates of the first geometric surface reference point and the second geometric surface reference point are known, the vector from the first geometric surface reference point to the origin of coordinates and the vector from the second geometric surface reference point to the origin of coordinates, that is, the first vector and the second vector, are calculated according to the coordinates of the two reference points. For example, assuming that the coordinates of the first geometric surface reference point a are (0, 1), the coordinates of the second geometric surface reference point B are (0, -1), and the origin coordinates O are (0, 0), the first vector OA is (0, 1), and the second vector OB is (0, -1).
Step A20: and acquiring a vector included angle between the first vector and the second vector.
The vector included angle is calculated according to a calculation formula of the first vector and the second vector using vector point multiplication and modulo. The calculation formula of the included angle isWhere A and B are the first vector and the second vector, respectively, θ is the angle between the two vectors, represents a point multiplication, and A and B represent the modulus (length) of the two vectors, respectively.
It can be understood that, because the vector included angle reflects the relative positional relationship between the two vectors, in order to facilitate calculation of the rotation matrix, the automatic grid generating system can determine the corresponding rotation matrix according to the vector included angle, and can effectively improve the efficiency of calculating the rotation matrix.
Step A30: and obtaining a rotation matrix according to the vector included angle.
It should be noted that, in this step, the quaternion principle is adopted for calculating the rotation matrix according to the vector included angle. In a specific calculation, the rotation matrix is a 3x3 matrix. Assuming that the quaternion q is a four-dimensional vector, let the first vector v1 rotate by an angle θ around the vector u to the second vector v2, u being perpendicular to the v1-v2 plane, i.e. u is equal to the cross product of v1 and v2, the quaternion q can be expressed as the following equation 1:
(1)
The rotation matrix R can be expressed as the following formula 2:
(2)
In this embodiment, the rotation matrix for aligning the two geometric surfaces is calculated by obtaining the vector angle between the first vector and the second vector. The process not only improves the accuracy of calculating the rotation matrix, but also improves the automation degree of the subsequent grid generation, so that the whole grid generation process is more efficient.
In the fourth embodiment of the present application, the same or similar contents as those of the above-described embodiments can be referred to the above description, and the description thereof will not be repeated. On this basis, please refer to fig. 5, fig. 5 is a flowchart illustrating a fourth embodiment of the automated grid generation method according to the present application, and the step S40 further includes:
step S401: and mapping a first grid point in the grid data of the first geometric surface to the second geometric surface according to the rotation matrix to obtain a second grid point on the second geometric surface.
Note that grid points are basic elements constituting a grid, that is, intersections between grids, indicating specific positions of grid points on a geometric plane. In this step, rotation and translation transformation are performed on each first grid point in the first geometric surface grid data using the rotation matrix calculated in the previous step, thereby obtaining a corresponding second grid point on the second geometric surface.
Step S402: and connecting the second grid points according to the first grid cells in the grid data to obtain second grid cells with a second geometric surface.
Based on the second grid point obtained in step S401, grid points on the second geometric surface are connected according to the topological connection relationship of the first grid unit in the first geometric surface grid data, and the second grid unit on the second geometric surface is obtained.
Step S403: and obtaining the surface grid unit of the target object through the grid data and the second grid unit.
The surface mesh unit refers to a polygonal area formed by vertices and edges on the surface of the three-dimensional model or the geometric body. These polygonal areas may be triangles, quadrilaterals, or other polygonal shapes, depending on the algorithm and settings of the mesh generation. The surface mesh unit of the target object herein refers to the surface mesh unit of all geometric surfaces of the target object. Additionally, it should be noted that, referring to fig. 6, fig. 6 is a schematic diagram of a surface mesh model of an automated mesh generating target object in an embodiment of the mesh generating method according to the present application.
In a possible implementation manner, the step S403 specifically includes:
Step B10: obtaining boundary points and line units of the first geometric surface and boundary points and line units of the second geometric surface through the grid data and the grid units of the second geometric surface;
The line unit is a line segment formed by connecting two nodes, and is one of basic elements constituting a grid, and is used for discretizing a continuum or structure so as to perform numerical calculation.
It will be appreciated that this step is operative to enable the system to understand the boundary extent of the first and second geometrical surfaces of the object by obtaining the boundary point and line elements of said first geometrical surface and the boundary point and line elements of said second geometrical surface, providing the necessary constraints for the subsequent mesh subdivision.
Step B20: and taking boundary points and line units of the first geometric surface and boundary points and line units of the second geometric surface as constraints, and carrying out grid subdivision on the rest geometric surfaces of the target object to obtain surface grid units of the target object.
In the specific step, according to the extracted boundary point and line unit information, an appropriate mesh subdivision algorithm (such as Delaunay subdivision, a propelling wavefront method, etc., which is not limited in this embodiment) is adopted to mesh the rest geometric surfaces of the target object, so as to obtain the surface mesh units of all geometric surfaces of the target object.
Additionally, it should be noted that the remaining geometric surfaces refer to all geometric surfaces of the target object except the first geometric surface and the second geometric surface.
In the embodiment, the accurate control of grid subdivision on the rest geometric surfaces of the target object is realized by extracting and utilizing the boundary points and line units of the first geometric surface and the second geometric surface, so that the continuity and consistency of the grid of the whole target object are ensured, and the accuracy and quality of grid generation are improved.
Step S404: an overall grid of the target object is generated based on the face grid cells.
The whole grid of the target object refers to a grid structure obtained by discretizing the target object, and the grid structure covers the whole surface and the inside of the target object.
In a possible implementation manner, the step S404 specifically includes:
step C10: and taking the surface grid unit as constraint, and carrying out grid subdivision on the target object to obtain the whole grid of the target object.
In the specific step, all the surface grids of the target object are required to be used as boundary constraints, and the target object is split through a grid splitting algorithm to obtain a final overall grid. Additionally, it should be noted that, referring to fig. 7, fig. 7 is a schematic diagram of an overall grid model of an automated grid generation target object in an embodiment of the grid generation method according to the present application.
In the embodiment, by taking all the grid cells of the surface of the target object as constraint conditions, the grid of the target object is ensured to be consistent with the known grid data at the boundary when the whole grid subdivision is carried out on the target object, errors caused by discontinuous or inconsistent grids are avoided, and the accuracy and quality of grid generation are improved.
In the embodiment, grid point mapping is performed on the geometric surface of the target object through the rotation matrix, a grid unit and a surface grid unit are constructed, boundary points and line units of the target object are extracted, accurate subdivision of the grid of the target object is achieved by taking the boundary points and the line units as constraints, and the accuracy and quality of overall grid generation are improved.
The present application also provides an automated grid generating device, please refer to fig. 8, which includes:
An object dividing module 10, configured to obtain, by a target object, a first geometric surface and a second geometric surface of the target object, where a height of the first geometric surface in a coordinate system is higher than a height of the second geometric surface;
A matrix construction module 20, configured to obtain a rotation matrix according to the first geometric surface and the second geometric surface;
a mesh generation module 30, configured to generate mesh data of the first geometric surface by performing mesh generation on the first geometric surface;
A grid generating module 40, configured to generate an overall grid of the target object based on the rotation matrix, the second geometric surface, and the grid data of the first geometric surface.
The automatic grid generation device provided by the application can solve the technical problem of automatically generating grids when a rotation matrix is not given by adopting the automatic grid generation method in the embodiment. Compared with the prior art, the automatic grid generating device has the same beneficial effects as the automatic grid generating method provided by the embodiment, and other technical features in the automatic grid generating device are the same as the features disclosed by the method of the embodiment, and are not repeated herein.
The present application provides an automated grid generation apparatus, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the automated grid generation method of the first embodiment described above.
Referring now to FIG. 9, a schematic diagram of an automated grid generating device suitable for use in implementing embodiments of the present application is shown. The automated mesh generating device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal DIGITAL ASSISTANT: personal digital assistants), PADs (Portable Application Description: tablet computers), PMPs (Portable MEDIA PLAYER: portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The automated grid generating device shown in fig. 9 is only one example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 9, the automated grid generating apparatus may include a processing device 1001 (e.g., a central processor, a graphics processor, etc.) which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data required for the operation of the automated mesh generating device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a Liquid crystal display (LCD: liquid CRYSTAL DISPLAY), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means 1009 may allow the automated mesh generating device to communicate wirelessly or by wire with other devices to exchange data. While an automated grid generating device having various systems is shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the disclosed embodiment of the application are performed when the computer program is executed by the processing device 1001.
The automatic grid generation equipment provided by the application adopts the automatic grid generation method in the embodiment, and can solve the technical problem of automatically generating grids when a rotation matrix is not given. Compared with the prior art, the automatic grid generating device has the same beneficial effects as the automatic grid generating method provided by the embodiment, and other technical features in the automatic grid generating device are the same as the features disclosed by the method of the previous embodiment, and are not repeated herein.
It is to be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The present application provides a computer readable storage medium having computer readable program instructions (i.e., a computer program) stored thereon for performing the automated grid generation method of the above-described embodiments.
The computer readable storage medium provided by the present application may be, for example, a U disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM: read Only Memory), an erasable programmable Read-Only Memory (EPROM: erasable Programmable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wire, fiber optic cable, RF (Radio Frequency), and the like, or any suitable combination of the foregoing.
The computer readable storage medium may be embodied in an automated grid generation device; or may exist alone without being assembled into an automated grid generating device.
The computer-readable storage medium carries one or more programs that, when executed by the automated grid generation apparatus, cause the automated grid generation apparatus to: obtaining a first geometric surface and a second geometric surface of a target object through the target object; obtaining a rotation matrix according to the first geometric surface and the second geometric surface; performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface; an overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present application may be implemented in software or in hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (i.e. a computer program) for executing the automatic grid generation method, so that the technical problem of automatically generating grids when a rotation matrix is not given can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the automatic grid generation method provided by the embodiment, and are not described in detail herein.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of an automated grid generation method as described above.
The computer program product provided by the application can solve the technical problem of automatically generating grids when a rotation matrix is not given. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the automatic grid generation method provided by the embodiment, and are not described in detail herein.
The foregoing description is only a partial embodiment of the present application, and is not intended to limit the scope of the present application, and all the equivalent structural changes made by the description and the accompanying drawings under the technical concept of the present application, or the direct/indirect application in other related technical fields are included in the scope of the present application.

Claims (10)

1. An automated grid generation method, the method comprising:
Obtaining a first geometric surface and a second geometric surface of a target object through the target object, wherein the height of the first geometric surface in a coordinate system is higher than that of the second geometric surface;
obtaining a rotation matrix according to the first geometric surface and the second geometric surface;
performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface;
An overall mesh of the target object is generated based on the rotation matrix, the second geometric surface, and mesh data of the first geometric surface.
2. The method of claim 1, wherein the step of deriving a rotation matrix from the first geometric surface and the second geometric surface comprises:
acquiring a coordinate system in the target object;
Taking a geometric point, of which the distance between the first geometric surface and the second geometric surface and the origin of the coordinate system is a preset distance, as a datum point, and obtaining a first geometric surface datum point and a second geometric surface datum point;
a rotation matrix is derived based on the first geometric surface datum and the second geometric surface datum.
3. The method of claim 2, wherein the step of deriving a rotation matrix based on the first geometric surface datum and the second geometric surface datum comprises:
Obtaining a first vector and a second vector based on the first geometric surface datum point and the second geometric surface datum point;
acquiring a vector included angle between the first vector and the second vector;
and obtaining a rotation matrix according to the vector included angle.
4. The method of claim 1, wherein the step of meshing the first geometric surface to obtain mesh data for the first geometric surface comprises:
obtaining boundary points of a first geometric surface, and obtaining a bounding box according to the boundary points;
Generating a hyper triangle based on the bounding box;
obtaining an initial triangular grid according to the hyper triangle;
inserting the boundary points into the initial triangular meshes one by one to obtain target triangular meshes;
And splitting the target triangular mesh through a preset rule to obtain mesh data of the first geometric surface.
5. The method of claim 1, wherein the step of generating an overall grid of the target object based on the rotation matrix, the second geometric surface, and the grid data of the first geometric surface comprises:
mapping a first grid point in the grid data of the first geometrical surface to the second geometrical surface according to the rotation matrix to obtain a second grid point on the second geometrical surface;
connecting the second grid points according to the first grid units in the grid data to obtain second grid units of a second geometric surface;
Obtaining a surface grid unit of the target object through the grid data and the second grid unit;
an overall grid of the target object is generated based on the face grid cells.
6. The method of claim 5, wherein the step of obtaining the face grid cell of the target object from the grid data and the second grid cell comprises:
obtaining a first boundary point and a first line unit of the first geometrical surface and a second boundary point and a second line unit of the second geometrical surface through the grid data and the second grid unit;
And taking the first boundary point, the first line unit, the second boundary point and the second line unit as constraints, and performing grid subdivision on the rest geometric surfaces of the target object to obtain a surface grid unit of the target object.
7. The method of claim 5, wherein the step of generating an overall grid of the target object based on the face grid cells comprises:
And taking the surface grid unit as constraint, and carrying out grid subdivision on the target object to obtain the whole grid of the target object.
8. An automated grid generation apparatus, the apparatus comprising:
the object dividing module is used for obtaining a first geometric surface and a second geometric surface of the target object through the target object, wherein the height of the first geometric surface in a coordinate system is higher than that of the second geometric surface;
The matrix construction module is used for obtaining a rotation matrix according to the first geometric surface and the second geometric surface;
The mesh subdivision module is used for performing mesh subdivision on the first geometric surface to obtain mesh data of the first geometric surface;
and the grid generation module is used for generating an integral grid of the target object based on the rotation matrix, the second geometric surface and the grid data of the first geometric surface.
9. An automated grid generation device, the device comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program configured to implement the steps of the automated grid generation method of any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the automated grid generation method according to any one of claims 1 to 7.
CN202410607641.7A 2024-05-16 2024-05-16 Automatic grid generation method, device, equipment and storage medium Pending CN118171547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410607641.7A CN118171547A (en) 2024-05-16 2024-05-16 Automatic grid generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410607641.7A CN118171547A (en) 2024-05-16 2024-05-16 Automatic grid generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118171547A true CN118171547A (en) 2024-06-11

Family

ID=91357251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410607641.7A Pending CN118171547A (en) 2024-05-16 2024-05-16 Automatic grid generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118171547A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107515982A (en) * 2017-08-22 2017-12-26 电子科技大学 A kind of contact analysis method in three-dimensional mechanical finite element modal analysis
EP3525175A1 (en) * 2018-02-09 2019-08-14 Dassault Systèmes Designing a part manufacturable by milling operations
CN112381862A (en) * 2020-10-27 2021-02-19 新拓三维技术(深圳)有限公司 Full-automatic registration method and device for CAD (computer-aided design) model and triangular mesh
CN114970283A (en) * 2022-06-28 2022-08-30 安世亚太科技股份有限公司 Geometric model structure detection method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107515982A (en) * 2017-08-22 2017-12-26 电子科技大学 A kind of contact analysis method in three-dimensional mechanical finite element modal analysis
EP3525175A1 (en) * 2018-02-09 2019-08-14 Dassault Systèmes Designing a part manufacturable by milling operations
CN112381862A (en) * 2020-10-27 2021-02-19 新拓三维技术(深圳)有限公司 Full-automatic registration method and device for CAD (computer-aided design) model and triangular mesh
CN114970283A (en) * 2022-06-28 2022-08-30 安世亚太科技股份有限公司 Geometric model structure detection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Pappalardo et al. Development of ANCF tetrahedral finite elements for the nonlinear dynamics of flexible structures
TWI475511B (en) System and method for meshing curved surface
CN107958484B (en) Texture coordinate calculation method and device
EP2887241A1 (en) Cad-based initial surface geometry correction
CN111079215A (en) Method and device for determining ramp engineering quantity and electronic equipment
CN112308969A (en) Three-dimensional map generation method and device
CN114187589A (en) Target detection method, device, equipment and storage medium
Lindow et al. Ligand excluded surface: A new type of molecular surface
CN110940336B (en) Strapdown inertial navigation simulation positioning resolving method and device and terminal equipment
JP7375149B2 (en) Positioning method, positioning device, visual map generation method and device
CN118171547A (en) Automatic grid generation method, device, equipment and storage medium
CN113065180A (en) GIM analysis method, device, equipment and storage medium
CN115511701A (en) Method and device for converting geographic information
TWI406189B (en) Method for constructing triangular grids of point clouds
CN115935561A (en) Three-dimensional pipe network modeling method and device, electronic equipment and storage medium
CN115496860A (en) Flexible rule model construction method and device, terminal equipment and storage medium
CN115187709A (en) Geographic model processing method and device, electronic equipment and readable storage medium
CN111898819B (en) Space grid dividing method and device
CN114373051A (en) Map updating method and device, electronic equipment and storage medium
Siwei et al. Review of bounding box algorithm based on 3D point cloud
KR20220079200A (en) Method and apparatus for calculating the amount of sunlight using a grid model
Misztal Deformable simplicial complexes
CN116229005B (en) Geodesic determining method and device for three-dimensional roadway model
CN117422810B (en) Structure and parameter guided indoor element regularization and relationship reasoning method and terminal
JP7350122B2 (en) Method, device, roadside equipment and cloud control platform for determining the bottom boundary point of a vehicle

Legal Events

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