Improved machining allowance acquisition method, system, device, storage medium and application
Through statistical analysis and multi-point sampling methods, the problem of machining allowance calculation failure caused by long, narrow and large-area triangular patches in complex curved surface parts has been solved, and accurate allowance calculation for parts such as aero-engine casings has been achieved, ensuring that the calculation accuracy and efficiency of results.
Patent Information
- Application Number
- CN202210905993.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-07-29
AI Technical Summary
When calculating the machining allowance of complex curved surface parts, the existing technology cannot accurately locate and filter out long, narrow and large-area triangular patches, resulting in inaccurate calculation results and low efficiency. In addition, when these patches exist, the nearest measuring point The adjacent triangle patch set is constructed incorrectly, causing the machining allowance calculation to fail.
Using a method based on statistical analysis and multi-point sampling, by calculating the marked edges and areas of triangular patches, narrow, long and large-area triangular patches are screened out, and multiple points are randomly and evenly sampled within them to construct different search spaces to find The nearest neighbor points of the measuring point are compared with the distances in different search spaces, the nearest neighbor triangular patch set of the measuring point is determined, and the minimum distance value is calculated as the processing margin.
It achieves accurate machining allowance calculation for complex curved surface parts, avoids unnecessary calculation losses, and ensures the correct construction of the nearest neighbor triangular patch set of the measuring point. The results show that the allowance distribution is uniform and smooth, with no step jumps, and is consistent with Actual part condition.
Smart Images

Figure CN115294045B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of parts inspection data recognition, and in particular relates to an improved machining allowance acquisition method, system, equipment, storage medium and application. Background Art
[0002] At present, in the field of aerospace, complex curved parts such as aircraft engine casings are all cast, so these parts have uneven distribution of machining allowances and large individual differences. Before machining, they need to be accurately detected and analyzed to obtain the machining allowances of each part to guide subsequent machining operations.
[0003] The current calculation methods for machining allowances can be mainly divided into three representation methods: point-to-point distance, point-to-triangle distance, and point-to-NURBES surface distance. The machining allowance calculation method based on point-to-point distance requires discretizing the theoretical CAD model into a point cloud, and then searching for corresponding points in the measured point cloud and the CAD point cloud. The normal distance between the corresponding points is used as the allowance value of the measured point of the part. The distance value calculated by this method is often not the shortest distance from the measured point to the CAD model, and the calculation result is quite different from the actual allowance value. The machining allowance calculation method based on the distance from the point to the NURBES surface requires the parametric equation of the reference surface to be known in advance and iteratively solved in combination with the parametric equation to find the shortest distance value from the measured point to the surface. This method has low calculation efficiency.
[0004] Based on the calculation method of the distance from the point to the triangle, the reference CAD model is discretized into multiple triangles, and the distance value from the measured point to its nearest triangle is used to represent the machining allowance. This method has high accuracy and high efficiency in solving the result. However, in the process of discretizing the CAD model into triangles, some narrow and large-area triangles often appear. This phenomenon has no effect on the discretization accuracy, but it will seriously affect the results of the nearest triangle search of each measuring point in the subsequent allowance calculation process, thereby causing the allowance calculation to fail.
[0005] This phenomenon is particularly obvious for complex curved parts such as aircraft engine casings. Therefore, the problem of margin calculation failure due to the existence of narrow and large-area triangular facets needs to be solved urgently.
[0006] Through the above analysis, the problems and defects of the prior art are as follows:
[0007] (1) The existing technology cannot accurately locate and filter out narrow, large-area triangular facets in the reference CAD model, cannot avoid the unnecessary computational loss caused by processing all triangular facets, and has low accuracy.
[0008] (2) The prior art determines the nearest neighbor triangle face set of a measuring point only by searching the shortest distance from the measuring point to all triangle face vertices, which results in incorrect construction of the nearest neighbor triangle face set.
[0009] (3) The existing technology has poor effect in accurately calculating the machining allowance of complex curved surface parts without referring to the narrow, large-area triangular facets in the CAD triangular mesh model. Summary of the invention
[0010] In view of the problems existing in the prior art, the present invention provides an improved method, system, device, storage medium and application for obtaining machining allowance, and in particular, relates to a solution to the problem that in the process of calculating the machining allowance of complex parts by the distance from a point to a triangle, the calculation of the allowance is invalid due to the existence of narrow and long triangles with large areas.
[0011] The present invention is implemented in this way: an improved machining allowance acquisition method based on statistical analysis and multi-point sampling comprises:
[0012] Count the marked edges and areas of each triangular facet, locate and screen out the narrow and long triangular facets and large triangular facets in the reference CAD model; calculate the centroid points of the screened narrow and long triangular facets and large triangular facets and randomly and uniformly discretize multiple sampling points inside;
[0013] Different search spaces are constructed with reference CAD model vertices, centroids and random uniform sampling points respectively. The measuring point searches for the nearest neighbor point in the above different search spaces respectively, and the distances from the measuring point to the nearest neighbor points in the two different search spaces are compared to determine the nearest neighbor triangle facet set of the measuring point.
[0014] The distance from the measuring point to each facet in the set of nearest neighboring triangular facets of the measuring point is calculated, and the minimum distance value is obtained as the machining allowance of the measuring point.
[0015] Furthermore, the improved machining allowance acquisition method based on statistical analysis and multi-point sampling specifically includes the following steps:
[0016] S1, calculate the side length and area of each triangle in the reference CAD triangular mesh model, take the longest side of each triangle as the marked side of the triangle, count the mean and standard deviation of the marked sides and areas of all triangles, and use the mean and standard deviation to define a confidence interval to screen and judge the narrow and large-area triangles in the reference CAD triangular mesh model;
[0017] S2 calculates the centroid of each narrow triangle and randomly samples k-1 points uniformly in the triangle. For each large triangle, calculates the centroid of each large triangle and randomly samples 2k-1 points uniformly in the triangle.
[0018] S3 takes the vertices of all triangular facets to construct the search space {C1}, and takes the calculated centroid points and random uniform sampling points to construct the search space {C2}; for each registered measurement point, search for the closest point in the {C1} space, and the shortest distance is Search for the nearest vertex in {C2} space, the shortest distance is
[0019] S4 constructs the nearest neighbor triangle patch set of the measurement point {V nearest}.like Then only the triangles that share the same points with the nearest point in {C1} are added to the nearest neighbor triangle set {V nearest}; if In addition to adding the triangles that share the points with the nearest point in {C1} to the nearest neighbor triangle set {V nearest}, the triangle to which the nearest point searched in {C2} belongs is added to the nearest triangle set {V nearest}middle;
[0020] S5 calculates the nearest neighbor triangle patch set from the measured point {V nearest}, and take the minimum distance value as the actual machining allowance of the measuring point.
[0021] Furthermore, the statistical screening of narrow and large-area triangular facets in step S1 includes:
[0022] For each triangle face v in the reference CAD triangular mesh model i (i=1…n), calculate the lengths of its three edges and use the longest edge as the marked edge l of the triangle. iden-i Calculate its area and use it as the marked area S iden-i :
[0023]
[0024] In the formula {l 1-i l 2-i l 3-i} are triangle patches v i The side length value, p = 1 / 2 (l 1-i +l 2-i +l 3-i ) is the triangle patch v i half circumference;
[0025] After counting the marked edges and marked areas of each triangle, calculate the mean μ of the marked edges of the entire model l With standard deviation σ l and the mean μ of the marked area s With standard deviation σ s :
[0026]
[0027] According to the mean μ of the labeled edge l With standard deviation σ l and the mean μ of the marked area s With standard deviation σ s Set the confidence interval k separately l , k s :
[0028]
[0029] In the formula, λ is the standard deviation multiple, and the specific value is set according to the actual screening effect;
[0030] If the marked edge of a triangle is not within the confidence interval k l If the marked area of a triangle is not within the confidence interval k, it is marked as a narrow triangle. s In the figure, it is marked as a large area triangle.
[0031] Furthermore, in step S2, the generation of sampling points for narrow and large-area triangular facets includes:
[0032] For narrow triangles, k points are sampled inside, including 1 centroid point and k-1 randomly evenly distributed points; for large triangles, 2k points are sampled inside, including 1 centroid point and 2k-1 randomly evenly distributed points; the centroid point p g-i Generated by the following formula:
[0033]
[0034] In the formula {p 1-i p 2-i p 3-i} are the coordinates of the three vertices of the i-th narrow or large-area triangle.
[0035] The jth random uniform sampling point p r-j Generated by the following formula:
[0036]
[0037] Where r1 and r2 are random values that satisfy the (0-1) normal distribution.
[0038] Further, in step S3, a search space is constructed, and a set of nearest neighbor triangles is constructed for each measurement point, including:
[0039] The nearest neighbor search space of the measurement point is composed of the search space {C1} composed of the coordinates of the triangle patch vertices and the search space {C2} composed of the coordinates of the centroid and random uniform sampling points. The coordinate points of the two search spaces are stored in the kdTree structure. For a single measurement point q i , search for the nearest neighbor point p in {C1} and {C2} respectively c1 、p c2 Then, according to the distance between the measuring point and the two nearest neighbor points, the measured nearest neighbor triangle patch set {V nearest}:
[0040]
[0041] In the formula For reference CAD model with p c1 m triangles with common vertices, The triangle to which the centroid point or random sampling point belongs; is the distance from the measured point to the nearest neighbor point in {C1} space, is the distance from the measured point to the nearest neighbor in {C2} space; when the measured point is closer to the nearest neighbor in {C1} space, the triangles in {C1} space that share vertices with the nearest neighbor can be used for {V nearest} is correctly established; when the measured point is closer to the nearest neighbor point in {C2} space, the triangle to which the nearest neighbor point in {C2} space belongs needs to be added to {V nearest}, establish the correct set of nearest neighbor triangles.
[0042] Further, in step S105, the measuring point is nearest The distance value of each triangle in the set is calculated, and the machining allowance value of the measuring point is obtained, including:
[0043] Measuring point q i Calculate successively to {V nearest The distance of each triangle in the set is calculated when measuring point q i To a single triangle patch v in the collection pc-i In the distance, the measuring point q i (x i y i z i ) to the triangle patch v pc-i Project the plane where it is located to get the projection point q pro-i (x pro-i y pro-i z pro-i ):
[0044]
[0045] Where n i =(nx-i n y-i n z-i ), representing the triangle patch v pc-i Normal vector; after obtaining the coordinates of the projection point, construct three vectors based on the triangle vertices and the projection point To determine whether the projection point is within the triangle:
[0046]
[0047] Where (p 1-i p 2-i p 3-i ) is the triangle patch v pc-i The three vertex coordinates of the triangle; when the three vectors satisfy the same direction of the cross product results, the projection point is located on the triangle patch v pc-i The distance from the measuring point to the triangle patch Directly expressed as the distance between the measured point and the projected point:
[0048]
[0049] If the projection point is not located in the triangle, the distances from the measuring point to the three edges of the triangle are calculated respectively. When calculating the distance from the measuring point to any edge, if the projection point of the measuring point to the edge is not located on the edge, the smaller value of the distances from the measuring point to the two vertices on the edge is expressed as the distance value from the measuring point to the edge.
[0050] Then take the minimum distance value of the three sides as the measuring point to the triangle patch v pc-i Distance:
[0051]
[0052] In the formula They are respectively the measuring point to the triangular surface v pc-i The distance values of the three edges.
[0053] After calculating the measuring points q i To its nearest neighbor triangle face set {V nearest}, and finally take the minimum distance as the machining allowance value of the measuring point
[0054]
[0055] In the formula The measuring points q i To its nearest neighbor triangle face set {V nearest}The distance value of each triangle in it.
[0056] Another object of the present invention is to provide an improved machining allowance acquisition system based on statistical analysis and multi-point sampling, comprising:
[0057] The narrow and large-area triangle face screening module is used to calculate the side length and area of each triangle face in the reference CAD triangle mesh model, take the longest side of each triangle face as the marked side of the triangle face, count the mean and standard deviation of the marked sides and areas of all triangle face faces, and use the mean and standard deviation to define the confidence interval to screen and judge the narrow and large-area triangle face faces in the reference CAD triangle mesh model;
[0058] The random discrete sampling module for narrow and large-area triangles is used to calculate the centroid point for each narrow triangle and randomly and uniformly sample k-1 points in the triangle; for each large-area triangle, calculate its centroid point and randomly and uniformly sample 2k-1 points in the triangle;
[0059] The search space construction module is used to construct the search space {C1} by taking the vertices of all triangular facets, and to construct the search space {C2} by taking the calculated centroid points and random uniform sampling points; for each registered measurement point, search for the closest point in the {C1} space, and the shortest distance is Search for the nearest vertex in {C2} space, the shortest distance is
[0060] The nearest neighbor triangle patch set construction module is used to construct the nearest neighbor triangle patch set {V nearest};
[0061] The triangle distance calculation module is used to calculate the distance from the measured point to its nearest neighbor triangle face set {V nearest}, and take the minimum distance value as the actual machining allowance of the measuring point.
[0062] Another object of the present invention is to provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the improved machining allowance acquisition method based on statistical analysis and multi-point sampling.
[0063] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the improved machining allowance acquisition method based on statistical analysis and multi-point sampling.
[0064] Another object of the present invention is to provide an improved machining allowance acquisition method based on statistical analysis and multi-point sampling for application in the machining of casting molding machine tool parts for complex curved surface parts such as aircraft engine casings in the aerospace field.
[0065] In combination with the above technical solutions and the technical problems solved, please analyze the advantages and positive effects of the technical solutions to be protected by the present invention from the following aspects:
[0066] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:
[0067] When calculating the machining allowance in the form of point-to-triangle distance, in order to effectively solve the problem of failure in machining allowance calculation of complex curved parts due to the existence of narrow and long, large-area triangles, the present invention proposes an improved machining allowance acquisition method based on statistical analysis and multi-point sampling, which mainly includes statistical analysis of the reference CAD triangular mesh model to achieve accurate screening of narrow and long, large-area triangles, random discrete sampling of narrow and long, large-area triangles, correct construction of the nearest neighbor triangle set of the measuring point, and accurate calculation of the point-to-triangle distance.
[0068] By using the solution proposed in the present invention, accurate calculation of the allowance of complex curved surface parts such as aircraft engine casings is achieved. Comparing the existing calculation scheme with the proposed scheme, the machining allowance of complex curved surface parts calculated by the existing scheme will have large-area large allowance abnormal points, and there is an obvious step jump phenomenon. However, the allowance calculated by the proposed scheme has no large allowance abnormal points, and the allowance distribution is uniform and smooth, without step jump phenomenon, which is in line with the actual part situation.
[0069] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:
[0070] The present invention adopts a statistical analysis method to accurately locate and filter out narrow and long, large-area triangular facets in the reference CAD model. Subsequently, narrow and long, large-area triangular facets are processed specifically, avoiding unnecessary calculation loss caused by processing all triangular facets.
[0071] The present invention aims at a narrow and long triangle face, calculates its centroid point and randomly and uniformly discretely samples k-1 points inside the face to form k sampling points, thereby ensuring the accuracy of the narrow and long triangle search.
[0072] The present invention aims at a large-area triangular face, calculates its centroid point and randomly and uniformly discretely samples 2k-1 points inside it to form 2k sampling points, thereby ensuring the accuracy of large-area triangle search.
[0073] The present invention constructs a search space {C1} with reference to the vertices of the CAD model, constructs a search space {C2} with the centroid point and the random uniform sampling point, searches for the nearest neighbor point in the two spaces respectively, and compares the distances from the measuring point to the two nearest neighbor points to determine the nearest neighbor triangle facet set {V nearest This effectively solves the problem of incorrect construction of the nearest neighbor triangle facet set due to the existence of narrow and large triangle facets.
[0074] The present invention calculates the distance from the measuring point to its nearest neighbor triangle face set {V nearest The minimum distance value is taken as the machining allowance of the point, which realizes the accurate calculation of the machining allowance of complex surface parts when there are narrow and large-area triangular faces in the reference CAD triangular mesh model.
[0075] Third, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0076] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are as follows: After transformation, the technical solution of the present invention can realize the accurate calculation of the machining allowances of various parts of various complex curved surface parts in the aerospace field. The accurate allowance analysis value is used to guide the subsequent machining of parts, which can greatly reduce the possibility of scrapping parts, improve the processing yield rate of the enterprise, and achieve quality improvement and efficiency increase of the enterprise.
[0077] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad: the detection of machining allowance is an important step before parts processing. The accuracy of the detection result seriously affects the quality of subsequent processing. The existing allowance calculation scheme does not consider the correctness of the construction of the nearest neighbor triangle facet set of the measuring point when there are narrow and long triangles with large area. Therefore, the calculated allowance value is greatly different from the actual value, which will cause processing failure. The scheme proposed by the present invention fills the gap in allowance calculation. It does not consider the influence of narrow and long triangles with large area. It performs special processing on narrow and long triangles with large area, realizes the correct construction of the nearest neighbor triangle facet set of the measuring point, and thus ensures the accuracy of allowance calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 It is a flowchart of improved machining allowance acquisition based on statistical analysis and multi-point sampling provided by an embodiment of the present invention;
[0079] Figure 2 It is a schematic diagram of an improved machining allowance acquisition principle based on statistical analysis and multi-point sampling provided by an embodiment of the present invention;
[0080] like Figure 3 As shown, a schematic diagram of an improved machining allowance acquisition system based on statistical analysis and multi-point sampling provided by an embodiment of the present invention;
[0081] Figure 4 It is a comparison chart of the chromatograms before and after the improvement of the machining allowance calculation of complex curved surface parts provided by the embodiment of the present invention; Figure 4 (a) is the original method, and (b) is the method of the present invention;
[0082] Figure 5 It is a comparison diagram of the machining allowance calculation of complex curved surface parts before and after the improvement provided by the embodiment of the present invention; Figure 5 (a) is the original method, and (b) is the method of the present invention;
[0083] In the figure: 1. Narrow and large-area triangle patch screening module; 2. Narrow and large-area triangle patch random discrete sampling module; 3. Search space construction module; 4. Measurement point nearest neighbor triangle patch set construction module; 5. Triangle face distance calculation module. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0085] 1. Explanatory Examples In order to enable those skilled in the art to fully understand how to implement the present invention, this section provides an illustrative example that expands and describes the technical solution of the claims.
[0086] like Figure 1 As shown, the improved machining allowance acquisition method based on statistical analysis and multi-point sampling provided by the embodiment of the present invention includes:
[0087] S101, calculate the side length and area of each triangle in the reference CAD triangular mesh model, take the longest side of each triangle as the marked side of the triangle, count the mean and standard deviation of the marked sides and areas of all triangles, and use the mean and standard deviation to define a confidence interval to screen and judge the narrow and large-area triangles in the reference CAD triangular mesh model.
[0088] S102 calculates the centroid of each narrow triangle and randomly and evenly samples k-1 points in the triangle; calculates the centroid of each large triangle and randomly and evenly samples 2k-1 points in the triangle.
[0089] S103 takes the vertices of all triangular facets to construct the search space {C1}, and takes the calculated centroid points and random uniform sampling points to construct the search space {C2}. For each registered measurement point, search for the closest point in the {C1} space, and the shortest distance is Search for the nearest vertex in {C2} space, the shortest distance is
[0090] S104 constructs the nearest neighbor triangle patch set of the measuring point {V nearest}.like Then, we only need to add the triangles that share the same points with the nearest point in {C1} to the nearest neighbor triangle set {V nearest}. In addition to adding the triangles that share the points with the nearest point in {C1} to the nearest neighbor triangle set {V nearest}, it is also necessary to add the triangle to which the nearest point searched in {C2} belongs to the nearest triangle set {V nearest}middle.
[0091] S105 Calculate the distance from the measured point to its nearest neighbor triangle face set {V nearest}, and take the minimum distance value as the actual machining allowance of the point.
[0092] Figure 2 The improved machining allowance acquisition principle based on statistical analysis and multi-point sampling is provided in an embodiment of the present invention.
[0093] As a further preferred embodiment, in step S101, the following method is specifically used to complete the statistical screening of narrow and large-area triangular facets:
[0094] For each triangle face v in the reference CAD triangular mesh model i (i=1…n), calculate the lengths of its three edges and use the longest edge as the marked edge l of the triangle. iden-i Calculate its area and use it as the marked area S iden-i :
[0095]
[0096] In the formula {l 1-i l 2-i l 3-i} are triangle patches v i The side length value, p = 1 / 2 (l 1-i +l 2-i +l 3-i ) is the triangle patch v i Half circumference.
[0097] After counting the marked edges and marked areas of each triangle, calculate the mean μ of the marked edges of the entire model l With standard deviation σ l and the mean μ of the marked area s With standard deviation σ s :
[0098]
[0099] According to the mean μ of the labeled edge l With standard deviation σ l and the mean μ of the marked area s With standard deviation σ s Set the confidence interval k separately l , k s :
[0100]
[0101] In the formula, λ is the standard deviation multiple, and the specific value can be set according to the actual screening effect.
[0102] If the marked edge of a triangle is not within the confidence interval k l If the marked area of a triangle is not within the confidence interval k, it is marked as a narrow triangle. s In the figure, it is marked as a large area triangle.
[0103] As a further preferred embodiment, in step S102, the following method is specifically used to complete the generation of sampling points for narrow and long triangle patches with large areas:
[0104] For narrow triangles, k points are sampled inside, including 1 centroid point and k-1 randomly evenly distributed points. For large triangles, 2k points are sampled inside, including 1 centroid point and 2k-1 randomly evenly distributed points. The centroid point p g-i Generated by the following formula:
[0105]
[0106] In the formula {p 1-i p 2-i p 3-i} are the coordinates of the three vertices of the i-th narrow or large-area triangle.
[0107] The jth random uniform sampling point p r-j Generated by the following formula:
[0108]
[0109] Where r1 and r2 are random values that satisfy the (0-1) normal distribution.
[0110] As a further preferred embodiment, in step S103, the following method is specifically used to construct the search space, and to construct a nearest neighbor triangle patch set for each measurement point:
[0111] The nearest neighbor search space of the measurement point is mainly composed of the search space {C1} composed of the coordinates of the triangle patch vertices and the search space {C2} composed of the coordinates of the centroid and random uniform sampling points. Storing the coordinate points of the two search spaces in a kdTree structure can greatly speed up the search for corresponding points. i , we need to search for the nearest neighbor point p in {C1} and {C2} respectively c1 、p c2 Then, according to the distance between the measuring point and the two nearest neighbor points, the measured nearest neighbor triangle patch set {V nearest}:
[0112]
[0113] In the formula For reference CAD model with p c1 m triangles with common vertices, The triangle patch to which the centroid point or random sampling point belongs. is the distance from the measured point to the nearest neighbor point in {C1} space, is the distance from the measured point to the nearest neighbor in {C2} space. That is to say, when the measured point is closer to the nearest neighbor in {C1} space, only the triangles in {C1} space that share vertices with the nearest neighbor can be considered to ensure {V nearest} is established correctly. When the measured point is closer to the nearest neighbor point in {C2} space, it is also necessary to add the triangle to which the nearest neighbor point in {C2} space belongs to into {V nearest}, the correct set of nearest neighbor triangles can be established.
[0114] As a further preferred method, in step S105, the following method is specifically used to complete the measurement point to {V nearest}Calculate the distance value of each triangle in the set and get the machining allowance value of the measuring point:
[0115] Measuring point q i It is necessary to calculate {V nearest The distance of each triangle in the set is calculated when measuring point q i To a single triangle patch v in the collection pc-i In the distance process, firstly measure the point q i (x i y i z i ) to the triangle patch v pc-i Project the plane where it is located to get the projection point q pro-i (x pro-i y pro-i z pro-i ):
[0116]
[0117] Where n i =(n x-i n y-i n z-i ), representing the triangle patch v pc-i After obtaining the coordinates of the projection point, construct three vectors based on the triangle vertices and the projection point. To determine whether the projection point is within the triangle:
[0118]
[0119] Where (p 1-i p 2-i p 3-i ) is the triangle patch v pc-i When the three vectors satisfy the same direction of the cross product results, it means that the projection point is located on the triangle patch v pc-i The distance from the measuring point to the triangle patch It can be directly expressed as the distance between the measured point and the projection point:
[0120]
[0121]
[0122] If the projection point is not within the triangle, the distance from the measuring point to the three edges of the triangle is calculated separately. When calculating the distance from the measuring point to any edge, if the projection point of the measuring point to the edge is not on the edge, the smaller value of the distance between the measuring point and the two vertices on the edge is expressed as the distance value from the measuring point to the edge. Finally, the minimum distance value of the three edges is taken as the distance from the measuring point to the triangle v pc-i Distance:
[0123]
[0124] In the formula They are respectively the measuring point to the triangular surface v pc-i The distance values of the three edges.
[0125] After calculating the measuring points q i To its nearest neighbor triangle face set {V nearest}, and finally take the minimum distance as the machining allowance value of the measuring point
[0126]
[0127] In the formula The measuring points q i To its nearest neighbor triangle face set {V nearest}The distance value of each triangle in it.
[0128] like Figure 3 As shown, the improved machining allowance acquisition system based on statistical analysis and multi-point sampling provided by the embodiment of the present invention includes:
[0129] The narrow and long, large-area triangle face screening module 1 is used to calculate the side length and area of each triangle face in the reference CAD triangle mesh model, take the longest side of each triangle face as the marked side of the triangle face, count the mean and standard deviation of the marked sides and areas of all triangle faces, and use the mean and standard deviation to define the confidence interval to screen and judge the narrow and long, large-area triangle face in the reference CAD triangle mesh model.
[0130] The random discrete sampling module 2 for narrow and large-area triangles is used to calculate the centroid point of each narrow and long triangle and randomly and uniformly sample k-1 points in the triangle; and to calculate the centroid point of each large-area triangle and randomly and uniformly sample 2k-1 points in the triangle.
[0131] The search space construction module 3 is used to construct the search space {C1} by taking the vertices of all triangular facets, and to construct the search space {C2} by taking the calculated centroid points and random uniform sampling points. For each registered measurement point, search for the closest point in the {C1} space, and the shortest distance is Search for the nearest vertex in {C2} space, the shortest distance is
[0132] The nearest neighbor triangle patch set construction module 4 is used to construct the nearest neighbor triangle patch set {V nearest}.like Then, we only need to add the triangles that share the same points with the nearest point in {C1} to the nearest neighbor triangle set {V nearest}. In addition to adding the triangles that share the points with the nearest point in {C1} to the nearest neighbor triangle set {V nearest}, it is also necessary to add the triangle to which the nearest point searched in {C2} belongs to the nearest triangle set {V nearest}middle.
[0133] The triangle distance calculation module 5 is used to calculate the distance from the measuring point to its nearest neighbor triangle face set {V nearest}, and take the minimum distance value as the actual machining allowance of the point.
[0134] 2. Application Examples: In order to prove the creativity and technical value of the technical solution of the present invention, this section provides application examples of the technical solution of the claims on specific products or related technologies.
[0135] The present invention can be applied to the integrated measurement and processing technology of complex curved surface parts. First, the point cloud data of the complex curved surface parts is obtained through precision measurement. Then, the point cloud and the CAD model are combined and the method proposed by the present invention is used to accurately calculate the margins of each part of the part. Finally, the processing is guided according to the margins calculated for each part to improve the processing quality of the parts.
[0136] 3. Evidence of the effects of the embodiments. The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the prior art. The following content is described in conjunction with the data, charts, etc. of the test process.
[0137] Compared with the existing margin calculation method, the proposed method can effectively solve the problem of margin calculation failure caused by the existence of narrow and long, large-area triangles. The margin value calculated by the proposed method is consistent with the actual situation of the parts. The following Table 1 is a statistical comparison of the margin values calculated by the existing method and the proposed method for a certain model of casing parts. It can be seen that the maximum and minimum margin values calculated by the existing method are abnormally large values, and the maximum and minimum margin values calculated by the method of the present invention are greatly reduced, achieving more accurate calculation.
[0138] Table 1 Statistics of the remaining parts of the casing
[0139]
[0140]
[0141] Furthermore, all the residual values of the measuring points calculated by the two methods are plotted in the form of chromatograms and distribution diagrams. Figure 4 is a comparison chart of the chromatograms before and after the improvement of the calculation of the machining allowance of the casing parts provided by the embodiment of the present invention, wherein Figure 4 (a) is the chromatographic result of the original method. It can be seen that there are a large number of abnormal points with large residuals on the end face of the casing. (b) is the chromatographic result of the method of the present invention. It can be seen that the residual chromatogram of the end face of the casing after improvement is evenly distributed without abnormal points. Figure 5 is a comparison diagram of the machining allowance calculation of complex curved surface parts before and after the improvement provided by the embodiment of the present invention; wherein Figure 5 (a) is the distribution result of the original method. It can be seen that there are a large number of peak jumps, but these peak points are all abnormal points. (b) is the distribution result of the method of the present invention. It can be seen that the overall distribution is uniform after improvement, without obvious peak points, which is in line with the actual situation.
[0142] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0143] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. An improved machining allowance acquisition method based on statistical analysis and multi-point sampling, characterized in that: The improved machining allowance acquisition method based on statistical analysis and multi-point sampling includes: Count the marked edges and areas of each triangular facet, locate and screen out the narrow and long triangular facets and large triangular facets in the reference CAD model; calculate the centroid points of the screened narrow and long triangular facets and large triangular facets and randomly and uniformly discretize multiple sampling points inside; Different search spaces are constructed with reference CAD model vertices, centroids and random uniform sampling points respectively. The measuring point searches for the nearest neighbor point in the above different search spaces respectively, and the distances from the measuring point to the nearest neighbor points in the two different search spaces are compared to determine the nearest neighbor triangle facet set of the measuring point. Calculate the distance from the measuring point to each face in the set of nearest neighboring triangular faces of the measuring point, and obtain the minimum distance value as the machining allowance of the measuring point; The improved machining allowance acquisition method based on statistical analysis and multi-point sampling specifically comprises the following steps: S1, calculate the side length and area of each triangle in the reference CAD triangular mesh model, take the longest side of each triangle as the marked side of the triangle, count the mean and standard deviation of the marked sides and areas of all triangles, and use the mean and standard deviation to define a confidence interval to screen and judge the narrow and large-area triangles in the reference CAD triangular mesh model; S2 calculates the centroid of each narrow triangle and randomly samples k-1 points uniformly in the triangle. For each large triangle, calculates the centroid of each large triangle and randomly samples 2k-1 points uniformly in the triangle. S3 takes the vertices of all triangular facets to construct the search space {C1}, and takes the calculated centroid points and random uniform sampling points to construct the search space {C2}; for each registered measurement point, search for the closest point in the {C1} space, and the shortest distance is Search for the nearest vertex in {C2} space, the shortest distance is S4 constructs the nearest neighbor triangle patch set of the measurement point {V nearest };like Then only the triangles that share the same points with the nearest point in {C1} are added to the nearest neighbor triangle set {V nearest }; if In addition to adding the triangles that share the points with the nearest point in {C1} to the nearest neighbor triangle set {V nearest }, the triangle to which the nearest point searched in {C2} belongs is added to the nearest triangle set {V nearest }middle; S5 calculates the nearest neighbor triangle patch set from the measured point {V nearest The minimum distance value is taken as the actual machining allowance of the measuring point; The statistical screening of narrow and large-area triangular facets in step S1 includes: For each triangle face v in the reference CAD triangular mesh model i , i = 1...n, calculate the lengths of its three edges and use the longest edge length as the marked edge l of the triangle iden-i Calculate its area and use it as the marked area S iden-i : In the formula {l 1-i l 2-i l 3-i } are triangle patches v i The side length value, p = 1 / 2 (l 1-i +l 2-i +l 3-i ) is the triangle patch v i half circumference; After counting the marked edges and marked areas of each triangle, calculate the mean μ of the marked edges of the entire model l With standard deviation σ l and the mean μ of the marked area s With standard deviation σ s : According to the mean μ of the labeled edge l With standard deviation σ l and the mean μ of the marked area s With standard deviation σ s Set the confidence interval k separately l , k s : In the formula, λ is the standard deviation multiple, and the specific value is set according to the actual screening effect; If the marked edge of a triangle is not within the confidence interval k l If the marked area of a triangle is not within the confidence interval k, it is marked as a narrow triangle. s In the middle, it is marked as a large-area triangle; In step S2, the generation of sampling points for narrow and large-area triangular facets includes: For narrow triangles, k points are sampled inside, including 1 centroid point and k-1 randomly evenly distributed points; for large triangles, 2k points are sampled inside, including 1 centroid point and 2k-1 randomly evenly distributed points; the centroid point p g-i Generated by the following formula: Where {p 1-i p 2-i p 3-i } are the coordinates of the three vertices of the i-th narrow or large triangle; The jth random uniform sampling point p r-j Generated by the following formula: Where r1 and r2 are random values satisfying the normal distribution (0-1); In step S3, a search space is constructed, and a set of nearest neighbor triangles is constructed for each measurement point, including: The nearest neighbor search space of the measurement point is composed of the search space {C1} composed of the coordinates of the triangle patch vertices and the search space {C2} composed of the coordinates of the centroid and random uniform sampling points. The coordinate points of the two search spaces are stored in the kdTree structure. For a single measurement point q i , search for the nearest neighbor point p in {C1} and {C2} respectively c1 、p c2 Then, according to the distance between the measuring point and the two nearest neighbor points, the measured nearest neighbor triangle patch set {V nearest }: In the formula For reference CAD model with p c1 m triangles with common vertices, The triangle to which the centroid point or random sampling point belongs; is the distance from the measured point to the nearest neighbor point in {C1} space, is the distance from the measured point to the nearest neighbor in {C2} space; when the measured point is closer to the nearest neighbor in {C1} space, the triangles in {C1} space that share vertices with the nearest neighbor can be used for {V nearest } is correctly established; when the measured point is closer to the nearest neighbor point in {C2} space, the triangle to which the nearest neighbor point in {C2} space belongs needs to be added to {V nearest }, establish the correct set of nearest neighbor triangles; In step S5, the measuring point is nearest The distance value of each triangle face in the set is calculated, and the machining allowance value of the measuring point is obtained, including: Measuring point q i Calculate successively to {V nearest The distance of each triangle in the set is calculated when measuring point q i To a single triangle v in the collection pc-i In the distance, the measuring point q i (x i y i z i ) to the triangle patch v pc-i Project the plane where it is located to get the projection point q pro-i (x pro-i y pro-i z pro-i ): Where n i =(n x-i n y-i n z-i ), representing the triangle patch v pc-i Normal vector; after obtaining the coordinates of the projection point, construct three vectors based on the triangle vertices and the projection point To determine whether the projection point is within the triangle: Where (p 1-i p 2-i p 3-i ) is the triangle patch v pc-i The three vertex coordinates of the triangle; when the three vectors satisfy the same direction of the cross product results, the projection point is located on the triangle patch v pc-i The distance from the measuring point to the triangle Directly expressed as the distance between the measured point and the projected point: If the projection point is not located in the triangle, the distances from the measuring point to the three edges of the triangle are calculated respectively. When calculating the distance from the measuring point to any edge, if the projection point of the measuring point to the edge is not located on the edge, the smaller value of the distances from the measuring point to the two vertices on the edge is expressed as the distance value from the measuring point to the edge. Then take the minimum distance value of the three sides as the measuring point to the triangle patch v pc-i Distance: In the formula They are respectively the measuring point to the triangle surface v pc-i The distance values of the three edges; After calculating the measuring points q i To its nearest neighbor triangle face set {V nearest }, and finally take the minimum distance as the machining allowance value of the measuring point In the formula The measuring points q i To its nearest neighbor triangle face set {V nearest }The distance value of each triangle in it.
2. An improved machining allowance acquisition system based on statistical analysis and multi-point sampling that implements the improved machining allowance acquisition method based on statistical analysis and multi-point sampling as claimed in claim 1, characterized in that: The improved machining allowance acquisition system based on statistical analysis and multi-point sampling includes: The narrow and large-area triangle face screening module is used to calculate the side length and area of each triangle face in the reference CAD triangle mesh model, take the longest side of each triangle face as the marked side of the triangle face, count the mean and standard deviation of the marked sides and areas of all triangle face faces, and use the mean and standard deviation to define the confidence interval to screen and judge the narrow and large-area triangle face faces in the reference CAD triangle mesh model; The random discrete sampling module for narrow and large-area triangles is used to calculate the centroid point for each narrow triangle and randomly and uniformly sample k-1 points in the triangle; for each large-area triangle, calculate its centroid point and randomly and uniformly sample 2k-1 points in the triangle; The search space construction module is used to construct the search space {C1} by taking the vertices of all triangular facets, and to construct the search space {C2} by taking the calculated centroid points and random uniform sampling points; for each registered measurement point, search for the closest point in the {C1} space, with the shortest distance being d qi-pc1 , search for the nearest vertex in {C2} space, the shortest distance is d qi-pc2 ; The nearest neighbor triangle patch set construction module is used to construct the nearest neighbor triangle patch set {V nearest }; The triangle distance calculation module is used to calculate the distance from the measured point to its nearest neighbor triangle face set {V nearest }, and take the minimum distance value as the actual machining allowance of the measuring point.
3. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the improved machining allowance acquisition method based on statistical analysis and multi-point sampling as claimed in claim 1.
4. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the improved machining allowance acquisition method based on statistical analysis and multi-point sampling as claimed in claim 1.
5. An application of the improved machining allowance acquisition method based on statistical analysis and multi-point sampling as described in claim 1 in the casting and molding machine tool parts processing of complex curved surface parts of aircraft engine casings in the aerospace field.
