A method for evaluating surface step difference in the sunken area after mirror milling of skin through online thickness measurement.
By utilizing the online thickness measurement function and feature recognition algorithm of the mirror milling equipment, automated detection of surface step differences in the skin was achieved, solving the problems of long detection cycles and high costs, and improving production efficiency and detection efficiency.
Patent Information
- Application Number
- CN202310685858.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-06-09
AI Technical Summary
Existing methods for detecting surface step differences in mirror milling processes suffer from long inspection cycles, high costs, and the inability to achieve online automated inspection, resulting in low production efficiency and increased costs.
The online thickness measurement function of the mirror milling equipment is used to detect the thickness and step difference of the skin depression area in real time through a computer program. The step difference of the skin surface is automatically evaluated by using ordered point cloud set and feature recognition algorithm, and a step difference cloud map is generated.
It enables online automated inspection of mirror-milled surfaces, saving inspection cycles and costs, improving production efficiency, and meeting the needs of mass production.
Smart Images

Figure CN116511995B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of aircraft skin mirror milling technology, specifically to a method for evaluating the step difference after online detection of skin thickness during aircraft skin mirror milling. Background Technology
[0002] Mirror milling equipment is a dual five-axis machining center system. Its main structure consists of a support head, a milling head, and a workpiece clamping device. The support head and milling head are located on both sides of the skin, pointing towards each other and aligning. The support head supports the skin and can measure thickness in real time and provide feedback control for machine tool movements, working in conjunction with the milling head to mill skin depressions, edge contours, or drill holes. Mirror milling equipment has the functions of scanning the actual skin surface, automatically correcting the program based on the actual surface, and detecting the wall thickness of the depression area in real time. Unlike the smooth surface characteristics of chemical milling, mirror milling surfaces exhibit visible step differences. The aerospace manufacturing industry has stringent quantitative control requirements for these step differences, which are mainly measured using depth dial indicators or scratch testers. Current mirror milling surface step difference detection technologies have the following problems:
[0003] (1) The testing cycle is long. When operators use depth dial gauges or scratch testers to measure step difference values, they need to select test points based on their operating experience. Then, for the large number of test points selected, the measuring tools are adjusted point by point for measurement. Then, the measured values are read and recorded. Usually, when two people test a single 6-meter-long skin covered with depressions, it takes two working days just to test the step difference in the depression area. Then, time needs to be spent to sort out and analyze the step difference data. The current low efficiency of step difference testing affects the product delivery schedule and the continuous production of mirror milling equipment.
[0004] (2) The testing cost is high. The testing of step difference not only requires the use of instruments and measuring tools such as depth dial gauges or scratch testers, but also requires professional inspectors to spend a lot of testing time, and causes machine tool downtime and waiting losses. Whether it is the cost of purchasing instruments and measuring tools, the depreciation cost of machine tool downtime, or the labor cost of inspectors, it is a considerable cost expenditure.
[0005] (3) There is little room for improvement. Since the step difference needs to be detected for each piece of skin after mirror milling, the detection method of using a depth dial gauge or scratch instrument to measure and extract data point by point cannot be improved in batches or automatically. There is no room for improvement, and it is generally only suitable for single-piece and small-batch parts production.
[0006] Currently, the step difference detection of mirror-milled surfaces can only be performed offline point-by-point inspection, failing to achieve online automated detection. This is primarily because an online step difference calculation method for mirror-milled surfaces has not yet been developed. To address this issue, based on online real-time thickness detection technology for mirror milling, a method for detecting and evaluating surface step differences in the sunken area after mirror milling of a skin is invented. Summary of the Invention
[0007] A method for evaluating surface step difference in the sunken area after mirror milling of skin, characterized by comprising the following steps:
[0008] Step 1: Use a mirror milling machine to enable the milling function or thickness measurement function, and call the milling program to measure the thickness of the skin depression area online. Obtain a document containing the ordered spatial coordinates of the toolpath trajectories within the depression area and the corresponding depression thickness value. The ordered point cloud is represented as Cloud = {P} i (X i ,Y i Z i A i C i Thick_Value i P(i=1,2,…,N) is the number of points in the ordered point cloud. i For numbering ordered spatial points, X i ,Y i Z i A i C i Thick_Value represents the X, Y, Z directions, machine tool tilt angle A, and machine tool tilt angle C of an ordered spatial point in the skinning coordinate system. i This represents the thickness of the sunken area.
[0009] Step 2: Predefine an array data containing an ordered point cloud Cloud, and reserved variables for each ordered spatial point: Orientation, Left_Mismatch, and Right_Mismatch, and predefine the order difference storage space Mismatch variable.
[0010] Step 3: Predefine four types of features: horizontal lines, vertical lines, diagonal lines, and rounded lines. Create two-dimensional arrays for each type according to the feature number and point position number. Each two-dimensional array cell stores the address of an ordered spatial point in the data array that matches the feature number and corresponding point position number. At the same time, define independent functions for storing and retrieving the address of the data array for each type, as well as corresponding functions for storing and retrieving the order difference value. For the diagonal line type, define a separate one-dimensional array Edata to represent the slope.
[0011] Step 4: Open the Ordered Point Cloud document and create a temporary point P. t (X t ,Y t Z t A t Ct Thick_Value t ), read {P one by one i (X i ,Y i Z i A i C i Thick_Value i Given a string of numbers i = 1, 2, ..., N, assign a temporary point P to it. t (X t ,Y t Z t A t C t Thick_Value t Then determine the thickness value (Thick_Value) at the current point. t Can it be placed under the threshold condition (δ-ε)? t ,δ+ε t If the condition is not met within the specified interval, ignore that point and proceed to the next point for assignment and evaluation. If the condition is met, set the current P value accordingly. t (X t ,Y t Z t A t C t Thick_Value t Stored in the data array, where δ is the theoretical thickness of the skin depression zone, and ε t The thickness increment value used to determine whether the thickness value meets the conditions is specified in the attached table.
[0012] Step 5: Given M points in the data array and M < N, calculate the storage points {P} in the data array sequentially. i (X i ,Y i Z i A i C i Thick_Value i The tangential angle values of {i = 2, 3, ..., M-1} are P. i The vector pointing from the previous point to this point and P i Calculate the inverse cosine of the angle between the vectors pointing to the next point, and store the result in the corresponding point's tangential angle value (Orientation) in the data array. Finally, assign the tangential angle value (Orientation) of P2 to P1, and set P... M-1 The point tangential angle value Orientition is assigned to P. M .
[0013] Step 6: Starting from point 1 to point M in the data array, determine whether the tangential angle value (Orientation) of each point is less than or equal to the threshold ε. θ , ε θ ε represents the increment of the tangential angle value Orientation. θ The value ranges from 0.2° to 11.4°, as detailed in the attached table, when Orientation ≤ ε θ Then continue comparing the next point, when Orientation > ε θ When the comparison stops, an orientation greater than ε will appear. θ The Mth time t The point is used as the starting point for feature discrimination of elements in the data array, the Mth point. t Points 1 to M before the point t Point -1 is a point where the trajectory repeats;
[0014] Step 7: From the Mth data array t From point M to point M-1, determine the tangential angle value of each point one by one, using the tangential angle value and the difference between the X and Y coordinate values of different points as the judgment conditions, where the orientation change value ε of the tangential angle value is considered. θ The increment value for determining the first included angle is ε. θ The value ranges from 0.2° to 11.4°, see the attached table for details, ε θ2 The increment value for determining the second included angle is ε. θ2 The value is between 25° and 50°, ε is the coordinate increment value in the X and Y directions, and the value of ε is between 0.03 and 0.2. All ordered spatial points are identified and marked as four types of element feature points with the type names of horizontal line, vertical line, diagonal line and rounded corner line. The specific steps of feature division are as follows:
[0015] (7-1) When the tangential angle value Orientation is less than the threshold ε θ , and |Y 当前点 -Y 上一点 If | is less than or equal to ε, assign a horizontal line-type element feature number and a point position number to the current point, and increment the point position number by 1. Determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ, If greater than ε θ The feature number is incremented by 1, and then the position number is set to zero. If it is not greater than ε θ No action is required;
[0016] (7-2) When the tangential angle value Orientation is less than the threshold ε θ , and |X 当前点 -X 上一点If | is less than or equal to ε, assign a vertical line element feature number and a point position number to the current point, and increment the point position number by 1. Determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ, If greater than ε θ The feature number is incremented by 1, and then the position number is set to zero. If it is not greater than ε θ No action is required;
[0017] (7-3) When the tangential angle value Orientation is less than the threshold ε θ , and |Y 当前点 -Y 上一点 |greater than ε and |X 当前点 -X 上一点 If | is greater than ε, assign a diagonal line element feature number and a point position number to the current point, and increment the point position number by 1. Determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ If it is greater than ε θ Next, determine if the point index is greater than or equal to 1. If it is, meaning the number of points under the corresponding feature number is at least 2, increment the feature number by 1, and then set the point index to zero. If it is less than 1, set the point index to zero. If the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is not greater than ε... θ No action is required;
[0018] (7-4) When the tangential angle value Orientation is greater than the threshold ε θ And the tangential angle value Orientation is less than or equal to the threshold ε θ2 At that time, assign the feature point number and position number within the rounded corner element to the current point, and determine whether the absolute value of the difference between the orientation of the current point and the orientation of the next point's tangential angle is greater than ε. θ If it is greater than ε θ Next, determine if the point index is greater than or equal to 2. If it is, meaning the number of points under the corresponding feature number is at least 3, increment the feature number by 1, and then set the point index to zero. If it is less than 2, set the point index to zero. If the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is not greater than ε... θ No action is required;
[0019] (7-5) When the tangential angle value Orientation is greater than the threshold ε θ2 When the current point is an endpoint or a vertex, these points are not assigned feature numbers;
[0020] After the operation is completed, the two-dimensional arrays corresponding to the horizontal line, vertical line, diagonal line and rounded line categories store multiple discontinuous horizontal line segments, vertical line segments, diagonal line segments and rounded line segments composed of feature points. The spatial coordinate values and numbers of the feature points that make up a single line segment are continuous. Each line segment in the four categories is a line element of that category.
[0021] Step 8: Calculate the slope K of each oblique line in the oblique line class. i =|Y i1 -Y i2 | / |X i1 -X i2 |, i = 1, 2, 3, ..., L, and store them in a one-dimensional array Edata, where L is the number of line elements of the diagonal line, Y i1 Y i2 X i1 X i2 These are the Y-coordinates and X-coordinates of the first and second feature points of the i-th line element, respectively.
[0022] Count the number M values with different K values in the array Edata. k M k When M is 1, there is no need to classify it again. k When the value is not 1, the line elements of the diagonal line class need to be further refined according to the K value. The specific steps are as follows:
[0023] Create M according to different K values k There are three two-dimensional arrays representing different line types. Each array cell stores the feature number of the feature point of each line element in the data array and the address of the ordered spatial point corresponding to its position. For each line type with a specific K value, functions for storing and retrieving the data array address are defined independently, along with corresponding functions for storing and retrieving the order difference value. Using all line elements in the line types generated in step 7 as the operation objects, starting from the first line element, the slope value of the current line element is sequentially determined relative to M. k If the K values in each diagonal line category are equal, and if they are equal, the address of the feature point within the current line element is assigned to the corresponding two-dimensional array of diagonal line categories. After completing the classification operation, the newly generated M... k Each of the two-dimensional arrays of different eigenvalue categories of diagonal lines stores line elements of the same diagonal line category.
[0024] Step 9 uses the order difference calculation functions defined for the four types of features to calculate the left and right order differences of feature points of different types. A vector is formed by the current point pointing to the next point, or the previous point pointing to the current point. This vector is then used to form a cross product with the nearest neighbor point with the smallest Euclidean distance from the current point, and the product is then applied to the Z-axis. If the result is positive, the nearest neighbor point is located to the left of the current line element; that is, the absolute value of the thickness difference between the current point and the nearest neighbor point is taken as the left order difference of the current point. If the result is negative, the nearest neighbor point is located to the right of the current line element; that is, the absolute value of the thickness difference between the current point and the nearest neighbor point is taken as the right order difference of the current point. The initial values for both left and right order differences are -1. The definition methods for the order difference calculation functions differ for different feature types; the specific definition methods are as follows:
[0025] (9-1) The calculation methods for the left and right order differences of feature points for horizontal lines, vertical lines, and diagonal lines are as follows:
[0026] (9-1-1) Calculate the Euclidean distance between each point in a single line element and each point in all other line elements in the current class object, and compare the Euclidean distance values to obtain the two points with the smallest Euclidean distance values. The Euclidean distance values of these two points should be between 70% and 90% of the effective diameter value of the selected tool, that is, the effective diameter value of the tool is the tool diameter value minus twice the tool bottom angle value.
[0027] (9-1-2) Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to its nearest neighbor with the smallest Euclidean distance, and the dot product with the Z-axis. If the result is positive, the nearest neighbor is located to the left of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor is assigned to the left-hand difference of the current point; if the result is negative, the nearest neighbor is located to the right of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor is assigned to the right-hand difference of the current point.
[0028] (9-1-3) Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to its second nearest neighbor at the Euclidean distance, and the dot product with the Z-axis. If the result is positive, the nearest neighbor is located to the left of the current line element. Further determine whether the left-order difference of the current point is -1. If it is -1, assign the absolute value of the thickness difference between the current point and the nearest neighbor to the left-order difference of the current point. If it is not -1, do nothing. If the result is negative, the nearest neighbor is located to the right of the current line element. Further determine whether the right-order difference of the current point is -1. If it is -1, assign the absolute value of the thickness difference between the current point and the nearest neighbor to the right-order difference of the current point. If it is not -1, do nothing.
[0029] (9-1-4) Repeat this process to calculate the left and right differences of each point of the current line element. Repeat this process for the remaining line elements to calculate the left and right differences of all point sets.
[0030] (9-2) The calculation method for the left-order and right-order difference functions of rounded corner feature points is as follows:
[0031] (9-2-1) Calculate the Euclidean distance between each point in a single line element and each point in all other line elements in the current class object, and compare the Euclidean distance values to obtain the two points with the smallest Euclidean distance values. The Euclidean distance values of these two points should be between 70% and 90% of the effective diameter value of the selected tool, that is, the effective diameter value of the tool is the tool diameter value minus twice the tool bottom angle value.
[0032] (9-2-2) Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to another nearest neighbor point, and the dot product with the Z-axis. If the result is positive, the nearest neighbor point is located to the left of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor point is assigned to the left-order difference value of the current point; if the result is negative, the nearest neighbor point is located to the right of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor point is assigned to the right-order difference value of the current point.
[0033] (9-2-3) Repeat this process to calculate the left and right differences of each point of the current line element. Repeat this process for the remaining line elements to calculate the left and right differences of all point sets.
[0034] In step 10, the order difference value of all points is equal to the larger of its left and right order difference values. For spatial points that only have a left or right order difference, the order difference value is equal to the left or right order difference value.
[0035] After step 11 is completed, the data array is written to a document to save the result data.
[0036] Step 12 uses computer graphics tools to query the order difference value attribute of the ordered spatial point set, which can generate the order difference cloud map of each point in the sunken area after mirror milling. According to production needs, based on the left and right order difference attributes of the ordered spatial point set, the left or right order difference cloud map of each point in the sunken area after mirror milling can be selected to be generated.
[0037] The aerospace manufacturing industry has stringent quantitative control requirements for step difference. Without a method for efficiently and accurately evaluating step difference in the depression zone, mirror milling processes cannot be efficiently applied in engineering. Traditional methods of measuring step difference using depth dial gauges or scratch testers have inherent drawbacks such as long inspection cycles, high inspection costs, and limited room for improvement, failing to meet the actual operational needs of automated, mass production in manufacturing workshops.
[0038] This invention, based on the online thickness measurement function of mirror milling equipment, proposes an online step difference calculation method for mirror milled surfaces, enabling automated online evaluation of step differences on mirror milled skin surfaces. A step difference evaluation report for sunken areas can be generated with a single click, saving two working days of step difference detection time per part and significantly reducing high inspection costs. This greatly promotes the efficient engineering application of mirror milling technology. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the skin structure.
[0040] Figure 2 This is a schematic diagram of the mirrored milling tool path and step difference state in the rectangular recessed milling area 1.
[0041] Figure 3 This is a schematic diagram of the ordered spatial coordinate point cloud of online thickness measurement for the recessed milling zones 2 and 3.
[0042] Figure 4 This is a schematic diagram of an ordered point cloud containing effective thickness values after filtering out noise based on thickness conditions.
[0043] Figure 5 This is a schematic diagram of the ordered point cloud after filtering out repeated coordinate points of the trajectory at the starting point.
[0044] Figure 6 This is a schematic diagram showing the state of ordered point clusters in the sunken milling area 2, categorized by features and numbered in layers.
[0045] Figure 7 This is a schematic diagram showing the initial classification and layering of ordered points in the recessed milling area based on their characteristics.
[0046] Figure 8 This is a schematic diagram showing the state of the ordered point clusters in the recessed milling area, which are then classified and numbered in layers according to their features.
[0047] Numbering in the diagram: 1. Rectangular recessed milling area; 2. Partially beveled recessed milling area; 3. Fully beveled recessed milling area; 4. Inner circular hole edge contour; 5. Internal irregular opening edge contour. Detailed Implementation
[0048] See Figure 1 , Figure 2 As shown, the skin includes typical recessed area features such as rectangular recessed milling area 1, partially beveled recessed milling area 2, and fully beveled recessed milling area 3, as well as internal edge features such as inner circular hole edge contour 4 and internal irregular opening edge contour 5. The mirror milling toolpath for rectangular recessed milling area 1 is a conventional near-"eye" shaped toolpath that first performs rotary milling and then reciprocating milling. Under the corresponding state of this toolpath, the step difference value M between the (j+1)th point of the first and second columns shown in typical section AA is... [0to1][j]The order difference M between the (j+1)th point of the second and third columns. [1to2][j] The difference in remaining milling thickness between adjacent columns can be obtained by calculating the absolute value of the difference, denoted as: |Thick_Value [0][j] -Thick_Value [1][j] |and|Thick_Value [1][j] -Thick_Value [2][j] The final evaluation value of the step difference at point j+1 in column 2 is M. [0to1][j] M [1to2][j] The larger of the calculated values.
[0049] See Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 As shown, the online detection method for milling step difference in skin mirroring takes the typical depression features of the partially beveled milling area 2 and the fully beveled milling area 3 as a specific embodiment. It directly measures the surface step difference between adjacent tool paths in the mirrored milled skin depression area, transforming it into the absolute value of the milling remaining thickness difference between nearest-neighbor points in the depression area through indirect calculation. Specifically, it includes the following steps:
[0050] Step 1: Use a mirror milling machine to enable the milling function or thickness measurement function, and call the milling program to measure the thickness of the skin depression area online. Obtain a document containing the ordered spatial coordinates of the toolpath trajectories within the depression area and the corresponding depression thickness value. The ordered point cloud is represented as Cloud = {P} i (X i ,Y i Z i A i C i Thick_Value i P(i=1,2,…,N) is the number of points in the ordered point cloud. i For numbering ordered spatial points, X i ,Y i Z i A i C i Thick_Value represents the X, Y, Z directions, machine tool tilt angle A, and machine tool tilt angle C of an ordered spatial point in the skinning coordinate system. i This represents the thickness of the sunken region. The starting point of the ordered point cloud is marked as P1ˊ, and the ending point is marked as P. N .
[0051] Step 2 defines an array data containing an ordered point cloud Cloud, and reserved variables for each ordered spatial point: Orientation, Left_Mismatch, and Right_Mismatch, and predefines the order difference storage space Mismatch variable.
[0052] Step 3: Predefine four feature types: horizontal lines, vertical lines, diagonal lines, and rounded lines. Create two-dimensional arrays for each type according to the feature number and point position number. Each two-dimensional array cell stores the address of an ordered spatial point in the data array that matches the feature number and corresponding point position number. At the same time, define independent functions for storing and retrieving the address of the data array for each type, as well as corresponding functions for storing and retrieving the order difference value. For the diagonal line type, define a separate one-dimensional array Edata to represent the slope.
[0053] Step 4: Open the Ordered Point Cloud document and create a temporary point P. t (X t ,Y t Z t A t C t Thick_Value t ), read {P one by one i (X i ,Y i Z i A i C i Thick_Value i Given a string of numbers i = 1, 2, ..., N, assign a temporary point P to it. t (X t ,Y t Z t A t C t Thick_Value t Then determine the thickness value (Thick_Value) at the current point. t Can it be placed under the threshold condition (δ-ε)? t ,δ+ε t If the condition is not met within the specified interval, ignore that point and proceed to the next point for assignment and evaluation. If the condition is met, set the current P value accordingly. t (X t ,Y t Z t A t C t Thick_Value tStored in the data array, where δ is the theoretical thickness of the skin depression zone, and ε t The thickness increment value used to determine whether the thickness value meets the requirements is specified in the attached table. After the operation is completed, the ordered point cloud stored in the data array starts at P1 and ends at P... M .
[0054] Step 5: Given M points in the data array and M < N, calculate the storage points {P} in the data array sequentially. i (X i ,Y i Z i A i C i Thick_Value i The tangential angle values of {i = 2, 3, ..., M-1} are P. i The vector pointing from the previous point to this point and P i Calculate the inverse cosine of the angle between the vectors pointing to the next point, and store the result in the corresponding point's tangential angle value (Orientation) in the data array. Finally, assign the tangential angle value (Orientation) of P2 to P1, and set P... M-1 The point tangential angle value Orientition is assigned to P. M .
[0055] Step 6: Starting from point 1 to point M in the data array, determine whether the tangential angle value (Orientation) of each point is less than or equal to the threshold ε. θ , ε θ ε represents the increment of the tangential angle value Orientation. θ The value ranges from 0.2° to 11.4°, as detailed in the attached table, when Orientation ≤ ε θ Then continue comparing the next point, when Orientation > ε θ When the comparison stops, an orientation greater than ε will appear. θ The Mth time t The point is used as the starting point for feature discrimination of elements in the data array, the Mth point. t Points 1 to M before the point t Point -1 is a point where the trajectory repeats; the endpoint is P. M The marker remains unchanged.
[0056] Step 7: From the Mth data array t From point M to point M-1, determine the tangential angle value of each point one by one, using the tangential angle value and the difference between the X and Y coordinate values of different points as the judgment conditions, where the orientation change value ε of the tangential angle value is considered. θ The increment value for determining the first included angle is ε.θ The value ranges from 0.2° to 11.4°, see the attached table for details, ε θ2 The increment value for determining the second included angle is ε. θ2 The value is between 25° and 50°, ε is the coordinate increment value in the X and Y directions, and the value of ε is between 0.03 and 0.2. All ordered spatial points are identified and marked as four types of element feature points with the type names of horizontal line, vertical line, diagonal line and rounded corner line. The specific steps of feature division are as follows:
[0057] (7-1) When the tangential angle value Orientation is less than the threshold ε θ , and |Y 当前点 -Y 上一点 If | is less than or equal to ε, assign a horizontal line-type element feature number and a point position number to the current point, and increment the point position number by 1. Determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ, If greater than ε θ The feature number is incremented by 1, and then the position number is set to zero. If it is not greater than ε θ No action is required;
[0058] (7-2) When the tangential angle value Orientation is less than the threshold ε θ , and |X 当前点 -X 上一点 If | is less than or equal to ε, assign a vertical line element feature number and a point position number to the current point, and increment the point position number by 1. Determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ, If greater than ε θ The feature number is incremented by 1, and then the position number is set to zero. If it is not greater than ε θ No action is required;
[0059] (7-3) When the tangential angle value Orientation is less than the threshold ε θ , and |Y 当前点 -Y 上一点 |greater than ε and |X 当前点 -X 上一点 If | is greater than ε, assign a diagonal line element feature number and a point position number to the current point, and increment the point position number by 1. Determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ If it is greater than ε θNext, determine if the point index is greater than or equal to 1. If it is, meaning the number of points under the corresponding feature number is at least 2, increment the feature number by 1, and then set the point index to zero. If it is less than 1, set the point index to zero. If the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is not greater than ε... θ No action is required;
[0060] (7-4) When the tangential angle value Orientation is greater than the threshold ε θ And the tangential angle value Orientation is less than or equal to the threshold ε θ2 At that time, assign the feature point number and position number within the rounded corner element to the current point, and determine whether the absolute value of the difference between the orientation of the current point and the orientation of the next point's tangential angle is greater than ε. θ If it is greater than ε θ Next, determine if the point index is greater than or equal to 2. If it is, meaning the number of points under the corresponding feature number is at least 3, increment the feature number by 1, and then set the point index to zero. If it is less than 2, set the point index to zero. If the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is not greater than ε... θ No action is required;
[0061] (7-5) When the tangential angle value Orientation is greater than the threshold ε θ2 When the current point is an endpoint or a vertex, these points are not assigned feature numbers;
[0062] After step 7 is completed, the two-dimensional arrays corresponding to the horizontal line, vertical line, diagonal line, and rounded line categories store multiple discontinuous horizontal line segments, vertical line segments, diagonal line segments, and rounded line segments composed of feature points. The spatial coordinates and numbers of the feature points that make up a single line segment are continuous. Each line segment in the four categories is a line element of that category. After step 7 is completed... Figure 6 The recessed milling area 2 shown contains an ordered cluster of spatial points, including 27 horizontal line-like elements, numbered H1 to H27; 34 vertical line-like elements, numbered V1 to V34; 8 diagonal line-like elements, numbered D1 to D8; and 7 rounded line-like elements, numbered C1 to C7. After the operation in step 7 is completed... Figure 7 The recessed milling area 3 shown contains 58 oblique line-like elements, numbered D1 to D58; and 9 rounded line-like elements, numbered C1 to C9.
[0063] Step 8: Calculate the slope K of each oblique line in the oblique line class. i =|Y i1 -Yi2 | / |X i1 -X i2 |, i = 1, 2, 3, ..., L, and store them in a one-dimensional array Edata, where L is the number of line elements of the diagonal line, Y i1 Y i2 X i1 X i2 These are the Y-coordinates and X-coordinates of the first and second feature points of the i-th line element, respectively.
[0064] Count the number M values with different K values in the array Edata. k M k When M is 1, there is no need to classify it again. k When the value is not 1, the line elements of the diagonal line class need to be further refined according to the K value. The specific steps are as follows:
[0065] Create M according to different K values k There are three two-dimensional arrays representing different line types. Each array cell stores the feature number of the feature point of each line element in the data array and the address of the ordered spatial point corresponding to its position. For each line type with a specific K value, functions for storing and retrieving the data array address are defined independently, along with corresponding functions for storing and retrieving the order difference value. Using all line elements in the line types generated in step 7 as the operation objects, starting from the first line element, the slope value of the current line element is sequentially determined relative to M. k If the K values in each diagonal line category are equal, and if they are equal, the address of the feature point within the current line element is assigned to the corresponding two-dimensional array of diagonal line categories. After completing the classification operation, the newly generated M... k Each of the two-dimensional arrays of different eigenvalue categories of diagonal lines stores line elements of the same diagonal line category.
[0066] After step 8 is completed Figure 8 The three ordered points in the recessed milling area shown contain 58 oblique line elements, which are reclassified into four categories based on their slopes. 12 oblique line elements with the same slope are classified into category D1, numbered D1_1 to D1_12; 32 oblique line elements with the same slope are classified into category D2, numbered D2_1 to D2_32; 8 oblique line elements with the same slope are classified into category D3, numbered D3_1 to D3_8; and 5 oblique line elements with the same slope are classified into category D4, numbered D4_1 to D4_5. The original 9 rounded line elements remain unchanged, numbered C1 to C9.
[0067] Step 9 uses the order difference calculation functions defined for the four types of features to calculate the left and right order differences of feature points of different types. A vector is formed by the current point pointing to the next point, or the previous point pointing to the current point. This vector is then used to form a cross product with the nearest neighbor point with the smallest Euclidean distance from the current point, and the product is then applied to the Z-axis. If the result is positive, the nearest neighbor point is located to the left of the current line element; that is, the absolute value of the thickness difference between the current point and the nearest neighbor point is taken as the left order difference of the current point. If the result is negative, the nearest neighbor point is located to the right of the current line element; that is, the absolute value of the thickness difference between the current point and the nearest neighbor point is taken as the right order difference of the current point. The initial values for both left and right order differences are -1. The definition methods for the order difference calculation functions differ for different feature types; the specific definition methods are as follows:
[0068] (9-1) The calculation methods for the left and right order differences of feature points for horizontal lines, vertical lines, and diagonal lines are as follows:
[0069] (9-1-1) Calculate the Euclidean distance between each point in a single line element and each point in all other line elements in the current class object, and compare the Euclidean distance values to obtain the two points with the smallest Euclidean distance values. The Euclidean distance values of these two points should be between 70% and 90% of the effective diameter value of the selected tool, that is, the effective diameter value of the tool is the tool diameter value minus twice the tool bottom angle value.
[0070] (9-1-2) Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to its nearest neighbor with the smallest Euclidean distance, and the dot product with the Z-axis. If the result is positive, the nearest neighbor is located to the left of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor is assigned to the left-hand difference of the current point; if the result is negative, the nearest neighbor is located to the right of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor is assigned to the right-hand difference of the current point.
[0071] (9-1-3) Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to its second nearest neighbor at the Euclidean distance, and the dot product with the Z-axis. If the result is positive, the nearest neighbor is located to the left of the current line element. Further determine whether the left-order difference of the current point is -1. If it is -1, assign the absolute value of the thickness difference between the current point and the nearest neighbor to the left-order difference of the current point. If it is not -1, do nothing. If the result is negative, the nearest neighbor is located to the right of the current line element. Further determine whether the right-order difference of the current point is -1. If it is -1, assign the absolute value of the thickness difference between the current point and the nearest neighbor to the right-order difference of the current point. If it is not -1, do nothing.
[0072] (9-1-4) Repeat this process to calculate the left and right differences of each point of the current line element. Repeat this process for the remaining line elements to calculate the left and right differences of all point sets.
[0073] (9-2) The calculation method for the left-order and right-order difference functions of rounded corner feature points is as follows:
[0074] (9-2-1) Calculate the Euclidean distance between each point in a single line element and each point in all other line elements in the current class object, and compare the Euclidean distance values to obtain the two points with the smallest Euclidean distance values. The Euclidean distance values of these two points should be between 70% and 90% of the effective diameter value of the selected tool, that is, the effective diameter value of the tool is the tool diameter value minus twice the tool bottom angle value.
[0075] (9-2-2) Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to another nearest neighbor point, and the dot product with the Z-axis. If the result is positive, the nearest neighbor point is located to the left of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor point is assigned to the left-order difference value of the current point; if the result is negative, the nearest neighbor point is located to the right of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor point is assigned to the right-order difference value of the current point.
[0076] (9-2-3) Repeat this process to calculate the left and right differences of each point of the current line element. Repeat this process for the remaining line elements to calculate the left and right differences of all point sets.
[0077] In step 10, the order difference value of all points is equal to the larger of its left and right order difference values. For spatial points that only have a left or right order difference, the order difference value is equal to the left or right order difference value.
[0078] After step 11 is completed, the data array is written to a document to save the result data.
[0079] Step 12 uses computer graphics tools to query the order difference value attribute of the ordered spatial point set, which can generate the order difference cloud map of each point in the sunken area after mirror milling. According to production needs, based on the left and right order difference attributes of the ordered spatial point set, the left or right order difference cloud map of each point in the sunken area after mirror milling can be selected to be generated.
[0080] The specific selection of threshold parameters used in the invention is shown in the attached table.
[0081]
Claims
1. A method for evaluating surface step difference in the sunken area after mirror milling of skin, characterized in that... Includes the following steps: Step 1: Use a mirror milling machine to enable the milling function or thickness measurement function, and call the milling program to measure the thickness of the skin depression area online. Obtain a document containing the ordered spatial coordinates of the toolpath trajectories within the depression area and the corresponding depression thickness value. The ordered point cloud is represented as Cloud = {P} i (X) i ,Y i Z i A i C i Thick_Value i P(i = 1, 2, ..., N) is the number of points in the ordered point cloud. i For numbering ordered spatial points, X i ,Y i Z i A i C i Thick_Value represents the X, Y, Z directions, machine tool tilt angle A, and machine tool tilt angle C of an ordered spatial point in the skinning coordinate system. i This represents the thickness of the sunken area. Step 2: Predefine an array data containing an ordered point cloud Cloud, and reserved variables for each ordered spatial point: Orientation, Left_Mismatch, and Right_Mismatch, and predefine the order difference storage space Mismatch variable. Step 3: Predefine four feature types: horizontal lines, vertical lines, diagonal lines, and rounded lines. Create two-dimensional arrays for each type according to the feature number and point position number. Each two-dimensional array cell stores the address of an ordered spatial point in the data array that matches the feature number and corresponding point position number. Also, define separate functions for storing and retrieving the data array address, as well as corresponding functions for storing and retrieving the step difference value for each type. For the diagonal line type, define a separate one-dimensional array Edata to represent the slope. Step 4: Open the ordered point cloud document and create a temporary point P. t (X) t ,Y t Z t A t C t Thick_Value t ), read {P one by one i (X) i ,Y i Z i A i C i Thick_Value i Given a set of integers i = 1, 2, ..., N, assign a temporary point P to it. t (X) t ,Y t Z t A t C t Thick_Value t Then determine the thickness value (Thick_Value) at the current point. t Can it be placed under the threshold condition (δ-ε)? t , δ+ε t If the condition is not met within the specified interval, ignore that point and proceed to the next point for assignment and evaluation. If the condition is met, set the current P value accordingly. t (X) t ,Y t Z t A t C t Thick_Value t ) Stored in the data array, where δ is the theoretical thickness of the skin depression zone, ε t The thickness increment value used to determine whether the thickness value meets the conditions; Step 5: Given M points in the data array and M < N, calculate the storage points {P} in the data array sequentially. i (X) i ,Y i Z i A i C i Thick_Value i The tangential angle values of {i = 2, 3, ..., M-1} are P. i The vector pointing from the previous point to this point and P i Calculate the inverse cosine of the angle between the vectors pointing to the next point, and store the result in the corresponding point's tangential angle value (Orientation) in the data array. Finally, assign the tangential angle value (Orientation) of P2 to P1, and set P... M-1 The point tangential angle value Orientition is assigned to P. M ; Step 6: Starting from point 1 to point M in the data array, determine whether the tangential angle value (Orientation) of each point is less than or equal to the threshold ε. θ , ε θ ε represents the increment of the tangential angle value Orientation. θ The value ranges from 0.2° to 11.4°, as detailed in the attached table, when Orientation ≤ ε θ Then continue comparing the next point, when Orientation > ε θ When the comparison stops, an orientation greater than ε will appear. θ The Mth time t The point is used as the starting point for feature discrimination of elements in the data array, the Mth point. t Points 1 to M before the point t Point -1 is a point where the trajectory repeats; Step 7: From the Mth element of the data array t From point M to point M-1, determine the tangential angle value of each point one by one, using the tangential angle value and the difference between the X and Y coordinate values of different points as the judgment conditions, where the orientation change value ε of the tangential angle value is considered. θ The increment value for determining the first included angle is ε. θ The value ranges from 0.2° to 11.4°, ε θ2 The increment value for determining the second included angle is ε. θ2 The value is between 25° and 50°, ε is the coordinate increment value in the X and Y directions, and the value of ε is between 0.03 and 0.
2. All ordered spatial points are identified and marked as four types of element feature points with the type names of horizontal line, vertical line, diagonal line and rounded corner line. After the operation, the two-dimensional arrays corresponding to the horizontal line, vertical line, diagonal line and rounded corner line categories store multiple discontinuous horizontal line segments, vertical line segments, diagonal segments and rounded corner line segments composed of feature points. The spatial coordinate values and numbers of the feature points that make up a single line segment are continuous. Each line segment in the four categories is a line element of that category. Step 8: Calculate the slope K of each oblique line in the oblique line class. i =|Y i1 -Y i2 | / |X i1 -X i2 |, i = 1, 2, 3, ..., L, and store them in a one-dimensional array Edata, where L is the number of line elements of the diagonal line, Y i1 Y i2 X i1 X i2 Let M be the Y-coordinates and X-coordinates of the 1st and 2nd feature points of the i-th line element, respectively. Count the number M values in the array Edata that have different K values. k M k When M is 1, there is no need to classify it again. k When the value is not 1, the line elements of the diagonal line class are further refined according to the K value. After the classification operation is completed, the newly generated M is... k Each of the two-dimensional arrays of different eigenvalues contains line elements of the same slope category. Step 9: Using the order difference calculation functions defined for the four types of features, calculate the left and right order differences of feature points of different types. Form a vector by pointing from the current point to the next point, or from the previous point to the current point. Take the cross product of this vector with the nearest neighbor point with the smallest Euclidean distance from the current point and the dot product with the Z-axis. If the result is positive, the nearest neighbor point is to the left of the current line element; that is, the absolute value of the thickness difference between the current point and the nearest neighbor point is taken as the left order difference of the current point. If the result is negative, the nearest neighbor point is to the right of the current line element; that is, the absolute value of the thickness difference between the current point and the nearest neighbor point is taken as the right order difference of the current point. The initial values for both left and right order differences are -1. Different methods of defining the order difference calculation functions for different types of features result in different left and right order differences for feature points. Step 10: The order difference value of all points is equal to the larger value of the left order difference and the right order difference. Only spatial points with left or right order difference values are left, and their order difference values are equal to the left or right order difference values. After step 11 is completed, write the data array to a document to save the result data; Step 12: By querying the order difference value attribute of the ordered spatial point set using computer graphics tools, an order difference cloud map of each point in the sunken area after mirror milling can be generated. Depending on production needs, based on the left and right order difference attributes of the ordered spatial point set, either the left or right order difference cloud map of each point in the sunken area after mirror milling can be generated.
2. The method for evaluating surface step difference in the sunken area after mirror milling of skin according to claim 1, characterized in that... In step 7, the specific marking steps for the four types of element feature points—horizontal lines, vertical lines, diagonal lines, and rounded corners—are as follows: 2-1 When the tangential angle value Orientation is less than the threshold ε θ , and |Y 当前点 -Y 上一点 If | is less than or equal to ε, assign a horizontal line-type element feature number and a point position number to the current point, increment the point position number by 1, and determine whether the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ, If greater than ε θ The feature number is incremented by 1, and then the position number is set to zero. If it is not greater than ε θ No action is required. 2-2 When the tangential angle value Orientation is less than the threshold ε θ , and |X 当前点 -X 上一点 If | is less than or equal to ε, assign a vertical line element feature number and a point position number to the current point, increment the point position number by 1, and determine if the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ, If greater than ε θ The feature number is incremented by 1, and then the position number is set to zero. If it is not greater than ε θ No action is required. 2-3 When the tangential angle value Orientation is less than the threshold ε θ , and |Y 当前点 -Y 上一点 |greater than ε and |X 当前点 -X 上一点 When | is greater than ε, assign a diagonal line element feature number and a point position number to the current point, increment the point position number by 1, and determine whether the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ If it is greater than ε θ Next, determine if the point index is greater than or equal to 1. If it is, meaning the number of points under the corresponding feature number is at least 2, increment the feature number by 1, and then set the point index to zero. If it is less than 1, set the point index to zero. If the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is not greater than ε... θ No action is required; 2-4 When the tangential angle value Orientation is greater than the threshold ε θ And the tangential angle value Orientation is less than or equal to the threshold ε θ2 At that time, assign the feature point number and position number within the rounded corner element to the current point, and determine whether the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is greater than ε. θ If it is greater than ε θ Next, determine if the point index is greater than or equal to 2. If it is, meaning the number of points under the corresponding feature number is at least 3, increment the feature number by 1, and then set the point index to zero. If it is less than 2, set the point index to zero. If the absolute value of the difference between the current point's tangential angle (Orientation) and the next point's tangential angle (Orientation) is not greater than ε... θ No action is required; 2-5 When the tangential angle value Orientation is greater than the threshold ε θ2 When the current point is an endpoint or a vertex, these points are not assigned feature numbers.
3. The method for evaluating surface step difference in the sunken area after mirror milling of skin according to claim 1, characterized in that... The process of further refining the classification of line elements of the diagonal line class based on the K value in step 8 is as follows: Create M according to different K values k There are three two-dimensional arrays representing different line types. Each array cell stores the feature number of the feature point of each line element in the data array and the address of the ordered spatial point corresponding to its position. For each line type with a specific K value, functions for storing and retrieving the data array address are defined independently, along with corresponding functions for storing and retrieving the order difference value. Using all line elements in the line types generated in step 7 as the operation objects, starting from the first line element, the slope value of the current line element is sequentially determined relative to M. k If the K values in each diagonal line category are equal, and if they are equal, the address of the feature point within the current line element is assigned to the corresponding two-dimensional array of diagonal line categories. After completing the classification operation, the newly generated M... k Each of the two-dimensional arrays of different eigenvalue categories of diagonal lines stores line elements of the same diagonal line category.
4. The method for evaluating surface step difference in the sunken area after mirror milling of skin according to claim 1, characterized in that... The different methods for defining the order difference calculation function for different types of features in step 9 result in different left and right order difference values for different feature points. Specifically, the methods include the calculation methods for the left and right order difference calculation functions for horizontal line type, vertical line type, and diagonal line type feature points, and the calculation methods for the left and right order difference calculation functions for rounded corner type feature points.
5. The method for evaluating surface step difference in the sunken area after mirror milling of skin according to claim 4, characterized in that... The specific process of calculating the left-order and right-order differences of feature points of horizontal lines, vertical lines, and diagonal lines is as follows: 5-1 Calculate the Euclidean distance between each point in a single line element and each point in all other line elements within the current class object, and compare the Euclidean distance values to obtain the two points with the smallest Euclidean distance values. The Euclidean distance values of these two points should be between 70% and 90% of the effective diameter value of the selected tool, that is, the effective diameter value of the tool is the tool diameter value minus twice the tool bottom angle value. 5-2 Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to its nearest neighbor with the smallest Euclidean distance, and the dot product with the Z-axis. If the result is positive, the nearest neighbor is located to the left of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor is assigned to the left-hand difference of the current point; if the result is negative, the nearest neighbor is located to the right of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor is assigned to the right-hand difference of the current point. 5-3 Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to its second nearest neighbor at its Euclidean distance, and the dot product with the Z-axis. If the result is positive, the nearest neighbor is located to the left of the current line element. Further determine whether the left-order difference of the current point is -1. If it is -1, assign the absolute value of the thickness difference between the current point and the nearest neighbor to the left-order difference of the current point. If it is not -1, do nothing. If the result is negative, the nearest neighbor is located to the right of the current line element. Further determine whether the right-order difference of the current point is -1. If it is -1, assign the absolute value of the thickness difference between the current point and the nearest neighbor to the right-order difference of the current point. If it is not -1, do nothing. 5-4 Repeat this process to calculate the left and right differences of each point of the current line element. Repeat this process for the remaining line elements to calculate the left and right differences of all point sets.
6. The method for evaluating surface step difference in the sunken area after mirror milling of skin according to claim 4, characterized in that... The calculation method for the left-order and right-order difference functions of the rounded corner feature points is as follows: 6-1 Calculate the Euclidean distance between each point in a single line element and each point in all other line elements within the current class object, and compare the Euclidean distance values to obtain the two points with the smallest Euclidean distance values. The Euclidean distance values of these two points should be between 70% and 90% of the effective diameter value of the selected tool, that is, the effective diameter value of the tool is the tool diameter value minus twice the tool bottom angle value. 6-2 Determine the sign of the cross product of the vector formed by the current point pointing to the next point or the vector formed by the previous point pointing to the current point and the vector formed by the current point pointing to another nearest neighbor point, and the dot product with the Z-axis. If the result is positive, the nearest neighbor point is located to the left of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor point is assigned to the left-order difference value of the current point; if the result is negative, the nearest neighbor point is located to the right of the current line element, and the absolute value of the thickness difference between the current point and the nearest neighbor point is assigned to the right-order difference value of the current point. 6-3 Repeat this process to calculate the left and right differences of each point of the current line element. Repeat this process for the remaining line elements to calculate the left and right differences of all point sets.
Citation Information
Patent Citations
Real-time noncontact measurement and compensation device for mirror image milling processing error of skin shape, and skin thickness precise control method
CN108073131A
Three-dimensional scanning line point cloud gap order difference extraction method for aircraft skin butt joint
CN111814888A