Sampling area boundary expansion method, device and equipment and readable storage medium
Through the NURBS reconstruction method and boundary expansion technology, the problem of insufficient measurement accuracy in the edge area of thin-walled parts under the diameter of the ruby probe is limited, and the complete sampling and processing deformation of the edge area of the workpiece is achieved.
Patent Information
- Application Number
- CN202311421477.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
During the processing of thin-walled parts, the diameter of the ruby probe limits the measurement accuracy, resulting in the sampling point being unable to fully reflect the complete morphology of the workpiece surface, especially in the edge area of the workpiece surface, where processing deformation data cannot be obtained, resulting in the processing deformation of the edge area being uncontrollable.
The initial sampled data is reconstructed by using the non-uniform rational B-spline curve (NURBS) reconstruction method to obtain the data of the reconstruction surface, and boundary expansion is performed based on the data of each reconstruction curve to obtain the expanded surface data of the target workpiece.
Through the boundary expansion method, complete sampling of the edge area of the workpiece is achieved, the accuracy of subsequent processing is improved, and the processing deformation compensation effect of thin-walled parts is ensured.
Smart Images

Figure CN119919606A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of production and manufacturing technology, and in particular to a sampling area boundary expansion method, device, equipment and readable storage medium. Background Art
[0002] In order to control the machining deformation and clamping deformation of thin-walled parts, the industry currently uses machining deformation compensation technology based on on-machine measurement. On-machine measurement sampling uses a ruby probe for contact measurement. This measurement method has the advantages of high precision, intuitive data, and no influence from the measurement environment. However, because the ruby probe has a certain diameter, a certain amount of space must be left when measuring the edge of the workpiece surface to avoid the probe from colliding with the side cavity of the workpiece and causing serious errors in the sampling data. Therefore, the sampling point cannot fully reflect the complete morphology of the workpiece surface. In the machining deformation compensation, the edge area of the workpiece surface will have the problem of being unable to obtain the machining deformation, which also leads to the edge area can only be processed according to the original machining path. In addition, since the processing of complex thin-walled parts mostly adopts the layered milling method, the sampling area can well compensate for the machining deformation in each layer of milling, while the deformation of the edge area cannot be controlled. After multi-layer milling, there will be a more obvious stratification at the junction of the sampling area and the edge area. Therefore, it is necessary to expand the boundary of the sampling area of the workpiece to obtain a complete sampling area and improve the accuracy of subsequent processing. Summary of the invention
[0003] The embodiment of the present invention provides a method, device, equipment and readable storage medium for expanding the boundary of a tool sampling area, which are used to expand the boundary of a workpiece, obtain a complete sampling area, and improve the accuracy of subsequent processing.
[0004] In order to solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0005] An embodiment of the present invention provides a sampling area boundary expansion method, comprising:
[0006] Acquire initial sampling data of the target workpiece;
[0007] Reconstructing the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves;
[0008] The boundary of the reconstructed curve is expanded according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece.
[0009] Optionally, the initial sampling data includes sampling data of a plurality of preset sampling curves, each sampling curve including a plurality of preset sampling points;
[0010] The initial sampling data is reconstructed using a non-uniform rational B-spline curve NURBS reconstruction method to obtain reconstructed surface data, including:
[0011] Determine the reconstruction parameters corresponding to each sampling point on each sampling curve by using the NURBS reconstruction method;
[0012] According to the reconstruction parameters corresponding to the multiple sampling points on each sampling curve, the data of the corresponding reconstructed curve is obtained;
[0013] The data of the reconstructed surface is obtained according to the data of each of the reconstructed curves.
[0014] Optionally, the reconstructed surface is composed of a sampling curve in a first direction and a sampling curve in a second direction;
[0015] Expanding the boundary of the reconstructed curve according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece, including:
[0016] According to the data of each reconstructed curve in the first direction, a boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data;
[0017] According to the data of each reconstructed curve in the second direction and the first expanded data in the second direction, performing boundary expansion on the corresponding reconstructed curve in the second direction to obtain second expanded data;
[0018] The extended surface data of the target workpiece is obtained according to the first extended data and the second extended data.
[0019] Optionally, each reconstructed curve is composed of a plurality of reconstructed sampling points;
[0020] According to the data of each reconstructed curve in the first direction, a boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data, including:
[0021] According to the data of each reconstructed sampling point on the first target reconstruction curve, the tangent vector of the first target reconstruction curve at the first reconstruction sampling point, the radius of the target probe and the first straight-line distance, the data of the first extended point corresponding to the first reconstruction sampling point is obtained; wherein the first straight-line distance is the shortest straight-line distance between the first reconstruction sampling point and the edge of the target workpiece; the first reconstruction sampling point is the first reconstruction sampling point or the last reconstruction sampling point on the first target reconstruction curve; the target probe is the probe that measures the initial sampling data; the first target reconstruction curve is any reconstruction curve in the first direction among each reconstruction curve in the first direction;
[0022] The first extended data is obtained according to the data of the first extended point corresponding to the first reconstruction sampling point on each of the first target reconstruction curves.
[0023] Optionally, obtaining data of a first extended point corresponding to the first reconstructed sampling point according to data of each reconstructed sampling point on the first target reconstructed curve, a tangent vector of the first target reconstructed curve at the first reconstructed sampling point, a radius of the target probe and a first straight-line distance includes:
[0024] Determining a first extension distance according to the radius of the target probe and the first straight line distance;
[0025] Obtaining a second extension distance according to data of any two adjacent reconstructed sampling points of the first target reconstructed curve;
[0026] Obtaining a target extension distance corresponding to the first reconstructed sampling point according to the first extension distance and the second extension distance;
[0027] Data of a first extended point corresponding to the first reconstructed sampling point is obtained according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point.
[0028] Optionally, after obtaining data of a first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, the method further includes:
[0029] Determine an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstruction curve;
[0030] When the absolute value of the error value is greater than or equal to a preset threshold, the target extension distance is reduced by a preset distance to obtain a reduced extension distance;
[0031] Updating the reduced extension distance to the target distance;
[0032] The step of obtaining data of a first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point is returned until an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstructed curve is less than the preset threshold.
[0033] Optionally, the initial sampling data is obtained by performing in-situ measurement on the target workpiece in a clamped state by a target measuring head in an on-machine measuring device;
[0034] Wherein, the accuracy of the target measuring head is higher than or equal to 0.05 mm.
[0035] The embodiment of the present invention further provides a sampling area boundary expansion device, comprising:
[0036] A first acquisition module, used to acquire initial sampling data of a target workpiece;
[0037] A first processing module is used to reconstruct the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves;
[0038] The second processing module is used to expand the boundary of the reconstructed curve according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece.
[0039] An embodiment of the present invention also provides a sampling area boundary expansion device, including: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the sampling area boundary expansion method described in any one of the above is implemented.
[0040] An embodiment of the present invention further provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps in the sampling area boundary expansion method described above are implemented.
[0041] The beneficial effects of the present invention are:
[0042] The sampling area boundary expansion method provided by the scheme of the present invention obtains initial sampling data of a target workpiece, reconstructs the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method, and obtains data of a reconstructed surface, wherein the reconstructed surface includes multiple reconstructed curves, and the boundary of the reconstructed curve is expanded according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece, thereby realizing boundary expansion of the workpiece, obtaining a complete sampling area, and improving the accuracy of subsequent processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flow chart showing a method for expanding the boundary of a sampling area provided by an embodiment of the present invention;
[0044] Figure 2 A schematic diagram showing a reconstructed curve provided by an embodiment of the present invention;
[0045] Figure 3 A flowchart showing a NURBS surface region expansion algorithm provided by an embodiment of the present invention;
[0046] Figure 4 A schematic diagram showing the structure of a sampling area boundary expansion device provided in an embodiment of the present invention;
[0047] Figure 5 A schematic diagram showing the structure of a sampling area boundary expansion device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] The embodiment of the present invention provides a method, device, equipment and readable storage medium for expanding the boundary of a tool sampling area, which are used to expand the boundary of a workpiece, obtain a complete sampling area, and improve the accuracy of subsequent processing.
[0050] like Figure 1 As shown, an embodiment of the present invention provides a sampling area boundary expansion method, comprising:
[0051] Step 101: Acquire initial sampling data of a target workpiece.
[0052] In this embodiment, the sampling area boundary expansion technology is studied to solve the problem that the sampling area cannot meet the compensation requirements during the deformation compensation process of thin-walled parts with very high precision requirements (±0.01). Therefore, the target workpiece is a thin-walled part.
[0053] As an optional embodiment, the initial sampling data is obtained by performing in-situ measurement of the target workpiece in a clamped state by a target measuring head in an on-machine measuring device, wherein the accuracy of the target measuring head is higher than or equal to 0.05 mm, that is, when the target workpiece is measured on the machine, the in-situ measurement of the target workpiece in a clamped state is performed by the on-machine measuring device, and the measurement accuracy of the target measuring head cannot be less than 0.005 mm, and the target measuring head is a ruby probe.
[0054] In this step, firstly, a plurality of sampling curves are preset on the target workpiece, each sampling curve includes a plurality of preset sampling points. For example, M rows and N columns of sampling curves are preset on the target workpiece, and the intersection between each row of sampling curves and each column of sampling curves is the sampling point.
[0055] That is, the initial sampling data includes sampling data of a plurality of preset sampling curves, each sampling curve includes a plurality of preset sampling points, and the sampling data of each sampling curve includes sampling data of a plurality of preset sampling points.
[0056] Step 102: reconstruct the initial sampling data using a non-uniform rational B-splines (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves.
[0057] In this step, the NURBS surface reconstruction method is used to reconstruct the sampling points according to the initial sampling data. The subsequent boundary expansion algorithm is also based on this theory. The NURBS surface reconstruction method is used to reconstruct the data of the reconstructed curve corresponding to the corresponding sampling curve according to the sampling data of each sampling curve.
[0058] Each sampling curve is reconstructed in the above manner to obtain data of each reconstructed curve, and then combined to obtain data of the reconstructed surface.
[0059] Step 103: Expand the boundaries of the reconstructed curves according to the data of each reconstructed curve to obtain expanded surface data of the target workpiece.
[0060] It should be noted that aircraft engine blades, rocket compartment troughs, etc. are typical thin-walled parts. When sampling, it is usually impossible to obtain information on the steps of the trough and the suspended part of the blade through on-machine measurement. Therefore, the sampling area expansion algorithm can better enable the application of machining deformation compensation based on on-machine measurement to such parts. Before expanding the sampling area, several prerequisites need to be clarified: (1) The edge area of the sampling surface of the part should be relatively smooth. If there is a large curvature change, the point information of the boundary area cannot be predicted by theory. (2) The material of the part should be evenly distributed and consistent. If the materials of the edge area and the center area of the part are different, different deformations will occur under the same cutting force, which is very unfavorable for subsequent compensation. (3) The surface roughness of the part should be guaranteed to a certain extent to ensure that there are no welds, potholes, barbs, and other machining defects that seriously affect the accuracy of sampling.
[0061] Therefore, in this step, the boundary of the corresponding reconstructed curve is expanded according to the data of each reconstructed curve to obtain the expanded data corresponding to the reconstructed curve. According to the expanded data corresponding to each curve, the expanded surface data of the target workpiece is obtained.
[0062] As an optional embodiment, the initial sampling data is reconstructed using a non-uniform rational B-spline curve NURBS reconstruction method to obtain reconstructed surface data, including:
[0063] The NURBS reconstruction method is used to determine the reconstruction parameters corresponding to each sampling point on each sampling curve, and the data of the corresponding reconstructed curve is obtained according to the reconstruction parameters corresponding to multiple sampling points on each sampling curve, and the data of the reconstructed surface is obtained according to the data of each reconstructed curve.
[0064] Specifically, in this optional embodiment, the NURBS surface reconstruction method is briefly introduced as follows: a NURBS curve is a parameterized curve, and the points on the curve (i.e., sampling points) are represented by reconstruction parameters u. The starting point u of the t sampling points on a sampling curve is 0, and the end point u is 1. Each sampling point of the sampling curve can be represented by the corresponding u (i.e., the reconstruction parameter corresponding to each sampling point is determined). A sampling curve can be described by the following formula.
[0065]
[0066] Among them, ρ(u) represents the data of the reconstructed curve, d i (i=0,1,2,...n) are control vertices. The convex hull polygon formed by connecting these points in sequence is the control polygon. i,k (u)(i=0,1,...n) is the k-order B-spline basis function.
[0067] Each sampling curve is reconstructed in the above manner to obtain data of each reconstructed curve, and then combined to obtain data of the reconstructed surface.
[0068] The distribution of sampling points on the NURBS reconstructed surface has a very obvious feature: the sampling point distribution is in a grid pattern. In an optional embodiment, the reconstructed surface is composed of a sampling curve in a first direction and a sampling curve in a second direction, wherein the first direction is a preset row direction (horizontal line), and the second direction is a preset column direction (vertical line), or the first direction is a preset column direction, and the second direction is a preset row direction. In this optional embodiment, the first direction is a preset row direction, and the second direction is a preset column direction. Assume that there are m×n reconstructed points in total, and these points are distributed on m horizontal lines (reconstructed curves) and n vertical lines (reconstructed curves). These lines are woven to form a reconstructed surface. Therefore, the boundary expansion of the sampling area is actually to extend these m horizontal lines and n vertical lines.
[0069] Expanding the boundary of the reconstructed curve according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece, including:
[0070] According to the data of each reconstructed curve in the first direction, the boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data; according to the data of each reconstructed curve in the second direction and the first expanded data in the second direction, the boundary of the corresponding reconstructed curve in the second direction is expanded to obtain second expanded data; according to the first expanded data and the second expanded data, the expanded surface data of the target workpiece is obtained.
[0071] Taking the case where the first direction is the preset row direction and the second direction is the preset vertical direction, the reconstructed surface includes m rows and n columns of reconstructed curves. In this embodiment, the m horizontal reconstructed curves can be expanded first and then the n vertical reconstructed curves can be expanded, or vice versa. However, the vertical reconstructed curves must not be expanded before the expansion of the m horizontal reconstruction curves is completed.
[0072] It should be noted that the row direction and the column direction are both customized directions in the embodiment of the present invention, and can be set as needed in specific implementations.
[0073] Furthermore, each reconstructed curve is composed of multiple reconstructed sampling points, and the reconstructed sampling points correspond to the above sampling points one by one, such as Figure 2 As shown, Figure 2 The solid line in is the NURBS reconstruction curve, and the hollow points are the reconstruction sampling points, where ρ∈(ρ 0 ,ρ 1 ,ρ 2 ,ρ 3 ,ρ 4 ,ρ 5 ,ρ 6 ), the reconstructed curve ρ is a space curve.
[0074] According to the data of each reconstructed curve in the first direction, a boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data, including:
[0075] According to the data of each reconstructed sampling point on the first target reconstructed curve, the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, the radius of the target probe and the first straight-line distance, the data of the first extended point corresponding to the first reconstructed sampling point is obtained, wherein the first straight-line distance is the shortest straight-line distance between the first reconstructed sampling point and the edge of the target workpiece; the first reconstructed sampling point is the first reconstructed sampling point or the last reconstructed sampling point on the first target reconstructed curve; the target probe is a probe for measuring the initial sampling data, and optionally, the target probe is a ruby probe; the first target reconstructed curve is any reconstructed curve in the first direction among the reconstructed curves in the first direction, that is, the data of the first extended point corresponding to the first reconstructed sampling point is obtained by using the data of each reconstructed sampling point on the first target reconstructed curve, the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, the radius of the target probe and the first straight-line distance corresponding to the first reconstructed sampling point, and the data of the first extended point corresponding to the last reconstructed sampling point is obtained by using the data of each reconstructed sampling point on the first target reconstructed curve, the tangent vector of the first target reconstructed curve at the last reconstructed sampling point, the radius of the target probe and the first straight-line distance corresponding to the last reconstructed sampling point;
[0076] The first extended data is obtained according to the data of the first extended point corresponding to the first reconstructed sampling point on each of the first target reconstruction curves, that is, the first extended data is obtained according to the data of the first extended point corresponding to the first reconstructed sampling point and the data of the first extended point corresponding to the last reconstructed sampling point on each of the first target reconstruction curves.
[0077] It should be noted that the first reconstructed sampling point and the last reconstructed sampling point are reconstructed sampling points at both ends of a reconstructed curve, but which one is the first reconstructed sampling point and which one is the last reconstructed sampling point can be set according to requirements.
[0078] Further, obtaining data of a first extended point corresponding to the first reconstructed sampling point according to data of each reconstructed sampling point on the first target reconstructed curve, a tangent vector of the first target reconstructed curve at the first reconstructed sampling point, a radius of the target probe and a first straight-line distance includes:
[0079] A first extension distance is determined according to the radius of the target probe and the first straight-line distance, a second extension distance is obtained according to data of any two adjacent reconstructed sampling points of the first target reconstruction curve, a target extension distance corresponding to the first reconstructed sampling point is obtained according to the first extension distance and the second extension distance, and data of a first expansion point corresponding to the first reconstructed sampling point is obtained according to data of the first reconstructed sampling point, the target extension distance and a tangent vector of the first target reconstruction curve at the first reconstructed sampling point.
[0080] Specifically, assuming that a reconstructed curve has a total of n+1 reconstructed sampling points, in order to extend the reconstructed curve outward, we first need to calculate the tangent vector ψ of the curve at the first and last points (the first reconstructed sampling point and the last reconstructed sampling point): 0 ,ψ 1 , and then let the first and last points (the first reconstructed sampling point and the last reconstructed sampling point) ρ 0 ,ρ n The distribution extension l (first extension distance and second extension distance) along the tangent vector direction is obtained as ρ 0 ',ρ n ', the calculation process is as follows:
[0081]
[0082] Among them, ρ 0 is the data of the first reconstructed sampling point of the curve, ρ 0 ' is the data of the sampling point after the first reconstructed sampling point is extended (that is, the data of the first extended point corresponding to the first reconstructed sampling point), ψ 0 For the curve in ρ 0 The tangent vector at the position, l is the extension distance (i.e., the first extension distance). r is the radius of the ruby probe, λ is ρ 0 The minimum straight-line distance from the target workpiece boundary. The extension distance l (including the first extension distance) must meet two conditions: ① greater than or equal to the sum of the ruby probe radius r and λ, which ensures that the surface after expansion can fully display the surface morphology of the part. ② less than or equal to the minimum distance between two adjacent sampling points on the curve. ρ on the curve n ' and ρ 0 ', the meaning of the parameters is the same as solving ρ 0 The meaning of the parameters of ' is basically the same, that is, ρ n is the data of the last reconstructed sampling point of the curve, ρ n ' is the data of the sampling point after the last reconstructed sampling point is extended (that is, the data of the first extended point corresponding to the last reconstructed sampling point), ψ 1 For the curve in ρ n The tangent vector at the position, l is the extension distance (i.e., the second extension distance). r is the radius of the ruby probe, λ is ρn The minimum straight-line distance from the target workpiece boundary. The extension distance l (second extension distance) satisfies the above two conditions. The data sequence of the reconstructed sampling points after the expansion is ρ∈[ρ 0 ',ρ 1 ,ρ 2 ... n-1 ,ρ n '], the NURBS curve is reconstructed for the sampling point sequence, and the obtained curve is extended at both ends compared with the original curve.
[0083] It should be noted that, according to the above two conditions, the first extension distance and the second extension distance are range values, respectively. When selecting, a value within the range can be arbitrarily selected. Preferably, the middle value of the range value or the maximum value can be selected.
[0084] It should also be noted that, according to the data of each reconstructed curve in the second direction and the first expanded data in the second direction, the boundary of the corresponding reconstructed curve in the second direction is expanded to obtain the second expanded data. The process is basically similar to the above-mentioned process of performing boundary expansion on the corresponding reconstructed curve in the first direction according to the data of each reconstructed curve in the first direction to obtain the first expanded data, and will not be repeated here.
[0085] It should also be noted that, in order to ensure the accuracy of the expansion, after obtaining the data of the first expansion point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, the method further includes:
[0086] determining an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstructed curve, and when an absolute value of the error value is greater than or equal to a preset threshold, reducing the target extension distance by a preset distance to obtain a reduced extension distance, optionally the preset threshold is 0.01, updating the reduced extension distance to the target distance, and returning to the step of obtaining the data of the first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, until the error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstructed curve is less than the preset threshold.
[0087] Specifically, based on the curve boundary expansion algorithm, a NURBS surface area expansion algorithm is proposed. The process of the NURBS surface area expansion algorithm is as follows: Figure 3As shown in the figure, since the NURBS surface is composed of interwoven curves, the key to expanding the surface is to expand each curve in turn. Taking a reconstructed surface with m rows and n columns as an example, the m horizontal reconstructed curves can be expanded first and then the n vertical reconstructed curves can be expanded, or vice versa. However, the vertical reconstructed curves must not be expanded before the expansion of the m reconstructed curves is completed. First, expand the m horizontal reconstructed curves by a distance l. 0 (determined according to the above two conditions), obtain the data of the first expansion point, calculate the error value α between the data of the first expansion point and the data of each reconstructed sampling point on the first target reconstruction curve, if α<0.001, it is considered that the expansion curve can meet the accuracy requirement, if it does not meet the conditions, the expansion distance should be reduced until the expansion curve meets the accuracy requirement. After the expansion of the m horizontal reconstruction curves is completed, the n longitudinal reconstruction curves are continued to be expanded. This step is the same as the above process. After the expansion of all longitudinal reconstruction curves is completed, the expansion of the reconstructed surface is realized.
[0088] In the embodiment of the present invention, an on-machine measuring device is used to perform in-situ measurement on a part in a clamped state; then, NURBS surfaces and curves are reconstructed based on the measurement results; on the basis of the NURBS curve reconstruction, a method is proposed to achieve curve expansion by extending a distance l along the tangent vector directions of both ends of the curve. Then, according to the curve expansion algorithm, a method is proposed to first expand the boundaries of each curve in the first direction on the NURBS surface, and then expand the curve in the second direction, thereby achieving NURBS surface boundary expansion.
[0089] like Figure 4 As shown, an embodiment of the present invention further provides a sampling area boundary expansion device, comprising:
[0090] The first acquisition module 401 is used to acquire initial sampling data of the target workpiece;
[0091] A first processing module 402 is used to reconstruct the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves;
[0092] The second processing module 403 is used to expand the boundary of the reconstructed curve according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece.
[0093] Optionally, the initial sampling data includes sampling data of a plurality of preset sampling curves, each sampling curve including a plurality of preset sampling points;
[0094] The first processing module 402 includes:
[0095] A first processing unit, configured to determine a reconstruction parameter corresponding to each sampling point on each sampling curve by using the NURBS reconstruction method;
[0096] A second processing unit, configured to obtain data of a corresponding reconstructed curve according to reconstruction parameters corresponding to a plurality of sampling points on each sampling curve;
[0097] The third processing unit is used to obtain the data of the reconstructed surface according to the data of each reconstructed curve.
[0098] Optionally, the reconstructed surface is composed of a sampling curve in a first direction and a sampling curve in a second direction;
[0099] The second processing module 403 includes:
[0100] a fourth processing unit, configured to perform boundary expansion on the corresponding reconstructed curve in the first direction according to the data of each reconstructed curve in the first direction, so as to obtain first expanded data;
[0101] a fifth processing unit, configured to perform boundary expansion on the corresponding reconstructed curve in the second direction according to the data of each reconstructed curve in the second direction and the first expanded data in the second direction, so as to obtain second expanded data;
[0102] The sixth processing unit is configured to obtain the extended surface data of the target workpiece according to the first extended data and the second extended data.
[0103] Optionally, each reconstructed curve is composed of a plurality of reconstructed sampling points;
[0104] The fourth processing unit is specifically configured to:
[0105] According to the data of each reconstructed sampling point on the first target reconstruction curve, the tangent vector of the first target reconstruction curve at the first reconstruction sampling point, the radius of the target probe and the first straight-line distance, the data of the first extended point corresponding to the first reconstruction sampling point is obtained; wherein the first straight-line distance is the shortest straight-line distance between the first reconstruction sampling point and the edge of the target workpiece; the first reconstruction sampling point is the first reconstruction sampling point or the last reconstruction sampling point on the first target reconstruction curve; the target probe is the probe that measures the initial sampling data; the first target reconstruction curve is any reconstruction curve in the first direction among each reconstruction curve in the first direction;
[0106] The first extended data is obtained according to the data of the first extended point corresponding to the first reconstruction sampling point on each of the first target reconstruction curves.
[0107] Optionally, the fourth processing unit is specifically configured to:
[0108] Determining a first extension distance according to the radius of the target probe and the first straight line distance;
[0109] Obtaining a second extension distance according to data of any two adjacent reconstructed sampling points of the first target reconstructed curve;
[0110] Obtaining a target extension distance corresponding to the first reconstructed sampling point according to the first extension distance and the second extension distance;
[0111] Data of a first extended point corresponding to the first reconstructed sampling point is obtained according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point.
[0112] Optionally, the second processing module 403 further includes:
[0113] A first determining unit, configured to determine an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstruction curve;
[0114] A seventh processing unit, configured to reduce the target extension distance by a preset distance to obtain a reduced extension distance when the absolute value of the error value is greater than or equal to a preset threshold;
[0115] an eighth processing unit, configured to update the reduced extension distance to the target distance;
[0116] a ninth processing unit, configured to return the step of obtaining data of a first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, until an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstructed curve is less than the preset threshold.
[0117] Optionally, the initial sampling data is obtained by performing in-situ measurement on the target workpiece in a clamped state by a target measuring head in an on-machine measuring device;
[0118] Wherein, the accuracy of the target measuring head is higher than or equal to 0.05 mm.
[0119] It should be noted that the sampling area boundary expansion device provided in the embodiment of the present invention is a device capable of executing the above-mentioned sampling area boundary expansion method. All embodiments of the above-mentioned sampling area boundary expansion method are applicable to the device and can achieve the same or similar technical effects.
[0120] The embodiment of the present invention also provides a sampling area boundary expansion device, such as Figure 5 As shown, it includes: a processor 501; and a memory 502 connected to the processor 501 through a bus interface, the memory 502 is used to store programs and data used by the processor 501 when performing operations, and the processor 501 calls and executes the programs and data stored in the memory 502.
[0121] The transceiver 503 is connected to the bus interface and is used to receive and send data under the control of the processor 501 .
[0122] Among them, Figure 5 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 501 and various circuits of memory represented by memory 502 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides a user interface 504. The transceiver 503 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 504 may also be an interface capable of externally and internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.
[0123] The processor 501 is responsible for managing the bus architecture and general processing, and the memory 502 can store data used by the processor 501 when performing operations.
[0124] The processor 501 performs the following processes:
[0125] Acquire initial sampling data of the target workpiece;
[0126] Reconstructing the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves;
[0127] The boundary of the reconstructed curve is expanded according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece.
[0128] Optionally, the initial sampling data includes sampling data of a plurality of preset sampling curves, each sampling curve including a plurality of preset sampling points;
[0129] The processor 501 is configured to:
[0130] Determine the reconstruction parameters corresponding to each sampling point on each sampling curve by using the NURBS reconstruction method;
[0131] According to the reconstruction parameters corresponding to the multiple sampling points on each sampling curve, the data of the corresponding reconstructed curve is obtained;
[0132] The data of the reconstructed surface is obtained according to the data of each of the reconstructed curves.
[0133] Optionally, the reconstructed surface is composed of a sampling curve in a first direction and a sampling curve in a second direction;
[0134] The processor 501 is configured to:
[0135] According to the data of each reconstructed curve in the first direction, a boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data;
[0136] According to the data of each reconstructed curve in the second direction and the first expanded data in the second direction, performing boundary expansion on the corresponding reconstructed curve in the second direction to obtain second expanded data;
[0137] The extended surface data of the target workpiece is obtained according to the first extended data and the second extended data.
[0138] Optionally, each reconstructed curve is composed of a plurality of reconstructed sampling points;
[0139] The processor 501 is specifically configured to:
[0140] According to the data of each reconstructed sampling point on the first target reconstruction curve, the tangent vector of the first target reconstruction curve at the first reconstruction sampling point, the radius of the target probe and the first straight-line distance, the data of the first extended point corresponding to the first reconstruction sampling point is obtained; wherein the first straight-line distance is the shortest straight-line distance between the first reconstruction sampling point and the edge of the target workpiece; the first reconstruction sampling point is the first reconstruction sampling point or the last reconstruction sampling point on the first target reconstruction curve; the target probe is the probe that measures the initial sampling data; the first target reconstruction curve is any reconstruction curve in the first direction among each reconstruction curve in the first direction;
[0141] The first extended data is obtained according to the data of the first extended point corresponding to the first reconstruction sampling point on each of the first target reconstruction curves.
[0142] Optionally, the processor 501 is specifically configured to:
[0143] Determining a first extension distance according to the radius of the target probe and the first straight line distance;
[0144] Obtaining a second extension distance according to data of any two adjacent reconstructed sampling points of the first target reconstructed curve;
[0145] Obtaining a target extension distance corresponding to the first reconstructed sampling point according to the first extension distance and the second extension distance;
[0146] Data of a first extended point corresponding to the first reconstructed sampling point is obtained according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point.
[0147] Optionally, the processor 501 is further configured to:
[0148] Determine an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstruction curve;
[0149] When the absolute value of the error value is greater than or equal to a preset threshold, the target extension distance is reduced by a preset distance to obtain a reduced extension distance;
[0150] Updating the reduced extension distance to the target distance;
[0151] The step of obtaining data of a first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point is returned until an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstructed curve is less than the preset threshold.
[0152] Optionally, the initial sampling data is obtained by performing in-situ measurement on the target workpiece in a clamped state by a target measuring head in an on-machine measuring device;
[0153] Wherein, the accuracy of the target measuring head is higher than or equal to 0.05 mm.
[0154] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing related hardware through a program, wherein the program includes instructions for executing part or all of the steps of the above method; and the program may be stored in a readable storage medium, which may be any form of storage medium.
[0155] An embodiment of the present invention further provides a readable storage medium, wherein a program is stored on the readable storage medium, and when the program is executed by a processor, the sampling area boundary expansion method as described in any one of the above items is implemented.
[0156] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0157] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0158] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0159] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles described in the present invention. These improvements and modifications are also within the scope of protection of the present invention.
Claims
1. A sampling area boundary expansion method, characterized in that: include: Acquire initial sampling data of the target workpiece; Reconstructing the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves; The boundary of the reconstructed curve is expanded according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece.
2. The method according to claim 1, characterized in that The initial sampling data includes sampling data of a plurality of preset sampling curves, and each sampling curve includes a plurality of preset sampling points; The initial sampling data is reconstructed using a non-uniform rational B-spline curve NURBS reconstruction method to obtain reconstructed surface data, including: Determine the reconstruction parameters corresponding to each sampling point on each sampling curve by using the NURBS reconstruction method; According to the reconstruction parameters corresponding to the multiple sampling points on each sampling curve, the data of the corresponding reconstructed curve is obtained; The data of the reconstructed surface is obtained according to the data of each of the reconstructed curves.
3. The method according to claim 1, characterized in that The reconstructed curved surface is composed of a sampling curve in a first direction and a sampling curve in a second direction; Expanding the boundary of the reconstructed curve according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece, including: According to the data of each reconstructed curve in the first direction, a boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data; According to the data of each reconstructed curve in the second direction and the first expanded data in the second direction, performing boundary expansion on the corresponding reconstructed curve in the second direction to obtain second expanded data; The extended surface data of the target workpiece is obtained according to the first extended data and the second extended data.
4. The method according to claim 3, characterized in that Each reconstructed curve is composed of multiple reconstructed sampling points; According to the data of each reconstructed curve in the first direction, a boundary of the corresponding reconstructed curve in the first direction is expanded to obtain first expanded data, including: According to the data of each reconstructed sampling point on the first target reconstruction curve, the tangent vector of the first target reconstruction curve at the first reconstruction sampling point, the radius of the target probe and the first straight-line distance, the data of the first extended point corresponding to the first reconstruction sampling point is obtained; wherein the first straight-line distance is the shortest straight-line distance between the first reconstruction sampling point and the edge of the target workpiece; the first reconstruction sampling point is the first reconstruction sampling point or the last reconstruction sampling point on the first target reconstruction curve; the target probe is the probe that measures the initial sampling data; the first target reconstruction curve is any reconstruction curve in the first direction among each reconstruction curve in the first direction; The first extended data is obtained according to the data of the first extended point corresponding to the first reconstruction sampling point on each of the first target reconstruction curves.
5. The method according to claim 4, characterized in that The step of obtaining data of a first extended point corresponding to the first reconstructed sampling point according to data of each reconstructed sampling point on the first target reconstructed curve, a tangent vector of the first target reconstructed curve at the first reconstructed sampling point, a radius of the target probe and a first straight line distance comprises: Determining a first extension distance according to the radius of the target probe and the first straight line distance; Obtaining a second extension distance according to data of any two adjacent reconstructed sampling points of the first target reconstructed curve; Obtaining a target extension distance corresponding to the first reconstructed sampling point according to the first extension distance and the second extension distance; Data of a first extended point corresponding to the first reconstructed sampling point is obtained according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point.
6. The method according to claim 5, characterized in that After obtaining data of a first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point, the method further includes: Determine an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstruction curve; When the absolute value of the error value is greater than or equal to a preset threshold, the target extension distance is reduced by a preset distance to obtain a reduced extension distance; Updating the reduced extension distance to the target distance; The step of obtaining data of a first extended point corresponding to the first reconstructed sampling point according to the data of the first reconstructed sampling point, the target extension distance, and the tangent vector of the first target reconstructed curve at the first reconstructed sampling point is returned until an error value between the data of the first extended point and the data of each reconstructed sampling point on the first target reconstructed curve is less than the preset threshold.
7. The method according to claim 1, characterized in that The initial sampling data is obtained by performing in-situ measurement of the target workpiece in a clamped state by a target measuring head in a machine measuring device; Wherein, the accuracy of the target measuring head is higher than or equal to 0.05 mm.
8. A sampling area boundary expansion device, characterized in that: include: A first acquisition module, used to acquire initial sampling data of a target workpiece; A first processing module is used to reconstruct the initial sampling data using a non-uniform rational B-spline curve (NURBS) reconstruction method to obtain data of a reconstructed surface, wherein the reconstructed surface includes a plurality of reconstructed curves; The second processing module is used to expand the boundary of the reconstructed curve according to the data of each reconstructed curve to obtain the expanded surface data of the target workpiece.
9. A sampling area boundary expansion device, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the sampling area boundary expansion method as described in any one of claims 1 to 7 is implemented.
10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps in the sampling area boundary expansion method according to any one of claims 1 to 7 are implemented.