Three-dimensional model data mapping method
In the finite element/finite volume simulation calculation, a three-dimensional model data mapping method for constructing a cylindrical search area using the focus node normal direction is solved, and a higher precision data mapping is achieved.
Patent Information
- Application Number
- CN202510135590.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the finite element/finite volume simulation calculation process, the prior art three-dimensional model data mapping method is based on distance, resulting in low mapping accuracy, especially when a thinner structure such as a rudder surface structure, it is easy to cause the risk of lower end face node data mapping to the upper end face.
A three-dimensional model data mapping method is proposed. By selecting a node of the mapping model as the focus node, searching for grids related to the focus node in the model to be mapped, calculating the mesh core coordinates and normal direction, and constructing a cylindrical search area along the normal direction of the focus node, and using weighted interpolation to obtain the mapping attribute information of the focus node.
The accuracy of the three-dimensional model data mapping is improved and errors caused by simply relying on distance are avoided. The cylindrical search area can more effectively filter out data points related to the focus node, adapt to grids of different shapes and sizes, and ensure the accuracy of the mapping results.
Smart Images

Figure CN119558110A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of three-dimensional model mapping, and in particular relates to a three-dimensional model data mapping method. Background Art
[0002] In the simulation calculation process based on finite element / finite volume, the geometric model of the analysis object is usually discretized into nodes and grids for modeling, and the state of the analysis object, such as temperature distribution, stress distribution, etc., is described by node / grid data. Different analysis software and analysis types usually use different discrete methods, grid scales and simplification levels, resulting in that for the same model, the node / grid data used to describe the model state cannot completely correspond. When the two need to interact with each other, in order to reduce the loss in the data transmission process, the existing three-dimensional model data mapping is based solely on distance, and the two points closest to each other are mapped, resulting in low mapping accuracy. In addition, when facing a thinner structure, such as a rudder structure, the node distance between the two end faces is close, but the data gap is usually large. The existing technology has the risk of mapping the node data of the lower end face to the upper end face, resulting in low mapping accuracy. Summary of the invention
[0003] In view of this, the present invention aims to propose a three-dimensional model data mapping method in order to solve at least one of the above-mentioned technical problems.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows: A first aspect of the present invention provides a three-dimensional model data mapping method, comprising the following steps: S1, selecting a node of the mapping model as a focus node, and searching for a grid related to the focus node in the model to be mapped; S2, calculate the coordinates of the centroid and normal direction of the grid; S3, calculating the normal direction of the focus node according to the normal direction of the grid; S4, constructing a cylindrical search area along the normal direction of the focusing node; S5. The attribute information of the data points and the attribute information of the focused node in the search area are calculated by weighted interpolation based on the coordinate data to obtain the mapped attribute information of the focused node.
[0005] Further, the S3 comprises the following steps: The normal direction of the focused node is obtained by averaging the normal directions of all meshes.
[0006] Further, the S3 comprises the following steps: The normal direction of the focus node is calculated as follows: ; in, is the normal direction of the focus node, is the normal direction of each mesh, is the weight of the normal direction of each mesh; The calculation formula is as follows: ; in, is the area of each grid, is the distance between the mesh centroid and the focus node.
[0007] Furthermore, in S4, a normal line is formed along the normal direction of the focus node, the normal distances between all mesh centroids and the normal line are calculated, and the largest normal distance among the normal distances of all mesh centroids is selected as the reference radius; The cylindrical radius of the search area is larger than the reference radius.
[0008] Furthermore, the cylinder height of the search area is the average side length of all grids, and takes the focusing node as the starting point and extends by half of the cylinder height in the normal direction and the opposite direction of the focusing node.
[0009] Furthermore, the cylinder height of the search area is less than the minimum thickness of the model to be mapped; And the centroid of the grid is located inside the search area.
[0010] Furthermore, the attribute information calculation formula of the focus node in S5 is as follows: ; in To focus on the attribute information of the node, is the attribute information of the data points in the grid, is the distance between the data point and the focus node, The value of is 2.
[0011] A second aspect of the present invention provides an electronic device, comprising a processor and a memory communicatively connected to the processor and used to store instructions executable by the processor, wherein the processor is used to execute the method described in the first aspect above.
[0012] The third aspect of the present invention provides a server, comprising at least one processor, and a memory communicatively connected to the processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the processor so that the at least one processor executes the method described in the first aspect.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method described in the first aspect.
[0014] Compared with the prior art, the three-dimensional model data mapping method described in the present invention has the following beneficial effects: (1) The three-dimensional model data mapping method described in the present invention improves the mapping accuracy by calculating the attribute information of the node through data interpolation, avoids the error caused by relying solely on the distance, and the cylindrical search area can more effectively screen out the data points related to the focused node. By setting the height of the cylinder, it is possible to avoid collecting points on other end faces, and it can better adapt to grids of different shapes and sizes.
[0015] (2) The three-dimensional model data mapping method described in the present invention calculates the normal distance between the centroid of all grids and the normal line, selects the largest normal distance as the reference radius, ensures that the search area can cover most of the data points with representative significance, and improves the accuracy of interpolation. The height of the cylinder is determined according to the average side length of the grid and the minimum thickness of the model, which can effectively capture local features and prevent the search area from containing data points of other end faces when the distance between the two end faces of the model is too close, thereby ensuring the accuracy of the mapping result. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings: Figure 1 The figure is a flowchart of a mapping method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0018] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0019] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0020] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. Embodiment 1:
[0021] like Figure 1 As shown, a three-dimensional model data mapping method includes the following steps: S1, selecting a node of the mapping model as a focus node, and searching for a grid related to the focus node in the model to be mapped; A node is a vertex in a 3D model. A vertex in a 3D model is a basic geometric point on the surface of the model. Each vertex has a 3D coordinate (x, y, z) that represents its position in space. Vertices can be connected into edges and faces to form a polygonal mesh. The mesh associated with the focus node is the mesh containing the focus node.
[0022] S2, calculate the coordinates of the centroid and normal direction of the grid; S3, calculating the normal direction of the focus node according to the normal direction of the grid; By calculating the normal directions of all meshes related to the focused node and using an average algorithm to obtain the normal direction of the focused node, the local geometric characteristics of the focused node can be more accurately reflected. Compared with using the centroid position or a single normal direction of the mesh, it can better capture local geometric information, thereby improving the accuracy of data interpolation.
[0023] In some embodiments, the normal directions of all meshes are averaged to obtain the normal direction of the focused node.
[0024] In some other embodiments, the calculation formula of the normal direction of the focus node is as follows: ; in, is the normal direction of the focus node, is the normal direction of each mesh, is the weight of the normal direction of each mesh; The calculation formula is as follows: ; in, is the area of each grid, is the distance between the mesh centroid and the focus node.
[0025] The weight is calculated based on the area of the grid and the distance between the grid centroid and the focus node, making the calculation result of the normal direction of the focus node more accurate and better reflecting the local geometric characteristics.
[0026] S4, constructing a cylindrical search area along the normal direction of the focusing node; The cylindrical search area can more effectively filter out data points related to the focused node. By setting the height of the cylinder, it is possible to avoid collecting points on other end faces, and it can better adapt to grids of different shapes and sizes.
[0027] In S4, the normal line is taken along the normal direction of the focus node, the normal distances between all mesh centroids and the normal line are calculated, and the largest normal distance among the normal distances of all mesh centroids is selected as the reference radius; the cylindrical radius of the search area is greater than the reference radius, and the calculation formula is as follows:
[0028] r1=r2×q; r1 is the cylindrical radius of the search area, r2 is the reference radius, and q is the proportional coefficient in the range of 1.1-1.3.
[0029] The size of the search area can be dynamically adjusted according to the distribution of the local grid, which improves the flexibility and adaptability of the search, while the method of dynamically determining the radius can better adapt to different geometric features.
[0030] The cylinder height of the search area is the average side length of all grids, and takes the focusing node as the starting point and extends by half of the cylinder height in the normal direction and the opposite direction of the focusing node.
[0031] The cylindrical height of the search area is less than the minimum thickness of the model to be mapped; Constructing a cylindrical search area along the normal direction of the focus node instead of using a fixed search range can better adapt to models with different geometric shapes and improve the accuracy of interpolation.
[0032] By calculating the normal distances between all grid centroids and normal lines, the largest normal distance is selected as the reference radius to ensure that the search area can cover most of the representative data points, thereby improving the accuracy of interpolation.
[0033] The height of the cylinder is determined according to the average side length of the grid and the minimum thickness of the model. It can effectively capture local features and prevent the search area from containing data points of other end faces when the distance between the two end faces of the model is too close, thus ensuring the accuracy of the mapping results.
[0034] S5, the attribute information of the data points in the search area and the attribute information of the focused node are calculated by weighted interpolation based on the coordinate data to obtain the mapped attribute information of the focused node; The data interpolation process is based on the inverse distance weighted interpolation method. The reciprocal of is used as the weight standard.
[0035] There are multiple grids (A, B, C, D) related to the focus node. Taking the interpolation of grid A to focus node a as an example, the specific weight expression is as follows: ; in, is the weight of the i-th point in the data set of grid A; is the distance between the i-th data point in the data set of grid A and the focus node a, and the value of u is 2.
[0036] ; in, is the x, y, and z axis coordinate data of the focus node a, , , is the x, y, and z axis coordinate data of the ith data point in the data set of grid A.
[0037] The value is generally 2. By defining a higher power, the neighboring nodes are more affected, and the interpolated data is closer to the value of the nearest sampling point. The attribute information expression of node a obtained by interpolation is: ; The formula for calculating the attribute information of the focused node in S5 is as follows: ; in To focus on the attribute information of the node, is the attribute information of the data points in the grid, is the distance between the data point and the focus node, The value of is 2.
[0038] Node attribute information includes node coordinate data and normal vector data.
[0039] Traverse all nodes of the model to be mapped and repeat steps S1-S5.
[0040] The attribute information of the node is calculated through data interpolation, which improves the accuracy of mapping and avoids the error caused by relying solely on distance. The cylindrical search area can more effectively filter out the data points related to the focused node. By setting the height of the cylinder, it is possible to avoid collecting points on other end faces, which can better adapt to grids of different shapes and sizes. Embodiment 2:
[0041] An electronic device comprises a processor and a memory which is communicatively connected to the processor and is used to store instructions executable by the processor, wherein the processor is used to execute the method described in the first embodiment above. Embodiment three:
[0042] A server includes at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes the method described in Example 1. Embodiment 4:
[0043] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
[0045] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A three-dimensional model data mapping method, characterized in that: The following steps are involved: S1, selecting a node of the mapping model as a focus node, and searching for a grid related to the focus node in the model to be mapped; S2, calculate the coordinates of the centroid and normal direction of the grid; S3, calculating the normal direction of the focus node according to the normal direction of the grid; S4, constructing a cylindrical search area along the normal direction of the focusing node; S5. The attribute information of the data points and the attribute information of the focused node in the search area are calculated by weighted interpolation based on the coordinate data to obtain the mapped attribute information of the focused node.
2. A three-dimensional model data mapping method according to claim 1, characterized in that: The S3 comprises the following steps: The normal direction of the focused node is obtained by averaging the normal directions of all meshes.
3. A three-dimensional model data mapping method according to claim 1, characterized in that: The S3 comprises the following steps: The normal direction of the focus node is calculated as follows: ; in, is the normal direction of the focus node, is the normal direction of each mesh, is the weight of the normal direction of each mesh; The calculation formula is as follows: ; in, is the area of each grid, is the distance between the mesh centroid and the focus node.
4. A three-dimensional model data mapping method according to claim 1, characterized in that: In the S4, the normal line is taken along the normal direction of the focus node, the normal distances between all the mesh centroids and the normal line are calculated, and the largest normal distance among the normal distances of all the mesh centroids is selected as the reference radius; The cylindrical radius of the search area is larger than the reference radius.
5. A three-dimensional model data mapping method according to claim 4, characterized in that: The cylinder height of the search area is the average side length of all grids, and takes the focusing node as the starting point and extends by half of the cylinder height in the normal direction and the opposite direction of the focusing node.
6. A three-dimensional model data mapping method according to claim 4, characterized in that: The cylindrical height of the search area is less than the minimum thickness of the model to be mapped; And the centroid of the grid is located inside the search area.
7. A three-dimensional model data mapping method according to claim 1, characterized in that: The formula for calculating the attribute information of the focused node in S5 is as follows: ; in To focus on the attribute information of the node, is the attribute information of the data points in the grid, is the distance between the data point and the focus node, The value of is 2.
8. An electronic device, comprising a processor and a memory connected to the processor for storing instructions executable by the processor, characterized in that: The processor is used to execute the method described in any one of claims 1 to 7.
9. A server, characterized in that: It includes at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes the method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.