High-precision reconstruction method for swept surface and surface reconstruction method for pipeline parts

By calculating the curvature of the triangular mesh and creating a unified curvature vector field, combining Gaussian mapping iteration and ICP registration optimization, inversely compute the correction path, the problem of poor accuracy of swept surface reconstruction is solved, and high-precision and high-reliability sweep is achieved Surface reconstruction method, suitable for surface reconstruction of pipeline parts.

CN118762145BInactive Publication Date: 2024-11-22CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411253719.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing swept surface reconstruction scheme has the problem of poor accuracy, which leads to low reliability and accuracy of surface reconstruction of pipeline parts, and cannot achieve automated operation, which is susceptible to discrete errors.

Method used

By obtaining the data information of the target swept surface, calculating the curvature of the triangular mesh surface, creating a unified curvature vector field based on the curvature direction and smoothing processing, using Gaussian mapping iteration and ICP registration optimization to fit the profile curve, and inversely compute the correct tracking path. Use the tangent space representation method to identify and fit the path curves to achieve high-precision reconstruction of the swept surface.

Benefits of technology

High-precision reconstruction of the sweeping surface is realized, the reliability and accuracy of reconstruction is improved, discrete errors of the tracking path are effectively avoided, and path accuracy is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762145B_ABST
    Figure CN118762145B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for high-precision reconstruction of a swept surface, including obtaining data information of a target swept surface and obtaining a triangular mesh model; calculating the curvature of the triangular mesh surface and obtaining an initial path; obtaining a contour curve by fitting the initial path; inversely calculating and correcting an ordered point set of the tracking path according to the contour curve, correcting the straight line segments and arc segments of the ordered point set of the tracking path and fitting to obtain a path curve; and completing the reconstruction of the final swept surface according to the contour curve and the path curve. The present invention also discloses a method for reconstructing a pipeline part surface including the method for high-precision reconstruction of a swept surface. The present invention approximates a swept cross section by Gaussian mapping, corrects the tracking path by inverse calculation, effectively avoids discrete errors of the tracking path, and combines constraints to improve path accuracy; therefore, the present invention can not only realize automatic high-precision reconstruction of the swept surface, but also has higher reliability and better accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electrical digital signal processing, and in particular relates to a high-precision reconstruction method for a swept surface and a pipeline part curved surface reconstruction method. Background Art

[0002] Sweeping is a commonly used surface modeling technique in CAD (Computer-Aided Design), which can create solids or surfaces by extending contour shapes along a specified path. There are usually three types of sweeping rules: (1) the cross-section normal remains unchanged; (2) the cross-section normal is consistent with the path tangent; (3) the cross-section normal changes according to a certain rule. In CAD and computer graphics, sweeping is widely used in 3D modeling, graphics and animation production due to its efficiency and intuitiveness, and its ability to create a variety of complex 3D shapes, curves and surfaces.

[0003] At present, the high-precision reconstruction schemes for swept surfaces often focus on minimizing reconstruction errors. At first, the swept surface reconstruction scheme used a swept surface fitting algorithm for reconstruction; later, swept surface reconstruction methods based on contour and path extraction appeared one after another; for example, the cross-sections were clustered to form sweep components, and local approximate sweep results were presented through local linear embedding, but such schemes ignored the influence of the original design contour or path on the sweep results. In addition, the scheme of reconstructing swept surfaces using contours and paths extracted based on curvature fields cannot be automated, and such schemes are easily affected by discrete errors, resulting in low surface reconstruction accuracy.

[0004] A typical application of the swept surface reconstruction scheme is the surface reconstruction of pipeline parts (including sewage pipes, cable pipes, etc.); such parts can be regarded as regular swept surfaces without deformation, so the swept surface reconstruction method can be used to achieve the surface reconstruction of pipeline parts. However, due to the poor accuracy of the existing swept surface reconstruction scheme, the reconstructed pipeline surface also has poor reliability and accuracy. Summary of the invention

[0005] One of the purposes of the present invention is to provide a high-precision automatic reconstruction method for a swept surface with high reliability and good accuracy.

[0006] A second object of the present invention is to provide a pipeline part curved surface reconstruction method including the swept surface high-precision reconstruction method.

[0007] The high-precision reconstruction method of the swept surface provided by the present invention comprises the following steps:

[0008] S1. Obtaining data information of the target swept surface and obtaining a corresponding triangular mesh model;

[0009] S2. For the triangular mesh model obtained in step S1, calculate the curvature of the triangular mesh surface, create a unified curvature vector field based on the curvature direction and smoothing, and obtain an initial path;

[0010] S3. According to the initial path obtained in step S2, a contour curve is fitted based on Gaussian mapping iteration and ICP registration optimization;

[0011] S4. According to the contour curve obtained in step S3, reverse calculation of the ordered point set of the corrected tracking path is performed, and the straight line segments and arc segments of the ordered point set of the corrected tracking path are identified by the tangent space representation method, and the straight line - arc segment fitting is performed based on the tangent constraint to obtain the path curve;

[0012] S5. Complete the reconstruction of the final swept surface according to the contour curve obtained in step S3 and the path curve obtained in step S4.

[0013] The step S2 comprises the following steps:

[0014] For the triangular mesh model obtained in step S1, the curvature of the triangular mesh surface is calculated based on the Normal Cycle theory;

[0015] Weak curvature regions are detected based on curvature direction and curvature value; for several vector field sub-regions divided by weak curvature regions, vector field sub-regions are classified and aligned based on the main curvature direction; finally, the weak curvature regions are smoothed to create a unified curvature vector field;

[0016] According to the data information of the normal vector and corresponding vector of any edge point on the triangulated network, the initial path is tracked.

[0017] The calculation to obtain the curvature of the triangular mesh surface specifically includes the following steps:

[0018] Compute the curvature of a triangular mesh surface:

[0019] For any vertex of a triangle mesh and its geodesic disk of radius r , the curvature tensor matrix is ​​calculated using the following formula : In the formula Geodesic disk The area of ​​​​the geodesic disk The edge of the middle grid; is the angle between the normals of two triangles with e as the common edge; For line segment Length; is the unit vector in the e direction;

[0020] Curvature tensor matrix Perform eigendecomposition: the eigenvector corresponding to the minimum eigenvalue is the vertex Normal vector The eigenvector corresponding to the maximum eigenvalue is the minimum principal curvature vector , the eigenvector corresponding to the second largest eigenvalue is the maximum principal curvature vector ;

[0021] Get the original maximum and minimum curvature vector fields of the discrete mesh vertices.

[0022] The creation of a unified curvature vector field specifically includes the following steps:

[0023] Detecting regions of weak curvature:

[0024] If the given m-ring neighborhood of point p Inside, satisfied , then the point p is determined to be within the angular tolerance The bottom has a strong curvature;

[0025] All within the angle tolerance The points below that do not have strong curvature constitute the weak curvature region;

[0026] Classification and alignment of vector field sub-regions:

[0027] The weak curvature region divides the vector field into several vector field sub-regions;

[0028] Arbitrarily choose an initial strong curvature point ,calculate Normal , the maximum principal curvature vector , minimum principal curvature vector ; Normal and the maximum principal curvature vector The determined plane is , normal and the minimum principal curvature vector The determined plane is ;

[0029] calculate , The intersection of the triangle mesh surface and the normal at the intersection is calculated. The deviation error , calculate the normal at the intersection and The deviation error ;

[0030] like , then select The minimum principal curvature direction of is the determination curvature direction, and Classified as the minimum curvature set ;like , then select The maximum principal curvature direction of is used as the determination curvature direction, and Classified as the maximum curvature set ;

[0031] For the remaining strong curvature points , , the following rules are used for judgment:

[0032] like The direction of minimum curvature is The judgment curvature direction is consistent, then Classified under , and select The direction of minimum curvature is Determine the curvature direction;

[0033] like The direction of maximum curvature is The judgment curvature direction is consistent, then Classified under , and select The direction of maximum curvature is Determine the curvature direction;

[0034] Complete classification and alignment of vector field sub-regions;

[0035] Smooth regions of weak curvature:

[0036] After classifying and aligning the vector field sub-regions, the initial aligned vector field is obtained; for the weak curvature region Smoothing of the points:

[0037] For weak curvature points , The set of strong curvature points in the m-ring field is , the following formula is used for smoothing: In the formula The curvature vector at the weak curvature point calculated for smoothing; is the curvature vector after the strong curvature points are aligned, and , Z is the number of strong curvature points;

[0038] Finally, the curvature vector at the mesh vertex p is .

[0039] The tracking to obtain the initial path specifically includes the following steps:

[0040] For any point on the edge of the triangle mesh ,calculate Normal and the curvature vector The determined plane ;Will and The triangle corresponding to the half-edge structure Find the intersection, the intersection point is q;

[0041] Set maximum compensation ;like , then set ;like , then set ;

[0042] Finally, we get the ordered point set of the initial path .

[0043] The step S3 comprises the following steps:

[0044] The input of this step is: the ordered point set of the initial path, the triangular mesh, the set allowable error accuracy ;

[0045] The output of this step is: contour line , transformation mapping ;

[0046] A. Take the first point in the ordered point set of the initial path Normal and The vector direction The determined plane is the initial section , and as the current section;

[0047] B. Perform Gaussian iteration:

[0048] B1. Find the intersection of the current section and the triangular mesh to obtain the set N of intersection normals; transform N through Gaussian mapping Mapped onto the Gaussian sphere;

[0049] B2. Use the least squares method to fit the normal line on the Gaussian sphere, and then use the Gaussian inverse mapping to transform the normal line To the triangular mesh, get a new section and use it as the current section;

[0050] B3. Repeat steps B1 and B2 until the following conditions are met: ,exist ;in, is the normal of any intersection point between the current section and the mesh, is the normal direction of the current section, Represents the inner product of two vectors; in this case, the intersection with the triangulated network is considered as a set of points on the contour ;

[0051] C. Execute steps A and B for all points in the ordered point set of the initial path to obtain the point set I on the contour;

[0052] D. Choose so that The point set corresponding to the minimum The plane where it is located is the target point set , use ICP algorithm to calculate other point sets With the target point set Transformation mapping between , is the normal of any intersection point between the section and the mesh of the jjth Gaussian iteration, is the section normal of the jjth Gaussian iteration; Projecting a section onto a target point set The plane where the projection point set is located is calculated using B-spline. Fitting to get the contour line .

[0053] The step S4 comprises the following steps:

[0054] Mapping by transformation The inverse transformation is used to perform inverse transformation mapping on the target point set and the points on the path to obtain the ordered point set of the modified tracking path;

[0055] The tangent space representation method is used to detect the arc segments and straight line segments of the ordered point set of the corrected tracking path;

[0056] According to the detected arc segments and straight line segments, the straight line segments and arc segments are implicitly represented, and the path curve is calculated by the least square method in combination with the standardized condition and the continuous condition.

[0057] The step S4 specifically comprises the following steps:

[0058] Inverse calculation to correct the ordered point set of the tracking path:

[0059] Each target point set Each plane corresponds to a transformation mapping ; Through the formula Perform inverse transformation mapping to obtain the ordered point set Q of the modified tracking path: ; Transformation Mapping The inverse transformation of For contour lines The point on

[0060] Corrected recognition of straight and circular segments for ordered set of points in a trace path:

[0061] The tangent space representation method is used to detect arcs and straight line segments;

[0062] Two adjacent points in Q and The distance between Expressed as , the angle between adjacent polyline segments Expressed as ; By transforming Map the ordered point set Q of the corrected tracking path to the ordered line segment set G of the two-dimensional plane; where, for The horizontal axis of for The vertical coordinate of

[0063] In the ordered line segment set G of the two-dimensional plane, the line segment The midpoint of ; Connect all midpoints to obtain midpoint polyline segments; if the difference between the slopes of adjacent midpoint polyline segments is lower than the set value and the slope is not 0, then the points corresponding to the midpoint polyline segments are determined to belong to the arc segment; if the difference between the angles of adjacent midpoint polyline segments and 0 is lower than the set value, then the points corresponding to the midpoint polyline segments are determined to belong to the straight line segment;

[0064] Get the path curve:

[0065] A total of Line segments, Arc segment, is the ordered point set corresponding to the k1th straight line segment, is the ordered point set corresponding to the k2th arc segment ;

[0066] Construct the following optimization problem: Constraints include standardized constraints and continuous constraints:

[0067] Standardized constraints include: Continuity constraints include: In the formula for The coordinates of the points on ; for The coordinates of the points on ; is the first coefficient implicitly represented by the k1th straight line, is the second coefficient implicitly represented by the k1th straight line; is the third coefficient implicitly represented by the k1th straight line; is the first coefficient implicitly represented by the k2th arc; is the second coefficient implicitly represented by the k2th arc; is the third coefficient implicitly represented by the k2th arc; is the fourth coefficient implicitly represented by the k2th arc; is the first coefficient implicitly represented by the tth straight line; is the second coefficient implicitly represented by the tth straight line; is the third coefficient implicitly represented by the tth straight line; is the first coefficient implicitly represented by the sth arc; is the second coefficient implicitly represented by the sth arc; is the third coefficient implicitly represented by the sth arc;

[0068] Finally, the path curve is calculated using the least squares method.

[0069] The step S1 specifically includes the following steps:

[0070] Acquire data information of the target sweep surface;

[0071] The data information of the swept surface is obtained, and the corresponding triangular mesh model is designed by using modeling software;

[0072] The step S5 specifically includes the following steps:

[0073] According to the contour curve obtained in step S3 and the path curve obtained in step S4, a vertical sweeping operation is performed using modeling software to obtain a final reconstructed swept surface, thereby completing the reconstruction of the swept surface.

[0074] The present invention also provides a pipeline part curved surface reconstruction method including the swept surface high-precision reconstruction method, comprising the following steps:

[0075] (1) Obtain the triangular mesh model of the pipeline parts and use it as the reconstruction target;

[0076] (2) Based on the triangular mesh model obtained in step (1), the swept surface high-precision reconstruction method is used to perform surface reconstruction;

[0077] (3) Based on the reconstruction result of the swept surface obtained in step (2), the surface reconstruction of the pipe part is completed.

[0078] The high-precision reconstruction method for swept surfaces and the pipeline part curved surface reconstruction method provided by the present invention approximate the swept cross section through Gaussian mapping, and correct the tracking path through inverse calculation, thereby effectively avoiding the discrete error of the tracking path, and combining constraints to improve the path accuracy. Therefore, the present invention can not only realize the high-precision reconstruction of the swept surface, but also has higher reliability and better accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 Schematic diagram of the process flow of the reconstruction method of the present invention.

[0080] Figure 2 A schematic diagram showing a comparison of contour extraction in an embodiment of the reconstruction method of the present invention: Figure 2 (a) is a schematic diagram of the comparison of the global view. Figure 2 (b) is a schematic diagram of the top view for comparison.

[0081] Figure 3 A schematic diagram for comparing path extraction in an embodiment of the reconstruction method of the present invention is shown below: Figure 3 (a) is a schematic diagram of the extraction effect of the Kovács et al method. Figure 3 (b) is a schematic diagram of the extraction effect of the B-spline fitting method. Figure 3 (c) is a schematic diagram of the extraction effect of the reconstruction method of the present invention.

[0082] Figure 4 This is a schematic diagram of the effect of an embodiment of the reconstruction method of the present invention: Figure 4 (a) is the schematic diagram of the original triangular network. Figure 4 (b) is a comparative schematic diagram of the profile side view. Figure 4 (c) is a comparative schematic diagram of the top view of the path. Figure 4 (d) is a schematic diagram of the reconstruction error of the Kovács et al method. Figure 4 (e) is a schematic diagram of the reconstruction error of the reconstruction method of the present invention.

[0083] Figure 5 This is a second effect schematic diagram of an embodiment of the reconstruction method of the present invention: Figure 5 (a) is a schematic diagram of the reconstruction error of the Kovács et al method. Figure 5 (b) is a schematic diagram of the reconstruction error of the reconstruction method of the present invention.

[0084] Figure 6 It is a schematic diagram of the method flow of the pipeline part surface reconstruction method of the present invention. DETAILED DESCRIPTION

[0085] like Figure 1 The figure shows a schematic diagram of the method flow of the reconstruction method of the present invention: the high-precision reconstruction method of the swept surface disclosed in the present invention comprises the following steps:

[0086] S1. Obtaining data information of the target swept surface and obtaining a corresponding triangular mesh model; specifically comprising the following steps:

[0087] Acquire data information of the target sweep surface;

[0088] For the acquired data information of the swept surface, a modeling software (such as Rhino modeling software) is used to design and obtain a corresponding triangular mesh model;

[0089] In the specific implementation, the designed contour is a curve on the ZY plane, the path is a curve in the XY plane, the sweep rule is a single-track sweep, and it is saved as a triangular mesh model; according to the complexity of the contour line and the path curve, four different types of models are designed, including simple contour and complex path, simple path and complex contour, closed contour, and complex contour and complex path sweep;

[0090] S2. For the triangular mesh model obtained in step S1, the curvature of the triangular mesh surface is calculated, a unified curvature vector field is created based on the curvature direction and smoothing, and an initial path is obtained; the steps include:

[0091] For the triangular mesh model obtained in step S1, the curvature of the triangular mesh surface is calculated based on the Normal Cycle theory;

[0092] Weak curvature regions are detected based on curvature direction and curvature value; for several vector field sub-regions divided by weak curvature regions, vector field sub-regions are classified and aligned based on the main curvature direction; finally, the weak curvature regions are smoothed to create a unified curvature vector field;

[0093] According to the data information of the normal vector and corresponding vector of any edge point on the triangulated network, the initial path is tracked;

[0094] The specific implementation includes the following steps:

[0095] Compute the curvature of a triangular mesh surface:

[0096] For any vertex of a triangle mesh and its geodesic disk of radius r , the curvature tensor matrix is ​​calculated using the following formula : In the formula Geodesic disk The area of ​​​​the geodesic disk The edge of the middle grid; is the angle between the normals of two triangles with e as the common edge; For line segment Length; is the unit vector in the e direction;

[0097] Curvature tensor matrix Perform eigendecomposition: the eigenvector corresponding to the minimum eigenvalue is the vertex Normal vector The eigenvector corresponding to the maximum eigenvalue is the minimum principal curvature vector , the eigenvector corresponding to the second largest eigenvalue is the maximum principal curvature vector ;

[0098] Get the original maximum and minimum curvature vector field of the discrete mesh vertices;

[0099] Create a uniform curvature vector field:

[0100] Detecting regions of weak curvature:

[0101] If the given m-ring neighborhood of point p Inside, satisfied , then the point p is determined to be within the angular tolerance The bottom has a strong curvature;

[0102] All within the angle tolerance Points that do not have strong curvature constitute weak curvature areas. At points in weak curvature areas, the variance of the principal curvature direction is large, and the angle between the curvature vector of the point and its neighboring points is too large. In these weak curvature areas, curve tracing may be interrupted, resulting in erroneous results.

[0103] Classification and alignment of vector field sub-regions:

[0104] The weak curvature region divides the vector field into several vector field sub-regions; in order to obtain a curvature field with a unified direction, it is necessary to select the maximum principal curvature direction or the minimum principal curvature direction of each strong curvature point and merge it into the final vector field;

[0105] Arbitrarily choose an initial strong curvature point ,calculate Normal , the maximum principal curvature vector , minimum principal curvature vector ; Normal and the maximum principal curvature vector The determined plane is , normal and the minimum principal curvature vector The determined plane is ;

[0106] calculate , The intersection of the triangle mesh surface and the normal at the intersection is calculated. The deviation error , calculate the normal at the intersection and The deviation error ;

[0107] like , then select The minimum principal curvature direction of is the determination curvature direction, and Classified as the minimum curvature set ;like , then select The maximum principal curvature direction of is used as the determination curvature direction, and Classified as the maximum curvature set ;

[0108] For the remaining strong curvature points , , the following rules are used for judgment:

[0109] like The direction of minimum curvature is The judgment curvature direction is consistent, then Classified under , and select The direction of minimum curvature is Determine the curvature direction;

[0110] like The direction of maximum curvature is The judgment curvature direction is consistent, then Classified under , and select The direction of maximum curvature is Determine the curvature direction;

[0111] Complete classification and alignment of vector field sub-regions;

[0112] Smooth regions of weak curvature:

[0113] After classifying and aligning the vector field sub-regions, the initial aligned vector field is obtained; for the weak curvature region Smoothing of the points:

[0114] For weak curvature points , The set of strong curvature points in the m-ring field is , the following formula is used for smoothing: In the formula The curvature vector at the weak curvature point calculated for smoothing; is the curvature vector after the strong curvature points are aligned, and , Z is the number of strong curvature points;

[0115] Finally, the curvature vector at the mesh vertex p is ;

[0116] The curvature vectors of mesh patches and edge points are calculated using barycentric coordinates; this results in a uniformly oriented curvature vector field, which facilitates tracking curvature lines in a more robust manner.

[0117] Get the initial path:

[0118] For any point on the edge of the triangle mesh ,calculate Normal and the curvature vector The determined plane ;Will and The triangle corresponding to the half-edge structure Find the intersection, the intersection point is q;

[0119] Set maximum compensation ;like , then set (at this time, Located on a mesh vertex or edge); if , then set (at this time, Located in triangle );

[0120] Finally, we get the ordered point set of the initial path ;

[0121] S3. According to the initial path obtained in step S2, a contour curve is fitted based on Gaussian mapping iteration and ICP registration optimization; comprising the following steps:

[0122] The input of this step is: the ordered point set of the initial path, the triangular mesh, and the set allowable error accuracy. ;

[0123] The output of this step is: contour line , transformation mapping ;

[0124] A. Take the first point in the ordered point set of the initial path Normal and The vector direction The determined plane is the initial section , and as the current section;

[0125] B. Perform Gaussian iteration:

[0126] B1. Find the intersection of the current section and the triangular mesh to obtain the set N of intersection normals; transform N through Gaussian mapping Mapped onto the Gaussian sphere;

[0127] B2. Use the least squares method to fit the normal line on the Gaussian sphere, and then use the Gaussian inverse mapping to transform the normal line To the triangular mesh, get a new section and use it as the current section;

[0128] B3. Repeat steps B1 and B2 until the following conditions are met: ,exist ;in, is the normal of any intersection point between the current section and the mesh, is the normal direction of the current section, Represents the inner product of two vectors; in this case, the intersection with the triangulated network is considered as a set of points on the contour ;

[0129] C. Execute steps A and B for all points in the ordered point set of the initial path to obtain the point set I on the contour;

[0130] D. Choose so that The point set corresponding to the minimum The plane where it is located is the target point set , use ICP algorithm to calculate other point sets With the target point set Transformation mapping between , is the normal of any intersection point between the section and the mesh of the jjth Gaussian iteration, is the section normal of the jjth Gaussian iteration; Projecting a section onto a target point set The plane where the projection point set is located is calculated using B-spline. Fitting to get the contour line ;

[0131] S4. According to the contour curve obtained in step S3, reversely calculate the ordered point set of the corrected tracking path, identify the straight line segments and arc segments of the ordered point set of the corrected tracking path using the tangent space representation method, and perform straight line-arc segment fitting based on the tangent constraint to obtain the path curve; comprising the following steps:

[0132] Mapping by transformation The inverse transformation is used to perform inverse transformation mapping on the target point set and the points on the path to obtain the ordered point set of the modified tracking path;

[0133] The tangent space representation method is used to detect the arc segments and straight line segments of the ordered point set of the corrected tracking path;

[0134] According to the detected arc segments and straight line segments, the straight line segments and arc segments are implicitly represented, and the path curve is calculated by the least square method in combination with the standardized conditions and the continuous conditions;

[0135] The specific implementation includes the following steps:

[0136] Inverse calculation to correct the ordered point set of the tracking path:

[0137] Each target point set Each plane corresponds to a transformation mapping ; Through the formula Perform inverse transformation mapping to obtain the ordered point set Q of the modified tracking path: ; Transformation Mapping The inverse transformation of For contour lines The point on

[0138] Corrected recognition of straight and circular segments for ordered set of points in a trace path:

[0139] The tangent space representation method is used to detect arcs and straight line segments;

[0140] Two adjacent points in Q and The distance between Expressed as , the angle between adjacent polyline segments Expressed as ; By transforming Map the ordered point set Q of the corrected tracking path to the ordered line segment set G of the two-dimensional plane; where, for The horizontal axis of for The vertical coordinate of

[0141] In the ordered line segment set G of the two-dimensional plane, the line segment The midpoint of ; Connect all midpoints to obtain midpoint polyline segments; if the difference between the slopes of adjacent midpoint polyline segments is lower than the set value and the slope is not 0, then the points corresponding to the midpoint polyline segments are determined to belong to the arc segment; if the difference between the angles of adjacent midpoint polyline segments and 0 is lower than the set value, then the points corresponding to the midpoint polyline segments are determined to belong to the straight line segment;

[0142] In addition, there are some transition points between the two segments, and the ordered point sets corresponding to these points are difficult to accurately identify as the previous segment or the next segment; in the subsequent fitting process, strict tangency constraints are used, and the wrong identification of these points may affect the fitting results, so these points will not be considered in the subsequent process;

[0143] Get the path curve:

[0144] In order to satisfy the continuity constraint, the tangency constraint condition is introduced; set a total of detected Line segments, Arc segment, is the ordered point set corresponding to the k1th straight line segment, is the ordered point set corresponding to the k2th arc segment ;

[0145] Construct the following optimization problem: Constraints include standardized constraints and continuous constraints:

[0146] Standardized constraints include: Continuity constraints include: In the formula for The coordinates of the points on ; for The coordinates of the points on ; is the first coefficient implicitly represented by the k1th straight line, is the second coefficient implicitly represented by the k1th straight line; is the third coefficient implicitly represented by the k1th straight line; is the first coefficient implicitly represented by the k2th arc; is the second coefficient implicitly represented by the k2th arc; is the third coefficient implicitly represented by the k2th arc; is the fourth coefficient implicitly represented by the k2th arc; is the first coefficient implicitly represented by the tth straight line; is the second coefficient implicitly represented by the tth straight line; is the third coefficient implicitly represented by the tth straight line; is the first coefficient implicitly represented by the sth arc; is the second coefficient implicitly represented by the sth arc; is the third coefficient implicitly represented by the sth arc;

[0147] Since the nonlinear constraints between multiple segments are not independent, the continuous least squares algorithm is used to solve them; however, this method is sensitive to the initial value, so the initial fitting results of each straight line and arc segment are used as the basis for introducing tangency constraints and solving the optimal initial value; after calculating the parameter values, a path curve that satisfies the tangency constraints can be generated;

[0148] S5. According to the contour curve obtained in step S3 and the path curve obtained in step S4, the final reconstruction of the swept surface is completed; specifically comprising the following steps:

[0149] According to the contour curve obtained in step S3 and the path curve obtained in step S4, a vertical sweeping operation is performed using modeling software (such as Rhino modeling software) to obtain a final reconstructed swept surface, thereby completing the reconstruction of the swept surface.

[0150] The reconstruction method of the present invention is further described below in conjunction with embodiments:

[0151] Taking the swept surface formed by complex contours and complex paths as an example, the contour and path extraction results are analyzed;

[0152] Inspection indicators:

[0153] Curve error: Assume that the true curve is recorded as , randomly select Points , then the curve The error calculation formula is: ,in, express and The minimum distance;

[0154] Surface error: The original triangular mesh is recorded as , randomly select Points , then on the swept surface The error calculation formula is: ,in, express and The minimum distance Represents the original triangular mesh The diagonal length of the minimum bounding box is:

[0155] The contour and path curve extraction errors are taken as examples of complex contours and complex paths. The reconstructed surface errors are taken as examples of the reconstruction results of swept surface models of four different complexities: simple contours and complex paths, simple paths and complex contours, closed contours, and complex contours and complex paths. Compared with previous related work, the error results are as follows:

[0156] The comparison method is the Kovács et al method, which is proposed by Kovács in the paper “Reconstructing swept surfaces from measured data” published in the journal The Mathematics of Surfaces XIV in 2013.

[0157] Contour extraction error: Figure 2As shown, the black line is the true contour, the blue line is the contour obtained by the Kovács et al method, and the red line is the contour obtained by the method of the present invention; Figure 2 (a) It can be seen that the contour extraction of the comparison method has a large deviation. However, the contour line projected onto the XZ plane using Gaussian mapping iteration has almost no visual difference from the true contour curve. Table 1 is a comparison error analysis table:

[0158] Table 1 Contour extraction error analysis table

[0159]

[0160] from Figure 2 (b) and Table 1 show that the Gaussian mapping iteration result has significantly less error than the tracking contour line based on the unified vector field, and is closer to the real contour curve. This further illustrates that the method of the present invention, based on the Gaussian mapping iteration and registration fitting to correct the cross-sectional contour curve, can restore the contour surface state of the sweeping process to a certain extent.

[0161] Path extraction error: Figure 3 As shown, the black line is the real path, the brown line is the path obtained by the Kovács et al method, the blue line is the path obtained by B-spline fitting, and the red line is the path obtained by the method of the present invention; Table 2 is a path extraction error analysis table:

[0162] Table 2 Path extraction error analysis table

[0163]

[0164] pass Figure 3 As can be seen from Table 2, the initial path obtained by tracking the curvature line has a large gap with the actual path due to the accumulated error, and the numerical error is large; by using the transformation relationship between the series of contours to reversely calculate the discrete ordered point set of the path, the accumulated error caused by discrete tracking is effectively reduced.

[0165] However, the discrete point set obtained by reverse calculation may still have errors, and a small error will make the local curvature of the B-spline fitting curve too large, resulting in local self-intersection during the sweep operation. By using the straight line-arc segment fitting path method of the present invention, the curvature is further smoothed, making the path curve smoother. At the same time, the fitting based on the tangent constraint reconciles the positional relationship between different segmented segments, meets the requirement of path continuity, and reduces the error overall.

[0166] Reconstructed surface accuracy: Two indicators are used for error analysis, Mean Absolute Error (MAE) and Root Mean Square Error (RMSE). Taking four swept surface models of different complexity as examples and comparing them with previous related work, the error results are shown in Table 3:

[0167] Table 3 Schematic diagram of surface reconstruction error comparison

[0168]

[0169] Figure 4 The comparison of contour and path extraction results and surface reconstruction errors of simple contour and complex path, simple path and complex contour and closed contour is given. Figure 2 and Figure 3 The complex contours and complex paths contour and path extraction results have been analyzed, so Figure 5 Only the geometric error comparison diagram of complex contour and complex path is shown. It can be seen that the present invention has numerical and visual advantages.

[0170] in accordance with Figure 4 and Figure 5 The error analysis of the present invention in contour extraction, path extraction and surface reconstruction is as follows: Simple contours and complex path surfaces are swept by complex contours and straight paths with large curvature changes. The present invention can extract relatively accurate straight paths. It can be seen from the front view of the contour that the iteration of Gaussian mapping can obtain a cross section closer to the real contour, and the extracted contour has higher accuracy, so the reconstruction accuracy of the swept surface is higher. Simple paths and complex contours are swept by circular contours and continuous inscribed arc paths. Both the top view of the path and the geometric error diagram show that from the inner circle to the outside, the comparison method has obvious error accumulation, and the present invention can significantly reduce such errors. Closed contours are swept along closed paths. The present invention also shows good reconstruction results in the case of closed contours and closed path swept surfaces. Complex contours and complex paths represent the sweeping of complex contours and complex paths. The path contains three situations: straight line-arc segment, arc segment inscribed, and arc segment circumscribed. The contour curvature is large and the rate of change is large. It can be seen that the present invention has an advantage in accuracy when processing complex contours and paths.

[0171] The present invention complies with the principle of vertically swept surface, fully considers the relationship between cross-sectional contour, path and scanned surface, extracts the cross section perpendicular to the tangent direction of the path based on the Gaussian mapping iteration method, restores the position state of the contour in the original sweeping process as much as possible, and reversely calculates the discrete ordered point set of the path, effectively reducing the error caused by discrete tracking curvature line. At the same time, considering the particularity of the sweeping operation, a straight line-arc segment fitting method based on tangent constraints is adopted to make the path curve smooth, solving the problem that the local curvature of the path is too large and causes the swept surface to intersect itself. Therefore, the present invention realizes the reverse reconstruction of the scanned surface by extracting the contour and the path. Experimental results show that compared with similar methods, the present invention has higher accuracy.

[0172] like Figure 6 The method flow chart of the pipeline part surface reconstruction method of the present invention is shown as follows: The pipeline part surface reconstruction method including the swept surface high-precision reconstruction method disclosed in the present invention comprises the following steps:

[0173] (1) Obtain the triangular mesh model of the pipeline parts and use it as the reconstruction target;

[0174] (2) Based on the triangular mesh model obtained in step (1), the swept surface high-precision reconstruction method is used to perform surface reconstruction;

[0175] (3) Based on the reconstruction result of the swept surface obtained in step (2), the surface reconstruction of the pipe part is completed.

[0176] In addition, the method of the present invention is also applicable to the surface reconstruction of other industrial parts, such as simple automobile body surfaces, machine tool spline shafts, cylindrical parts, etc. By using the plane path sweeping surface reconstruction method, the contour of the model is extracted, and the sweeping operation is performed to achieve surface reconstruction, thereby obtaining a reconstructed surface with higher precision.

[0177] The method of the present invention has practical significance. Due to the wear and tear of the part surface caused by use (such as repairing worn parts), the unavailability of digital data, the deformation of the 3D mesh or after numerical simulation, the original CAD parameter data may be unreusable, lost or no longer correspond to the original CAD model, and the original part cannot be reproduced. By reconstructing the surface of the part, the original part can be reproduced automatically and with high precision, avoiding the complicated manual interaction operations of researchers when reconstructing the surface. At the same time, it can also avoid the unavailability of the entire model due to damage to some parts, thereby reducing economic losses.

Claims

1. A pipeline part surface reconstruction method, characterized in that The steps include: (1) Obtain the triangular mesh model of the pipeline parts and use it as the reconstruction target; (2) Based on the triangular mesh model obtained in step (1), a swept surface high-precision reconstruction method is used to perform surface reconstruction; (3) According to the reconstruction result of the swept surface obtained in step (2), the surface reconstruction of the pipeline part is completed; The high-precision reconstruction method of the swept surface comprises the following steps: S1. Obtaining data information of the target swept surface and obtaining a corresponding triangular mesh model; S2. For the triangular mesh model obtained in step S1, the curvature of the triangular mesh surface is calculated, a unified curvature vector field is created based on the curvature direction and smoothing, and an initial path is obtained; the steps include: For the triangular mesh model obtained in step S1, the curvature of the triangular mesh surface is calculated based on the Normal Cycle theory; Weak curvature regions are detected based on curvature direction and curvature value; for several vector field sub-regions divided by weak curvature regions, vector field sub-regions are classified and aligned based on the main curvature direction; finally, the weak curvature regions are smoothed to create a unified curvature vector field; According to the data information of the normal vector and corresponding vector of any edge point on the triangulated network, the initial path is tracked; S3. According to the initial path obtained in step S2, a contour curve is fitted based on Gaussian mapping iteration and ICP registration optimization; comprising the following steps: The input of this step is: the ordered point set of the initial path, the triangular mesh, the set allowable error accuracy ; The output of this step is: contour line , transformation mapping ; A. Take the first point in the ordered point set of the initial path Normal and The vector direction The determined plane is the initial section , and as the current section; B. Perform Gaussian iteration: B1. Find the intersection of the current section and the triangular mesh to obtain the set N of intersection normals; transform N through Gaussian mapping Mapped onto the Gaussian sphere; B2. Use the least squares method to fit the normal line on the Gaussian sphere, and then use the Gaussian inverse mapping to transform the normal line To the triangular mesh, get a new section and use it as the current section; B3. Repeat steps B1 and B2 until the following conditions are met: ,exist ;in, is the normal of any intersection point between the current section and the mesh, is the normal direction of the current section, Represents the inner product of two vectors; in this case, the intersection with the triangulated network is considered as a set of points on the contour ; C. Execute steps A and B for all points in the ordered point set of the initial path to obtain the point set I on the contour; D. Choose so that The point set corresponding to the minimum The plane where the target point is located is the target point set. , use ICP algorithm to calculate other point sets With the target point set The transformation mapping between , is the normal of any intersection point between the section and the mesh of the jjth Gaussian iteration, is the section normal of the jjth Gaussian iteration; Projecting a section onto a target point set The plane where the projection point set is located is calculated using B-spline. Fitting to get the contour line ; S4. According to the contour curve obtained in step S3, reversely calculate the ordered point set of the corrected tracking path, identify the straight line segments and arc segments of the ordered point set of the corrected tracking path using the tangent space representation method, and perform straight line-arc segment fitting based on the tangent constraint to obtain the path curve; comprising the following steps: Mapping by transformation The inverse transformation is used to perform inverse transformation mapping on the target point set and the points on the path to obtain the ordered point set of the modified tracking path; The tangent space representation method is used to detect the arc segments and straight line segments of the ordered point set of the corrected tracking path; According to the detected arc segments and straight line segments, the straight line segments and arc segments are implicitly represented, and the path curve is calculated by the least square method in combination with the standardized conditions and the continuous conditions; S5. Complete the reconstruction of the final swept surface according to the contour curve obtained in step S3 and the path curve obtained in step S4.

2. The pipeline part surface reconstruction method according to claim 1, characterized in that The calculation to obtain the curvature of the triangular mesh surface specifically includes the following steps: Compute the curvature of a triangular mesh surface: For any vertex of a triangle mesh and its geodesic disk of radius r , the curvature tensor matrix is ​​calculated using the following formula : In the formula Geodesic disk The area of ​​​​the geodesic disk The edge of the middle grid; is the angle between the normals of two triangles with e as the common edge; For line segment Length; is the unit vector in the e direction; Curvature tensor matrix Perform eigendecomposition: the eigenvector corresponding to the minimum eigenvalue is the vertex Normal vector The eigenvector corresponding to the maximum eigenvalue is the minimum principal curvature vector , the eigenvector corresponding to the second largest eigenvalue is the maximum principal curvature vector ; Get the original maximum and minimum curvature vector fields of the discrete mesh vertices.

3. The pipeline part surface reconstruction method according to claim 2 is characterized in that The creation of a unified curvature vector field specifically includes the following steps: Detecting regions of weak curvature: If the given m-ring neighborhood of point p Inside, satisfied , then the point p is determined to be within the angular tolerance The bottom has a strong curvature; All within the angle tolerance The points below that do not have strong curvature constitute the weak curvature region; Classification and alignment of vector field sub-regions: The weak curvature region divides the vector field into several vector field sub-regions; Arbitrarily choose an initial point of strong curvature ,calculate Normal , the maximum principal curvature vector , minimum principal curvature vector ; Normal and the maximum principal curvature vector The determined plane is , normal and the minimum principal curvature vector The determined plane is ; calculate , The intersection of the triangle mesh surface and the normal at the intersection is calculated. The deviation error , calculate the normal at the intersection and The deviation error ; like , then select The minimum principal curvature direction of is the determination curvature direction, and Classified as the minimum curvature set ;like , then select The maximum principal curvature direction of is used as the determination curvature direction, and Classified as the maximum curvature set ; For the remaining strong curvature points , , the following rules are used for judgment: like The direction of minimum curvature is The judgment curvature direction is consistent, then Classified under , and select The direction of minimum curvature is Determine the curvature direction; like The direction of maximum curvature is The judgment curvature direction is consistent, then Classified under , and select The direction of maximum curvature is Determine the curvature direction; Complete classification and alignment of vector field sub-regions; Smooth regions of weak curvature: After classifying and aligning the sub-regions of the vector field, an initial aligned vector field is obtained; For weak curvature regions Smoothing of the points: For weak curvature points , The set of strong curvature points in the m-ring field is , the following formula is used for smoothing: In the formula The curvature vector at the weak curvature point calculated for smoothing; is the curvature vector after the strong curvature points are aligned, and , Z is the number of strong curvature points; Finally, the curvature vector at the mesh vertex p is .

4. The pipeline part surface reconstruction method according to claim 3 is characterized in that The tracking to obtain the initial path specifically includes the following steps: For any point on the edge of the triangle mesh ,calculate Normal and the curvature vector The determined plane ;Will and The triangle corresponding to the half-edge structure Find the intersection, the intersection point is q; Set maximum compensation ;like , then set ;like , then set ; Finally, we get the ordered point set of the initial path .

5. The pipeline part surface reconstruction method according to claim 4, characterized in that The step S4 specifically comprises the following steps: Inverse calculation to correct the ordered point set of the tracking path: Each target point set Each plane corresponds to a transformation mapping ; Through the formula Perform inverse transformation mapping to obtain the ordered point set Q of the modified tracking path: ; Transformation Mapping The inverse transformation of For contour lines The point on Corrected recognition of straight and circular segments for ordered set of points in a trace path: The tangent space representation method is used to detect arcs and straight line segments; Two adjacent points in Q and The distance between Expressed as , the angle between adjacent polyline segments Expressed as ; By transforming Map the ordered point set Q of the corrected tracking path to the ordered line segment set G of the two-dimensional plane; where, for The horizontal axis of for The vertical coordinate of In the ordered line segment set G of the two-dimensional plane, the line segment The midpoint of ; Connect all midpoints to obtain midpoint polyline segments; if the difference between the slopes of adjacent midpoint polyline segments is lower than the set value and the slope is not 0, then the points corresponding to the midpoint polyline segments are determined to belong to the arc segment; if the difference between the angles of adjacent midpoint polyline segments and 0 is lower than the set value, then the points corresponding to the midpoint polyline segments are determined to belong to the straight line segment; Get the path curve: A total of Line segments, Arc segment, is the ordered point set corresponding to the k1th straight line segment, is the ordered point set corresponding to the k2th arc segment ; Construct the following optimization problem: Constraints include standardized constraints and continuous constraints: Standardized constraints include: Continuity constraints include: In the formula for The coordinates of the points on ; for The coordinates of the points on ; is the first coefficient implicitly represented by the k1th straight line, is the second coefficient implicitly represented by the k1th straight line; is the third coefficient implicitly represented by the k1th straight line; is the first coefficient implicitly represented by the k2th arc; is the second coefficient implicitly represented by the k2th arc; is the third coefficient implicitly represented by the k2th arc; is the fourth coefficient implicitly represented by the k2th arc; is the first coefficient implicitly represented by the tth straight line; is the second coefficient implicitly represented by the tth straight line; is the third coefficient implicitly represented by the tth straight line; is the first coefficient implicitly represented by the sth arc; is the second coefficient implicitly represented by the sth arc; is the third coefficient implicitly represented by the sth arc; Finally, the path curve is calculated using the least squares method.

6. The pipeline part surface reconstruction method according to claim 5, characterized in that The step S1 specifically includes the following steps: Acquire data information of the target sweep surface; The data information of the swept surface is obtained, and the corresponding triangular mesh model is designed by using modeling software; The step S5 specifically includes the following steps: According to the contour curve obtained in step S3 and the path curve obtained in step S4, a vertical sweeping operation is performed using modeling software to obtain a final reconstructed swept surface, thereby completing the reconstruction of the swept surface.