Information extraction method and related device for bolt and nut modeling
Through a computer program, the geometric topology of bolts and nuts is traversed, edge groups are formed, and the origin coordinates and axial vectors are obtained, which solves the problem of low efficiency in the extraction of bolts and nuts CAE modeling information in the prior art, and realizes efficient batch modeling and accurate information extraction.
Patent Information
- Application Number
- CN202210262811.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-03-17
AI Technical Summary
The prior art has problems such as inefficient information extraction, error-prone or omission in bolt and nut CAE modeling, especially when batch modeling, engineers need to spend a lot of time manually.
The geometric topology of bolts and nuts is traversed through the computer program to form edge groups, and the origin coordinates and axial vectors are obtained through the edge groups, thereby realizing the information extraction of bolts and nuts.
Efficient batch modeling of bolts and nuts is realized, which reduces the labor intensity of engineers, saves time, improves R&D efficiency, and avoids errors caused by manual misoperation.
Smart Images

Figure CN114676470B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bolt and nut modeling, and in particular to an information extraction method, a computer-readable storage medium and a computer device for bolt and nut modeling. Background Art
[0002] Bolts and nuts are widely used in various types of transportation machinery such as commercial vehicles and passenger cars, and there are huge numbers and varieties of them in CAE (Computer Aided Engineering) models. The traditional bolt CAE modeling method is that engineers manually select individual bolt geometry, convert the bolt into connection information, assign adjacent components to the connection information, and finally convert it into a CAE analysis unit. This process is cumbersome and time-consuming, and because there are generally a large number of bolts and nuts, it is easy to make mistakes or omissions during modeling. For passenger cars, it usually takes engineers about 2 days to process all the bolt and nut data.
[0003] In the article "Automation Technology of Bolt CAD-CAE Model Conversion" ("Electromechanical Product Development and Innovation", Vol. 34, No. 1, January 2021, pp. 35-37), it is proposed how to quickly obtain the key geometric information of the bolts, including the bolt radius, bolt length, and washer size, through the python language when using ANSA software to model automotive bolts and nuts, so as to realize the conversion of the bolts from CAD (Computer Aided Design) to CAE models. However, in this method, the most important information about the bolt origin coordinates and axial vector is obtained by directly reading from the geometric data tag. When this information is not recorded or recorded incorrectly in the geometric data tag, this method cannot be used to extract information from the bolt. Summary of the invention
[0004] One aspect of the present invention aims to solve a technical problem of how to efficiently and batch extract information from the geometric topology of bolts and nuts.
[0005] In addition, other aspects of the present invention are also intended to solve or alleviate other technical problems existing in the prior art.
[0006] The present invention provides an information extraction method, a computer-readable storage medium and a computer device for bolt and nut modeling. Specifically, according to one aspect of the present invention, there are provided:
[0007] An information extraction method for modeling bolts and nuts, comprising the following steps of performing the following steps on the geometric topology of the bolts and nuts respectively by a computer program:
[0008] S1: According to the geometric topology, all edges are traversed and edge groups are obtained;
[0009] S2: Obtain the origin coordinates and the axial vector through the edge group.
[0010] Optionally, according to an embodiment of the present invention, in step S1, there are multiple edge groups, each of which includes two geometric edges with two identical vertices, and the geometric edges are edges with two vertices in the same plane in geometric topology.
[0011] Optionally, according to an embodiment of the present invention, step S1 includes the following steps:
[0012] S11: randomly selecting a geometric edge according to the geometric topology;
[0013] S12: Obtain an adjacent edge having two common vertices with the geometric edge, and store the geometric edge and the adjacent edge in an edge group;
[0014] S13: Determine whether all edges have been traversed. If yes, execute step S2; if no, execute step S14;
[0015] S14: Select another unselected geometric edge and return to execute step S12.
[0016] Optionally, according to an embodiment of the present invention, step S12 includes the following steps:
[0017] S121: obtaining two vertices of the geometric edge through the geometric topology, and obtaining an adjacent edge adjacent to the geometric edge through the two vertices;
[0018] S122: Obtain two vertices of the adjacent edge adjacent to the geometric edge;
[0019] S123: Determine whether two vertices of the adjacent edge adjacent to the geometric edge coincide with the two vertices of the geometric edge respectively, if yes, execute S124, if no, directly execute S13;
[0020] S124: Storing the geometric edge and the adjacent edge into an edge group.
[0021] Optionally, according to one embodiment of the present invention, in step S2, the total length of all geometric edges in each edge group is calculated, the edge group with the maximum total length and the edge group with the minimum total length are obtained, the origin coordinates are calculated through the edge group with the maximum total length, and the axial vector is calculated through the edge group with the minimum total length and the origin coordinates.
[0022] Optionally, according to one embodiment of the present invention, in step S2, the midpoint of the line connecting two vertices of a geometric edge in the maximum total length edge group is calculated as the origin, and the vector formed by the midpoint of the line connecting two vertices of a geometric edge in the minimum total length edge group and the origin is calculated as the axial vector.
[0023] Optionally, according to one embodiment of the present invention, in step S2, the midpoints of the two geometric sides of the maximum total length edge group are respectively calculated as the first midpoint and the second midpoint, the midpoint of the line connecting the first midpoint and the second midpoint is determined as the origin, the midpoints of the two geometric sides of the minimum total length edge group are respectively calculated as the third midpoint and the fourth midpoint, and the vector formed by the midpoint of the line connecting the third midpoint and the fourth midpoint and the origin is determined as the axial vector.
[0024] Optionally, according to an embodiment of the present invention, the information extraction method further comprises the following steps:
[0025] S3: Obtain the bolt radius, bolt length and Washer size according to the origin coordinates and axial vector of the bolt.
[0026] Optionally, according to an embodiment of the present invention, the information extraction method further comprises the following steps:
[0027] S4: positioning the nut according to the origin coordinates, axial vector, bolt radius, bolt length and Washer size data of the bolt and the origin coordinates and axial vector of the nut;
[0028] S5: Determine whether the nut matches the bolt, if yes, proceed to step S6;
[0029] S6: Deleting modeling information of a nut matching the bolt.
[0030] Optionally, according to an embodiment of the present invention, step S4 includes the following steps:
[0031] S41: establishing a cylindrical coordinate system with the origin of the bolt as the origin and the axial vector of the bolt as the z-axis;
[0032] S42: Calculate the projection of the origin of the nut in the cylindrical coordinate system.
[0033] Optionally, according to an embodiment of the present invention, in step S5, it is determined whether the coordinates of the projection are within the area of a cylinder with the direction of the axial vector of the bolt as the axis, the bolt length as the height and the bolt radius as the base radius. If so, the nut matches the bolt.
[0034] Optionally, according to an embodiment of the present invention, step S5 further includes the following steps:
[0035] If the nut does not match the bolt, the nut is updated to another nut with different origin coordinates and axial vectors, and the process returns to step S4.
[0036] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program implements the above-mentioned information extraction method when executed by a processor.
[0037] According to another aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned information extraction method when executing the computer program.
[0038] The benefits of the present invention include:
[0039] 1. By automatically extracting geometric topological information through algorithms, batch modeling of bolts and nuts can be realized, which reduces the labor intensity of engineers, saves time, improves R&D efficiency, and avoids errors and problems caused by manual misoperation;
[0040] 2. The origin coordinates and axial vector information of the bolt or nut are obtained by traversing all geometric edges of the bolt or nut. The information obtained is more accurate and there is no need to read this information from the geometric data tag;
[0041] 3. When the origin coordinates and axial vectors are obtained, the connection information of the bolts and nuts is merged to avoid generating two connections of bolts and nuts at the same position, making the modeling more efficient and in line with the actual situation of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The above and other features of the present invention will become apparent with reference to the accompanying drawings, in which:
[0043] Figure 1 A general flow chart of an information extraction method for bolt and nut modeling proposed according to one embodiment of the present invention is shown;
[0044] Figure 2 A flowchart of an information extraction method for bolt and nut modeling proposed according to an embodiment of the present invention is shown, in which all sub-steps are shown in detail;
[0045] Figure 3A schematic diagram showing the geometric topology of a bolt, wherein a method for finding the origin coordinates and the axial vector through the maximum total length edge group and the minimum total length edge group is shown;
[0046] Figure 4 Another method of finding the origin coordinates and the axial vector through the maximum total length edge group and the minimum total length edge group is shown;
[0047] Figure 5 A schematic diagram showing the positional relationship between bolts and nuts when a merging operation is performed on the bolts and nuts in an information extraction method for bolt and nut modeling proposed according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0048] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific implementation modes and the accompanying drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the whole of the present invention or as a limitation or restriction to the technical solution of the present invention.
[0049] The directional terms such as up, down, left, right, front, back, front, back, top, bottom, etc. mentioned or may be mentioned in this specification are defined relative to the structures shown in the drawings. They are relative concepts and may change accordingly according to their different positions and different usage states. Therefore, these or other directional terms should not be interpreted as restrictive terms. In addition, the terms "first", "second", "third", etc. or similar expressions are only used for description and distinction purposes, and cannot be understood as indicating or implying the relative importance of the corresponding components.
[0050] The information extraction method for bolt and nut modeling of the present invention is mainly based on CAE modeling of bolts and nuts. In this modeling method, the CAD model of the bolt and nut, that is, the geometric topology, is known. Of course, the information extraction method of the present invention can also be applied to other modeling methods of bolts and nuts, as long as it is necessary to extract information from the bolt and nut according to the known geometric topology. The technical features and technical steps of the information extraction method of the present invention can be understood and implemented based on various computer modeling software (such as ANSA, etc.), and the required geometric information of the bolt and nut is obtained according to the known CAD model of the bolt and nut, or the geometric topology, to simplify the modeling steps and improve the modeling efficiency.
[0051] The present invention aims to innovate the main information extraction method when modeling bolts and nuts. Therefore, all the operation steps and processes of the modeling method are not involved in the specification. The modeling method and process not mentioned in the specification can be learned from the prior art.
[0052] Before modeling bolts or nuts, the CAD model information of bolts and nuts, that is, the geometric topological information of bolts and nuts, is stored in the modeling software. These geometric topological information are sufficient to describe the information of all geometric edges of bolts and nuts. When modeling bolts and nuts, it is necessary to extract or calculate the relevant characteristic parameters of bolts and nuts from these geometric topological information and determine the pairing of bolts and nuts to achieve the effect of automated modeling. For bolts and nuts, the most critical information that needs to be obtained from the geometric topological information is the origin coordinates and axial vectors of bolts and nuts. The origin coordinates and axial vectors can be used to obtain other geometric information and connection information of bolts and nuts. However, the origin coordinates and axial vectors cannot be directly obtained from the geometric topological information.
[0053] refer to Figure 1 , which shows a general flow chart of an information extraction method for bolt and nut modeling proposed according to an embodiment of the present invention. In the present invention, an information extraction method is proposed to obtain the origin coordinates and axial vectors of bolts and nuts from geometric topological information, including performing the following steps on the geometric topology of bolts and nuts respectively through a computer program:
[0054] S1: According to the geometric topology, all edges are traversed and edge groups are obtained;
[0055] S2: Calculate the origin coordinates and the axis vector through the edge group;
[0056] And the following steps:
[0057] S3: Obtaining the bolt radius, bolt length and Washer size according to the origin coordinates and axial vector of the bolt;
[0058] S4: positioning the nut according to the origin coordinates, axial vector, bolt radius, bolt length and Washer size data of the bolt and the origin coordinates and axial vector of the nut;
[0059] S5: Determine whether the nut matches the bolt, if yes, proceed to step S6;
[0060] S6: Deleting modeling information of a nut matching the bolt.
[0061] It should be noted that, usually in the geometric topology of bolts and nuts, there are a large number of edges used to define the shapes of bolts and nuts. The "edges" referred to here are all the edges existing in the geometric topology. The "geometric edges" described in this specification refer to the edges with two vertices in the same plane in the geometric topology. Such geometric edges are sufficient to define the key parameters of bolts and nuts. Usually in the modeling of bolts and nuts, all the edges in their geometric topology are geometric edges, but it does not exclude the case where their geometric topology includes other types of edges.
[0062] In step S1, "traversing all its edges" means selecting all the edges in the geometric topology at least once, so that the geometric topology information of no edge is omitted. This process is automatically performed in the database of the software through an algorithm.
[0063] It should be emphasized that both step S1 and step S2 need to be executed on the bolt and nut respectively to obtain the origin coordinates and axial vectors of the bolt and nut respectively. The following explanations of the sub-steps of steps S1 and S2 are also applicable to the modeling of bolts and nuts.
[0064] refer to Figure 2 , which shows a flowchart of an information extraction method for bolt and nut modeling proposed according to an embodiment of the present invention, in which all sub-steps are shown in detail.
[0065] exist Figure 2 In the embodiment of the present invention, step S1 includes the following sub-steps:
[0066] S11: randomly selecting a geometric edge according to the geometric topology;
[0067] S12: Obtain an adjacent edge having two common vertices with the geometric edge, and store the geometric edge and the adjacent edge in an edge group;
[0068] S13: Determine whether all edges have been traversed. If yes, execute step S2; if no, execute step S14;
[0069] S14: Select another unselected geometric edge and return to execute step S12.
[0070] First, in step S11, the selected geometric edges are randomly selected from the geometric topology of the bolt or nut. The geometric edges in the geometric topology of the bolt and nut are usually the edges of the curve (in Figure 3 and Figure 4 In order to conveniently display the shape of the bolt, the geometric edges are drawn as polylines. These edges form the outer contour of the bolt or nut.
[0071] In step S12, "finding the adjacent edge having two identical vertices with the geometric edge" means that the adjacent edge coincides with the two vertices of the geometric edge, but is not the same edge. It should be emphasized that the expression "having two identical vertices" means that the two vertices of the adjacent edge coincide with the two vertices of the geometric edge, rather than only one of the vertices coincides. Therefore, since the adjacent edge coincides with the two vertices of the geometric edge, they enclose a closed plane, and this closed plane is a plane perpendicular to the axial direction of the bolt or nut, and the boundary of this plane is the contour shape of the bolt or nut on a plane perpendicular to its axial direction. Storing the adjacent edge and the geometric edge in an edge group means storing the contour shape on the plane in an edge group, so an edge group includes two different geometric edges with two identical vertices.
[0072] In step S13, it is determined whether all edges have been traversed. If not, it means that there are edges of partial outlines of bolts and nuts that have not been collected into the edge group. At this time, step S14 should be executed, that is, excluding the selected geometric edges, selecting another unselected geometric edge from the geometric topology again, and then re-execute the entire step S1 until all geometric edges have been traversed. At this time, all geometric edges representing the outline shape of the bolts and nuts have been collected into the edge group.
[0073] exist Figure 2 In the embodiment of the present invention, step S12 includes the following sub-steps:
[0074] S121: obtaining two vertices of the geometric edge through the geometric topology, and obtaining an adjacent edge adjacent to the geometric edge through the two vertices;
[0075] S122: Obtain two vertices of an adjacent edge adjacent to the geometric edge;
[0076] S123: Determine whether two vertices of an adjacent edge adjacent to the geometric edge coincide with the two vertices of the geometric edge respectively, if yes, execute S124, if no, directly execute S13;
[0077] S124: Storing the geometric edge and the adjacent edge into an edge group.
[0078] Step S12 proposes a method for obtaining the adjacent edges of a geometric edge, that is, how to find the adjacent edges that have two common vertices with the geometric edge. In geometric topology, there are many interconnected geometric edges, so a geometric edge may have multiple adjacent edges, while there is only one adjacent edge that has two common vertices with the geometric edge. In step S121, firstly, two vertices of the geometric edge are obtained according to the geometric topology, and the adjacent edges of the geometric edge are found from these two vertices respectively. Figure 3, which shows a schematic diagram of the geometric topology of the bolt. Here, let the geometric edge be E 1 , then obtain E 1 The two vertices of a 1 and b 1 , and then according to the geometric topology, the vertex a 1 and b 1 To obtain a 1 The geometric edges with vertices and b 1 The geometric edges of the vertices belong to E 1 If the adjacent edges of a 1 The geometric edges with vertices and b 1 The geometric edges of the vertices are the same geometric edge E 2 ,like Figure 3 As shown, then E 2 That is, 1 Adjacent edges with two identical vertices. If the 1 The geometric edge E of the vertex i and b 1 The geometric edge E of the vertex j (exist Figure 3 are not shown), E i and E j For different geometric sides, this proves that no matter E i Or E j Neither of them is related to the geometric edge E 1 For adjacent edges with two identical vertices, the three geometric edges are not stored in the edge group. Instead, another geometric edge that has not been acquired is selected to repeat the process.
[0079] After step S1 is completed, all edge groups of the bolt or nut have been obtained. At this time, these edge groups are processed in step S2, that is, the total length of all geometric edges in each edge group is first calculated to obtain the maximum total length edge group and the minimum total length edge group. There are two methods to calculate the origin coordinates and the axial vector through the maximum total length edge group and the minimum total length edge group.
[0080] refer to Figure 3 , which shows a schematic diagram of the geometric topology of the bolt, in which a method of finding the origin coordinates and the axial vector through the maximum total length edge group and the minimum total length edge group is shown. In this method, it is assumed that E 1 is a geometric edge in the maximum total length edge group, and E 3 is a geometric edge in the minimum total length edge group, find E 1 The two vertices a 1 、b 1 The midpoint of the line connecting 1 , determine it as the origin, and then find E3 The two vertices a 2 、b 2 The midpoint of the line connecting 2 , the midpoint e 2 With the origin e 1 The resulting vector is determined as the axial vector. This method is applicable when the lengths of the two geometric edges in the edge group are equal.
[0081] refer to Figure 4 , which shows another method for finding the origin coordinates and the axial vector through the maximum total length edge group and the minimum total length edge group. In this method, the midpoints of the two geometric edges in the maximum total length edge group are found respectively. These two midpoints are referred to as the first midpoint and the second midpoint. Assume that E 1 and E 2 are two geometric edges in the maximum total length edge group, then the first midpoint and the second midpoint are c 1 and d 1 , then the first midpoint c 1 and the second midpoint d 1 Connect and find the first midpoint c 1 and the second midpoint d 1 The midpoint of the line segment e 1 ', then we can take this midpoint e 1 'Confirm the origin of the bolt or nut, so that the coordinates of the origin can be easily obtained. Then find the midpoints of the two geometric edges in the minimum total length edge group respectively. These two midpoints are called the third midpoint and the fourth midpoint. Figure 4 , assuming E 3 and E 4 are two geometric edges in the minimum total length edge group, whose vertices are a 2 and b 2 , then the third midpoint and the fourth midpoint are c 2 and d 2 , then the third midpoint c 2 and the fourth midpoint d 2 Connect and find the third midpoint c 2 and the fourth midpoint d 2 The midpoint of the line segment e 2 ', at this point the origin e has been determined 1 ', then we can find the value through e 1 ' and e 2 ', this axial vector is the axial vector of the bolt or nut. This method can be applied to the case where the lengths of the two geometric edges in the edge group are not equal.
[0082] Step S3 is performed after the origin coordinates and axial vectors of the bolt and nut are obtained respectively. Figure 5, which shows a schematic diagram of the positional relationship between the bolt and the nut when the bolt and the nut are merged in the information extraction method for bolt and nut modeling proposed in one embodiment of the present invention, and various geometric parameters of the bolt are marked in the figure. 1 and the axial vector V 1 The step of obtaining the bolt radius R, bolt length L and Washer size W" can be performed by dividing the bolt into a network and converting the coordinate system.
[0083] Steps S4, S5 and S6 are to prevent the connection information of the bolt and the nut that matches it from being generated at the same position at the same time, which will cause duplication and error in modeling. Because in the process of vehicle assembly, when the bolt and the nut are connected, it is only necessary to first determine the connection information of a single bolt or a single nut, which is sufficient to determine the connection information of the bolt and the nut that match each other, because the nut or bolt that matches it only needs to be arranged according to the connection information, and there is no need to repeatedly determine the connection information. This method is called the merging of the connection information of the bolt and the nut. Therefore, it is necessary to determine whether the connection information of the bolt and the nut is formed at the same position. If so, it is necessary to delete the modeling information of one of them to achieve more accurate modeling. In steps S4, S5 and S6 of the present invention, it is determined whether the nut is at the position of the bolt according to the connection information of the bolt, and if so, the modeling information of the nut is deleted. Of course, it is also possible to use the connection information of the nut to determine whether the bolt is at the position of the nut in reverse, and if so, the modeling information of the bolt is deleted.
[0084] Step S4 includes the following steps:
[0085] S41: With the origin P of the bolt 1 is the origin, the axial vector V of the bolt 1 Establish a cylindrical coordinate system for the z-axis;
[0086] S42: Find the origin P of the nut 2 The projection into the cylindrical coordinate system.
[0087] First, in step S41, the origin coordinates and axial vector V of the bolt obtained in step S2 are used to calculate the 1 , establish a cylindrical coordinate system, refer to Figure 5 , the coordinate system is based on the origin P of the bolt 1 is the origin, axial vector V 1 The coordinate system of the z-axis, the mutually perpendicular x-axis and y-axis are established through the origin P 1 and perpendicular to V 1In the plane, its direction can be any direction. This coordinate system is a local coordinate system. Since the position of the bolt in the whole vehicle may be in many situations, the local coordinate system is very likely to be different from the whole vehicle coordinate system. The origin coordinates of the bolt and nut obtained from steps S1 and S2 are the origin coordinates in the whole vehicle coordinate system. It is difficult to determine the position relationship between the nut and the bolt through such origin coordinates. By using a local coordinate system with the origin of the bolt as the origin and projecting the origin of the nut into the local coordinate system, the relative positions of the two can be determined very accurately. Figure 5 In the figure, the origin of the nut is P. 2 , whose axial vector is V 2 , the axial vectors of the paired bolts and nuts are parallel to each other.
[0088] Then, in step S42, the origin P of the nut is 2 Project it into the cylindrical coordinate system and determine the origin P of the nut 2 The position of the projection in the cylindrical coordinate system.
[0089] In step S5, the origin P of the nut is 2 Here, a search area is defined, and the search area is the axial vector V of the bolt. 1 The area of a cylinder with the axis as the bolt length L as the height and the bolt radius R as the base radius, if the nut fits with the bolt, then its origin P 2 The projection in the cylindrical coordinate system must fall within this search area. So if the origin P of the nut 2 If the projection of is within the search area, it proves that the nut and the bolt are in the same position. At this time, S6 needs to be executed, that is, the connection information of the nut is deleted. If the origin P of the nut 2 If the projection of is not within the search area, no operation is performed, or the steps also included in step S5 described below are performed, depending on whether only the connection information of a nut and a bolt needs to be determined, or all nuts need to be traversed and determined.
[0090] It should be understood that in steps S4 and S5, the form of the local coordinate system is not limited to the cylindrical coordinate system, and a spherical coordinate system may also be used, as long as the coordinates of the bolt origin can be located using the local coordinate system; the shape of the search area is not limited to a cylindrical shape, and a spherical shape may also be used.
[0091] Step S5 also includes the following step, that is, if the nut does not match the bolt, the nut is updated to another nut with different origin coordinates and axial vectors, and the execution of step S4 is returned. This step exists because there are a large number of bolts and nuts in batch modeling, so the step of merging the connection information of the bolts and nuts in the above information processing method sometimes needs to be performed on each bolt and nut. Here, a method similar to traversing each geometric edge of the bolt and nut can be adopted. For one bolt, each nut in the database is traversed and judged, or for one nut, each bolt in the database is traversed and judged, so as to find the nut or bolt that matches this bolt or nut in the entire database without omission.
[0092] After executing the above steps, the adjacent components of the connection are searched through the obtained connection information and converted into CAE analysis units. At this point, the information extraction method is completed.
[0093] The information extraction method for bolt and nut modeling of the present invention can be applied to the modeling of bolts and nuts in multiple fields such as automobiles, aerospace, and ships.
[0094] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned information processing method are implemented.
[0095] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0096] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not elaborate on it here.
[0097] According to another aspect of the present invention, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned information extraction method when executing the computer program.
[0098] It should be understood that all the above preferred embodiments are illustrative rather than restrictive, and various modifications or variations made by those skilled in the art to the specific embodiments described above under the concept of the present invention should be within the legal protection scope of the present invention.
Claims
1. An information extraction method for bolt and nut modeling, characterized in that: The process includes the following steps of performing the geometric topology of the bolt and nut separately through a computer program: S1: According to the geometric topology, all edges are traversed and edge groups are obtained; S2: Calculate the origin coordinates and the axial vector through the edge group; In step S1, there are multiple edge groups, each of which includes two geometric edges with two identical vertices, where the geometric edges are edges with two vertices in the same plane in geometric topology; Step S1 includes the following steps: S11: randomly selecting a geometric edge according to the geometric topology; S12: Obtain an adjacent edge having two common vertices with the geometric edge, and store the geometric edge and the adjacent edge in an edge group; S13: Determine whether all edges have been traversed. If yes, execute step S2; if no, execute step S14; S14: Select another unselected geometric edge and return to step S12; Step S12 includes the following steps: S121: obtaining two vertices of the geometric edge through the geometric topology, and obtaining an adjacent edge adjacent to the geometric edge through the two vertices; S122: Obtain two vertices of an adjacent edge adjacent to the geometric edge; S123: Determine whether two vertices of an adjacent edge adjacent to the geometric edge coincide with the two vertices of the geometric edge respectively, if yes, execute S124, if no, directly execute S13; S124: Storing the geometric edge and the adjacent edge into an edge group.
2. The information extraction method according to claim 1, characterized in that: In step S2, the total length of all geometric edges in each edge group is calculated, the edge group with the maximum total length and the edge group with the minimum total length are obtained, the origin coordinates are calculated through the maximum total length edge group, and the axial vector is calculated through the minimum total length edge group and the origin coordinates.
3. The information extraction method according to claim 2, characterized in that: In step S2, the midpoint of the line connecting the two vertices of a geometric edge in the maximum total length edge group is obtained as the origin, and the vector formed by the midpoint of the line connecting the two vertices of a geometric edge in the minimum total length edge group and the origin is obtained as the axial vector.
4. The information extraction method according to claim 2, characterized in that: In step S2, the midpoints of the two geometric sides of the maximum total length edge group are respectively calculated as the first midpoint and the second midpoint, and the midpoint of the line connecting the first midpoint and the second midpoint is determined as the origin. The midpoints of the two geometric sides of the minimum total length edge group are respectively calculated as the third midpoint and the fourth midpoint, and the vector formed by the midpoint of the line connecting the third midpoint and the fourth midpoint and the origin is determined as the axial vector.
5. The information extraction method according to any one of claims 1 to 4, characterized in that: The information extraction method further comprises the following steps: S3: Obtain the bolt radius, bolt length and Washer size according to the origin coordinates and axial vector of the bolt.
6. The information extraction method according to claim 5, characterized in that: The information extraction method further comprises the following steps: S4: positioning the nut according to the origin coordinates, axial vector, bolt radius, bolt length and Washer size data of the bolt and the origin coordinates and axial vector of the nut; S5: Determine whether the nut matches the bolt, if yes, proceed to step S6; S6: Deleting modeling information of a nut matching the bolt.
7. The information extraction method according to claim 6, characterized in that: Step S4 includes the following steps: S41: establishing a cylindrical coordinate system with the origin of the bolt as the origin and the axial vector of the bolt as the z-axis; S42: Calculate the projection of the origin of the nut in the cylindrical coordinate system.
8. The information extraction method according to claim 7, characterized in that: In step S5, it is determined whether the coordinates of the projection are within the area of a cylinder with the direction of the axial vector of the bolt as the axis, the length of the bolt as the height and the radius of the bolt as the base radius. If so, the nut matches the bolt.
9. The information extraction method according to claim 6, characterized in that: Step S5 also includes the following steps: If the nut does not match the bolt, the nut is updated to another nut with different origin coordinates and axial vectors, and the process returns to step S4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the information extraction method according to any one of claims 1 to 9 is implemented.
11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the information extraction method according to any one of claims 1 to 9 is implemented.