Method for generating a processed surface from metal corrosion pits
By constructing a parametric datum surface and using the UG optimizer to adjust the control points to generate the final machined surface, the problem of long machined surface generation time in cold spray additive manufacturing is solved, and efficient metal corrosion pit repair is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV
- Filing Date
- 2023-05-26
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies require a long time to generate the machining surface before cold spray additive manufacturing, resulting in low repair efficiency.
By acquiring the point cloud of corrosion pits, a parameterized base surface is constructed, and the UG optimizer is used to iteratively adjust the control points with the minimum distance as the optimization objective function to generate the final processed surface, which meets the requirements of cold spray additive manufacturing.
It significantly shortens the repair time for parts by cold spray additive manufacturing, and improves repair quality and efficiency.
Smart Images

Figure CN116720274B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for generating a surface for removing metal corrosion pits, which facilitates the repair of metal corrosion pits using cold spray additive manufacturing technology. Background Technology
[0002] Aircraft casings are exposed to harsh environments for extended periods, making them prone to surface corrosion, which can severely compromise aircraft safety. Cold spray additive manufacturing technology can repair the casing surface. Before using cold spray additive manufacturing to repair the casing surface, CNC machine tools are needed to remove the corroded areas and create a machined surface that meets the requirements of the cold spray additive manufacturing process. CNC machining requires obtaining the location of defects on the casing surface and a digital model of the machined surface. Typically, 3D scanning is used to obtain defect point clouds, which are then used to generate the machined surface in UG software. If there are many defects, generating the machined surface can be time-consuming, resulting in low repair efficiency. Summary of the Invention
[0003] The purpose of this invention is to provide a method for generating a machined surface to remove metal corrosion pits, so as to achieve rapid generation of defective machined surfaces and improve repair efficiency.
[0004] This invention solves the above-mentioned technical problems through the following technical solution: a method for generating a machined surface to remove metal corrosion pits, comprising the following steps:
[0005] Obtain the point cloud of corrosion pits on the metal surface to be repaired, and process the point cloud of corrosion pits to obtain the point cloud cross-sectional line and point cloud guide line of the corrosion pits.
[0006] A parameterized datum surface for constructing corrosion pits is formed, which consists of multiple cross-sectional lines and multiple guide lines;
[0007] The parameterized base surface is adjusted based on the point cloud cross-section line and the point cloud guide line to generate the initial processing surface;
[0008] Using the coordinates of the control points in the initial machining surface as the optimization variables of the UG optimizer, the requirements of cold spray additive manufacturing as the optimization constraints, and the minimum average of the sum of the minimum distances from each point of the corrosion pit to the initial machining surface as the optimization objective function, the control points of the initial machining surface are iteratively adjusted using the UG optimizer to generate the final machining surface.
[0009] Furthermore, the specific implementation process for processing the corrosion pit point cloud is as follows:
[0010] The corrosion pit point cloud is cross-sectionally processed to construct the corrosion pit. N A point cloud cross-section line;
[0011] Connect the coordinates of the uncorroded surface to construct the edge point cloud guide line, and then construct the middle point cloud guide line of the corrosion pit;
[0012] choose n Point cloud section lines and m The point cloud guide line is generated and the selected point cloud cross section line and point cloud guide line are output.
[0013] The point cloud guide lines include edge point cloud guide lines and middle point cloud guide lines, 3≤ n ≤ N ,2≤ m ≤ M , N The number of lines in the constructed point cloud cross-section, M The number of guide lines for the constructed point cloud.
[0014] Preferably, the specific implementation process for outputting the selected point cloud cross-section line and point cloud guide line is as follows:
[0015] The selected point cloud section line is obtained by using the UF_EVAL_ask_spline_control_pts spline function in NX Open C / ufun, and then the control points of the obtained point cloud section line are created by using the UF_CURVE_create_point function, thus obtaining the selected point cloud section line.
[0016] The selected point cloud guide line is obtained by using the UF_EVAL_ask_spline_control_pts spline function in NX Open C / ufun, and then the control points of the obtained point cloud guide line are created by using the UF_CURVE_create_point function, thus obtaining the selected point cloud guide line.
[0017] Furthermore, the specific implementation process of adjusting the parameterized datum based on the point cloud cross-sectional line and the point cloud guide line is as follows:
[0018] For each point cloud cross-section line, a first set is constructed sequentially, and all control points of the point cloud cross-section line are stored in the corresponding first set;
[0019] For each of the point cloud guide lines, a second set is constructed sequentially, and all control points of the point cloud guide lines are stored in the corresponding second set;
[0020] After storing the control points of all point cloud cross-section lines and all point cloud guide lines, the parameterized base surface is adjusted based on the control points of all point cloud cross-section lines and all guide lines to generate the initial machining surface.
[0021] Furthermore, the specific implementation process of adjusting the parameterized datum based on the control points of all point cloud cross-section lines and all guide lines is as follows:
[0022] The tag value of each control point of each point cloud cross-section line is sequentially assigned to the tag value of the control point of the corresponding parameterized base surface cross-section line, and the parameterized base surface is adjusted according to the tag value of the control point of the cross-section line of the parameterized base surface.
[0023] The tag value of each control point of each point cloud guide line is sequentially assigned to the control point tag value of the guide line of the corresponding parameterized base surface, and the parameterized base surface is adjusted according to the control point tag value of the guide line of the parameterized base surface;
[0024] Compare the parametric base surfaces before and after adjustment, delete the unadjusted control points in the adjusted parametric base surface, and generate the initial machining surface. The unadjusted control points include the control points of the unadjusted section lines and the control points of the unadjusted guide lines.
[0025] Preferably, a double for loop is used to select different control points for different cross-sectional lines of the parameterized base surface and different control points for different point cloud cross-sectional lines, achieving a one-to-one correspondence between the control points of the cross-sectional lines of the parameterized base surface and the control points of the point cloud cross-sectional lines. Similarly, a double for loop is used to select different control points for different guide lines of the parameterized base surface and different control points for different point cloud guide lines, achieving a one-to-one correspondence between the control points of the guide lines of the parameterized base surface and the control points of the point cloud guide lines.
[0026] Furthermore, the optimization constraints include the maximum machining angle constraint, the concave section line constraint, and the constraint that the section line contains all defect point clouds.
[0027] Furthermore, the maximum machining angle constraint specifically refers to:
[0028] The included angle between any two adjacent segments of each cross-section line in the initial machining surface is obtained using the UF_CURVE_ask_curve_turn_angle function in NX Open C / ufun, and the included angle is stored in the uf_modl_expression.h function;
[0029] Based on the uf_modl_expression.h function and the included angle stored therein, a maximum machining angle function is created, such that the value of the uf_modl_expression.h function is less than the value of the maximum machining angle function;
[0030] The concave constraint of the cross-section line is specifically as follows:
[0031] Obtain the curvature center point of each control point of each cross-section line in the initial machining surface, select a point P in the space contained in the corrosion pit, calculate the included angle between each first connecting line and the second connecting line corresponding to the first connecting line, and make the included angle less than 90°, wherein the first connecting line refers to the line connecting point P and the control point of the cross-section line in the initial machining surface, and the second connecting line refers to the line connecting the control point and its curvature center point;
[0032] The cross-sectional line contains all the defect point cloud constraints, specifically:
[0033] Select a point P within the space contained in the corrosion pit, and calculate the length of each first line segment, where the first line segment refers to the line connecting point P and the point in the corrosion pit.
[0034] Calculate the length of the second line segment corresponding to the first line segment, such that the length of the first line segment is less than the length of the second line segment, wherein the second line segment refers to the line connecting point P to the intersection of the extension of the first line segment and the initial processing surface.
[0035] Furthermore, the specific expression of the optimization objective function is as follows:
[0036]
[0037] in, d i The first corrosion pit i The minimum distance from each point to the initial machining surface. G The number of corrosion pits. f ( d The minimum average of the sum of the minimum distances from each point of the corrosion pit to the initial machined surface is minimized.
[0038] Beneficial effects
[0039] Compared with the prior art, the advantages of the present invention are as follows:
[0040] The present invention provides a method for generating a machined surface for removing metal corrosion pits. The final machined surface obtained by this method not only meets the requirements of cold spray additive manufacturing process, but also closely approximates the shape of corrosion pits, which greatly shortens the time for cold spray additive repair of some parts and improves the repair quality. Attached Figure Description
[0041] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only one embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1This is a flowchart of the method for generating a processing surface to remove metal corrosion pits in an embodiment of the present invention;
[0043] Figure 2 This is a result image of the corrosion pit point cloud data after being imported into UG in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the point cloud cross-section line in an embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of point cloud guide lines in an embodiment of the present invention;
[0046] Figure 5 This is a diagram of the secondary development control operation interface in an embodiment of the present invention;
[0047] Figure 6 This is a schematic diagram of the control points of the point cloud cross-section line and the point cloud guide line in an embodiment of the present invention;
[0048] Figure 7 This is a schematic diagram of the parameterized base plane constructed in an embodiment of the present invention;
[0049] Figure 8 This is a schematic diagram of several cross-sectional lines and guide lines of the parameterized base surface in an embodiment of the present invention;
[0050] Figure 9 This is a schematic diagram of the initial machining surface in an embodiment of the present invention (showing a defect point cloud);
[0051] Figure 10 This is an optimized setting of the operation interface in the embodiment of the present invention;
[0052] Figure 11 This is a schematic diagram illustrating that the cross-sectional line in this embodiment of the invention should meet the requirements of cold spray additive manufacturing;
[0053] Figure 12 This is a schematic diagram illustrating that the guide lines in this embodiment of the invention should meet the requirements of cold spray additive manufacturing;
[0054] Figure 13 This is a schematic diagram of the concave constraint of the cross-section line in an embodiment of the present invention;
[0055] Figure 14 This is a schematic diagram of the line segment length of the cross-section line including all defect point cloud constraints in an embodiment of the present invention;
[0056] Figure 15 This is the optimized final processed surface (displaying defect point cloud) in the embodiment of the present invention.
[0057] Figure 16 This is the optimized final processed surface (hidden defect point cloud) in the embodiment of the present invention. Detailed Implementation
[0058] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] The technical solutions of this application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0060] This embodiment uses a single corrosion pit defect as an example to illustrate the effectiveness of the metal corrosion pit removal and machining surface generation method proposed in this application.
[0061] like Figure 1 As shown, the method for generating a metal corrosion pit removal processing surface provided in this embodiment includes the following steps:
[0062] Step 1: Obtain the point cloud of corrosion pits on the metal surface to be repaired, and process the point cloud of corrosion pits to obtain the point cloud cross-sectional line and point cloud guide line of corrosion pits.
[0063] Corrosion pit point cloud data can be obtained by scanning the metal surface to be repaired using 3D scanning equipment (such as a laser scanner). Corrosion pit point cloud data is a collection of points in a coordinate system, representing a three-dimensional digital representation of the metal surface structure. Composed of numerous scattered three-dimensional points, it provides not only precise three-dimensional coordinate information but also various other information such as intensity and color. The coordinate system of the corrosion pit point cloud can be the laser scanner coordinate system, inertial navigation coordinate system, local horizontal coordinate system, or geocentric coordinate system.
[0064] In the laser scanner coordinate system, the origin O is the laser emission point. The X-axis points in the direction of the vehicle's movement, the Y-axis is vertically upward, and the Z-axis is perpendicular to the X-axis, forming a right-handed system. The origin O of the inertial navigation coordinate system is the inertial platform reference center. The coordinate system is defined according to the internal reference frame of the inertial platform. The Y-axis points forward along the longitudinal axis of the vehicle, the X-axis points to the right in the direction of the vehicle's movement, and the Z-axis is vertically upward, forming a right-handed system. The origin of the local horizontal coordinate system is located at the GNSS phase center. The X-axis points east, the Y-axis points true north, and the Z-axis is along the ellipsoidal normal, forming a right-handed system. Depending on the coordinate axis orientation, the local horizontal coordinate system can be selected as a right-handed coordinate system such as Northeast-Sky, Northeast-Earth, or North-West-Sky. The choice of system mainly depends on the application scenario. The geocentric coordinate system, or simply geocentric coordinate system, is a geocentric coordinate system with the Earth's center as the origin. The origin O is the Earth's center of mass. The Z-axis is parallel to the Earth's axis and points to the North Pole. The X-axis points to the intersection of the Prime Meridian and the equator. The Y-axis is perpendicular to the XOZ plane (i.e., the intersection of 90° East longitude and the equator), forming a right-handed coordinate system.
[0065] The UG optimizer can import point cloud data in different formats, so you can directly import erosion pit point clouds into the UG optimizer (the import result is as follows). Figure 2 As shown in the figure, the point cloud of the corrosion pits is processed to obtain the point cloud cross-sectional line and point cloud guide line of the corrosion pits. The specific processing procedure is as follows:
[0066] Step 1.1: Perform cross-sectional processing on the corrosion pit point cloud to construct the corrosion pit structure. N A point cloud cross-section line, such as Figure 3 As shown;
[0067] Step 1.2: Connect the coordinates of the uncorroded surfaces to first construct the edge point cloud guide lines, and then construct the middle point cloud guide lines of the corrosion pits, such as... Figure 4 As shown;
[0068] Step 1.3: Select n Point cloud section lines and m The program generates point cloud guide lines and outputs the selected point cloud cross-section line and point cloud guide lines. The point cloud guide lines include edge point cloud guide lines and center point cloud guide lines, with a minimum value of 3. n ≤ N ,2≤ m ≤ M , N The number of lines in the constructed point cloud cross-section, M The number of guide lines for the constructed point cloud.
[0069] In this embodiment, the selection is achieved through a control developed in UG. n Point cloud section lines and m A point cloud guide line; the operation interface of the secondary development control is as follows: Figure 5 As shown, the output result is as follows Figure 6 As shown.
[0070] Specifically, the process of outputting control points in a secondary development control is as follows:
[0071] The selected point cloud section line is obtained by using the UF_EVAL_ask_spline_control_pts spline function in NX Open C / ufun, and then the control points of the obtained point cloud section line are created using the UF_CURVE_create_point function, thus obtaining the selected point cloud section line; the selected point cloud guide line is obtained by using the UF_EVAL_ask_spline_control_pts spline function in NX Open C / ufun, and then the control points of the obtained point cloud guide line are created using the UF_CURVE_create_point function, thus obtaining the selected point cloud guide line.
[0072] Step 2: Construct the parametric base surface of the corrosion pit.
[0073] In UG software, a parametric base surface for the corrosion pits is pre-established, such as... Figure 7 As shown. The parameterized base plane includes several section lines and several guide lines. Each section line or guide line is composed of control points, such as... Figure 8 As shown, the parameterized base plane is stored in a file path.
[0074] Step 3: Adjust the parametric base surface based on the point cloud section line and the point cloud guide line to generate the initial processing surface.
[0075] Before adjusting the parametric datum based on the point cloud cross-section lines and point cloud guide lines, the control points of both lines need to be stored in sets. Specifically, a first set is constructed for each point cloud cross-section line, and all control points of the cross-section line are stored in the corresponding first set; a second set is constructed for each point cloud guide line, and all control points of the guide line are stored in the corresponding second set.
[0076] For example, n =4, m =3, meaning that step 1 yields 4 point cloud cross-sectional lines and 3 point cloud guide lines. The first set corresponding to each point cloud cross-sectional line is represented as: , i =1,2,3,4 P ik For the first i The first point cloud cross-section line k One control point, n i For the first iThe number of control points for each point cloud cross-section line; similarly, the second set corresponding to each point cloud guide line is represented as... , j =1,2,3 P jk For the first j The first point cloud guide line k One control point, m j For the first j The number of control points for the point cloud guide line.
[0077] Let the four point cloud cross-sectional lines obtained in step 1 be... Figure 3 For the four cross-sectional lines shown, the construction of the first set and storage of control points for each point cloud cross-sectional line is as follows: For the first point cloud cross-sectional line on one side (e.g., left or right), a first set is constructed, and all control points of the first point cloud cross-sectional line are stored sequentially in the first set. Then, for the second point cloud cross-sectional line on the same side, a second set is constructed, and all control points of the second point cloud cross-sectional line are stored sequentially in the second set. Next, for the third point cloud cross-sectional line, a third set is constructed, and all control points of the third point cloud cross-sectional line are stored sequentially in the third set. Finally, for the fourth point cloud cross-sectional line, a fourth set is constructed, and all control points of the fourth point cloud cross-sectional line are stored sequentially in the fourth set. This completes the construction of the first set and storage of control points for all point cloud cross-sectional lines. The construction of the second set and storage of control points for the point cloud guide lines are carried out in the same manner.
[0078] In this embodiment, the control points of each point cloud cross-section line are selected sequentially using a secondary development control, followed by the control points of each point cloud guide line. It's important to note that the control points of each point cloud cross-section line or guide line are stored in the corresponding first or second set before selecting the control points of the next line, continuing until all control points for all point cloud cross-section lines and guide lines are stored. Therefore, the number of lines in the first set is equal to the number of point cloud cross-section lines, and the number of lines in the second set is equal to the number of point cloud guide lines. Next, selecting the parameterized datum surface generates the initial processing surface for removing metal corrosion pits. The specific operation interface is shown below. Figure 5 As shown, the generated initial machining surface is as follows Figure 9 As shown, from Figure 9 It is quite clear that the initial machining surface does not encompass all the defect point clouds, which does not meet the requirements of cold spray additive manufacturing.
[0079] Based on the first and second sets, a parameterized datum surface is selected to generate the initial machining surface. This involves adjusting the parameterized datum surface according to the control points of all point cloud cross-section lines and all guide lines to generate the initial machining surface. The specific adjustment process for the parameterized datum surface is as follows:
[0080] Step 3.1: Assign the tag value of each control point of each point cloud cross-section line to the control point tag value of the corresponding parameterized base surface cross-section line in sequence, and adjust the parameterized base surface according to the control point tag value of the cross-section line of the parameterized base surface;
[0081] Step 3.2: Assign the tag value of each control point of each point cloud guide line to the control point tag value of the corresponding parameterized datum, and adjust the parameterized datum according to the control point tag value of the guide line of the parameterized datum;
[0082] Step 3.3: Compare the parametric base surface before and after adjustment, delete the unadjusted control points in the adjusted parametric base surface, and generate the initial machining surface. The unadjusted control points include the control points of the unadjusted section lines and the control points of the unadjusted guide lines.
[0083] To automatically select different control points for different cross-sections or different guide lines of a parametric datum, a double for loop is used to select the control points of the parametric datum. Taking the selection of control points for the cross-sections of a parametric datum as an example: the outer for loop controls the number of cross-sections of the parametric datum. To adjust the cross-sections of the point cloud to the cross-sections of the parametric datum, the number of iterations of the outer for loop equals the number of cross-sections of the point cloud. The loop body of the outer for loop is the inner for loop, which controls the number of control points for the cross-sections of the parametric datum. To adjust the control points of each cross-section of the point cloud to the control points of the corresponding cross-section, the number of iterations of the inner for loop equals the number of control points of the current cross-section of the parametric datum (i.e., the cross-section of the parametric datum being executed by the outer for loop). The loop body of the inner for loop assigns the control point tag value of the point cloud cross-section to the control point tag value of the cross-section of the parametric datum; that is, the control points of the point cloud cross-section replace the control points of the cross-sections of the parametric datum.
[0084] In the specific implementation process, a two-dimensional array is constructed for the parameterized base plane. D H×L , H The number of section lines for parameterized base planes ( H (equal to the number of point cloud cross-section lines) L The number of control points for the section line of each parameterized base surface ( L (equal to the number of control points of the point cloud section line), and the parameterized base plane is parameterized in a specific positional order. h The first section line l The tag values of each control point are stored in a two-dimensional array. D H×L In, among them, h =1,2,…, H ,l =1,2,…, L The specific order of positions refers to first storing the control point tag values of the cross-section line of the first parameterized datum on a certain side, then storing the control point tag values of the cross-section line of the second parameterized datum on the same side, and so on, until completion. H The control point tag values of the cross-section lines of the parameterized base surface are stored. For corrosion pits, a two-dimensional array is constructed. E C×B , C The number of point cloud cross-sectional lines of corrosion pits ( H equal C ), B The number of control points for each point cloud cross-section line ( L equal B ), according to a specific positional order c The first point cloud cross-section line b The tag values of each control point are stored in a two-dimensional array. E C×B In, among them, c =1,2,…, C , b =1,2,…, B The specific positional order refers to storing the control point tag values of the first point cloud cross-section line on a certain side first, then storing the control point tag values of the second point cloud cross-section line on the same side, and so on, until completion. C The control point tag values of the point cloud cross-section are stored. The point cloud cross-section is stored in a two-dimensional array. E C×B The order and cross-sectional lines of the parameterized base surface are stored in the two-dimensional data. D H×L The order is the same. Therefore, the loop body of the inner for loop is... D [ i -1][ j -1]= E [ i -1][ j -1], that is, when proceeding to the [number]th i The outermost for loop's first... j During the inner for loop, the first... i The first point cloud cross-section line j The tag value of the control point is passed to the first... i The first parameterized base plane section line jEach control point tag value establishes a correspondence between the point cloud cross-sectional lines and the parameterized datum surface cross-sectional lines. This transfers the control point tag value of each point cloud cross-sectional line to the control point tag value of the parameterized datum surface cross-sectional lines. As the control point tag value of the parameterized datum surface cross-sectional lines changes, the coordinate values of the control points on those lines also change. Similarly, by adjusting the control point tag values of the guide lines on the parameterized datum surface using the control point tag values of each guide line in the point cloud, the coordinate values of the guide lines on the parameterized datum surface are adjusted.
[0085] The coordinate values of the control points of all cross-section lines of the parameterized base surface can be adjusted by using a double for loop; similarly, the coordinate values of the control points of all guide lines of the parameterized base surface can be adjusted by using the control points of the point cloud guide lines, thereby adjusting the parameterized base surface. The adjusted parameterized base surface is the initial machining surface.
[0086] Since a parametric base surface is constructed, changing one control point will cause changes to the associated lines and surfaces. However, because there are many control points on the established parametric base surface, not all control points will be adjusted. In this case, the adjusted parametric base surface is not the desired initial machining surface. Therefore, by traversing and comparing the control point coordinates of the adjusted parametric base surface with those of the original parametric base surface, the control points that have not been adjusted are found in the adjusted parametric base surface and deleted, and only the adjusted control points are kept, thus obtaining the initial machining surface.
[0087] Step 4: Using the coordinates of the control points in the initial machining surface as the optimization variables of the UG optimizer, the requirements of cold spray additive manufacturing as the optimization constraints, and the minimum average of the sum of the minimum distances from each point of the corrosion pit to the initial machining surface as the optimization objective function, the UG optimizer is used to iteratively adjust the control points of the initial machining surface to generate the final machining surface.
[0088] In UG software, set optimization variables, optimization constraints, and optimization objective function to complete the optimization settings. The optimization settings interface is shown below. Figure 10 As shown.
[0089] Regarding the requirements of cold spray additive manufacturing, the cross-sectional line of the final machined surface should meet the requirements of cold spray additive manufacturing, see [link to relevant documentation]. Figure 11 As shown. The main requirements for cold spray additive manufacturing include the maximum machining angle, the cross-section line must meet the concave requirement (i.e., the cross-section line must be concave), and the cross-section line must encompass all defect points (i.e., the cross-section line must contain all defect point cloud constraints). A machining angle that is too large or a cross-section line that is convex will affect the effectiveness of cold spray additive repair.
[0090] The guide lines of the final machined surface should meet the requirements of cold spray additive manufacturing, such as... Figure 12As shown, the final machining surface guide line should encompass all defect points, and the established final machining surface should be on one side of the defect point cloud, that is, it should contain all defect point clouds.
[0091] In the specific implementation process, the maximum machining angle constraint is as follows: The UF_CURVE_ask_curve_turn_angle function in NX Open C / ufun is used to directly obtain the included angle α between any two adjacent segments of each cross-section line in the initial machining surface, and this included angle α is stored in the uf_modl_expression.h function; a maximum machining angle function is created based on the uf_modl_expression.h function and the included angle stored therein, ensuring that the value of the uf_modl_expression.h function is less than the value of the maximum machining angle function. This is the constraint condition for the maximum machining angle.
[0092] The specific method for the concave section line constraint is as follows: Obtain the center of curvature of each control point on each section line in the initial machined surface. Select a point P within the space contained in the corrosion pit. Calculate the angle between each first connecting line and the corresponding second connecting line, ensuring that this angle β is less than 90°. This satisfies the concave section line constraint condition. Here, the first connecting line refers to the line between point P and the control point of the section line in the initial machined surface. P The first line connects to the second control point. P 1 and control points P The center of curvature corresponding to 1 P 1 ’ The lines connecting them, such as Figure 13 As shown. Each control point of each cross-section line has its own center of curvature. Therefore, for each control point of each cross-section line, the concave constraint of the cross-section line must be satisfied. That is, the number of the first connecting line and the second connecting line are equal to the sum of all control points of all cross-section lines of the initial machining surface.
[0093] The cross-section line encompasses all defect point cloud constraints as follows: Select a point P within the space contained by the corrosion pit, and use a series of related functions in NX Open C / ufun regarding UF_CURVE (curve) and uf_modl_expression.h (expression) to calculate the length L1 of each first line segment; then calculate the length L2 of the second line segment corresponding to the first line segment, ensuring that the length L1 of the first line segment is less than the length L2 of the second line segment. Here, the first line segment refers to the line connecting point P to the control point of the cross-section line in the initial machining surface, and the second line segment refers to the line connecting point P to the intersection of the extension of the first line segment and the initial machining surface, such as... Figure 14 As shown. This ensures that the final machined surface contains the constraint condition of all defect point clouds, and of course, the constraint condition that the cross-sectional line of the final machined surface and the guide line encompass all defect points is also satisfied.
[0094] The maximum machining angle function and the concave constraint of the cross-section line are both less than 90°. Figure 10 The settings are configured in the user interface, while a point P within the space contained in the corrosion pit is directly completed in the UG graphics window.
[0095] In this embodiment, the objective function is to minimize the average sum of the minimum distances from each point in the corrosion pit to the initial processed surface. The specific expression of the objective function is as follows:
[0096]
[0097] in, d i The first corrosion pit i The minimum distance from each point to the initial machining surface. G The number of corrosion pits. f ( d The minimum average of the sum of the minimum distances from each point of the corrosion pit to the initial machined surface is minimized.
[0098] Submit a solution in the UG optimizer, and the system will automatically iterate and adjust the control point parameters of the initial machined surface to generate the final machined surface that meets the requirements of cold spray additive manufacturing. Figure 15 and Figure 16 As shown, this achieves the goal of quickly generating defective machining surfaces.
[0099] The above description only discloses specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or modifications that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating a machined surface to remove metal corrosion pits, characterized in that, Includes the following steps: Obtain the point cloud of corrosion pits on the metal surface to be repaired, and process the point cloud of corrosion pits to obtain the point cloud cross-sectional line and point cloud guide line of the corrosion pits. A parameterized datum surface for constructing corrosion pits is formed, which consists of multiple cross-sectional lines and multiple guide lines; The parameterized base surface is adjusted based on the point cloud cross-section line and the point cloud guide line to generate the initial processing surface; Using the coordinates of the control points in the initial machining surface as the optimization variables of the UG optimizer, the requirements of cold spray additive manufacturing as the optimization constraints, and the minimum average of the sum of the minimum distances from each point of the corrosion pit to the initial machining surface as the optimization objective function, the control points of the initial machining surface are iteratively adjusted using the UG optimizer to generate the final machining surface. Wherein: the optimization constraints include the maximum machining angle constraint, the concave cross-section constraint, and the constraint that the cross-section contains all defect point clouds; The maximum machining angle constraint is specifically as follows: The included angle between any two adjacent segments of each cross-section line in the initial machining surface is obtained using the UF_CURVE_ask_curve_turn_angle function in NX Open C / ufun, and the included angle is stored in the uf_modl_expression.h function; Based on the uf_modl_expression.h function and the included angle stored therein, a maximum machining angle function is created, such that the value of the uf_modl_expression.h function is less than the value of the maximum machining angle function; The concave constraint of the cross-section line is specifically as follows: Obtain the curvature center point of each control point of each cross-section line in the initial machining surface, select a point P in the space contained in the corrosion pit, calculate the included angle between each first connecting line and the second connecting line corresponding to the first connecting line, and make the included angle less than 90°, wherein the first connecting line refers to the line connecting point P and the control point of the cross-section line in the initial machining surface, and the second connecting line refers to the line connecting the control point and its curvature center point; The cross-sectional line contains all the defect point cloud constraints, specifically: Select a point P within the space contained in the corrosion pit, and calculate the length of each first line segment, where the first line segment refers to the line connecting point P and the point in the corrosion pit. Calculate the length of the second line segment corresponding to the first line segment, such that the length of the first line segment is less than the length of the second line segment, wherein the second line segment refers to the line connecting point P to the intersection of the extension of the first line segment and the initial processing surface.
2. The method for generating a machined surface to remove metal corrosion pits according to claim 1, characterized in that, The specific implementation process for processing the corrosion pit point cloud is as follows: The corrosion pit point cloud is cross-sectionally processed to construct the corrosion pit. N A point cloud cross-section line; Connect the coordinates of the uncorroded surface to construct the edge point cloud guide line, and then construct the middle point cloud guide line of the corrosion pit; choose n Point cloud section lines and m The point cloud guide line is generated and the selected point cloud section line and point cloud guide line are output. The point cloud guide lines include edge point cloud guide lines and middle point cloud guide lines, 3≤ n ≤ N ,2≤ m ≤ M , N The number of lines in the constructed point cloud cross-section, M The number of guide lines for the constructed point cloud.
3. The method for generating a machined surface to remove metal corrosion pits according to claim 2, characterized in that, The specific implementation process for outputting the selected point cloud cross-section line and point cloud guide line is as follows: The selected point cloud section line is obtained by using the UF_EVAL_ask_spline_control_pts spline function in NX Open C / ufun, and then the control points of the obtained point cloud section line are created by using the UF_CURVE_create_point function, thus obtaining the selected point cloud section line. The selected point cloud guide line is obtained by using the UF_EVAL_ask_spline_control_pts spline function in NX Open C / ufun, and then the control points of the obtained point cloud guide line are created by using the UF_CURVE_create_point function, thus obtaining the selected point cloud guide line.
4. The method for generating a machined surface to remove metal corrosion pits according to claim 1, characterized in that, The specific implementation process of adjusting the parameterized datum based on the point cloud cross-section line and the point cloud guide line is as follows: For each point cloud cross-section line, a first set is constructed sequentially, and all control points of the point cloud cross-section line are stored in the corresponding first set; For each of the point cloud guide lines, a second set is constructed in sequence, and all control points of the point cloud guide lines are stored in the corresponding second set; After storing the control points of all point cloud cross-section lines and all point cloud guide lines, the parameterized base surface is adjusted based on the control points of all point cloud cross-section lines and all guide lines to generate the initial machining surface.
5. The method for generating a machined surface to remove metal corrosion pits according to claim 4, characterized in that, The specific implementation process of adjusting the parameterized datum based on the control points of all point cloud cross-section lines and all guide lines is as follows: The tag value of each control point of each point cloud cross-section line is sequentially assigned to the tag value of the control point of the corresponding parameterized base surface cross-section line, and the parameterized base surface is adjusted according to the tag value of the control point of the cross-section line of the parameterized base surface. The tag value of each control point of each point cloud guide line is sequentially assigned to the control point tag value of the guide line of the corresponding parameterized base surface, and the parameterized base surface is adjusted according to the control point tag value of the guide line of the parameterized base surface; Compare the parametric base surfaces before and after adjustment, delete the unadjusted control points in the adjusted parametric base surface, and generate the initial machining surface. The unadjusted control points include the control points of the unadjusted section lines and the control points of the unadjusted guide lines.
6. The method for generating a machined surface to remove metal corrosion pits according to claim 5, characterized in that, The method utilizes a double for loop to select different control points for different cross-sectional lines of the parameterized base surface and different control points for different point cloud cross-sectional lines, achieving a one-to-one correspondence between the control points of the cross-sectional lines of the parameterized base surface and the control points of the point cloud cross-sectional lines. Similarly, the method utilizes a double for loop to select different control points for different guide lines of the parameterized base surface and different control points for different point cloud guide lines, achieving a one-to-one correspondence between the control points of the guide lines of the parameterized base surface and the control points of the point cloud guide lines.
7. The method for generating a machined surface to remove metal corrosion pits according to claim 1, characterized in that, The specific expression for the optimization objective function is as follows: in, d i The first corrosion pit i The minimum distance from each point to the initial machining surface. G The number of corrosion pits. f ( d The minimum average of the sum of the minimum distances from each point of the corrosion pit to the initial machined surface is minimized.