Geometric model structure detection method, device, equipment and storage medium

By calculating the geometric model to detect the rotary transformation matrix associated with the vertex associated by the geometric surface, determine whether the geometric surface is a pair of rotation cycles, solve the problem that the rotating cycle surface cannot be effectively judged in the existing technology, and improved the grid. Generate efficiency and accuracy of numerical simulation.

CN114970283BActive Publication Date: 2025-01-28PERA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210740189.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2025-01-28
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

The prior art cannot effectively determine whether the two geometric planes to be detected in the geometric model are a pair of rotation periodic planes, which affects the grid generation efficiency and calculation efficiency and accuracy of numerical simulation.

Method used

By receiving the input geometric model, confirm that the number of vertices of the two geometric surfaces is the same and associated with the arc edge. Determine whether it is a pair of rotation cycles.

Benefits of technology

Quickly judge whether the two geometric planes to be tested in the geometric model are a pair of rotation cycles to improve the efficiency of grid generating and improve the calculation efficiency and accuracy of numerical simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970283B_ABST
    Figure CN114970283B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device, equipment and storage medium for detecting a geometric model structure. The method comprises: receiving an input geometric model; after confirming that the number of vertices of two geometric surfaces to be detected in the geometric model is the same, and confirming that the vertices of the geometric surfaces are associated with arc edges, calculating a periodic surface rotation transformation matrix according to the arc edges; after confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix, confirming that the two geometric surfaces are a pair of rotational periodic surfaces. The solution provided by the present invention can quickly determine whether the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, which is conducive to improving the efficiency of mesh generation and improving the calculation efficiency and accuracy of numerical simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for detecting a geometric model structure. Background Art

[0002] In the field of computer-aided engineering, it is necessary to perform mesh generation processing on the geometric surfaces of geometric models. Mesh generation is the key to digital simulation technology and is crucial to simulation efficiency and accuracy. In a geometric model, a pair of rotational periodic surfaces refers to two geometric surfaces that can be completely overlapped by rotating around a specific axis. In the process of mesh generation for each geometric surface of a geometric model, if it is determined that two geometric surfaces in the geometric model are a pair of rotational periodic surfaces, after generating a mesh for one of the rotational periodic surfaces, the mesh of the other rotational periodic surface can be quickly generated based on the mesh generated on the rotational periodic surface, thereby improving the mesh generation efficiency of the geometric model. The periodic surface meshes that can overlap consistently through rotational transformation can further improve the accuracy and efficiency of numerical simulation calculations.

[0003] However, the related art is unable to determine whether the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, thereby affecting the efficiency of mesh generation and reducing the computational efficiency of numerical simulation. Summary of the invention

[0004] In order to solve or partially solve the problems existing in the related art, the present invention provides a geometric model structure detection method, device, equipment and storage medium, which can quickly determine whether two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, which is beneficial to improve the efficiency of mesh generation and improve the computational efficiency and accuracy of numerical simulation.

[0005] A first aspect of the present invention provides a method for detecting a geometric model structure, comprising:

[0006] receiving an input geometric model;

[0007] After confirming that the two geometric surfaces to be detected in the geometric model have the same number of vertices and confirming that the vertices of the geometric surfaces are associated with arc edges, calculating a periodic surface rotation transformation matrix according to the arc edges;

[0008] After confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix, it is confirmed that the two geometric surfaces are a pair of rotation periodic surfaces.

[0009] In one embodiment, the method of confirming that the vertices of the geometric surface are associated with arc edges includes:

[0010] Obtaining geometric edges associated with vertices of the geometric surface;

[0011] Collect three sampling points from the geometric edge and calculate the circumscribed circle determined by the three sampling points;

[0012] After determining that the geometric edge is an arc edge according to the circumscribed circle, confirming that the vertex of the geometric surface is associated with an arc edge.

[0013] In one embodiment, the method of determining that the geometric edge is an arc edge according to the circumscribed circle includes:

[0014] Collecting a preset number of check points from the geometric edge;

[0015] After confirming that each of the check points is on the plane where the circumscribed circle is located and the distance between each of the check points and the center of the circumscribed circle is the radius of the circumscribed circle, it is determined that the geometric edge is an arc edge.

[0016] In one embodiment, the step of calculating the periodic surface rotation transformation matrix according to the arc edge includes:

[0017] According to the arc edge, determine the center of the circle corresponding to the arc edge, the target center angle of the circle, and the rotation axis vector perpendicular to the plane where the arc edge is located; wherein the target center angle of the circle is determined according to the circumscribed circle where the arc edge is located and the vertices of the two geometric surfaces located on the circumscribed circle;

[0018] A periodic surface rotation transformation matrix is ​​calculated according to the center of the circle, the target center angle of the circle and the rotation axis vector.

[0019] In one embodiment, calculating the periodic surface rotation transformation matrix according to the circle center, the target circle center angle and the rotation axis vector includes:

[0020] Determine a movement transformation matrix by moving the center of the circle to an origin in a pre-constructed three-dimensional coordinate system;

[0021] Determine a first rotation transformation matrix by rotating the rotation axis vector by a first rotation angle to a target coordinate plane on the three-dimensional coordinate system;

[0022] Determine a second rotation transformation matrix by rotating the rotation axis vector by a second rotation angle to a target coordinate axis on the three-dimensional coordinate system;

[0023] Determine a third rotation transformation matrix by rotating the rotation axis vector by an angle corresponding to the size of the target circle center angle;

[0024] Calculate a periodic surface rotation transformation matrix according to the movement transformation matrix, the first rotation transformation matrix, the second rotation transformation matrix and the third rotation transformation matrix;

[0025] The target coordinate plane and the target coordinate axis are determined by matching the three coordinate planes and the three coordinate axes in the three-dimensional coordinate system according to the projection lengths of the rotation axis vectors on the three coordinate planes in the three-dimensional coordinate system.

[0026] In one embodiment, the method of confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix includes:

[0027] According to the periodic surface rotation transformation matrix, a boundary point of one of the geometric surfaces is transformed to obtain a transformation result;

[0028] After confirming that there is a one-to-one correspondence between the transformation result and the boundary point of another geometric surface, confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces.

[0029] In one embodiment, the boundary points of the geometric surface include vertices of the geometric surface and endpoints on geometric edges of the geometric surface.

[0030] A second aspect of the present invention provides a geometric model structure detection device, comprising:

[0031] A receiving module, used for receiving an input geometric model;

[0032] A calculation module, configured to calculate a periodic surface rotation transformation matrix according to the arc edge after confirming that the two geometric surfaces to be detected in the geometric model have the same number of vertices and confirming that the vertices of the geometric surfaces are associated with arc edges;

[0033] The confirmation module is used to confirm that the two geometric surfaces are a pair of rotation periodic surfaces after confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix.

[0034] A third aspect of the present invention provides an electronic device, comprising:

[0035] Processor; and

[0036] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0037] A fourth aspect of the present invention provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method described above.

[0038] The technical solution provided by the present invention may include the following beneficial effects:

[0039] The method provided by the present invention receives an input geometric model, and after confirming that the number of vertices of two geometric surfaces to be detected in the geometric model is the same and that the vertices of the geometric surfaces are associated with arc edges, calculates a periodic surface rotation transformation matrix according to the arc edges, and after confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix, confirms that the two geometric surfaces are a pair of rotational periodic surfaces. In this way, it is possible to quickly determine whether the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, which is conducive to improving the efficiency of mesh generation and improving the calculation efficiency and accuracy of numerical simulation.

[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.

[0042] Figure 1 is a schematic flow chart of a geometric model structure detection method according to an embodiment of the present invention;

[0043] Figure 2 is another schematic flow chart of a geometric model structure detection method according to an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of the structure of a geometric model in a geometric model structure detection method shown in an embodiment of the present invention;

[0045] Figure 4 is a schematic diagram of the rotation process of the rotation vector axis in the geometric model structure detection method shown in an embodiment of the present invention;

[0046] Figure 5 is a schematic structural diagram of a geometric model structure detection device shown in an embodiment of the present invention;

[0047] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present invention. Specific embodiments

[0048] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0049] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0050] It should be understood that although the terms "first", "second", "third", etc. may be used to describe various information in the present invention, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0051] The related art is unable to determine whether the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, thereby affecting the efficiency of mesh generation and reducing the computational efficiency and accuracy of numerical simulation.

[0052] In response to the above problems, an embodiment of the present invention provides a geometric model structure detection method, which can quickly determine whether two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, which is beneficial to improving the efficiency of mesh generation and improving the computational efficiency and accuracy of numerical simulation.

[0053] The technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0054] Figure 1 It is a flow chart of a geometric model structure detection method shown in an embodiment of the present invention.

[0055] See also Figure 1 , the method comprising:

[0056] S101, receiving an input geometric model.

[0057] In this step, a geometric model input by a user is received, wherein the geometric model may refer to a 3D model file, such as a 3D model file in different formats such as step, iges, and stl.

[0058] S102, after confirming that the number of vertices of two geometric surfaces to be detected in the geometric model is the same and confirming that the vertices of the geometric surfaces are associated with arc edges, calculate a periodic surface rotation transformation matrix according to the arc edges.

[0059] The two geometric surfaces to be detected in the geometric model may be two geometric surfaces pre-selected by the user.

[0060] The method of confirming that the vertices of the geometric surface are associated with the arc edge may include: obtaining the geometric edge associated with the vertices of the geometric surface. Collecting three sampling points from the geometric edge and calculating the circumscribed circle determined by the three sampling points. After determining that the geometric edge is an arc edge according to the circumscribed circle, confirming that the vertices of the geometric surface are associated with the arc edge.

[0061] In this step, calculating the periodic surface rotation transformation matrix according to the arc edge may include: determining the center of the circle corresponding to the arc edge, the target center angle, and the rotation axis vector perpendicular to the plane where the arc edge is located according to the arc edge. The target center angle is determined according to the circumscribed circle where the arc edge is located and the vertices of two geometric faces located on the circumscribed circle. The periodic surface rotation transformation matrix is ​​calculated according to the center, the target center angle, and the rotation axis vector.

[0062] S103, after confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix, confirming that the two geometric surfaces are a pair of rotation periodic surfaces.

[0063] The method of confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix includes: transforming the boundary points of one of the geometric surfaces according to the periodic surface rotation transformation matrix to obtain a transformation result. After confirming that there is a one-to-one correspondence between the transformation result and the boundary points of the other geometric surface, it is confirmed that there is a one-to-one correspondence between the boundary points of the two geometric surfaces.

[0064] The boundary points of the geometric surface include the vertices of the geometric surface and the endpoints of the geometric edges of the geometric surface.

[0065] It can be seen from this embodiment that the method provided by the embodiment of the present invention receives an input geometric model, confirms that the number of vertices of the two geometric surfaces to be detected in the geometric model is the same, and confirms that the vertices of the geometric surfaces are associated with arc edges, and then calculates the periodic surface rotation transformation matrix according to the arc edges, and confirms that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix, and confirms that the two geometric surfaces are a pair of rotational periodic surfaces. In this way, it is possible to quickly determine whether the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, which is conducive to improving the efficiency of mesh generation and improving the calculation efficiency and accuracy of numerical simulation.

[0066] Figure 2 It is another flowchart of the geometric model structure detection method according to an embodiment of the present invention. Figure 2 relatively Figure 1 The scheme of the present invention is described in more detail.

[0067] See also Figure 2 , the method comprising:

[0068] S201, receiving an input geometric model.

[0069] In this step, a geometric model input by a user is received, wherein the geometric model may refer to a 3D model file, such as a 3D model file in different formats such as step, iges, and stl.

[0070] S202: confirm whether the number of vertices of two geometric faces to be detected in the geometric model is the same.

[0071] The two geometric faces to be detected in the geometric model may be two geometric faces pre-selected by a user. Each geometric face is determined by a boundary formed by connecting geometric edges, and the vertices of the geometric faces are the endpoints of the geometric edges. The two geometric faces to be detected may include a first geometric face and a second geometric face.

[0072] like Figure 3 In the geometric model shown in the embodiment, the two geometric faces to be detected in the geometric model are the first geometric face A and the second geometric face B. The first geometric face A has four geometric edges, namely, geometric edge A0A1, geometric edge A1A2, geometric edge A2A3, and geometric edge A0A3. The first geometric face A has four vertices, namely, vertex A0, vertex A1, vertex A2, and vertex A3. The second geometric face B has four geometric edges, namely, geometric edge B0B1, geometric edge B1B2, geometric edge B2B3, and geometric edge B0B3. The second geometric face B has four vertices, namely, vertex B0, vertex B1, vertex B2, and vertex B3. It can be seen that the first geometric face A and the second geometric face B have the same number of vertices, and the number of vertices of the two geometric faces is four.

[0073] Furthermore, the vertices of each geometric face can be recorded by constructing a collection.

[0074] For example, Figure 3 In the embodiment, the sets of vertices of the first geometric surface A and the second geometric surface B are respectively: and

[0075] It can be understood that since a pair of rotational periodic surfaces refers to two geometric surfaces that can be completely overlapped by rotating around a specific axis, if the number of vertices of the two geometric surfaces is different, the two geometric surfaces are not a pair of rotational periodic surfaces.

[0076] In this step, if it is confirmed that the number of vertices of the two geometric faces to be detected in the geometric model is different, S203 is executed. If it is confirmed that the number of vertices of the two geometric faces to be detected in the geometric model is the same, S204 is executed.

[0077] S203. Output the confirmation result that the two geometric surfaces are not a pair of rotational periodic surfaces.

[0078] In this step, a confirmation result that the two geometric surfaces are not a pair of rotational periodic surfaces is output, that is, it is confirmed that the two geometric surfaces to be detected in the geometric model are not a pair of rotational periodic surfaces.

[0079] S204: Determine whether the vertices of the geometric surface are associated with arc edges.

[0080] In one embodiment, the method of confirming that the vertex of the geometric surface is associated with an arc edge includes:

[0081] S204-1. Obtain geometric edges associated with vertices of the geometric surface.

[0082] In this step, each geometric edge associated with each vertex of one of the geometric faces can be obtained. For example, each geometric edge associated with each vertex of the first geometric face can be obtained. The geometric edges associated with the vertices can be represented by the set Record.

[0083] like Figure 3 In the embodiment, each vertex A of the first geometric surface A can be obtained. i Each associated geometric edge, where i<4 and i≥0. For example, the geometric edges associated with vertex A0 are: geometric edge A0A3, geometric edge A0A1, and geometric edge A0B0.

[0084] S204-2. Collect three sampling points from the geometric edge and calculate the circumscribed circle determined by the three sampling points.

[0085] It should be noted that this step can be performed on each geometric edge obtained in S204-1. Figure 3 In the embodiment, three sampling points are collected on the geometric edge A0A3, three sampling points are collected on the geometric edge A0A1, and three sampling points are collected on the geometric edge A0B0.

[0086] It can be understood that three points can determine a unique circumscribed circle. Assume that the three sampling points are points P1, P2 and P3, and the calculation formula for the center of the circumscribed circle determined by the three sampling points is:

[0087]

[0088] The radius of the circumscribed circle is the distance from the center C to any point among points P1, P2 and P3.

[0089] S204-3. After determining that the geometric edge is an arc edge according to the circumscribed circle, confirm that the vertex of the geometric surface is associated with the arc edge.

[0090] exist Figure 3In the embodiment, it can be understood that the geometric edge A0A3 and the geometric edge A0A1 are straight geometric edges, and the three sampling points collected on the geometric edge A0A3 and the geometric edge A0A1 cannot be used to calculate and determine the circumscribed circle. If the three sampling points collected on the geometric edge A0B0 can be used to calculate and determine the circumscribed circle, then it can be determined whether the geometric edge A0B0 is an arc edge based on the circumscribed circle.

[0091] In one embodiment, the method of determining that a geometric edge is an arc edge according to a circumscribed circle may include:

[0092] S204-3-1. Collect a preset number of check points from the geometric edges.

[0093] For example, in Figure 3 In the embodiment, a preset number of check points are collected from the geometric edge A0B0, such as 5 check points, and the check points collected from the geometric edge are different from the sampling points. In order to improve processing efficiency and reduce computing overhead, the preset number can be set to be less than or equal to three.

[0094] S204-3-2. After confirming that each check point is on the plane where the circumscribed circle is located and the distance between each check point and the center of the circumscribed circle is the radius of the circumscribed circle, it is determined that the geometric edge is an arc edge.

[0095] For example, in Figure 3 In the embodiment, if each check point collected from the geometric edge A0B0 is on the plane where the circumscribed circle is located, and the distance between each check point and the center C of the circumscribed circle is the radius of the circumscribed circle (i.e., the distance from the center C to any point among points P1, P2 and P3), it can be determined that the geometric edge A0B0 is an arc edge. Figure 3 In the embodiment, the vertices of the first geometric surface A are associated with arc edges, that is, it can be confirmed that the vertices of one of the geometric surfaces to be detected in the geometric model are associated with arc edges.

[0096] In S204, if it is confirmed that the vertices of the geometric surface are not associated with arc edges, S203 is executed. If it is confirmed that the vertices of the geometric surface are associated with arc edges, S205 is executed.

[0097] S205: Determine the center of the circle corresponding to the arc edge, the target center angle, and the rotation axis vector perpendicular to the plane where the arc edge is located, according to the arc edge. The target center angle is determined according to the circumscribed circle where the arc edge is located and the vertices of two geometric surfaces located on the circumscribed circle.

[0098] It can be understood that if it is confirmed in S204 that the vertex of the geometric surface is associated with multiple arc edges, S205 can be executed for each arc edge respectively.

[0099] In this step, according to the arc edge, the center C corresponding to the arc edge, the target center angle θ, and the rotation axis vector perpendicular to the plane where the arc edge is located can be determined. It can be understood that the plane normal vector and the rotation axis vector can be determined based on the plane where the arc edge is located. It may refer to the plane normal vector. According to the plane normal vector and the center C, the rotation axis can be determined. The target center angle θ is determined based on the circumscribed circle where the arc edge is located and the vertices of the two geometric faces located on the circumscribed circle. It can be understood that if there are vertices on the second geometric face also on the circumscribed circle, the target center angle θ can be calculated based on the vertices on the first geometric face on the circumscribed circle and the vertices on the second geometric face on the same circumscribed circle. The target center angle θ is: the angle between the line connecting the vertex of the first geometric face on the circumscribed circle and the center of the circle, and the line connecting the vertex of the second geometric face on the circumscribed circle and the center of the circle.

[0100] exist Figure 3 In the embodiment, for the confirmed arc edge A0B0, the target center angle θ is the vector With vector The angle between (because the vertex B0 of the second geometric surface is on the circumscribed circle). In other words, the vector With vector The rotation angle between is the target center angle θ. The rotation axis vector The starting point can be the center C, and the rotation axis vector It can be perpendicular to the plane where the arc edge A0B0 lies.

[0101] S206, calculating the periodic surface rotation transformation matrix according to the circle center, the target circle center angle and the rotation axis vector.

[0102] It should be noted that the periodic surface rotation transformation matrix is ​​calculated based on the rotation axis vector, the center of the circumscribed circle, and the target center angle, and the two vertices of the first geometric surface and the second geometric surface on the circumscribed circle can determine the corresponding relationship through the periodic surface rotation transformation matrix. In other words, the position of the vertex on the first geometric surface of the associated arc edge after transformation through the periodic surface rotation transformation matrix is ​​the same as the position of another vertex on the second geometric surface on the circumscribed circle.

[0103] In one embodiment, calculating the periodic surface rotation transformation matrix according to the center of the circle, the target center angle of the circle, and the rotation axis vector may include:

[0104] S206-1. Determine a movement transformation matrix by moving the center of the circle to the origin in a pre-constructed three-dimensional coordinate system.

[0105] The coordinates of the center C are (C x ,C y ,C z), by moving the center C to the origin O in the pre-constructed three-dimensional coordinate system, the movement transformation matrix T is determined:

[0106]

[0107] S206-2. Determine a first rotation transformation matrix by rotating the rotation axis vector by a first rotation angle α to a target coordinate plane in the three-dimensional coordinate system.

[0108] The rotation axis vector The coordinates of (n x ,n y ,n z ).

[0109] In this step, after the center of the circle is moved to the origin of the pre-constructed three-dimensional coordinate system through S206-1, the rotation axis vector The starting point can be the origin O in the three-dimensional coordinate system. By By rotating the first rotation angle α to the target coordinate plane in the three-dimensional coordinate system, the first rotation transformation matrix R can be determined. α .

[0110] It should be noted that the three-dimensional coordinate system includes three coordinate planes, namely the X0Z plane, the XOY plane, and the YOZ plane. The target coordinate plane is one of the three coordinate planes. The three-dimensional coordinate system also includes three coordinate axes, namely the X coordinate axis, the Y coordinate axis, and the Z coordinate axis. The rotation axis vector The first rotation angle α can be rotated around one of the coordinate axes to the target coordinate plane in the three-dimensional coordinate system. In other words, after the rotation, the rotation axis vector Located on the target coordinate plane.

[0111] S206-3. Determine a second rotation transformation matrix by rotating the rotation axis vector by a second rotation angle β to a target coordinate axis in the three-dimensional coordinate system.

[0112] In this step, the rotation axis vector located on the target coordinate plane can be Rotate the second rotation angle β to the target coordinate axis in the three-dimensional coordinate system to determine the second rotation transformation matrix R β .

[0113] It should be noted that the target coordinate axis is one of the three coordinate axes in the three-dimensional coordinate system. You can rotate an angle α around one of the coordinate axes to the target coordinate plane, and then transform it to the target coordinate axis in the three-dimensional coordinate system according to the second rotation angle β. That is, after the rotation, the rotation axis vector Located on the target coordinate axis, the rotation axis vector Coincident with the target axis.

[0114] S206-4. Determine a third rotation transformation matrix by rotating the rotation axis vector by an angle corresponding to the target circle center angle.

[0115] In this step, the rotation axis vector located on the target coordinate axis can be Rotate the angle θ corresponding to the target center angle to determine the third rotation transformation matrix R θ .

[0116] S206-5. Calculate a periodic surface rotation transformation matrix according to the movement transformation matrix, the first rotation transformation matrix, the second rotation transformation matrix, and the third rotation transformation matrix.

[0117] According to the movement transformation matrix T, the first rotation transformation matrix R α , the second rotation transformation matrix R β And the third rotation transformation matrix R θ , calculate the periodic surface rotation transformation matrix R.

[0118] In one embodiment, the calculation formula of the periodic surface rotation transformation matrix R is:

[0119]

[0120] Among them, T -1 , T, R α , R β The inverse matrix of T, R α , R β Perform the inverse transform to obtain .

[0121] It should be noted that the target coordinate plane and the target coordinate axis are based on the rotation axis vector The projection lengths on the three coordinate planes (i.e., X0Z plane, XOY plane, and YOZ plane) in the three-dimensional coordinate system are respectively determined by matching the three coordinate planes (i.e., X0Z plane, XOY plane, and YOZ plane) with the three coordinate axes (i.e., X coordinate axis, Y coordinate axis, and Z coordinate axis) in the three-dimensional coordinate system.

[0122] Rotation axis vector The coordinates of (n x ,n y ,n z ).

[0123] Rotation axis vector The length L is calculated as:

[0124]

[0125] Rotation axis vector The projection length L on the YOZ plane YZ , the projection length L on the X0Z plane ZX , the projection length L on the XOY plane XY They are:

[0126]

[0127]

[0128]

[0129] In one embodiment, according to three projection lengths (i.e., L YZ , L ZX , L XY ) is divided into the following three cases (1), (2), and (3) to match and determine the target coordinate plane and the target coordinate axis, and calculate the first rotation transformation matrix R α , the second rotation transformation matrix R β And the third rotation transformation matrix R θ The value of .

[0130] (1) Rotation axis vector Projection length L on the YOZ plane YZ Maximum case (i.e. at L YZ , L ZX , L XY Medium YZ is the largest value).

[0131] The matching determines that the target coordinate plane is the X0Z plane and the target coordinate axis is the Z coordinate axis.

[0132] Corresponding to S206-2 to S206-4, see Figure 4 , the rotation axis vector Rotate the first rotation angle α around the X coordinate axis to the X0Z plane (target coordinate plane), and then rotate the second rotation angle β around the Y coordinate axis to the Z coordinate axis (target coordinate axis) so that the rotation axis vector Coincident with the Z axis.

[0133] It can be understood that the rotation axis vector The rotation to the target coordinate plane needs to be performed according to the first orbit axis, that is, the rotation axis vector Rotate the first rotation angle α around the first orbital axis to the target coordinate plane. Rotation axis vector The rotation to the target axis needs to be performed according to the second orbit axis, that is, the rotation axis vector The second rotation angle β is rotated around the second orbit axis to the target coordinate axis.

[0134] The rotation axis vector Projection length L on the YOZ plane YZ In the largest case, the first orbital axis is the X coordinate axis, and the second orbital axis is the Y coordinate axis.

[0135] The first rotation transformation matrix R α , the second rotation transformation matrix R β And the third rotation transformation matrix R θ They are:

[0136]

[0137]

[0138]

[0139] in,

[0140]

[0141]

[0142]

[0143]

[0144] (2) Rotation axis vector Projection length L on the X0Z plane ZX Maximum case (i.e. at L YZ , L ZX , L XY Medium ZX is the largest value).

[0145] The matching determines that the target coordinate plane is the X0Y plane and the target coordinate axis is the X coordinate axis.

[0146] Corresponding to S206-2 to S206-4, the rotation axis vector Rotate the first rotation angle α around the Y coordinate axis to the X0Y plane (target coordinate plane), and then rotate the second rotation angle β around the Z coordinate axis to the X coordinate axis (target coordinate axis) so that the rotation axis vector Coincident with the X axis.

[0147] It can be understood that the rotation axis vector The rotation to the target coordinate plane needs to be performed according to the first orbit axis, that is, the rotation axis vector Rotate the first rotation angle α around the first orbital axis to the target coordinate plane. Rotation axis vector The rotation to the target axis needs to be performed according to the second orbit axis, that is, the rotation axis vector The second rotation angle β is rotated around the second orbit axis to the target coordinate axis.

[0148] The rotation axis vector Projection length L on the XOZ plane ZX In the largest case, the first orbital axis is the Y coordinate axis, and the second orbital axis is the Z coordinate axis.

[0149] The first rotation transformation matrix R α , the second rotation transformation matrix R β And the third rotation transformation matrix R θ They are:

[0150]

[0151]

[0152]

[0153] in,

[0154]

[0155]

[0156]

[0157]

[0158] (3) Rotation axis vector Projection length L on the XOY plane XY Maximum case (i.e. at L YZ , L ZX , L XY Medium XY is the largest value).

[0159] The matching determines that the target coordinate plane is the YOZ plane and the target coordinate axis is the Y coordinate axis.

[0160] Corresponding to S206-2 to S206-4, the rotation axis vector Rotate the first rotation angle α around the Z coordinate axis to the YOZ plane (target coordinate plane), and then rotate the second rotation angle β around the X coordinate axis to the Y coordinate axis (target coordinate axis) so that the rotation axis vector Coincident with the Y axis.

[0161] It can be understood that the rotation axis vector The rotation to the target coordinate plane needs to be performed according to the first orbit axis, that is, the rotation axis vector Rotate the first rotation angle α around the first orbital axis to the target coordinate plane. Rotation axis vector The rotation to the target axis needs to be performed according to the second orbit axis, that is, the rotation axis vector The second rotation angle β is rotated around the second orbit axis to the target coordinate axis.

[0162] The rotation axis vector Projection length L on the XOY plane XY In the largest case, the first orbital axis is the Z coordinate axis, and the second orbital axis is the X coordinate axis.

[0163] The first rotation transformation matrix R α , the second rotation transformation matrix R β And the third rotation transformation matrix R θ They are:

[0164]

[0165]

[0166]

[0167] in,

[0168]

[0169]

[0170]

[0171]

[0172] It can be understood that after the center of the circle is moved to the origin in the pre-constructed three-dimensional coordinate system, and the rotation axis vector is rotated twice by the first rotation angle α and the second rotation angle β, the rotation axis vector coincides with the target axis, and the vertex of the associated arc edge on the first geometric surface can be transformed to the position of another vertex on the second geometric surface on the same circumscribed circle by rotating the angle corresponding to the size of the target center angle. The periodic surface rotation transformation matrix R calculated above determines the transformation relationship between the two vertices on the first and second geometric surfaces. It can be seen that the periodic surface rotation transformation matrix R calculated can be used to detect whether two geometric surfaces are a pair of rotational periodic surfaces.

[0173] S207 , confirming whether there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix.

[0174] In this step, if it is confirmed according to the periodic surface rotation transformation matrix that there is no one-to-one correspondence between the boundary points of the two geometric surfaces, S203 is executed. If it is confirmed according to the periodic surface rotation transformation matrix that there is a one-to-one correspondence between the boundary points of the two geometric surfaces, S208 is executed.

[0175] It should be noted that if it is confirmed in S204 that the vertices of the geometric surface are associated with multiple arc edges, multiple periodic surface rotation transformation matrices are calculated for the multiple arc edges and the circumscribed circle, and one of the periodic surface rotation transformation matrices is used to confirm that the boundary points of the two geometric surfaces have a one-to-one correspondence, then S208 is executed, otherwise S203 is executed. In other words, the boundary points of the two geometric surfaces can be confirmed to have a one-to-one correspondence through one of the periodic surface rotation transformation matrices, then S208 is executed, otherwise S203 is executed.

[0176] In one embodiment, a method of confirming that there is a one-to-one correspondence between boundary points of two geometric surfaces according to a periodic surface rotation transformation matrix may include:

[0177] S207-1. According to the periodic surface rotation transformation matrix, the boundary points of one of the geometric surfaces are transformed to obtain a transformation result.

[0178] like Figure 3 In the embodiment, the boundary points of the first geometric surface A are transformed according to the periodic surface rotation transformation matrix R to obtain a transformation result.

[0179] The boundary points of a geometric surface include the vertices of the geometric surface and the endpoints on the geometric edges of the geometric surface. That is, the boundary points of the first geometric surface A can be vertex A0, vertex A1, vertex A2, and vertex A3. The boundary points of the first geometric surface A can also be endpoints on geometric edges A0A1, geometric edges A1A2, geometric edges A2A3, and geometric edges A0A3.

[0180] For example, the boundary point A0 of the first geometric surface A is transformed to obtain a transformation result a0.

[0181] S207-2. After confirming that there is a one-to-one correspondence between the transformation result and the boundary points of another geometric surface, confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces.

[0182] That is to say, the positions corresponding to the transformation results are mapped one-to-one to the corresponding boundary points of another geometric surface, and it can be confirmed that there is a one-to-one correspondence between the boundary points of the two geometric surfaces.

[0183] For example, in Figure 3 In the embodiment, if there is a one-to-one correspondence between the boundary points of the two geometric surfaces, the boundary point A0 of the first geometric surface A is transformed to obtain the transformation result a0. The position corresponding to the transformation result a0 is the boundary point B0 of the second geometric surface B.

[0184] For example, in Figure 3In an embodiment, if there is a one-to-one correspondence between the boundary points of the first geometric surface A and the boundary points of the second geometric surface B, the vertices A0, A1, A2, and A3 of the first geometric surface A, after transformation according to the periodic surface rotation transformation matrix R, correspond to the vertices B0, B1, B2, and B3 on the second geometric surface B, respectively.

[0185] For example, in Figure 3 In the embodiment, if there is a one-to-one correspondence between the boundary points of the first geometric surface A and the boundary points of the second geometric surface B, the endpoint A0 on the geometric edge A0A1 of the first geometric surface A, after being transformed according to the periodic surface rotation transformation matrix R, corresponds to the endpoint B0 on ​​the corresponding geometric edge B0B1 on the second geometric surface B. The endpoint A1 on the geometric edge A0A1 of the first geometric surface A, after being transformed according to the periodic surface rotation transformation matrix R, corresponds to the endpoint B1 on the corresponding geometric edge B0B1 on the second geometric surface B. In other words, the boundary ring of the first geometric surface A is A0A1A2A3, and the boundary ring of the second geometric surface B is B0B1B2B3. For any geometric edge A0A1 of the first geometric surface A, i A (i+1)%4 , any geometric edge B of the second geometric surface B i B (i+1)%4 , where 0≤i<4 and % is the remainder symbol. Geometric edge A i A (i+1)%4 The endpoints on the geometric edge B can be transformed one by one by the periodic surface rotation transformation matrix R. i B (i+1)%4 That is to say, by checking whether there is a one-to-one correspondence between the endpoints of the geometric edges of one geometric surface and the endpoints of the corresponding geometric edges of another geometric surface, it is determined whether the geometric edges on the two geometric surfaces correspond one-to-one.

[0186] In summary, according to the periodic surface rotation transformation matrix, the boundary points of one of the geometric surfaces are transformed. If the transformation result has a one-to-one correspondence with the boundary points of another geometric surface, then it is confirmed that the boundary points of the two geometric surfaces exist in a one-to-one correspondence. Specifically, according to the periodic surface rotation transformation matrix, the vertices of one of the geometric surfaces are transformed. If the transformation result has a one-to-one correspondence with the vertices of another geometric surface, and according to the periodic surface rotation transformation matrix, the two endpoints on one of the geometric edges on one of the geometric surfaces are transformed. If the transformation result has a one-to-one correspondence with the two endpoints on a corresponding geometric edge on the other geometric surface, then it is confirmed that the boundary points of the two geometric surfaces exist in a one-to-one correspondence.

[0187] S208. Output the confirmation result that the two geometric surfaces are a pair of rotational periodic surfaces.

[0188] In this step, a confirmation result that the two geometric surfaces are a pair of rotational periodic surfaces is output, that is, it is confirmed that the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces.

[0189] For example, in Figure 3 In the embodiment, it can be confirmed that the first geometric surface A and the second geometric surface B are a pair of rotation periodic surfaces.

[0190] It can be seen from this embodiment that the method provided by the embodiment of the present invention can quickly determine whether two geometric surfaces to be detected in a geometric model are a pair of rotational periodic surfaces, which is beneficial to improving the efficiency of mesh generation and the computational efficiency of numerical simulation.

[0191] Corresponding to the aforementioned application function realization method embodiment, the present invention also provides a geometric model structure detection device, an electronic device and corresponding embodiments.

[0192] Figure 5 It is a schematic diagram of the structure of a geometric model structure detection device shown in an embodiment of the present invention.

[0193] See also Figure 5 , a geometric model structure detection device 50 includes: a receiving module 510, a calculation module 520 and a confirmation module 530.

[0194] The receiving module 510 is used to receive an input geometric model.

[0195] The calculation module 520 is used to calculate the periodic surface rotation transformation matrix according to the arc edge after confirming that the number of vertices of the two geometric surfaces to be detected in the geometric model is the same and confirming that the vertices of the geometric surfaces are associated with arc edges.

[0196] The confirmation module 530 is used to confirm that the two geometric surfaces are a pair of rotation periodic surfaces after confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the periodic surface rotation transformation matrix.

[0197] It can be seen from this embodiment that the device 50 provided in the embodiment of the present invention can quickly determine whether the two geometric surfaces to be detected in the geometric model are a pair of rotational periodic surfaces, which is beneficial to improving the efficiency of mesh generation and improving the computational efficiency and accuracy of numerical simulation.

[0198] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0199] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present invention.

[0200] See also Figure 6, the electronic device 600 includes a memory 610 and a processor 620 .

[0201] The processor 620 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0202] The memory 610 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. Among them, ROM may store static data or instructions required by the processor 620 or other modules of the computer. The permanent storage may be a readable and writable storage device. The permanent storage may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 610 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 610 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0203] The memory 610 stores executable codes, and when the executable codes are processed by the processor 620 , the processor 620 can execute part or all of the above-mentioned methods.

[0204] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing part or all of the steps in the above method of the present invention.

[0205] Alternatively, the present invention may also be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) on which an executable code (or a computer program or a computer instruction code) is stored. When the executable code (or a computer program or a computer instruction code) is executed by a processor of an electronic device (or a server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present invention.

[0206] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A geometric model structure detection method, characterized in that: include: Receiving an input geometric model, wherein the geometric model is a 3D model file; After confirming that the number of vertices of the two geometric faces to be detected in the geometric model is the same, and confirming that the vertices of the geometric faces are associated with arc edges, a rotation transformation matrix is ​​calculated according to the arc edges, which includes: determining the center of the circle corresponding to the arc edge, a target center angle, and a rotation axis vector perpendicular to the plane where the arc edge is located according to the arc edge, wherein the target center angle is determined according to the circumscribed circle where the arc edge is located and the vertices of the two geometric faces located on the circumscribed circle, and calculating the rotation transformation matrix according to the center of the circle, the target center angle, and the rotation axis vector; After confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the rotation transformation matrix, it is confirmed that the two geometric surfaces are a pair of rotation periodic surfaces, and the pair of rotation periodic surfaces are two geometric surfaces that completely overlap by rotating around a specific axis.

2. The method according to claim 1, characterized in that The method of confirming that the vertex of the geometric surface is associated with an arc edge includes: Obtaining geometric edges associated with vertices of the geometric surface; Collect three sampling points from the geometric edge and calculate the circumscribed circle determined by the three sampling points; After determining that the geometric edge is an arc edge according to the circumscribed circle, confirming that the vertex of the geometric surface is associated with an arc edge.

3. The method according to claim 2, characterized in that The method of determining that the geometric edge is an arc edge according to the circumscribed circle includes: Collecting a preset number of check points from the geometric edge; After confirming that each of the check points is on the plane where the circumscribed circle is located and the distance between each of the check points and the center of the circumscribed circle is the radius of the circumscribed circle, it is determined that the geometric edge is an arc edge.

4. The method according to claim 1, characterized in that: The step of calculating a rotation transformation matrix according to the center of the circle, the target center angle of the circle and the rotation axis vector comprises: Determine a movement transformation matrix by moving the center of the circle to an origin in a pre-constructed three-dimensional coordinate system; Determine a first rotation transformation matrix by rotating the rotation axis vector by a first rotation angle to a target coordinate plane on the three-dimensional coordinate system; Determine a second rotation transformation matrix by rotating the rotation axis vector by a second rotation angle to a target coordinate axis on the three-dimensional coordinate system; Determine a third rotation transformation matrix by rotating the rotation axis vector by an angle corresponding to the size of the target circle center angle; Calculate a rotation transformation matrix according to the movement transformation matrix, the first rotation transformation matrix, the second rotation transformation matrix and the third rotation transformation matrix; The target coordinate plane and the target coordinate axis are determined by matching the three coordinate planes and the three coordinate axes in the three-dimensional coordinate system according to the projection lengths of the rotation axis vectors on the three coordinate planes in the three-dimensional coordinate system.

5. The method according to claim 1, characterized in that The method of confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the rotation transformation matrix includes: According to the rotation transformation matrix, a boundary point of one of the geometric surfaces is transformed to obtain a transformation result; After confirming that there is a one-to-one correspondence between the transformation result and the boundary point of another geometric surface, confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces.

6. The method according to claim 1, characterized in that: The boundary points of the geometric surface include the vertices of the geometric surface and the endpoints on the geometric edges of the geometric surface.

7. A geometric model structure detection device, characterized in that: include: A receiving module, used for receiving an input geometric model, wherein the geometric model is a 3D model file; A calculation module, for, after confirming that the number of vertices of the two geometric faces to be detected in the geometric model is the same and confirming that the vertices of the geometric faces are associated with arc edges, calculating a rotation transformation matrix according to the arc edges, including: determining, according to the arc edges, a center point of a circle corresponding to the arc edges, a target center point angle of a circle, and a rotation axis vector perpendicular to the plane where the arc edges are located, wherein the target center point angle is determined according to a circumscribed circle where the arc edges are located and two vertices of the geometric faces located on the circumscribed circle, and calculating a rotation transformation matrix according to the center point of a circle, the target center point angle of a circle, and the rotation axis vector; The confirmation module is used to confirm that the two geometric surfaces are a pair of rotational periodic surfaces after confirming that there is a one-to-one correspondence between the boundary points of the two geometric surfaces according to the rotation transformation matrix. The pair of rotational periodic surfaces are two geometric surfaces that completely overlap by rotating around a specific axis.

8. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: An executable code is stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Tool path optimization method for automatically generating safety cylinder of tire mold

    CN108021098A

  • Method for estimating pose of unmanned plane based on trapezoidal and circular combined landmark

    CN108122255A