Curved surface numerical control machining information extraction method and device based on B-spline curved surface reconstruction

Through the B-spline surface reconstruction method, the problem of difficulty in taking into account the rapidity, smoothness and accuracy of the surface reconstruction algorithm when dealing with disordered knife sites is solved, and efficient and accurate surface CNC machining information extraction is achieved.

CN119575869AActive Publication Date: 2025-03-07TSINGHUA UNIVERSITY +1

Patent Information

Application Number
CN202411740343.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-07
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

When surface reconstruction algorithms deal with disordered spatial discrete tool sites, it is difficult to take into account the requirements of speed, smoothness and accuracy.

Method used

The method based on B-spline surface reconstruction is adopted to obtain tool site information, parameterize tool site, determine B-spline surface parameters, calculate accuracy and smooth energy indicators, and generate tool positioning surface reconstruction problems based on comprehensive indicators to obtain the reconstruction structure and extract the surface CNC machining information.

Benefits of technology

Effectively reconstruct the tool positioning surface, improve the quality and efficiency of CNC machining of the curved surface, taking into account the requirements of speed, smoothness and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119575869A_ABST
    Figure CN119575869A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of numerical control system information processing, in particular to a curved surface numerical control machining information extraction method and device based on B-spline curved surface refactor.The method comprises the steps that after three-dimensional space position information of a curved surface machining cutter location point is obtained, cutter location point parameterization is carried out to determine B-spline curved surface parameters of a cutter positioning curved surface; determining a precision index according to the sum of squares of deviations of all cutter location points and the cutter positioning curved surface to calculate a regression matrix, determining a fairing energy index to calculate a fairing energy matrix, combining the two indexes to determine a comprehensive index, generating a curved surface reconstruction problem, solving the problem to obtain a reconstruction structure, and extracting curved surface numerical control machining information. Therefore, the problem that in the related technology, when a curved surface reconstruction algorithm processes disordered spatial discrete cutter location points, the requirements for rapidity, fairness and precision are generally difficult to consider is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of numerical control system information processing, and in particular to a method and device for extracting surface numerical control machining information based on B-spline surface reconstruction. Background Art

[0002] In the related technologies, surface reconstruction technology is a type of technology that can reconstruct a complete continuous surface based on a large number of discrete points. In the context of surface CNC machining, the tool positioning surface can be reversely reconstructed through the tool position information contained in the machining program. Compared with the discrete tool position information in the machining program, the tool positioning surface has obvious advantages. On the one hand, the tool positioning surface has good position continuity, which helps to improve the smoothness and consistency of the surface machining process; on the other hand, the detailed geometric information extracted based on the tool positioning surface (such as curvature, normal, etc.) can be further used for tasks such as machining program optimization, trajectory smoothing, speed planning and interpolation, and further improve the machining quality.

[0003] However, in the related technologies, surface reconstruction algorithms usually find it difficult to balance the requirements of speed, smoothness and accuracy when processing disordered spatial discrete tool position points, and improvement is urgently needed. Summary of the invention

[0004] The present application provides a method and device for extracting surface CNC machining information based on B-spline surface reconstruction, so as to solve the problem in the related art that the surface reconstruction algorithm is usually difficult to take into account the requirements of speed, smoothness and accuracy when processing disordered spatial discrete tool position points.

[0005] The first aspect of the present application provides a method for extracting surface CNC machining information based on B-spline surface reconstruction, comprising the following steps: obtaining three-dimensional spatial position information of at least one surface machining tool position point; parameterizing the at least one surface machining tool position point based on the three-dimensional spatial position information; determining the B-spline surface parameters of the tool positioning surface based on the parameterized tool position point; determining the accuracy index of the tool positioning surface based on the sum of the squares of the deviations between all tool position points and the tool positioning surface based on the B-spline surface parameters to calculate a regression matrix; determining the smoothing energy index of the tool positioning surface to calculate a smoothing energy matrix; determining a comprehensive index based on the accuracy index and the smoothing energy index to generate a tool positioning surface reconstruction problem based on the comprehensive index; solving the tool positioning surface reconstruction problem to obtain a tool positioning surface reconstruction structure to extract surface CNC machining information.

[0006] Through the above technical scheme, the embodiment of the present application can effectively reconstruct the tool positioning surface and extract processing information by obtaining tool position point information and a series of processing. Tool position point parameterization can process disordered scattered points, making subsequent calculations more accurate. Determining the B-spline surface parameters is flexible and the quasi-uniform node vector is selected to ensure the surface quality. The precision index calculation is scientific, based on the sum of squared deviations combined with matrix expression and regression matrix calculation to accurately quantify the precision requirements. The smoothing energy index considers multiple factors, based on the thin plate energy definition and through matrix calculation, taking into account stability and smoothness. The comprehensive index introduces adjustable precision and smoothness tendency to meet different needs. The linear equation system is solved quickly and the results are optimal, which improves the calculation speed and fitting effect. The final extracted processing information can further optimize the surface CNC machining and effectively improve the quality and efficiency of complex surface machining.

[0007] Optionally, in one embodiment of the present application, the tool position point parameterization of the at least one surface machining tool position point based on the three-dimensional spatial position information includes: projecting the at least one surface machining tool position point onto a target two-dimensional projection plane according to a preset projection vector; dividing the target two-dimensional projection plane into enclosing rectangular areas surrounding the projection points corresponding to all the tool position points; based on the two-dimensional position relationship in the target projection plane, linearly mapping the enclosing rectangular areas into a unit rectangle in the parameter domain of the B-spline surface according to a preset length relationship, so as to calculate the parameter value corresponding to each tool position point according to the mapping relationship.

[0008] Through the above technical solution, the embodiment of the present application can realize the effective conversion from three-dimensional space to two-dimensional plane by projecting the tool position point of the surface processing to the two-dimensional projection plane and dividing the enclosing rectangular area, thereby simplifying the difficulty of data processing. Based on the linear mapping method of the two-dimensional position relationship, the connection between the tool position point and the parameter domain of the B-spline surface is cleverly established, so that each tool position point can accurately obtain the corresponding parameter value, providing a reliable basis for subsequent calculations, not only improving the accuracy and rationality of parameterization, but also being able to better adapt to the processing of disordered scattered points, laying a solid foundation for subsequent work such as tool positioning surface reconstruction and CNC processing information extraction, and helping to improve the accuracy, efficiency and stability of the entire surface CNC processing process.

[0009] Optionally, in one embodiment of the present application, determining the B-spline surface parameters of the tool positioning surface includes: using the standard definition of the B-spline surface to determine the tool positioning surface, selecting the B-spline surface degree and the number of control points, and selecting a quasi-uniform node vector to define the B-spline surface parameters.

[0010] Through the above technical scheme, the embodiment of the present application can use the standard definition of B-spline surface to determine the tool positioning surface, which provides a solid theoretical basis for the precise construction of the surface. In the definition process, the degree of B-spline surface can be flexibly selected, and the high-order surface can bring high-order continuity, which helps to improve the smoothness and accuracy of the tool positioning surface when fitting complex shapes, and better adapt to various complex surface processing requirements. At the same time, the number of control points can be selected as needed, so that the scheme can find a balance between the amount of calculation and the fitting accuracy, which not only ensures the degree of fit between the tool positioning surface and the actual processing situation, but also takes into account the calculation efficiency. The selection of quasi-uniform node vectors can ensure that the nodes are evenly distributed, further enhancing the effect of surface reconstruction, making the reconstructed tool positioning surface more uniform and smooth on the whole, so that in the subsequent surface CNC processing, it can effectively improve the processing quality and reduce the processing errors caused by discontinuous or uneven surfaces.

[0011] Optionally, in one embodiment of the present application, the calculation of the regression matrix includes: calculating the B-spline basis matrix corresponding to the parameter value of each tool position point; reshaping it into corresponding row vectors according to a preset order based on the corresponding B-spline basis matrix; and arranging the corresponding row vectors vertically to form the regression matrix.

[0012] Through the above technical solution, the embodiment of the present application can accurately quantify the relationship between the tool position point and the B-spline surface by calculating the B-spline basis matrix corresponding to each tool position point parameter value, providing key basic data for subsequent processing. Based on this, the data is reshaped into row vectors in order. This reshaping method can make the data structure more regular and orderly, which is convenient for unified calculation and analysis. The reshaped row vectors are arranged vertically to form a regression matrix, which cleverly integrates the relevant information of all tool position points, so that the regression matrix can comprehensively and systematically reflect the characteristics of the tool position points in the B-spline surface parameterization process. The regression matrix plays a core role in the subsequent calculation of the accuracy index of the tool positioning surface, which helps to improve the accuracy and efficiency of the calculation, thereby laying a solid foundation for the entire tool positioning surface reconstruction and CNC machining information extraction process, and effectively improving the precision control and quality assurance capabilities of CNC machining of complex surfaces.

[0013] Optionally, in one embodiment of the present application, the calculation formula of the smoothing energy index is:

[0014]

[0015] in, is the control point D with coordinates i, j in the control point network i,j The second-order difference along the parameter u direction at the position is calculated as follows: is the control point D with coordinates i, j in the control point network i,jThe second-order difference along the direction of parameter v at position is calculated as follows:

[0016] Through the above technical solution, the embodiment of the present application can define the smoothing energy index by accumulating the sum of squares of second-order differences of each control point in the control point network in two directions, which can effectively quantify the smoothness of the tool positioning surface from an energy perspective, and comprehensively capture the bending characteristics of the surface in different directions, thereby more accurately measuring the smoothness of the surface.

[0017] Optionally, in one embodiment of the present application, the tool positioning surface reconstruction problem is:

[0018]

[0019] Among them, P CL is the tool point set matrix, A is the regression matrix, Q is the smoothing energy matrix, λ is the proportional factor, and D is the control point matrix to be solved.

[0020] Through the above technical scheme, the embodiment of the present application can realize the reconstruction of the tool positioning surface by minimizing the objective function, so that the reconstruction process can not only meet the accuracy requirements, but also take into account the smoothness of the surface, avoiding the situation where the surface is not smooth due to excessive pursuit of accuracy or sacrificing accuracy due to excessive pursuit of smoothness.

[0021] The second aspect of the present application provides a device for extracting surface CNC machining information based on B-spline surface reconstruction, including: an acquisition module for acquiring three-dimensional spatial position information of at least one surface machining tool position point; a parameterization module for parameterizing the at least one surface machining tool position point based on the three-dimensional spatial position information; a parameter determination module for determining the B-spline surface parameters of the tool positioning surface based on the parameterized tool position point; a first calculation module for determining the accuracy index of the tool positioning surface based on the B-spline surface parameters according to the square sum of the deviations of all tool positions and the tool positioning surface to calculate a regression matrix; a second calculation module for determining the smoothing energy index of the tool positioning surface to calculate a smoothing energy matrix generation module; a generation module for determining a comprehensive index based on the accuracy index and the smoothing energy index to generate a tool positioning surface reconstruction problem based on the comprehensive index; an extraction module for solving the tool positioning surface reconstruction problem to obtain a tool positioning surface reconstruction structure and extract surface CNC machining information.

[0022] Through the above technical scheme, the embodiment of the present application can effectively reconstruct the tool positioning surface and extract processing information by obtaining tool position point information and a series of processing. Tool position point parameterization can process disordered scattered points, making subsequent calculations more accurate. Determining the B-spline surface parameters is flexible and the quasi-uniform node vector is selected to ensure the surface quality. The precision index calculation is scientific, based on the sum of squared deviations combined with matrix expression and regression matrix calculation to accurately quantify the precision requirements. The smoothing energy index considers multiple factors, based on the thin plate energy definition and through matrix calculation, taking into account stability and smoothness. The comprehensive index introduces adjustable precision and smoothness tendency to meet different needs. The linear equation system is solved quickly and the results are optimal, which improves the calculation speed and fitting effect. The final extracted processing information can further optimize the surface CNC machining and effectively improve the quality and efficiency of complex surface machining.

[0023] Optionally, in one embodiment of the present application, the parameterization module includes: a projection unit, used to project the at least one surface machining tool position point onto a target two-dimensional projection plane according to a preset projection vector; a zoning unit, used to divide the target two-dimensional projection plane into enclosing rectangular areas surrounding the projection points corresponding to all the tool position points; and a calculation unit, used to linearly map the enclosing rectangular areas to a unit rectangle in the parameter domain of the B-spline surface according to a preset length relationship based on the two-dimensional position relationship in the target projection plane, so as to calculate the parameter value corresponding to each tool position point according to the mapping relationship.

[0024] Through the above technical solution, the embodiment of the present application can realize the effective conversion from three-dimensional space to two-dimensional plane by projecting the tool position point of the surface processing to the two-dimensional projection plane and dividing the enclosing rectangular area, thereby simplifying the difficulty of data processing. Based on the linear mapping method of the two-dimensional position relationship, the connection between the tool position point and the parameter domain of the B-spline surface is cleverly established, so that each tool position point can accurately obtain the corresponding parameter value, providing a reliable basis for subsequent calculations, not only improving the accuracy and rationality of parameterization, but also being able to better adapt to the processing of disordered scattered points, laying a solid foundation for subsequent work such as tool positioning surface reconstruction and CNC processing information extraction, and helping to improve the accuracy, efficiency and stability of the entire surface CNC processing process.

[0025] Optionally, in one embodiment of the present application, the parameter determination module includes: using the standard definition of B-spline surface to determine the tool positioning surface, selecting the degree and number of control points of the B-spline surface, and selecting a quasi-uniform node vector to define the B-spline surface parameters.

[0026] Through the above technical scheme, the embodiment of the present application can use the standard definition of B-spline surface to determine the tool positioning surface, which provides a solid theoretical basis for the precise construction of the surface. In the definition process, the degree of B-spline surface can be flexibly selected, and the high-order surface can bring high-order continuity, which helps to improve the smoothness and accuracy of the tool positioning surface when fitting complex shapes, and better adapt to various complex surface processing requirements. At the same time, the number of control points can be selected as needed, so that the scheme can find a balance between the amount of calculation and the fitting accuracy, which not only ensures the degree of fit between the tool positioning surface and the actual processing situation, but also takes into account the calculation efficiency. The selection of quasi-uniform node vectors can ensure that the nodes are evenly distributed, further enhancing the effect of surface reconstruction, making the reconstructed tool positioning surface more uniform and smooth on the whole, so that in the subsequent surface CNC processing, it can effectively improve the processing quality and reduce the processing errors caused by discontinuous or uneven surfaces.

[0027] Optionally, in one embodiment of the present application, the first calculation module includes: a calculation unit, used to calculate the B-spline basis matrix corresponding to the parameter value of each tool position point; a reshaping unit, used to reshape the corresponding B-spline basis matrix into corresponding row vectors in a preset order based on the corresponding B-spline basis matrix; and a regression matrix construction unit, used to arrange the corresponding row vectors vertically to form the regression matrix.

[0028] Through the above technical solution, the embodiment of the present application can accurately quantify the relationship between the tool position point and the B-spline surface by calculating the B-spline basis matrix corresponding to each tool position point parameter value, providing key basic data for subsequent processing. Based on this, the data is reshaped into row vectors in order. This reshaping method can make the data structure more regular and orderly, which is convenient for unified calculation and analysis. The reshaped row vectors are arranged vertically to form a regression matrix, which cleverly integrates the relevant information of all tool position points, so that the regression matrix can comprehensively and systematically reflect the characteristics of the tool position points in the B-spline surface parameterization process. The regression matrix plays a core role in the subsequent calculation of the accuracy index of the tool positioning surface, which helps to improve the accuracy and efficiency of the calculation, thereby laying a solid foundation for the entire tool positioning surface reconstruction and CNC machining information extraction process, and effectively improving the precision control and quality assurance capabilities of CNC machining of complex surfaces.

[0029] Optionally, in one embodiment of the present application, the calculation formula of the smoothing energy index is:

[0030]

[0031] in, is the control point D with coordinates i, j in the control point network i,j The second-order difference along the parameter u direction at the position is calculated as follows: is the control point D with coordinates i, j in the control point network i,j The second-order difference along the direction of parameter v at position is calculated as follows:

[0032] Through the above technical solution, the embodiment of the present application can define the smoothing energy index by accumulating the sum of squares of second-order differences of each control point in the control point network in two directions, which can effectively quantify the smoothness of the tool positioning surface from an energy perspective, and comprehensively capture the bending characteristics of the surface in different directions, thereby more accurately measuring the smoothness of the surface.

[0033] Optionally, in one embodiment of the present application, the tool positioning surface reconstruction problem is:

[0034]

[0035] Among them, P CL is the tool point set matrix, A is the regression matrix, Q is the smoothing energy matrix, λ is the proportional factor, and D is the control point matrix to be solved.

[0036] Through the above technical scheme, the embodiment of the present application can realize the reconstruction of the tool positioning surface by minimizing the objective function, so that the reconstruction process can not only meet the accuracy requirements, but also take into account the smoothness of the surface, avoiding the situation where the surface is not smooth due to excessive pursuit of accuracy or sacrificing accuracy due to excessive pursuit of smoothness.

[0037] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for extracting surface CNC machining information based on B-spline surface reconstruction as described in the above embodiment.

[0038] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned method for extracting surface CNC machining information based on B-spline surface reconstruction.

[0039] The fifth aspect of the present application provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned method for extracting surface CNC machining information based on spline surface reconstruction.

[0040] After obtaining the tool position information, the embodiment of the present application can effectively reconstruct the tool positioning surface and extract processing information through the steps of tool position parameterization, B-spline surface parameter determination, precision and smoothing energy index calculation, comprehensive index construction, and linear equation group solution. Tool position parameterization realizes the conversion from three-dimensional to two-dimensional, simplifies data processing, and accurately establishes the connection between tool position and B-spline surface parameter domain, adapts to disordered scattered point processing, and lays the foundation for subsequent work. The B-spline surface parameter definition is flexible, and the selection of times, the number of control points, and the use of quasi-uniform node vectors ensure the surface quality and improve the fitting accuracy and calculation efficiency of complex shapes. The regression matrix construction link accurately quantifies the relationship and integrates information, plays a key role in the calculation of precision indicators, and improves the precision control capability. The smoothing energy index comprehensively quantifies the smoothness of the surface from the energy perspective, and the optimization formula of the tool positioning surface reconstruction problem takes into account both precision and smoothness, and ultimately effectively improves the quality, efficiency, accuracy, high efficiency and stability of complex surface processing, reduces processing errors, and provides strong support for surface CNC processing.

[0041] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0043] Figure 1 A flowchart of a method for extracting surface NC machining information based on B-spline surface reconstruction according to an embodiment of the present application;

[0044] Figure 2 A schematic diagram of a tool position point and its parameterization process obtained according to a specific embodiment of the present application;

[0045] Figure 3 A schematic diagram of calculating the smoothing energy index of a control point network according to a specific embodiment of the present application;

[0046] Figure 4 It is a schematic diagram of a reconstructed tool positioning surface result according to a specific embodiment of the present application;

[0047] Figure 5 A schematic diagram of surface normal information based on tool positioning surface extraction according to a specific embodiment of the present application;

[0048] Figure 6 A schematic diagram of the structure of a device for extracting surface numerical control machining information based on B-spline surface reconstruction according to an embodiment of the present application;

[0049] Figure 7The figure is a structural example diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0051] The following describes the method and device for extracting surface CNC machining information based on B-spline surface reconstruction according to the embodiment of the present application with reference to the accompanying drawings. In view of the problem that the surface reconstruction algorithm in the related art mentioned in the above background technology is usually difficult to take into account the requirements of rapidity, smoothness and precision when processing disordered spatial discrete tool positions, the present application provides a method for extracting surface CNC machining information based on B-spline surface reconstruction, in which the tool positioning surface can be effectively reconstructed and machining information can be extracted by obtaining tool position information and a series of processing. Tool position parameterization can handle disordered scattered points, making subsequent calculations more accurate. It is flexible to determine the parameters of the B-spline surface and the quasi-uniform node vector is preferably used to ensure the quality of the surface. The accuracy index calculation is scientific, based on the sum of squared deviations combined with matrix expression and regression matrix calculation to accurately quantify the accuracy requirements. The smoothing energy index takes into account multiple factors, is defined based on the thin plate energy and is calculated through the matrix, taking into account stability and smoothness. The comprehensive index introduces adjustable accuracy and smoothness tendency to meet different needs. The linear equations are solved quickly and the results are optimal, which improves the calculation speed and fitting effect. The final extracted processing information can further optimize the surface CNC machining and effectively improve the quality and efficiency of complex surface machining. This solves the problem in related technologies that the surface reconstruction algorithm is usually difficult to balance the requirements of speed, smoothness and accuracy when processing disordered spatial discrete tool positions.

[0052] Specifically, Figure 1 A flow chart of a method for extracting surface CNC machining information based on B-spline surface reconstruction provided in an embodiment of the present application.

[0053] like Figure 1 As shown, the surface NC machining information extraction method based on B-spline surface reconstruction includes the following steps:

[0054] In step S101, the three-dimensional spatial position information of at least one curved surface machining tool position point is obtained.

[0055] It can be understood that the surface machining tool position point refers to the position of the tool center point in three-dimensional space at the moment when the tool cutting edge contacts the machined surface during the surface CNC machining process.

[0056] In the actual execution process, when the processing equipment runs according to the processing path, the measuring equipment will measure the tool position point at a specific time node or key position point, read the surface NC processing program, and obtain a series of three-dimensional spatial position information of the surface processing tool position points, which is recorded as the tool position point set:

[0057] P CL ={p k =(x k ,y k ,z k )∈R 3 |k=1,2,…,N}.

[0058] The embodiment of the present application can measure the tool position point at a specific node using a measuring device when the processing equipment is running, and can accurately obtain the position of the tool center point in three-dimensional space to form a tool position point set, thereby providing basic and critical data support for subsequent processing and ensuring the accuracy of the processing path and surface shape.

[0059] In step S102, tool location point parameterization is performed on the at least one curved surface machining tool location point based on the three-dimensional spatial position information.

[0060] It can be understood that tool point parameterization is the process of converting the surface machining tool point in three-dimensional space into a set of parameters according to certain rules and methods. These parameters can more conveniently describe the characteristics and positional relationship of the tool point in subsequent calculations and processing.

[0061] Optionally, in one embodiment of the present application, the tool position point parameterization of the at least one surface machining tool position point based on the three-dimensional spatial position information includes: projecting the at least one surface machining tool position point onto a target two-dimensional projection plane according to a preset projection vector; dividing the target two-dimensional projection plane into enclosing rectangular areas surrounding the projection points corresponding to all the tool position points; based on the two-dimensional position relationship in the target projection plane, linearly mapping the enclosing rectangular areas into a unit rectangle in the parameter domain of the B-spline surface according to a preset length relationship, so as to calculate the parameter value corresponding to each tool position point according to the mapping relationship.

[0062] In the actual execution process, the tool position points are regarded as disordered scattered points in three-dimensional space, and the tool position points are projected onto a two-dimensional projection plane according to the specified projection vector. In the projection plane, a rectangular area that can surround all the tool position projection points is delineated. The length, width and direction of the enclosing rectangle can be selected arbitrarily, but in order to obtain better accuracy and smoothness of subsequent fitting, it is recommended to optimize the length, width and direction of the enclosing rectangle so that the length and width of the enclosing rectangle are as small as possible.

[0063] Furthermore, based on the two-dimensional position relationship in the projection plane, the enclosing rectangular area is linearly mapped to the unit rectangle in the u,v parameter domain of the B-spline surface {(u,v)|u∈[0,1],v∈[0,1]} according to the length relationship, and each tool position point p is calculated according to the mapping relationship. k The corresponding parameter value (u k ,v k )∈[0,1]×[0,1], completing the parameterization of the tool position point.

[0064] The embodiment of the present application can effectively reduce the data dimension by projecting the disordered scattered points (surface machining tool positions) in the three-dimensional space to the two-dimensional projection plane, thereby simplifying the complexity of subsequent processing. Delimiting the enclosing rectangular area and optimizing its length, width and direction can preliminarily organize and organize the tool positions to a certain extent, which is conducive to improving the accuracy and efficiency of subsequent calculations. Based on the linear mapping of the two-dimensional position relationship to the unit rectangle of the B-spline surface parameter domain, the connection between the tool position and the B-spline surface parameters is cleverly established, so that each tool position can obtain the corresponding parameter value, providing convenient and accurate basic data for the subsequent construction of the tool positioning surface, precision calculation and other operations. This method can better adapt to the distribution of tool positions. Whether it is regular or irregular tool position distribution, it can effectively perform parameterization processing, thereby improving the accuracy control of the entire surface CNC machining process, the surface fitting effect and the quality of the final product, and while ensuring the accuracy, it helps to improve the calculation speed and processing efficiency, providing strong technical support for complex surface processing.

[0065] In step S103, based on the parameterized tool position point, the B-spline surface parameters of the tool positioning surface are determined.

[0066] It can be understood that the B-spline surface parameters are a mathematical model used to describe and construct a surface, and its parameters include the degree of the B-spline surface, the number of control points, the node vector, etc.

[0067] In the actual implementation process, the standard definition of B-spline surface is used to determine the tool positioning surface, and the degree and number of control points of the B-spline surface are selected, and the quasi-uniform node vector is selected to define the B-spline surface parameters.

[0068] Specifically, this application uses a B-spline surface to fit the tool position point and reconstructs it into a tool positioning surface, using the standard definition of the B-spline surface In this definition, p B is a point on the B-spline surface, (u,v) is a point p B The corresponding parameter, D ij, i=0,1,…,m, j=0,1,…n are the control points of the B-spline surface. All the control points form a control point network of size (m+1)×(n+1). N i,p (u) and N j,q (v) are the B-spline basis functions corresponding to the parameters u and v respectively. The specific form of the B-spline basis function is the node vector U = [u0, u1, …, u m+p+1 ] and V=[x0,v1,…,v n+q+1 ] and the degrees p and q of the B-spline.

[0069] In particular, in order to ensure sufficient surface smoothness, the present invention does not limit the degrees p and q of the B-spline surface, that is, the degrees p and q of the B-spline surface can be selected as any positive integer greater than or equal to 2, and the high-order surface has high-order continuity. The present application does not limit the number of control points of the B-spline surface, that is, the number of control points of the B-spline surface (m+1)×(n+1) can be arbitrarily selected. Generally speaking, the larger the number of control points, the higher the accuracy of the tool positioning surface fitting, but at the same time, the greater the calculation amount of the fitting algorithm.

[0070] Furthermore, after the degree p and q of the B-spline surface and the number m and n of the B-spline surface control points are determined, in order to ensure a uniform and smooth surface reconstruction effect, the present application preferably uses a quasi-uniform node vector, that is, the node vector U = [u0, u1, ..., u m+p+1 ] have a repetition degree p+1, that is, u0=u1=…=u p =0,u m+1 =u m+2 =…=u m+p+1 = 1, and all other internal nodes are evenly distributed between 0 and 1. Similarly, the node vector V = [v0, v1, …, v n+q+1 ] have a repetition degree q+1, that is, u0=u1=…=u q =0,u n+1 =u n+2 =…=u n+q+1 =1, and all other internal nodes are evenly distributed between 0 and 1.

[0071] The embodiment of the present application can reconstruct the tool positioning surface by adopting the standard definition of B-spline surface, which provides a solid theoretical basis for surface construction and ensures the standardization and accuracy of the surface. There is no limit on the number of B-spline surfaces, and high-order surfaces can be selected according to actual needs to obtain high-order continuity, thereby ensuring the smoothness of the surface and meeting the strict requirements for surface quality in complex surface processing. The flexible selection of the number of control points enables a trade-off between accuracy and calculation amount, which can not only improve the fitting accuracy by increasing the control points, but also appropriately reduce the control points to reduce the calculation complexity when the accuracy requirements are not particularly high. The preferred quasi-uniform node vector can effectively ensure that the surface reconstruction effect is uniform and smooth, making the reconstructed tool positioning surface more ideal in overall morphology. This method of comprehensively considering multiple factors and flexibly selecting parameters can construct a high-quality tool positioning surface, which provides reliable guarantee for the subsequent CNC machining information extraction, machining accuracy improvement and smooth progress of complex surface machining based on the surface, and greatly improves the adaptability and effectiveness of the entire surface CNC machining process.

[0072] In step S104, based on the B-spline surface parameters, the accuracy index of the tool positioning surface is determined according to the square sum of the deviations between all tool position points and the tool positioning surface to calculate a regression matrix.

[0073] It is understandable that the accuracy index of the tool positioning surface is a quantitative standard for measuring the degree of fit between the tool positioning surface and the actual tool position point. This application is defined as the sum of the squares of the deviations between all tool position points and the tool positioning surface. The deviation refers to the distance from the tool position point to the corresponding point on the tool positioning surface. The smaller the value obtained by accumulating the square of the deviation of each tool position point, the closer the tool positioning surface is to the actual distribution of the tool position points, that is, the higher the accuracy.

[0074] Optionally, in one embodiment of the present application, the calculation of the regression matrix includes: calculating the B-spline basis matrix corresponding to the parameter value of each tool position point; reshaping it into corresponding row vectors according to a preset order based on the corresponding B-spline basis matrix; and arranging the corresponding row vectors vertically to form the regression matrix.

[0075] This application is based on the knife point set P obtained in step S101 CL ={p k =(x k ,y k ,z k )∈R 3 |k=1,2,…,N} and the parameterization result (u k ,v k )∈[0,1]×[0,1], using the B-spline surface definition in step S103 Perform random scattered point fitting to construct the tool positioning surface.

[0076] Specifically, a basic feature of the tool positioning surface is that all tool positions are approximately located on the tool positioning surface, and the tool position p k The parameters on the B-spline surface are (u k ,v k ) B,k The distance is as small as possible. This basic feature also describes the accuracy requirement of the tool positioning surface. This application uses the "sum of squares of deviations" indicator commonly used in mathematics to quantitatively describe this accuracy requirement. For the tool position point p k , and its deviation from the tool positioning surface can be expressed as:

[0077]

[0078] Therefore, the quantitative accuracy index of the tool positioning surface is defined as:

[0079]

[0080] Furthermore, in order to facilitate the rapid calculation of surface fitting, the present application expresses both the tool location point set and the control point set in matrix form. The tool location point set is recorded in matrix form, and the matrix form is as follows:

[0081]

[0082] The size of the tool location matrix is ​​(N×3). ij , i=0,1,…,m,j=0,1,…n is (m+1)×(n+1). In order to fully express the control point set using a two-dimensional matrix, the i and j dimensions of the control point network are reshaped in the order of i first and then j as the first dimension of the control point matrix, and the spatial coordinates of the control points are used as the second dimension of the control point matrix. Therefore, the control point matrix can be written as:

[0083] D [(m+1)×(n+1)×3]

[0084] =[D 00 T D 10 T … D m0 T D 01 T D 11 T … D m1 T … D 0n T D 1n T … D mn T ]T

[0085] The size of the control point matrix is ​​[(m+1)×(n+1)]×3.

[0086] In some embodiments, the tool position matrix and the control point matrix can be used to represent the accuracy index of the tool positioning surface as E=‖P CL -AD‖ 2 , the matrix expression of this accuracy index is equivalent to the above definition, where matrix A is called the regression matrix, which contains the information of the tool position parameterization and the information of the B-spline surface definition. The size of the regression matrix A is N×[(m+1)×n+1]. The following describes how to calculate the regression matrix A: First, for each tool position pk, the B-spline basis matrix corresponding to the parameter value pk is calculated as:

[0087]

[0088] The size of the matrix is ​​(m+1)×(n+1); secondly, each two-dimensional B-spline basis matrix N k Reshape it into a row vector of 1×[(m+1)×(n+1)] in the order of rows first and columns. This process corresponds to the reshape process of the control point network above. The reshaped row vector is:

[0089]

[0090] Finally, each knife point p k The reshaped row vectors are arranged vertically to form the regression matrix:

[0091]

[0092] The embodiment of the present application can determine the accuracy index by calculating the sum of the squares of the deviations between the tool position point and the tool positioning surface. This method quantifies the deviation into a specific value, which can intuitively and accurately reflect the degree of fit between the tool positioning surface and the actual tool position point, so that the accuracy evaluation has a clear and objective standard. Taking the sum of squares of deviations as the basis, the problem of positive and negative deviations offsetting each other is avoided, and the overall deviation of all tool position points is considered more comprehensively. The characteristic that the smaller the value, the higher the accuracy provides a clear direction for optimizing the tool positioning surface. When adjusting the surface parameters or improving the processing strategy, the adjustment effect can be quickly judged based on this indicator, which effectively improves the optimization efficiency. At the same time, high-precision fitting helps to make the tool motion trajectory more in line with the actual processing requirements in subsequent CNC processing, reduce processing errors, and improve product quality. It also provides reliable data support and decision-making basis for quality control and process improvement of the entire processing process, and effectively guarantees the accuracy and stability of complex surface processing.

[0093] In step S105, the smoothing energy index of the tool positioning surface is determined to calculate a smoothing energy matrix.

[0094] It is understandable that the smoothing energy index is a quantitative index used to measure the smoothness of the tool positioning surface. From a physical or mathematical perspective, it reflects the smoothness and continuity of the surface. A smooth surface can make the tool movement smoother during the machining process, reduce tool vibration and wear, and is very important for machining accuracy and surface quality.

[0095] On the one hand, the high surface quality requirements of surface CNC machining put forward requirements on the smoothness of tool positioning surfaces; on the other hand, this application performs B-spline surface fitting for disordered scattered points. If the distribution of scattered points is uneven, the surface fitting will be unstable in some areas due to the small number of scattered points. Adding constraints other than accuracy indicators will help solve the instability. Therefore, this application proposes a smoothness index based on the energy description of tool positioning surfaces.

[0096] In some cases, for a general free-form surface, its smoothness is considered from the energy perspective. The thin plate bending energy of the free-form surface can be expressed as Q = ∫ s (κ1 2 +κ2 2 )dA, where κ1 and κ2 are the principal curvatures of the surface, dA is the differential area element on the surface, the energy of the surface is directly related to the curvature of the surface, and minimizing the bending energy of the surface often means the optimal smoothness. The definition of the B-spline surface used in this application has been described in step S103, so the tool positioning surface is composed of the control point network D ij ,i=0,1,…,m,j=0,1,…n completely determines. In order to quantitatively describe the smoothness of the tool positioning surface, this application is inspired by the "thin plate bending energy" and proposes a tool positioning surface smoothness energy index that can be calculated through a control point network.

[0097] The formula for defining the smoothing energy index of the tool positioning surface in this application is as follows:

[0098]

[0099] In the formula represents the "energy" of each control point in the control point network, where the control point D i,j The second-order difference in both u and v directions is and To approximate the "principal curvature" of the local control point network. Control point D i,j The second-order difference at is calculated by its position with two adjacent points on the control point network, and the second-order difference in the u direction is The second-order difference in the v direction is If the control point D i,j If the control point is at the edge of the control point network, the "principal curvature" in the corresponding direction is considered to be zero. After excluding the edge control points, the smoothing energy index of the tool positioning surface can be expressed as

[0100] Specifically, a significant advantage of the smoothing energy index Q of the tool positioning surface proposed in this application is that Q is the energy index of all control points D i,j The quadratic form, that is, Q can be expressed as all control points D i,j is a quadratic homogeneous polynomial of variables. In order to facilitate the rapid calculation of surface fitting, the present application expresses the smoothing energy index Q as a quadratic matrix representation Q=D T QD, according to the reshaping relationship of the control point matrix D and the above smoothing energy index expression The smoothing energy matrix Q can be calculated and obtained. The matrix Q is a symmetric positive definite matrix with a size of [(m+1)×(n+1)]×[(m+1)×(n+1)].

[0101] The embodiments of the present application can effectively reduce the vibration and wear of the tool during movement by ensuring the smoothness of the curved surface, greatly improve the processing accuracy, and make the surface quality of the processed product more delicate and uniform. From the perspective of the production process, this indicator provides a reliable basis for quality control in the processing process, helps to predict and optimize possible processing problems caused by uneven curved surfaces in advance, thereby reducing the scrap rate and improving production efficiency. At the same time, it also provides a useful reference for the reasonable selection and use of tools, extending the service life of tools and reducing production costs.

[0102] In step S106, a comprehensive index is determined according to the accuracy index and the smoothing energy index, so as to generate a tool positioning surface reconstruction problem based on the comprehensive index.

[0103] It is understandable that the tool positioning surface reconstruction problem is a mathematical problem description based on comprehensive indicators. It is usually presented in the form of an optimization problem, such as minimizing the various contents contained in the comprehensive indicators (such as accuracy indicators and smoothing energy indicators), determining the optimal parameters of the tool positioning surface (such as the control point position and node vector of the B-spline surface, etc.), so as to achieve the reconstruction of the tool positioning surface, so that it has good smoothness while meeting the accuracy requirements, and providing a high-quality tool positioning surface foundation for subsequent CNC machining.

[0104] Specifically, the comprehensive accuracy index and the smoothing energy index, this application defines the comprehensive index of the tool positioning surface as f(D) = E + λQ = ‖P CL -AD‖ 2 +λD TQD, the definition introduces a proportional factor λ to adjust the fitting process's tendency toward accuracy and smoothness. Under the definition of the comprehensive index of the tool positioning surface, the tool positioning surface reconstruction can be expressed as the following mathematical problem:

[0105]

[0106] The embodiment of the present application can comprehensively consider the precision index and the smoothness energy index, define the comprehensive index of the tool positioning surface, and flexibly adjust the tendency of the fitting process to precision and smoothness by introducing the proportional factor λ, so as to balance the two requirements and avoid the situation of focusing on one side and ignoring the other. The tool positioning surface reconstruction problem is constructed with this comprehensive index and presented in the form of an optimization problem, clearly and explicitly focusing on determining the optimal parameters of the tool positioning surface by minimizing the relevant content, such as the control point position, node vector, etc. In this way, the reconstructed tool positioning surface can not only accurately fit the tool position point and meet the precision requirements, but also have good smoothness, creating a high-quality foundation for subsequent CNC machining, helping to improve the quality and efficiency of the entire CNC machining, reducing machining errors caused by insufficient surface precision or insufficient smoothness, and ensuring that the processed products meet high standards.

[0107] In step S107, the tool positioning surface reconstruction problem is solved to obtain a tool positioning surface reconstruction structure and extract surface NC machining information.

[0108] It can be understood that the tool positioning surface reconstruction structure refers to the structure composed of the specific shape and corresponding parameters of the tool positioning surface determined after solving the tool positioning surface reconstruction problem, and the surface CNC machining information is further analyzed and extracted from the obtained tool positioning surface reconstruction structure, which is data and information closely related to the surface CNC machining process.

[0109] In the actual implementation process, since the smoothing energy matrix Q is a symmetric positive definite matrix, the mathematical problem proposed in step S106 has an analytical solution, and the analytical solution is the optimal solution that minimizes the comprehensive index. Solving the mathematical problem and setting the comprehensive index gradient to 0, we can obtain the linear equation system (A T A+λQ)D=A T P CL , then the optimal analytical solution of the control point matrix is ​​D = (A T A+λQ) -1 A T P CL .

[0110] Specifically, the final calculation process of the tool positioning surface reconstruction method proposed in this application is the analytical solution of a set of linear equations. Therefore, classical mathematical methods such as QR decomposition can be applied to quickly solve them. This makes the proposed tool positioning surface reconstruction method have a significant computing speed advantage compared to other surface reconstruction technologies that require iterative solutions.

[0111] The reconstruction result of the tool positioning surface reconstruction method proposed in this application theoretically reaches the optimal solution with the minimum comprehensive index, which makes the proposed tool positioning surface reconstruction method have significant advantages in fitting error and smoothness. Although the inherent contradiction between fitting error and smoothness in surface reconstruction cannot be avoided, the introduced proportional factor can be used to adjust the fitting process's tendency towards accuracy and smoothness to meet actual usage needs.

[0112] Furthermore, after the control point solution is completed, the tool positioning surface reconstruction result can be checked. In terms of accuracy, each tool position point p can be calculated. k Deviation from the corresponding point on the tool positioning surface The maximum value and average value of the deviation are used as the accuracy inspection results of the tool positioning surface reconstruction. In terms of smoothness, the tool positioning surface image can be drawn to directly observe the smoothness of the surface, or quantitative indicators such as surface slope, curvature, bending energy, etc. can be used to check the smoothness of the surface.

[0113] It should be noted that the discrete tool position information in the machining program indicates that when the tool is located at these discrete tool position locations and their connecting lines, the machining of complex surfaces can be achieved. In contrast, the present invention reconstructs a complete and continuous tool positioning surface in the form of a B-spline surface, and when the tool is located at any position on the tool positioning surface, the machining of complex surfaces can be achieved. Therefore, the tool positioning surface actually contains richer surface CNC machining information.

[0114] The following introduces several types of surface CNC machining information extraction and usage methods by way of examples:

[0115] First, use the calculation method of the B-spline surface normal to extract the normal information of the tool positioning surface: According to the expression of the B-spline surface The tangent vector along the u and v directions of any point on it can be calculated Calculate the cross product of the two tangent vectors to get the normal vector The normal information extracted from the tool positioning surface can be further used to optimize the tool posture in surface CNC machining. For example, the tool direction can always be along the normal of the tool positioning surface, or the tool direction can always maintain a certain inclination angle with the normal of the tool positioning surface.

[0116] Second, use the calculation method of B-spline surface curvature to extract the curvature information of the tool positioning surface: According to the expression of B-spline surface The curvature information of any point on it can be calculated. For example, the curvatures of a point on a B-spline surface along the u and v directions are and The curvature along other specified directions is Where d is a unit vector in the specified direction. In addition, the principal curvature and Gaussian curvature at the point can also be calculated. The curvature information extracted from the tool positioning surface can be further used for surface CNC machining speed planning. For example, the speed planning process can limit a smaller feed speed in the large curvature area to ensure the surface quality of the surface machining, and can also apply a larger feed speed in the small curvature area to improve the efficiency of surface machining.

[0117] The present application is described in detail below with reference to a specific embodiment.

[0118] 1) Read a free-form surface NC machining program to obtain the surface machining tool position points. In this embodiment, the number of tool position points is 1960.

[0119] 2) Complete the parameterization of the tool position point. The process of obtaining the tool position point and its parameterization is as follows: Figure 2 As shown in the figure, the tool position points are regarded as disordered scattered points in three-dimensional space, and the tool position points are projected onto a two-dimensional projection plane according to the specified projection vector. In the projection plane, an enclosing rectangular area that can enclose all the tool position projection points is delineated. Based on the two-dimensional position relationship in the projection plane, the enclosing rectangular area is linearly mapped to the unit rectangle in the u,v parameter domain of the B-spline surface {(u,v)|u∈[0,1],v∈[0,1]} according to the length relationship, and each tool position point p is calculated according to the mapping relationship. k The corresponding parameter value (u k ,v k )∈[0,1]×[0,1], completing the parameterization of the tool position point.

[0120] 3) Define the B-spline surface parameters of the tool positioning surface, and select the degree of the B-spline surface p = 3 and q = 3. The bicubic B-spline surface defined in this way can achieve the continuity of C2 and meet the continuity requirements of general CNC machining. The number of control points of the B-spline surface is m = 10, n = 10, so the size of the control point network is 11 × 11. Select a quasi-uniform node vector, that is, the node vector U = [0,0,0,0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1,1,1,1], the node vector V = [0,0,0,0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1,1,1,1].

[0121] 4) Calculate the regression matrix according to the accuracy index and calculation method of the tool positioning surface defined in S104

[0122] 5) Calculate the smoothing energy index according to the smoothing energy index and calculation method of the tool positioning surface defined in step S105 and the smoothing energy matrix Q. Figure 3 The control point D in the control point network is shown in i,j Schematic diagram of the calculation of "energy" at, where the control point D i,j The second-order difference at is calculated by its position with two adjacent points on the control point network, and the second-order difference in the u direction is The second-order difference in the v direction is

[0123] 6) Select the proportional factor λ=0.01, and obtain the comprehensive index of accuracy and smoothness of the tool positioning surface as E+0.01Q.

[0124] 7) Solve the linear equations (A T A+λQ)D=A T P CL , obtain the optimal solution of the control point matrix, and realize the reconstruction of the tool positioning surface. After inspection, the maximum position deviation of the reconstructed tool positioning surface in this embodiment and the original tool position point is 0.076mm, and the average position deviation is 0.0081mm. The tool positioning surface reconstructed in this embodiment is as follows Figure 4 As shown, it can be seen that it has good smoothness.

[0125] 8) Extract normal information based on the reconstructed tool positioning surface, Figure 5 It is a schematic diagram of normal information extraction, with normal vectors marked at some locations on the tool positioning surface.

[0126] According to the method for extracting surface CNC machining information based on B-spline surface reconstruction proposed in the embodiment of the present application, the tool positioning surface can be effectively reconstructed and the machining information can be extracted by obtaining the tool position point information and a series of processing. Tool position point parameterization can handle disordered scattered points, making subsequent calculations more accurate. It is flexible to determine the parameters of the B-spline surface and to select quasi-uniform node vectors to ensure the surface quality. The precision index calculation is scientific, based on the squared deviation combined with matrix expression and regression matrix calculation to accurately quantify the precision requirements. The smoothing energy index considers multiple factors, based on the thin plate energy definition and through matrix calculation, taking into account stability and smoothness. The comprehensive index introduces adjustable precision and smoothness tendency to meet different needs. The linear equation system is solved quickly and the results are optimal, which improves the calculation speed and fitting effect. The final extracted machining information can further optimize the surface CNC machining and effectively improve the quality and efficiency of complex surface machining.

[0127] Next, a surface CNC machining information extraction device based on B-spline surface reconstruction proposed in accordance with an embodiment of the present application will be described with reference to the accompanying drawings.

[0128] Figure 6 It is a block diagram of a surface CNC machining information extraction device based on B-spline surface reconstruction according to an embodiment of the present application.

[0129] like Figure 6 As shown, the surface NC machining information extraction device 10 based on B-spline surface reconstruction includes: an acquisition module 100, a parameterization module 200, a parameter determination module 300, a first calculation module 400, a second calculation module 500, a generation module 600 and an extraction module 700.

[0130] Specifically, the acquisition module 100 is used to acquire the three-dimensional spatial position information of at least one curved surface machining tool position point.

[0131] The parameterization module 200 is used to parameterize the at least one surface machining tool location point based on the three-dimensional spatial position information.

[0132] The parameter determination module 300 is used to determine the B-spline surface parameters of the tool positioning surface based on the parameterized tool position point.

[0133] The first calculation module 400 is used to determine the accuracy index of the tool positioning surface based on the B-spline surface parameters and the sum of squares of deviations between all tool position points and the tool positioning surface to calculate a regression matrix.

[0134] The second calculation module 500 is used to determine the smoothing energy index of the tool positioning surface to calculate the smoothing energy matrix generation module.

[0135] The generation module 600 is used to determine a comprehensive index according to the accuracy index and the smoothing energy index, so as to generate a tool positioning surface reconstruction problem based on the comprehensive index.

[0136] The extraction module 700 is used to solve the tool positioning surface reconstruction problem to obtain the tool positioning surface reconstruction structure and extract the surface numerical control machining information.

[0137] Optionally, in one embodiment of the present application, the parameterization module 200 includes: a projection unit, a zoning unit and a calculation unit.

[0138] Wherein, the projection unit is used to project the at least one curved surface machining tool position point onto a target two-dimensional projection plane according to a preset projection vector.

[0139] The area division unit is used to divide the target two-dimensional projection plane into enclosing rectangular areas that enclose all the projection points corresponding to all the tool position points.

[0140] A calculation unit is used to linearly map the enclosing rectangular area to a unit rectangle in the parameter domain of the B-spline surface according to a preset length relationship based on the two-dimensional position relationship in the target projection plane, so as to calculate the parameter value corresponding to each tool position point according to the mapping relationship.

[0141] Optionally, in one embodiment of the present application, the parameter determination module 300 includes: using the standard definition of the B-spline surface to determine the tool positioning surface, and selecting the degree and number of control points of the B-spline surface, and selecting a quasi-uniform node vector to define the B-spline surface parameters.

[0142] Optionally, in one embodiment of the present application, the first calculation module 400 includes: a calculation unit, a reshaping unit and a regression matrix construction unit.

[0143] The calculation unit is used to calculate the B-spline basis matrix corresponding to the parameter value of each tool position point.

[0144] A reshaping unit is used to reshape the corresponding B-spline basis matrix into a corresponding row vector according to a preset order.

[0145] The regression matrix construction unit is used to arrange the corresponding row vectors vertically to form the regression matrix.

[0146] Optionally, in one embodiment of the present application, the calculation formula of the smoothing energy index is:

[0147]

[0148] in, is the control point D with coordinates i, j in the control point network i,j The second-order difference along the parameter u direction at the position is calculated as follows: is the control point D with coordinates i, j in the control point network i,j The second-order difference along the direction of parameter v at position is calculated as follows:

[0149] Optionally, in one embodiment of the present application, the tool positioning surface reconstruction problem is:

[0150]

[0151] Among them, P CL is the tool point set matrix, A is the regression matrix, Q is the smoothing energy matrix, λ is the proportional factor, and D is the control point matrix to be solved.

[0152] It should be noted that the aforementioned explanation of the embodiment of the method for extracting surface CNC machining information based on B-spline surface reconstruction is also applicable to the device for extracting surface CNC machining information based on B-spline surface reconstruction in this embodiment, and will not be repeated here.

[0153] According to the surface CNC machining information extraction device based on B-spline surface reconstruction proposed in the embodiment of the present application, the tool positioning surface can be effectively reconstructed and the machining information can be extracted by obtaining the tool position point information and a series of processing. Tool position point parameterization can process disordered scattered points, making subsequent calculations more accurate. Determining the B-spline surface parameters is flexible and the quasi-uniform node vector is selected to ensure the surface quality. The precision index calculation is scientific, based on the squared deviation combined with matrix expression and regression matrix calculation to accurately quantify the precision requirements. The smoothing energy index considers multiple factors, based on the thin plate energy definition and through matrix calculation, taking into account stability and smoothness. The comprehensive index introduces adjustable precision and smoothness tendency to meet different needs. The linear equation system is solved quickly and the results are optimal, which improves the calculation speed and fitting effect. The final extracted machining information can further optimize the surface CNC machining and effectively improve the quality and efficiency of complex surface machining.

[0154] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0155] A memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .

[0156] When the processor 702 executes the program, the method for extracting surface numerical control machining information based on spline surface reconstruction provided in the above embodiment is implemented.

[0157] Furthermore, the electronic device further comprises:

[0158] The communication interface 703 is used for communication between the memory 701 and the processor 702 .

[0159] The memory 701 is used to store computer programs that can be executed on the processor 702 .

[0160] The memory 701 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0161] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0162] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.

[0163] The processor 702 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0164] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for extracting surface CNC machining information based on spline surface reconstruction.

[0165] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned method for extracting surface numerical control machining information based on spline surface reconstruction.

[0166] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0167] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0168] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0169] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0170] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0171] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0172] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0173] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for extracting surface NC machining information based on B-spline surface reconstruction, characterized in that: The following steps are involved: Acquire three-dimensional spatial position information of at least one surface machining tool position point; Parameterizing the at least one curved surface machining tool position point based on the three-dimensional spatial position information; Based on the parameterized tool position point, the B-spline surface parameters of the tool positioning surface are determined; Based on the B-spline surface parameters, the accuracy index of the tool positioning surface is determined according to the square sum of the deviations between all tool position points and the tool positioning surface to calculate the regression matrix; Determining a smoothing energy index of the tool positioning surface to calculate a smoothing energy matrix; Determine a comprehensive index according to the accuracy index and the smoothing energy index, so as to generate a tool positioning surface reconstruction problem based on the comprehensive index; The tool positioning surface reconstruction problem is solved to obtain the tool positioning surface reconstruction structure and extract the surface numerical control machining information.

2. The method according to claim 1, characterized in that The parameterizing of the at least one curved surface machining tool position point based on the three-dimensional spatial position information comprises: Projecting the at least one curved surface machining tool position point onto a target two-dimensional projection plane according to a preset projection vector; In the target two-dimensional projection plane, a rectangular area is divided to surround the projection points corresponding to all the tool position points; Based on the two-dimensional position relationship in the target projection plane, the enclosing rectangular area is linearly mapped to a unit rectangle in the parameter domain of the B-spline surface according to a preset length relationship, so as to calculate the parameter value corresponding to each tool position point according to the mapping relationship.

3. The method according to claim 1, characterized in that The step of determining the B-spline surface parameters of the tool positioning surface comprises: The tool positioning surface is determined using a standard definition of a B-spline surface, and the degree and number of control points of the B-spline surface are selected, as well as a quasi-uniform node vector, to define the B-spline surface parameters.

4. The method according to claim 1, characterized in that: The calculation of the regression matrix includes: Calculate the B-spline basis matrix corresponding to the parameter value of each tool position point; Reshape into corresponding row vectors based on the corresponding B-spline basis matrix according to a preset order; The corresponding row vectors are arranged vertically to form the regression matrix.

5. The method according to claim 1, characterized in that The calculation formula of the smoothing energy index is: in, is the control point D with coordinates i, j in the control point network i,j The second-order difference along the parameter u direction at the position is calculated as follows: is the control point D with coordinates i, j in the control point network i,j The second-order difference along the direction of parameter v at position is calculated as follows:

6. The method according to claim 5, characterized in that The tool positioning surface reconstruction problem is: Among them, P CL is the tool point set matrix, A is the regression matrix, Q is the smoothing energy matrix, λ is the proportional factor, and D is the control point matrix to be solved.

7. A device for extracting surface numerical control machining information based on B-spline surface reconstruction, characterized in that: include: An acquisition module, used for acquiring three-dimensional spatial position information of at least one curved surface machining tool position point; A parameterization module, used for parameterizing the tool position point of the at least one curved surface machining tool position point based on the three-dimensional spatial position information; A parameter determination module is used to determine the B-spline surface parameters of the tool positioning surface based on the parameterized tool position point; A first calculation module is used to determine the accuracy index of the tool positioning surface based on the B-spline surface parameters and the square sum of the deviations between all tool position points and the tool positioning surface to calculate a regression matrix; A second calculation module is used to determine the smoothing energy index of the tool positioning surface to calculate the smoothing energy matrix; A generation module, used to determine a comprehensive index according to the accuracy index and the smoothing energy index, so as to generate a tool positioning surface reconstruction problem based on the comprehensive index; The extraction module is used to solve the tool positioning surface reconstruction problem to obtain the tool positioning surface reconstruction structure and extract the surface numerical control machining information.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for extracting surface numerical control machining information based on B-spline surface reconstruction as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method for extracting surface numerical control machining information based on B-spline surface reconstruction as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that The computer program is executed to implement the method for extracting surface numerical control machining information based on B-spline surface reconstruction as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for generating numerical-control side milling machining tool path for complicated curved surfaces

    CN102637216A

  • NURBS curve surface fairing generation method in vehicle shell modeling

    CN115358009A

  • Optical curved surface construction method based on B-spline

    CN116880060A

  • Method of reconstructing aspheric surface equations from measurements

    US20140188959A1

Cited By

  • Method for calculating scattering field of electrically large-size scatterer

    CN120974563A