A method for identifying ship weld features
Through the Delaunay triangulation method based on concave vertices and triangle rotations, complex welding seam characteristics are identified, which solves the problem of difficulty in identifying complex polygonal welding seams in the existing technology, and achieves efficient and accurate welding process parameter selection and welding quality. promote.
Patent Information
- Application Number
- CN202111483243.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-12-07
AI Technical Summary
Existing weld feature recognition technology mainly targets a single type of weld or partial joints, which limits its application scope. It is also difficult to quickly and accurately identify complex polygonal weld features, which affects the selection of welding process parameters and welding quality.
The Delaunay triangulation method based on concave vertices and triangle rotations is used to generate the STL file of the three-dimensional model. By extracting the contour lines and points of the model, combined with the joint spatial position judgment, the joint form and groove type are identified to realize complex welding. Fast and accurate identification of seam features.
It improves the speed and accuracy of welding robot welding process selection, shortens the algorithm running time, improves the accuracy and efficiency of feature recognition, expands the application scope of the welding process database, and ensures welding quality and efficiency.
Smart Images

Figure CN114332475B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of pattern recognition, and relates to a weld feature recognition technology based on a weldment digital model, and in particular to a ship weld feature recognition method. Background Art
[0002] Welding is an important part of shipbuilding. Due to the presence of welding smoke, arc light and metal splash, the welding working environment is often harsh. With the advent of Made in China 2025, the use of welding robots for automated welding can not only improve the consistency of welding quality, but also improve production efficiency and reduce costs, which is the key to promoting China's intelligent shipbuilding.
[0003] The key to the quality of welding is the rapid and accurate selection of welding process parameters, which requires accurate identification of weld features in the digital model of welded parts. Weld feature recognition has always been a research focus in the field of automated welding. At present, the research mainly focuses on the processing of weld images or digital point cloud models, mainly by collecting weld images or point cloud models through visual sensors, and then obtaining weld feature points based on extraction algorithms to achieve groove recognition. In addition, the secondary development of weld models using the modeling software API interface can obtain the property characteristics of welded parts and identify weld features. However, weld feature recognition is currently mainly aimed at a single type of weld, or at the extraction of some joints or individual grooves, which limits its scope of application. In addition, weld features are also an important reference for the recommendation of process parameters in the welding process database. Therefore, the research on ship weld feature recognition is conducive to the accurate identification of weld features in the digital model of ship welded parts, improving the rapidity and accuracy of welding process selection of welding robots, and at the same time, it also increases the diversity and effectiveness of the welding process database, which is conducive to optimizing the quality of weld formation. Summary of the invention
[0004] The purpose of the invention is to provide a method for identifying the characteristics of a ship weld in a digital model of a welded part.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions to achieve it:
[0006] A method for identifying ship weld features first generates an STL file of a three-dimensional model through Delaunay triangulation based on the rotation direction of directed triangles; then weld features are identified based on the STL file to identify the joint form and groove type. The specific steps are as follows:
[0007] Step 1. Delaunay triangulation based on concave vertices and triangle handedness;
[0008] Step 2. Generate STL file of 3D model;
[0009] Step 3. Extract the contour lines and points of the model;
[0010] Step 4. Determine the spatial position of the joint;
[0011] Step 5. Weld feature identification.
[0012] Furthermore, the Delaunay triangulation based on concave vertices and triangle hand directions in step 1 includes initial triangular mesh generation and local transformation of the triangular mesh, wherein the specific content and steps of the initial triangular mesh generation are as follows:
[0013] (1) Read the polygon vertices in counterclockwise order and store them in the array space in sequence;
[0014] (2) Determine the concavity and convexity of each vertex by the angle coefficient method and obtain all concave vertices;
[0015] (3) Take three vertices from the array space in order to form a directed triangle, and calculate its area for judging the direction of the triangle. If the calculation result is positive, the triangle is counterclockwise and rotates to step (4); otherwise, it is clockwise and rotates to step (5). If the three vertices are on the same straight line, also go to step (5);
[0016] (4) Determine whether the triangle contains a concave vertex. If there is no concave vertex, output the three vertices P that constitute the triangle. i , P i+1 , P i+2 , and P i+1 Remove from the array space, and use the starting point P of the triangle i , end point P i+2 and the next vertex P i+3 , forming a new directed triangle △P i P i+2 P i+3 Go to step (6); if there is a concave vertex, go to step (5);
[0017] (5) The triangle ΔP i P i+2 P i+3 Starting point P i Store back into the array space and take out the next vertex P i+1 , reconstructing a new directed triangle △P i+1 P i+2 P i+3 Go to step (6);
[0018] (6) Determine whether the number of vertices in the array space is less than or equal to 3. If so, end the triangle meshing. Otherwise, obtain the newly constructed directed triangle in step (4) or step (5), and then go to step (3) to determine the rotation direction.
[0019] The method of local transformation of the triangular mesh is to remove the boundary edges of the initial divided triangles, and process each remaining non-boundary edge according to the following steps:
[0020] 1) Traverse the initial triangular mesh, find two adjacent triangles with non-boundary edges as common edges, and determine the concavity of the quadrilateral formed by these two triangles. If it is a concave quadrilateral, do nothing; otherwise, go to step 2);
[0021] 2) Calculate the six interior angles of the two triangles and take the minimum angle α, then swap the diagonals and calculate the minimum angle β of the six interior angles of the two new triangles;
[0022] 3) Compare the angles α and β. If α≥β, keep the diagonal and swap the first two triangles; otherwise, keep the diagonal and swap the second two new triangles.
[0023] Furthermore, the specific content and method of generating the STL file of the three-dimensional model in step 2 is to obtain the geometric information of the triangular face by traversing each contour surface information of the three-dimensional model and using the above-mentioned Delaunay triangulation algorithm. The STL file in ASCII code file format can be obtained by triangulating the entire model.
[0024] Further, the specific content and method of extracting the contour lines and points of the model in step 3 is to combine all the triangular facets in the STL file in pairs, and process each pair of the combined triangular facets according to the following steps:
[0025] (I) Determine whether a pair of triangles have two common vertices. If so, they are adjacent; otherwise, they are not adjacent. For adjacent triangles, calculate the angle between their normal vectors and go to step (II); if they are not adjacent, take the next pair of triangles and continue the adjacent judgment of this step;
[0026] (II) Determine whether the common line segment of two triangles is the model contour line based on the angle between the normal vectors. If θ=0 or θ=180°, the common line segment formed by the two common vertices is not the model contour line; if 0<θ<180°, the common line segment is part of the model contour line;
[0027] (III) Output the common line segments of all triangular facets in different planes in step (II), and the entire contour of the model can be extracted;
[0028] (IV) Count the number of times each triangle vertex appears in all contour lines. If n ≥ 3, then the point is the model endpoint, and then all contour vertices are obtained.
[0029] Further, the spatial position judgment of the joint described in step 4 is mainly based on the number of times the normal vector at the belt determination surface is parallel, vertical and opposite in direction, and specifically adopts the following steps:
[0030] (a) Calculate the area of the triangles in STL based on Heron's formula and find the area of each contour surface. Take the first four groups with the largest area and obtain the normal vector of the corresponding contour surface;
[0031] (b) Perform a pairwise cross product on the normal vectors obtained in step (a) and find the modulus of the vector product. If the modulus is 0, the two normal vectors are parallel. Count the number of times the normal vectors are parallel, P. a ;
[0032] (c) Perform dot products on the normal vectors obtained in step (a) and calculate the dot product. If the product is 0, the two normal vectors are perpendicular. Count the number of times the normal vectors appear perpendicular V t ;
[0033] (d) Determine the directions of the normal vectors obtained in step (a) pairwise, and count the number of times they are in opposite directions. p ;
[0034] (e) According to P a ,V t ,O p The value of determines the spatial position relationship of the joint. a =6 and O p =4, the two joints are in parallel; if V t =4 and O p =2, the two joints are in a vertical state.
[0035] Further, the weld feature recognition in step 5 mainly includes joint form recognition and groove type recognition, wherein the method for joint form recognition specifically adopts the following steps:
[0036] (A) Obtain the shortest contour line groups of various types according to the total number of contour lines. If there are 24 contour lines, output the first 8 shortest contour line groups; if there are 27 contour lines, output the first 10 shortest contour line groups; if there are 30 contour lines, output the first 12 shortest contour line groups;
[0037] (B) Take the second shortest contour as the distance threshold. For the shortest contour group output in step (A), calculate all distances between the endpoints of each contour, remove the length of the contour itself, and compare the minimum distance with the distance threshold. If the minimum distance is greater than the distance threshold, the contour distance is called a large spacing; otherwise, it is called a small spacing;
[0038] (C) Identify the joint type based on the joint spatial position and contour line distance. If the joint is in a parallel state and the contour line distance is a small spacing, it is a butt joint; otherwise, it is a lap joint. If the joint is in a vertical state and the contour line distance is a small spacing, it is a corner joint; otherwise, it is a T-joint.
[0039] The method for identifying the groove type specifically adopts the following steps:
[0040] (D) Identify the groove type according to the total number of contour lines and the joint form. If the total number of contour lines is 24, when the joint form is a butt joint or an angle joint, go to step (E); when it is a lap joint or a T-joint, the joint is not grooved. If the total number of contour lines is 27, go to step (F). If the total number of contour lines is 30, go to step (G);
[0041] (E) Bevel identification is performed based on the angle α between the two minimum distance contour lines. If the joint is a flat joint, when α = 0, it is an I-type bevel; otherwise, it is a V-type bevel. If the joint is an angle joint, when α = 90°, it is a non-bevel; otherwise, it is a single-side bevel.
[0042] (F) Bevel identification is performed based on the distance between the contour lines. If the distance is small, it is a double-sided bevel of a corner joint; otherwise, it is a single-sided bevel of a T-joint;
[0043] (G) Bevel identification is performed based on the joint type and contour line distance. If it is a butt joint with a small spacing, it is a Y-shaped bevel of the butt joint; if it is a T-shaped joint with a large spacing, it is a double-sided bevel of the T-shaped joint.
[0044] The present invention has the following advantages and beneficial effects:
[0045] (1) The Delaunay triangulation based on concave vertices and triangle hand direction proposed in the present invention can realize the fast triangulation of complex polygons such as "combs", with a small number of distortion units and a better triangular mesh morphology; the convexity and concavity of each vertex can be effectively obtained through the angle coefficient method, which effectively reduces the time consumed by the initial triangular mesh division and improves the execution efficiency of the algorithm; finally, after the local transformation based on the minimum angle maximum criterion, the degree of mesh distortion is effectively reduced, making the entire mesh closer to a regular triangle, ensuring the generation of better mesh quality, and facilitating the acquisition of STL files.
[0046] (2) The extraction of model contour lines and points proposed by the present invention directly determines whether the common line segment is the model contour line through the normal vector angle of adjacent triangular facets, which effectively reduces the computational complexity of the algorithm and realizes the rapid acquisition of model contour lines and points. At the same time, the spatial position relationship judgment of the joint based on Heron's formula realizes the preliminary identification of the welding joint. Combined with the total number of contour lines and the minimum contour line distance, 4 types of joint forms and 10 types of grooves can be quickly and accurately identified, further shortening the algorithm running time and improving the accuracy and operation efficiency of the feature recognition algorithm.
[0047] (3) The weld feature recognition method proposed in the present invention not only recognizes more joint forms and groove types, but also has a shorter average running time for feature recognition, and has the advantages of high efficiency and high accuracy. In addition, the algorithm only needs to obtain the STL file of the model weld, which has a smaller amount of pre-processing than other methods, greatly improving the practicality and extensiveness of the algorithm. At the same time, it also provides a guarantee for the ship welding robot to quickly and accurately select welding process parameters and improve welding quality and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a general flow chart of a method for identifying characteristics of a ship weld according to the present invention;
[0049] Figure 2 Flowchart for initial triangulated mesh generation;
[0050] Figure 3 This is the principle diagram for judging concave and convex vertices;
[0051] Figure 4 This is a schematic diagram for determining the rotation direction of a triangle. Figure 4 (a) indicates counterclockwise rotation, Figure 4 (b) indicates clockwise rotation;
[0052] Figure 5 This is a schematic diagram for determining whether a triangle contains concave vertices. Figure 5 (a) indicates that the concave vertex is inside the triangle. Figure 5 (b) indicates that the concave vertex is on the edge of the triangle. Figure 5 (c) indicates that the concave vertex is outside the triangle;
[0053] Figure 6 Schematic diagram for determining the concavity and convexity of a quadrilateral. Figure 6 (a) represents a convex quadrilateral, Figure 6 (b) represents a concave quadrilateral;
[0054] Figure 7 This is the principle diagram of the minimum angle maximization criterion;
[0055] Figure 8 It is a schematic diagram with judgment surface. Figure 8 (a) is a schematic diagram of a butt joint. Figure 8 (b) is a schematic diagram of a corner joint. Figure 8 (c) shows a schematic diagram of a T-joint;
[0056] Fig. 9 Select a schematic for the contour line. Fig. 9 (a) shows the schematic diagram of the first 8 groups of contour lines. Fig. 9 (b) shows the schematic diagram of the first 10 groups of contour lines; Fig. 9 (c) shows the schematic diagram of the first 12 groups of contour lines;
[0057] Fig.10 The test results of four triangulation methods are shown;
[0058] Fig.11 Test results of four triangulations of the "comb" polygon;
[0059] exist Fig.10 and Fig.11 middle, Fig.10 (a) Fig.11 (a) shows the test results of the single-connected polygon ring tracing algorithm. Fig.10 (b) Fig.11 (b) shows the test results of the triangulation algorithm based on concave and convex vertices. Fig.10 (c) Fig.11 (c) represents the test results of the dynamic Delaunay triangulation algorithm. Fig.10 (d) Fig.11 (d) represents the test results of the present invention;
[0060] Fig.12 For the weld feature recognition test of the cabin section, Fig.12 (a) indicates the case number of the weld in the cabin section, Fig.12 (b) Fig.12 (c), 12(d), Fig.12 (e) and Fig.12 (f) represent the characteristics of welds 1, 2, 3, 4, 5 and 6 respectively. DETAILED DESCRIPTION
[0061] In order to make the purpose and technical solution of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] like Figure 1As shown, a weld feature recognition method of the present invention. First, the concave and convex vertices of the polygon are determined by the angle coefficient method, and the Delaunay triangulation based on the concave vertices and the triangle rotation direction is used to construct the triangular mesh of the three-dimensional model surface and generate an STL file; then, based on the normal vector angle of adjacent triangular facets, the contour lines and points of the model are extracted; finally, the weld features are identified according to the spatial position of the joint and the minimum contour line distance. The specific steps are as follows:
[0063] (1) Delaunay triangulation based on concave vertices and triangle handedness;
[0064] (2) Generate STL file of 3D model;
[0065] (3) Extract the contour lines and points of the model;
[0066] (4) Determination of the spatial position of the joint;
[0067] (5) Weld feature identification.
[0068] like Figure 2 , 3, 4, 5, 6 and 7, the Delaunay triangulation based on concave vertices and triangle hand direction includes initial triangular mesh generation and local transformation of the triangular mesh, wherein the method for generating the initial triangular mesh adopts the following steps:
[0069] (1) Read the vertices of the polygon P1, P2, ..., P in counterclockwise order. n , and store them into the array space in sequence;
[0070] (2) The convexity and concavity of each vertex are determined by the angle coefficient method to obtain all concave vertices. The determination method is as follows:
[0071] like Figure 3 As shown, at the pending vertex P i+1 Two horizontal straight lines l1 and l2 are set at equal distances above and below it, and the straight lines l1 or l2 are respectively connected to the front edge P i P i+1 , behind P i+1 P i+2 The intersection points are A and B. Let the straight line AP i+1 , BP i+1 The slopes of are tanα and tanβ respectively, and the difference in angle coefficients Δ is calculated. If: (i) the intersection points A and B are on the same horizontal line and Δ>0, then the vertex P i+1 is a concave vertex; otherwise, Δ<0, then vertex P i+1 is a convex vertex. (ii) If the intersection points A and B are not on the same horizontal line and Δ>0, then vertex P i+1 is a convex vertex; otherwise, Δ<0, then vertex P i+1is a concave vertex. Its calculation is as follows:
[0072]
[0073] In the formula, x a ,y a is the horizontal and vertical coordinates of the intersection point A; x b ,y b is the horizontal and vertical coordinates of the intersection point B; x Pi+1 ,y Pi+1 For vertex P i+1 Horizontal and vertical coordinate values.
[0074] In addition, if the previous P i P i+1 Or the back P i+1 P i+2 When it is a horizontal straight line, the above formula 1 / tanα=0 or 1 / tanβ=0.
[0075] (3) Take three vertices P from the array space in order j , P j+1 , P j+2 To form a directed triangle △P j P j+1 P j+2 , find its area S △Pj Pj+1Pj+2 Determine the direction of the triangle. Figure 4 As shown, if the calculation result is positive, the triangle is rotated counterclockwise and step (4); otherwise, it is rotated clockwise and step (5). If the three vertices are on the same straight line, step (5) is also performed. The calculation is as follows:
[0076]
[0077] Where (x0, y0) is the vertex P j Coordinates; (x1, y1) is the vertex P j+1 Coordinates; (x2, y3) is the vertex P j+2 coordinate.
[0078] (4) Determine whether the triangle contains a concave vertex. If there is no concave vertex, output the three vertices P that constitute the triangle. i , P i+1 , P i+2 , and P i+1 Remove from the array space, and use the starting point P of the triangle i , end point P i+2 and the next vertex P i+3 , forming a new directed triangle △P i P i+2 Pi+3 Go to step (6); if there is a concave vertex, go to step (5). The judgment method is as follows:
[0079] like Figure 5 As shown, the undetermined concave vertex D and the triangle vertex P i , P i+1 , P i+2 Connect them, and we get ∠P i DP i+1 , ∠P i DP i+2 , ∠P i+1 DP i+2 Three angles. If point D is inside or on the edge of triangle ABC, that is, ∠ADB+∠ADC+∠BDC=360°, then the interior of the triangle contains a concave vertex; if point D is outside triangle ABC, that is, ∠ADB+∠ADC+∠BDC<360°, then the interior of the triangle does not contain a concave vertex.
[0080] (5) The triangle ΔP i P i+2 P i+3 Starting point P i Store back into the array space and take out the next vertex P i+1 , reconstructing a new directed triangle △P i+1 P i+2 P i+3 Go to step (6);
[0081] (6) Determine whether the number of vertices in the array space is less than or equal to 3. If so, end the triangle meshing. Otherwise, obtain the newly formed directed triangle in step (4) or step (5), i.e., △P i P i+2 P i+3 or △P i+1 P i+2 P i+3 , then go to step (3) to determine the rotation direction.
[0082] like Figure 6 and Figure 7 As shown, the local transformation of the triangular mesh is performed based on the minimum angle maximum criterion, so that the triangular shape of the mesh is optimal, that is, the boundary edges of the initial divided triangles are removed, and each of the remaining non-boundary edges is processed according to the following steps:
[0083] (1) Traverse the initial triangular mesh, find two adjacent triangles with non-boundary edges as common sides, and determine the concavity of the quadrilateral formed by these two triangles. If it is a concave quadrilateral, do nothing; otherwise, go to step (2). The method for determining the concavity of a quadrilateral is as follows:
[0084] like Figure 6As shown, the common side of two adjacent triangles is recorded as straight line l1, and the straight line connecting the two vertices of the two triangles that are not on the common side is recorded as l2. If the straight lines l1 and l2 intersect, it is a convex quadrilateral; otherwise, it is a concave quadrilateral;
[0085] (2) Calculate the six interior angles of the two triangles and take the smallest angle α, then Figure 7 Exchange the diagonals and calculate the minimum angle β of the six interior angles in the two new triangles;
[0086] (3) Compare the angles α and β. If α ≥ β, keep the diagonals and swap the first two triangles; otherwise, keep the diagonals and swap the second two new triangles.
[0087] The method for generating the STL file of the three-dimensional model mainly involves calling the SolidWorks software API function, traversing each contour surface of the three-dimensional model, and extracting the normal vector (pointing to the outside of the entity) and contour vertex coordinate information on each contour surface. The vertices of each contour surface are arranged counterclockwise, and the above-mentioned triangulation algorithm is used to use the three vertex coordinates outputted by each division as the three vertex coordinates of the triangular face, and the normal vector of the triangular face is the normal vector of the contour surface, thereby forming the geometric information of a triangular face. The STL file in ASCII code file format can be obtained by triangulating the entire model.
[0088] like Figure 8 As shown in the figure, the positional relationship of the two joints' surfaces to be determined directly affects the joint form. Since the surface to be determined is larger than the groove end face, the surface to be determined is obtained by calculating the area of each contour surface and taking the first four groups with the largest area; then, the spatial positional relationship of the four types of joints is determined based on the parallel or perpendicular relationship of the normal vector (dashed line) at the surface to be determined.
[0089] like Fig. 9 As shown in the figure, according to the number of contour lines of 10 types of welding grooves, they can usually be divided into three categories: 24, 27 and 30. When the number of contour lines is 24, there are mainly six types: I-type groove and V-type groove of butt joints; no groove and single-side groove of corner joints; no groove of T-type and lap joints. Fig. 9 (a) It is the I-type groove corresponding to the butt joint among the 24 contour line types. The weld feature recognition involved in this type mainly takes out the first 8 groups of the shortest contour lines; then calculates all the distances between the endpoints of the 8 groups of contour lines; finally, the joint form and groove type are identified according to the joint spatial position and the minimum contour line distance. When there are 27 contour lines, there are only two types: the double-sided groove of the corner joint and the single-sided groove of the T-joint. Fig. 9(b) It is the double-sided groove corresponding to the fillet joint in the 27 contour line types. The weld feature recognition involved in this type is mainly for the shortest 10 groups of contour lines, and refers to the same processing method in the 24 contour lines to identify the corresponding joint form and groove type. When the number of contour lines is 30, there are also only two types: the Y-shaped groove of the butt joint and the double-sided groove of the T-shaped joint. Fig. 9 (c) is the double-sided groove corresponding to the T-joint among the 30 contour line types. The weld feature recognition is mainly based on the 12 groups of shortest contour lines and the joint form and groove type are identified in the same way as above.
[0090] The method for extracting the contour lines and points of the model is to combine all the triangular facets in the STL file in pairs, and process each pair of the combined triangular facets according to the following steps:
[0091] (1) Determine whether a pair of triangles has two common vertices. If so, they are adjacent; otherwise, they are not adjacent. For adjacent triangles, calculate the angle between their normal vectors and go to step (2); if they are not adjacent, take the next pair of triangles and continue the adjacent judgment of this step. The calculation is as follows:
[0092]
[0093] Where (x, y, z) 1,2 are the normal vectors of the two triangles respectively.
[0094] (2) Determine whether the common line segment of the two triangles is the model contour line based on the normal vector angle. If θ = 0 or θ = 180°, the two triangles are in the same plane, and the common line segment formed by their two common vertices is not the model contour line; if 0 < θ < 180°, the two triangles are in different planes, and the common line segment is part of the model contour line;
[0095] (3) Output the common line segments of all triangular facets in different planes in step (2), and the entire contour of the model can be extracted;
[0096] (4) Count the number of times each triangle vertex appears in all contour lines. If n ≥ 3, the point is the model endpoint, and then all contour vertices are obtained;
[0097] The spatial position determination of the joint is mainly based on the number of times the normal vector at the determination surface is parallel, perpendicular and opposite in direction, and specifically adopts the following steps:
[0098] (1) Calculate the area of the triangular face in STL based on Heron's formula and find the area of each contour surface. Take the first four groups with the largest area and obtain the normal vector of the corresponding contour surface. Heron's formula is as follows:
[0099]
[0100] Among them: p = (a + b + c) / 2 is the semi-perimeter; a, b, c are the side lengths.
[0101] (2) Perform a pairwise cross product on the normal vectors obtained in step (1) and calculate the modulus of the vector product. If the modulus is 0, the two normal vectors are parallel. Count the number of times the normal vectors are parallel, P. a . It is calculated as follows:
[0102]
[0103] Where (l,m,n) is the normal vector of the contour surface Coordinates; (o, p, q) is the normal vector of the contour surface coordinate.
[0104] (3) Perform dot products on the normal vectors obtained in step (1) and calculate the dot product. If the product is 0, the two normal vectors are perpendicular. Count the number of times the normal vectors appear perpendicular V t . It is calculated as follows:
[0105]
[0106] Where (l,m,n) is the normal vector of the contour surface Coordinates; (o, p, q) is the normal vector of the contour surface coordinate.
[0107] (4) Determine the directions of the normal vectors obtained in step (1) pairwise, and count the number of times they are in opposite directions. p .
[0108] (5) According to P a ,V t ,O p The value of determines the spatial position relationship of the joint. a =6 and O p =4, the two joints are in parallel; if V t =4 and O p =2, the two joints are in a vertical state.
[0109] The weld feature recognition mainly includes joint form recognition and groove type recognition. The joint form recognition mainly includes recognition of four types of joint forms: flat joint, lap joint, corner joint and T-joint, and adopts the following steps:
[0110] (1) Obtain the shortest contour line groups of various types according to the total number of contour lines. If there are 24 contour lines, output the first 8 shortest contour line groups; if there are 27 contour lines, output the first 10 shortest contour line groups; if there are 30 contour lines, output the first 12 shortest contour line groups;
[0111] (2) Take the second shortest contour as the distance threshold. For the shortest contour group output in step (1), calculate all distances between the endpoints of each contour, remove the length of the contour itself, and compare the minimum distance with the distance threshold. If the minimum distance is greater than the distance threshold, the contour distance is called a large spacing; otherwise, it is called a small spacing.
[0112] (3) Identify the joint type based on the joint spatial position and contour line distance. If the joint is in a parallel state and the contour line distance is a small spacing, it is a butt joint; otherwise, it is a lap joint. If the joint is in a vertical state and the contour line distance is a small spacing, it is a corner joint; otherwise, it is a T-joint.
[0113] The groove type identification mainly includes I-type, V-type and Y-type grooves of butt joints; non-grooved, single-sided and double-sided grooves of corner joints and T-type joints, and non-grooved grooves of lap joints. The following steps are used:
[0114] (1) Identify the groove type according to the total number of contour lines and the joint form. If the total number of contour lines is 24, when the joint form is a butt joint or an angle joint, go to step (2); when it is a lap joint or a T-joint, the joint is not grooved. If the total number of contour lines is 27, go to step (3). If the total number of contour lines is 30, go to step (4);
[0115] (2) Bevel identification is performed based on the angle α between the two minimum distance contour lines. If the joint is a flat joint, when α = 0, it is an I-type bevel; otherwise, it is a V-type bevel. If the joint is an angle joint, when α = 90°, it is a non-bevel; otherwise, it is a single-sided bevel.
[0116] (3) Bevel identification is performed based on the distance between the contour lines. If the distance is small, it is a double-sided bevel of a corner joint; otherwise, it is a single-sided bevel of a T-joint;
[0117] (4) Bevel identification is performed based on the joint type and contour line distance. If it is a butt joint with a small spacing, it is a Y-shaped bevel of the butt joint; if it is a T-shaped joint with a large spacing, it is a double-sided bevel of the T-shaped joint.
[0118] In order to verify the effectiveness and stability of the ship weld feature recognition method of the present invention, the polygons such as the "comb" were segmented and tested, and the single-connected polygon ring tracing algorithm (single-connected tracing method) was used to compare the results. [1] , triangulation algorithm based on concave and convex vertices (concave and convex vertex triangulation method) [2] and dynamic Delaunay triangulation algorithm (dynamic Delaunay method) [3] The results of the four methods for dividing two types of polygons are shown in the figure below. Fig.10 and Fig.11 As shown in the figure, the performance index of the segmentation comparison is the average grid quality coefficient q M and the mesh-associated quality factor q J .
[0119] References:
[0120] [1] Zhou Zhi. Research on triangulation algorithm[D]. Harbin: Harbin University of Science and Technology, 2007.
[0121] [2] Li Lan. Triangulation of simple polygonal regions based on concave and convex vertex determination [J]. Journal of China University of Metrology, 2001(1):166-168.
[0122] [3] Luo Xiaohua, Fu Wenchao, Guan Peixiang, et al. Dynamic Delaunay triangulation algorithm for simple polygons[J]. Journal of Jinan University (Natural Science and Medicine Edition), 2011, 32(1): 26-30, 5.
[0123] Depend on Fig.10 and Fig.11 It can be seen that the number of deformed triangles in the single-connected pursuit method is the largest, and the mesh morphology is poor, while the number of deformed triangles in the algorithm of the present invention is less, which is significantly optimized. When dividing the "comb" polygon, the dynamic Delaunay method cannot achieve segmentation, while the segmentation test of the algorithm of the present invention is normal and is better than the other two methods in controlling the number of deformed triangles, and the segmentation quality is the best.
[0124] Table 1 shows the results of mesh quality analysis. It can be seen from the table that the mesh quality of the proposed algorithm is better than that of the other three methods in terms of both the average mesh quality coefficient and the mesh correlation quality coefficient. Fig.10 The average polygon increase was 12.49% and 12.78% respectively, targeting Fig.11 The polygons increased by an average of 11.62% and 11.74% respectively, which further illustrates that the algorithm of the present invention effectively reduces the degree of mesh deformity, making the entire mesh closer to a regular triangle, thus ensuring the generation of a better mesh quality.
[0125] Table 1:
[0126]
[0127] In order to further verify the effectiveness of the algorithm of the present invention, Fig.12 The six welds on the middle ship cabin section were tested for feature recognition and modeled with a welding workpiece library based on welding features (feature library design method) [4] and the traversal feature tree technology based on SolidWorks (traversal feature method) [5] A comparison was made.
[0128] References:
[0129] [4] Ying Can. Research on trajectory optimization of cooperative motion of welding robot workstation[D]. Guangzhou: South China University of Technology, 2013.
[0130] [5] Zhang Zenan, Zhong Liangwei. Secondary development of automatic weld annotation based on SolidWorks[J]. Software Engineering, 2020, 23(5): 17-20.
[0131] Table 2 shows the test results of three weld feature recognition methods. It can be seen from the table that the traversal feature method can only recognize two types of butt joints and T-joints, and cannot recognize the groove type, and the recognition effect is poor. Although the feature library design method can accurately identify 6 weld features like the algorithm of the present invention, the average running time of joint and groove recognition is higher than that of the algorithm of the present invention, and the execution efficiency is low. In addition, the feature library design method needs to first perform feature modeling design and establish a database for all welds on the cabin section, which greatly increases the development workload, and when the database scale is large, it may take a long time to match the weld features. The algorithm of the present invention has a shorter average running time for joint and groove recognition, higher execution efficiency, and only needs to obtain the STL file of the model weld, so the initial processing volume is small, and it can recognize more joint forms and groove types with high accuracy.
[0132] Tables 3 and 4 are the detailed test results of joints and grooves of the algorithm of the present invention, respectively. It can be seen from the tables that the algorithm of the present invention can quickly count the number of times the normal vector is parallel, vertical, and opposite at the surface to be determined, accurately obtain the minimum contour line distance, distance threshold, total number of contour lines, and the angle between two minimum distance contour lines, and make correct judgments and comparisons based on key parameters, and accurately identify the joint forms and groove types of 6 welds, namely, I-type groove of butt joint, V-type groove of butt joint, T-joint without groove, corner joint without groove, corner joint double-sided groove, and T-joint double-sided groove, thereby realizing accurate recognition of weld features with high execution efficiency, verifying the effectiveness of the algorithm of the present invention.
[0133] Table 2:
[0134]
[0135] Table 3:
[0136]
[0137] Table 4:
[0138]
[0139] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, a person skilled in the art should understand that the specific implementation modes of the present invention can still be modified or replaced by equivalents, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A method for identifying ship weld features, characterized in that: The steps include: (1) Delaunay triangulation based on concave vertices and triangle handedness; The Delaunay triangulation based on concave vertices and triangle hand direction includes initial triangular mesh generation and local transformation of the triangular mesh; (2) Generate STL file of 3D model; The STL file of the three-dimensional model is generated by traversing each contour surface information of the three-dimensional model and using the above-mentioned Delaunay triangulation algorithm to obtain the geometric information of the triangular facets; and the STL file in the ASCII code file format is obtained by triangulating the entire model; (3) Extract the contour lines and points of the model; (4) Determination of the spatial position of the joint; (5) Weld feature recognition; The weld feature recognition includes joint form recognition and groove type recognition; The joint form identification specifically adopts the following steps: (m) Obtain various types of shortest contour line groups according to the total number of contour lines; when the total number of contour lines is 24, output the first 8 groups of the shortest contour line groups; when the total number of contour lines is 27, output the first 10 groups of the shortest contour line groups; when the total number of contour lines is 30, output the first 12 groups of the shortest contour line groups; (n) taking the second shortest contour line as the distance threshold; for the shortest contour line group output in step (m), calculating all distances between the endpoints of each contour line, removing the length of the contour line itself, and comparing the minimum distance with the distance threshold; when the minimum distance is greater than the distance threshold, the contour line distance is called a large spacing; otherwise, it is called a small spacing; (o) Identify the joint type based on the joint spatial position and the distance from the contour line; when the joint is parallel and the distance from the contour line is small, it is a butt joint; when the joint is parallel and the distance from the contour line is large, it is a lap joint; when the joint is vertical and the distance from the contour line is small, it is a corner joint; when the joint is vertical and the distance from the contour line is large, it is a T-joint; The groove type identification specifically adopts the following steps: (p) Identify the groove type according to the total number of contour lines and the joint form; when the total number of contour lines is 24 and the joint form is a butt joint or an angle joint, go to step (q); when it is a lap joint or a T-joint, the joint is not grooved; if the total number of contour lines is 27, go to step (s); if the total number of contour lines is 30, go to step (t); (q) Bevel identification is performed based on the angle α between the two minimum distance contour lines; when the joint form is a butt joint and α=0, it is an I-type bevel of a butt joint; when the joint form is a butt joint and α≠0, it is a V-type bevel of a butt joint; when the joint form is an angle joint and α=90°, it is a non-beveled angle joint; when the joint form is an angle joint and α≠90°, it is a single-sided bevel of an angle joint; (s) Bevel identification is performed based on the distance between contour lines; when the distance is small, it is a double-sided bevel of a fillet joint; otherwise, it is a single-sided bevel of a T-joint; (t) The groove is identified according to the joint form and the distance between the contour lines. When it is a butt joint with a small spacing, it is a Y-shaped groove of the butt joint; when it is a T-shaped joint with a large spacing, it is a double-sided groove of the T-shaped joint.
2. A ship weld feature recognition method according to claim 1, characterized in that: The method of local transformation of the triangular mesh in step (1) is to remove the boundary edges of the initial divided triangles and process each remaining non-boundary edge according to the following method and steps: (a) Traverse the initial triangular mesh, find two adjacent triangles with non-boundary edges as common sides, and determine the concavity of the quadrilateral formed by these two triangles; if it is a concave quadrilateral, do nothing; otherwise, go to step (b); (b) Calculate the six interior angles of the two triangles and take the smallest angle α, then swap the diagonals and calculate the smallest angle β of the six interior angles of the two new triangles; (c) Compare the angles α and β. If α ≥ β, keep the diagonals and swap the first two triangles. Otherwise, keep the diagonals and swap the second two triangles.
3. A method for identifying ship weld features according to claim 1, characterized in that: The method for extracting the contour lines and points of the model in step (3) is to combine all the triangular facets in the STL file in pairs, and process each pair of the combined triangular facets according to the following steps: (d) Determine whether a pair of triangular facets have two common vertices. If yes, they are adjacent; otherwise, they are not adjacent. For adjacent triangular facets, calculate the angle between their normal vectors and go to step (e). If not, take the next pair of triangular facets and continue the adjacent determination in this step. (e) Determine whether the common line segment of the two triangles is the model contour line according to the normal vector angle; when θ = 0 or θ = 180°, the common line segment formed by the two common vertices is not the model contour line; when 0 < θ < 180°, the common line segment is part of the model contour line; (f) outputting the common line segments of all triangular facets located in different planes in step (e), that is, extracting the entire contour of the model; (g) Count the number of times n that each triangle vertex appears in all contour lines; when n ≥ 3, the point is the model endpoint, and then all contour vertices are obtained.
4. A method for identifying ship weld features according to claim 1, characterized in that: The specific method for determining the spatial position of the joint in step (4) is as follows: (h) Calculate the area of the triangles in STL based on Heron's formula and find the area of each contour surface; take the first four groups with the largest area and obtain the normal vector of the corresponding contour surface; (i) Perform a pairwise cross product on the normal vectors obtained in step (h) and find the modulus of the vector product; if the modulus is 0, the two normal vectors are parallel; count the number of times the normal vectors appear parallel, P a ; (j) performing dot products on the normal vectors obtained in step (h) and calculating the dot product; when the product is 0, the two normal vectors are perpendicular; Count the number of times the normal vector appears vertical V t ; (k) Determine the directions of the normal vectors obtained in step (h) pairwise, and count the number of times they are in opposite directions. p ; (l) According to P a ,V t ,O p The value of determines the spatial position relationship of the joint; when P a =6 and O p =4, the two joints are in parallel; when V t =4 and O p =2, the two joints are in a vertical state.
