Complex curve interpolation method based on numerical control machine tool
By using the quadratic Bezier curve algorithm that detects tangent information on the CNC system to perform curve segmentation fitting, the problem that the CNC system cannot directly realize high-precision complex curve interpolation is solved, the machining accuracy and efficiency are improved, and the smooth continuity and quality of the machining path are ensured.
Patent Information
- Application Number
- CN202510570907.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-05
AI Technical Summary
The existing CNC systems have limited capabilities in complex logic operations, making it difficult to directly realize high-precision complex curve interpolation, resulting in a decrease in processing accuracy and quality, and an increase in complexity of high-order operations, affecting processing efficiency and flexibility.
The quadratic Bezier curve algorithm based on detection tangent information is adopted to realize high-quality tangent connection of multi-segment curves by performing curve segmentation fitting on the CNC system, avoiding the computational complexity and accuracy losses caused by high-order operations.
It significantly improves the interpolation accuracy and operating efficiency of the CNC system, ensures smooth and continuous processing paths, improves the surface quality and processing adaptability of complex contours, solves the problem of curve connection, reduces the computational complexity, and enhances the reliability of the processing process.
Smart Images

Figure CN120428657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerical control machine tool processing, and in particular to a complex curve interpolation method based on numerical control machine tools. Background Art
[0002] In the field of modern machining, CNC machine tools are the core equipment for high-precision, high-efficiency machining. Their performance directly determines the machining quality and production efficiency of parts. As the manufacturing industry develops towards high-end and precision, the demand for complex curved parts (such as aerospace components, precision molds, and automotive panels) is increasing. This places higher demands on the computing power, trajectory planning accuracy, and real-time control performance of CNC systems.
[0003] However, the CNC systems used in existing machine tools have limited capabilities for complex logical operations, with their core functions still primarily focused on basic motion control and simple interpolation. Faced with complex machining logic, these systems struggle to handle it themselves, forcing the bulk of the logical operations to be handled by the machine tool's host computer. Consequently, the input to the machine tool's CNC system is merely pre-calculated position information, rather than a complete instruction set capable of directly executing complex logical operations within the CNC system. This architecture prevents the CNC system from making autonomous real-time decisions, increases data transmission latency, slows system response, and, to a certain extent, reduces the flexibility and adaptability of the machining process.
[0004] In addition, in order to achieve higher precision, many advanced interpolation algorithms require a large number of floating-point operations or matrix solutions, which greatly increases the computational complexity and requires high-order operations. However, due to hardware architecture limitations (such as low-computing-power embedded processors), limited memory resources, and strict real-time constraints, CNC systems often struggle to efficiently perform such high-order operations, resulting in increased delays in data transmission and processing during machining, affecting machining efficiency. Furthermore, in practical applications, it is difficult to directly implement high-precision complex curve interpolation tasks within the CNC system. The consequence is that the machining trajectory deviates from the theoretical model, leading to increased contour errors and worsening surface roughness, seriously affecting the molding quality of high-value-added parts. Summary of the Invention
[0005] The present invention aims to provide a complex curve interpolation method based on CNC machine tools to solve the problem that the existing CNC system cannot directly implement high-precision complex curve interpolation tasks, which affects the processing accuracy and processing quality.
[0006] To achieve the above object, the present invention adopts the following technical solution: a complex curve interpolation method based on CNC machine tools, comprising:
[0007] The principles and advantages of this solution are:
[0008] This solution provides a method for implementing complex curve fitting on CNC machine tools. Based on the use of detected tangent lines in the same plane, combined with a quadratic Bezier curve algorithm, segmented curve fitting is performed. Through intelligent segmentation processing, high-quality tangent connections between multiple segments are achieved, ultimately achieving the goal of complex continuous curve interpolation on CNC systems. The core of this solution is to use measured tangent information to guide the construction of quadratic Bezier curves, maintaining the geometric continuity of curve transitions while avoiding the computational complexity and precision loss associated with higher-order curve operations.
[0009] Compared to traditional methods, this solution significantly improves the interpolation accuracy and operational efficiency of the CNC system by optimizing the mathematical processing of curve junctions while ensuring a smooth and continuous machining path. This allows complex contour machining to achieve excellent surface quality while maintaining a stable machining cycle. This breakthrough not only solves the long-standing curve connection problem in CNC programming, which requires computing work performed by a host computer, but also improves the reliability of the machining process by reducing computational complexity, providing a technical solution for high-precision complex curve machining that combines theoretical innovation with practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 The present invention is a flow chart of a complex curve interpolation method based on a CNC machine tool.
[0011] Figure 2 This is an example display diagram of a complex curve interpolation method based on CNC machine tools in the present invention.
[0012] Figure 3 This is an illustration of the tangent sorting method of a complex curve interpolation method based on a CNC machine tool according to the present invention.
[0013] Figure 4 This is a diagram illustrating the processing rules for the first tangent line and the last tangent line tangent point of a complex curve interpolation method based on a CNC machine tool of the present invention. DETAILED DESCRIPTION
[0014] The following is further described in detail through specific implementation methods:
[0015] Example 1
[0016] In this embodiment, a complex curve interpolation method based on a CNC machine tool is based on the use of the tangent line of the same plane obtained by detection, combined with the quadratic Bezier curve algorithm to carry out curve segment fitting operations, which can connect multiple curves tangentially, and finally achieve the purpose of realizing complex continuous curve interpolation on the CNC system. This method effectively avoids the key problems such as the difficulty in controlling the accuracy and the complexity and difficulty of programming brought about by high-order operations in traditional interpolation methods. Through this innovative method, not only can multiple curves be accurately connected in a tangential form, ensuring the smoothness and continuity of the curve connection, but also the accuracy and surface quality of complex continuous curve processing can be significantly improved, processing errors can be reduced, production efficiency can be improved, and the adaptability and reliability of CNC machine tools in handling complex curve processing tasks can be enhanced. In this embodiment, as shown in the attached Figure 1 As shown, the following steps are included:
[0017] S1, obtain n tangent information in the same plane through CNC machine tool detection, n ≥ 2, denoted as L n ; Sort the n tangent lines according to the sorting method, and use the set processing rules to obtain the corresponding intersection point M i and tangent point p i information.
[0018] In this embodiment, combined with the Figure 2 As shown, the tangent information of the intersection curve of the specified section and the surface is obtained by detection using a CNC machine tool, wherein the obtained tangent needs to meet specific requirements, that is, any two adjacent tangents in the same plane are neither parallel to each other nor intersect to form an intersection point, and the number of tangents is not less than n, where n≥2. At the same time, the tangent direction must meet the set requirements to ensure that the direction of the complex curve can be accurately depicted and the subsequent curve fitting work can be done.
[0019] The tangent lines of the same plane obtained by detection can be expressed in the form of a linear parametric equation, which is expressed as L(a) = p + a·v, (Equation 1); where a is a parameter; p represents the tangent point of the tangent line to clarify the specific position where the tangent line touches the curve; v is the tangent direction, which is used to indicate the direction of the tangent line in the plane. At the same time, the tangent point of the n tangent lines obtained is recorded as P i By substituting the corresponding parameter values, tangent point coordinates, tangent vector and other specific data, according to the operation rules of formula 1, the tangent intersection point is accurately calculated to obtain the tangent intersection point.
[0020] In actual operation, we first use such a straight line parametric equation to calculate the intersection points between the tangent lines.
[0021] In this embodiment, the n tangent lines obtained according to the requirements are denoted as L1, L2, ..., L n , as attached Figure 2As shown in Figure 1. The tangent point of the tangent line requires that three adjacent tangent lines intersect in sequence, and the intersection point is recorded as M i (i=1,2,..,n-1), that is, each tangent line L i and the next tangent line L i+1 The intersection point is M i , expressed as L1∩L2,L2∩L3,...,L i-1 ∩L i ,i∈n, as shown in the attached Figure 2 As shown in Figure 2.
[0022] At the same time, the sorting method is that the tangent direction is the direction of the normal of the tangent point on the curve rotated 90° clockwise or counterclockwise in the plane, and the overall tangent direction is maintained. That is, the direction of the tangent direction is the direction of the curve normal rotated 90° clockwise or counterclockwise, and the direction of the vector formed by the intersection of two adjacent tangents must be consistent with the direction of the tangent line where the two intersections are located, that is, vector M i M i+1 With L i+1 The tangent direction is in the same direction, that is, the intersection point M i to M i+1 The vector direction must be aligned with the tangent line L i+1 The direction is consistent. Figure 3 To further explain, the sorting rule is that the tangent point of the tangent requires that the three adjacent tangents L1, L2, and L3 meet the following conditions: the intersection point of L1 and L2 is M1, and the intersection point of L2 and L3 is M2. The tangent direction of the tangent is the direction of the normal of the tangent point on the curve rotated 90° clockwise or counterclockwise in the plane. The vector M1M2 is in the same direction as the tangent direction of L2 to ensure the orderly adjacent arrangement of the tangents and the smooth transition of adjacent curve segments. The n tangents obtained are arranged in this way.
[0023] Then determine the tangent point p of the tangent line i , as attached Figure 2 As shown in Figure 3, the tangent point p i Located in L i In this embodiment, the tangent point p is determined by using the set processing rules according to the different positions of the tangent arrangement. i information.
[0024] In this embodiment, the processing rule is that when the tangent is L1 and L n When the first and last tangent lines are detected, the rules for handling the tangent points need to be flexibly set according to the actual situation. In other words, it is necessary to determine the reliability of the tangent points detected by the CNC machine tool.
[0025] When the reliability of the detected tangent point is high, that is, the accuracy is high and the error is small, the tangent point obtained by the detection can be directly used as the control point of the fitting quadratic Bezier curve to construct the curve model.
[0026] When the reliability of the detected tangent point is low, it is determined to be unreliable. Since there is no midpoint between the first and last tangent points to calculate the tangent point, the average value needs to be used to calculate the tangent point position when the tangent point reliability is low. Then, it is necessary to use the relevant information of other tangent intersections in the middle to determine the new tangent point. In this embodiment, as shown in the attached figure, Figure 4 As shown, first calculate the sum of the distances between the two adjacent points of the other tangent intersections in the middle, recorded as S. When there are n tangents, calculate their average distance as According to this average distance, the distance from the tangent point of the first tangent and the last tangent to the intersection point is distributed. That is, this average distance is distributed to the distance from the tangent point of the first tangent and the last tangent to the adjacent intersection points, thereby forming new tangent points. These new tangent points are used as control points of the quadratic Bezier curve to ensure that under different detection accuracy conditions, the construction of the quadratic Bezier curve can be as close to the real curve shape as possible.
[0027] When the tangent is divided by L1 and L n When other intermediate tangents other than the one in the figure are used for fitting a curve similar to a circle using a quadratic Bezier curve, the tangent points of each tangent are determined according to specific processing rules to meet the requirements of fitting a curve similar to a circle using a quadratic Bezier curve. In this embodiment, the intersection point M of the two adjacent tangents is used as the intersection point M of the two adjacent tangents. i and M i+1 The midpoint of the tangent line is L i+1 The tangent point of this tangent line. Similarly, the midpoint between each two adjacent tangent intersections is obtained as the tangent point, as shown in the following figure. Figure 2 As shown in Figure 4, this eliminates random errors in the tangent points detected by the CNC machine tool. This precise tangent point determination provides a more reliable data foundation for subsequent quadratic Bezier curve construction, significantly reducing curve deviations caused by tangent point errors when fitting a curve that approximates a circle.
[0028] S2, according to the number of tangents, the corresponding intersection points and tangent points are used as control points of the quadratic Bezier curve segment, and curve fitting is performed.
[0029] In this embodiment, the calculated tangent point of two adjacent tangents and the intersection of these two tangents constitute the three control points of the quadratic Bezier curve, and curve fitting is performed separately according to the quadratic Bezier curve formula. In this embodiment, the quadratic Bezier curve algorithm is used to perform complex curve fitting. For orderly arranged tangents, fitting processing is performed separately according to the number of tangents and the fitting method.
[0030] When n=2, that is, when there are only two tangent segments, two adjacent tangents generate a quadratic Bezier curve. In this embodiment, the tangent points of the two adjacent tangents L1 and L2 are set to P1 and P2 respectively, and the intersection point of the tangents is M1. According to the quadratic Bezier curve formula B(t)=(1-t) 2 P1+2t(1-t)M1+t 2 P2,t∈[0,1], fit the curve.
[0031] When the number of tangents is large, that is, n>2, every two adjacent tangents (L i ,L i+ 1) Generate a quadratic Bezier curve. Therefore, for n tangent lines, there will be n-1 quadratic Bezier curves. Curve fitting is then performed segment by segment based on the intersection of each tangent line, resulting in multiple quadratic Bezier curves. The three control points of each Bezier curve are determined by the corresponding tangent and intersection points. Multiple Bezier curves are then segmented and fitted. Complex curves are then progressively fitted to ensure that each curve segment seamlessly connects with adjacent segments. Curve fitting errors are effectively controlled under precise geometric constraints.
[0032] S3, determine the curve segment information where the interpolation is located, and put the obtained parameters into the calculation formula to obtain the t value as the target tangent interpolation point for motion control compensation.
[0033] After completing the curve fitting, the appropriate t value is determined based on the position of the current proposed curve segment in the overall complex curve, the connection relationship with the adjacent curve segments, and the preset difference accuracy requirements to accurately calculate the coordinates of each point on the curve segment for interpolation.
[0034] In this embodiment, the t value of the quadratic Bezier curve is calculated based on the specific relationship between the set tangent and the quadratic Bezier curve. The tangent is represented by the corresponding coordinates in the two-dimensional coordinate system established under the plane, which can be expressed as v(v x ,v y ), and at the same time, the calculated t interpolation point must satisfy the predetermined tangent on the corresponding quadratic Bezier curve. The calculation formula is:
[0035]
[0036] Where, v x represents the x-coordinate of the tangent direction; v y The tangent y-coordinate is represented by p1(x1, y1), p2(x2, y2), and M1(x3, y3), respectively, representing the three control points of the current quadratic Bezier curve segment. Substituting the coordinates of the corresponding control points and the tangent coordinates into Equation 2 during calculation yields the t value that satisfies the conditions. This t value is then used to determine the coordinates of each point on the quadratic Bezier curve.
[0037] In this embodiment, by determining the interpolation ratio t of the quadratic Bezier curve, the tangent on the quadratic Bezier curve is specified, the ratio t is calculated using the determined tangent, and then substituted into the quadratic Bezier curve of the corresponding segment to obtain the interpolation point at that position.
[0038] In this embodiment, as shown in the attached Figure 1 To the attached Figure 4 As shown, taking five-axis CNC machine tool processing as an example, if we want to accurately know the contour of a roller fillet, we can directly obtain the interpolation point through the control system of the five-axis CNC machine tool, and then use the tangent to find the point on the fillet that meets this tangent for motion compensation.
[0039] Specifically, a five-axis CNC machine tool detects and obtains five tangent lines, each with different normals, along the intersection curve of the roller fillet and a cross section. These tangent lines are evenly distributed along the quarter arc of the fillet. In this embodiment, the above method is used to fit the roller fillet, addressing the difficulty of interpolating complex curves on CNC machine tools.
[0040] The method works as follows: first, five tangents are determined. Each of three adjacent tangents must meet the specified requirements: the intersection of L1 and L2 is M1, and the intersection of L2 and L3 is M2. The tangent direction is the direction of the normal on the curve at the tangent point rotated 90 degrees clockwise in the plane. Vectors M1 and M2 are in the same direction as the tangent direction of L2 to ensure the orderly adjacent order of the tangents. The five tangents are arranged in this way and recorded as L1, L2, L3, L4, and L5, respectively, and expressed using the parametric equation of the line.
[0041] Then, the intersection of each two adjacent tangent lines is obtained based on the line parametric equation. For example, the intersection of L1 and L2 is M1, the intersection of L2 and L3 is M2, the intersection of L3 and L4 is M3, and the intersection of L4 and L5 is M4. After obtaining the intersection points, the tangent point information is determined according to the set processing rules.
[0042] In this embodiment, for the tangent lines L2, L3, and L4, the midpoint of M1 and M2 is taken as P2, the midpoint of M2 and M3 is taken as P3, and the midpoint of M3 and M4 is taken as P4, and P2, P3, and P4 are respectively used as the tangent points of L2, L3, and L4.
[0043] For tangent lines L1 and L5, the average distance is calculated using the sum of the distances between the two adjacent points at the midpoint tangent intersection. This average distance is then assigned to the distance between the tangent points of L1 and L5. This means P1M1 = P5M4 = (M1M2 + M2M3 + M3M4) / 6. The calculated P1 and P5 are then used as the tangent points of L1 and L5. This way, the intersection and tangent point information for each tangent is obtained.
[0044] Then the calculated data is used to fit the rounded curve. In this embodiment, for the curve with n>2, the fitting is performed in sections, that is,
[0045] The first segment B1(t) = (1-t) 2 P1+2t(1-t)M1+t 2 P2,t∈[0,1];
[0046] Second segment B2(t)=(1-t) 2 P2+2t(1-t)M2+t 2 P3,t∈[0,1];
[0047] The third segment B3(t) = (1-t) 2 P3+2t(1-t)M3+t 2 P4,t∈[0,1];
[0048] The fourth segment B4(t) = (1-t) 2 P4+2t(1-t)M4+t 2 P5,t∈[0,1].
[0049] After obtaining each curve segment, determine the t value to obtain the accurate interpolation point. In this embodiment, when interpolating, it is necessary to first calculate which curve the required tangent is on, and then calculate the tangent v (v x ,v y ) is substituted into Formula 2. The calculated t-value interpolation point must satisfy the given tangent on the corresponding quadratic Bezier curve. When the tangent is in segment B1, the three control points of the quadratic Bezier curve are p1(x1,y1), p2(x2,y2), and M1(x3,y3); when the tangent is in segment B2, the three control points of the quadratic Bezier curve are p2(x1,y1), p3(x2,y2), and M2(x3,y3); when the tangent is in segment B3, the three control points of the quadratic Bezier curve are p3(x1,y1), p4(x2,y2), and M3(x3,y3); when the tangent is in segment B4, the three control points of the quadratic Bezier curve are p4(x1,y1), p5(x2,y2), and M4(x3,y3). By calculating the corresponding t value based on the corresponding curve segment and determining the coordinates of each point on the quadratic Bezier curve based on the t value, we can accurately obtain the interpolation point at the target tangent. Based on the interpolation point, we can find the point on the fillet that satisfies this tangent and perform motion compensation.
[0050] The five tangent line data obtained from the detection are as follows:
[0051] Line1 (horizontal tangent)
[0052] Its tangent point P1: (0.000, 25.000); direction vector n1: (1.000, 0.000); the tangent line equation is: L(1) = (0.000, 25.000) + a·(1.000, 0.000)
[0053] Line2 (tilted downward and right)
[0054] Its tangent point P2: (8.576, 23.483); direction vector n2: (0.939, -0.343); the tangent line equation is: L(2) = (8.576, 23.483) + a·(0.939, -0.343)
[0055] Line 3 (steep lower right)
[0056] Its tangent point P3: (16.544, 18.743); direction vector n3: (0.750, -0.662); the tangent line equation is: L(3) = (16.544, 18.743) + a·(0.750, -0.662)
[0057] Line 4 (nearly vertical)
[0058] Its tangent point P4: (23.019, 9.753); direction vector n4: (0.390, -0.921); the tangent line equation is: L(4) = (23.019, 9.753) + a·(0.390, -0.921)
[0059] Line5 (vertical)
[0060] Its tangent point P5: (25.000, 0.000); direction vector n5: (0.000, -1.000); the tangent line equation is: L(5) = (25.000, 0.000) + a·(0.000, -1.000)
[0061] The intersection points calculated from the above data are:
[0062] M1 (4.422, 25.000); M2 (13.007, 21.865); M3 (20.803, 14.984); M4 (25.000, 5.078).
[0063] At the same time, first calculate the tangent points of the middle tangent, which are:
[0064] P2(8.715,23.433); P3(16.905,18.425); P4(22.902,10.031).
[0065] According to the sum of the distances between the two adjacent points of the other tangent intersections in the middle, the average value is calculated, which is
[0066] P1M1=P5M4=(M1M2+M2M3+M3M4) / 6=5.05;
[0067] The calculated average values are respectively assigned to the distances from the first tangent point and the fifth tangent point to the adjacent intersection points, and the first tangent point and the fifth tangent point are obtained, which are
[0068] P1=(-0.628, 25.000); P5= (25.000, 0.028).
[0069] The data is used to fit the first quadrant arc with a diameter of 50. At the same time, the result data of this solution is compared with the result obtained by the logic operation of the host computer. The comparison data is as follows (the calculation process retains three decimal places):
[0070]
[0071] It can be seen intuitively from the above table that the accuracy of the results fitted by this solution and the calculation results obtained through logical operations is as high as 99%, which is fully capable of achieving the accuracy and effectiveness of the results calculated by the host computer, so that the existing CNC system can be directly used to achieve high-precision complex curve interpolation tasks.
[0072] This embodiment creatively achieves high-precision tangent connection of multiple curve segments, fundamentally solving the problem of smooth transitions in the machining of complex continuous curves. This ensures that the curve connections not only achieve geometric continuity but also meet higher-order continuity requirements, thereby significantly improving the surface finish and contour accuracy of the machined surface. In actual machining, this method can effectively eliminate the common problems of tool marks and contour abrupt changes in traditional segmented machining, allowing for systematic control of machining errors. Furthermore, by optimizing curve transitions, it reduces tool marks and contour deviations in traditional segmented machining, improving product consistency and reducing machining errors. It also reduces the time required for repeated trimming and machining, shortens the production cycle, optimizes the machining process, and significantly reduces the risk of abnormal tool wear. Furthermore, due to the optimized machining path design, the CNC system can complete complex contour machining with a more efficient feed strategy, shortening the production cycle while ensuring machining quality and improving overall production efficiency. In the long run, this technology significantly enhances the adaptability of CNC machine tools to highly complex machining tasks, especially in fields such as aerospace and precision molds that require extremely high curve quality. It can provide more reliable and stable machining solutions, bringing a qualitative leap to modern precision manufacturing.
[0073] The above is only an embodiment of the present invention, and the common knowledge such as the specific technical solutions and / or characteristics in the solution are not described in detail here. It should be pointed out that for those skilled in the art, without departing from the technical solution of the present invention, several variations and improvements can be made, which should also be regarded as the scope of protection of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the description can be used to interpret the content of the claims.
Claims
1. A complex curve interpolation method based on CNC machine tools, characterized in that: Based on the tangent information of the intersection curve of the specified section and the surface obtained by detection, curve fitting is performed in combination with the intersection point of the quadratic Bezier curve and the tangent to achieve complex continuous curve interpolation on the CNC system; the following steps are included: Step 1: Use CNC machine tool detection to obtain n tangent information in the same plane, n ≥ 2, recorded as L n ; Sort the n tangent lines according to the sorting method, and use the set processing rules to obtain the corresponding intersection point M i and tangent point p i information; Step 2: Based on the number of tangent lines, the corresponding intersection points and tangent points are used as control points of the quadratic Bezier curve segment, and curve fitting is performed; Step 3: Determine the curve segment information where the interpolation is located, and bring the obtained parameters into the calculation formula to obtain the t value as the interpolation point of the target tangent to perform motion control compensation.
2. The complex curve interpolation method based on a CNC machine tool according to claim 1, characterized in that: In step 1, the three adjacent tangents obtained must intersect in sequence; the sorting method is that the tangent direction is the direction of the normal of the tangent point on the curve rotated 90° in the plane, and the direction of the vector formed by the intersection of two adjacent tangents must be consistent with the direction of the tangent line where the two intersections are located.
3. The complex curve interpolation method based on a CNC machine tool according to claim 1, characterized in that: The intersection point is the intersection point M of each two adjacent tangent lines. i , expressed as L1∩L2,L2∩L3,...,L i-1 ∩L i ,i∈n.
4. The complex curve interpolation method based on a CNC machine tool according to claim 1, characterized in that: The tangent point is determined by the set processing rules according to the different positions of the tangent arrangement. i Information, the processing rules are: When the tangent lines are L1 and L n When the corresponding cut-off point information is determined according to the reliability of the detected cut-off point; When the tangent line is divided by L1 and L n When there are other intermediate tangents other than the two adjacent intersection points, the midpoint of the two adjacent intersection points is taken as the tangent point of the common tangent of the two intersection points.
5. The complex curve interpolation method based on a CNC machine tool according to claim 4, characterized in that: When the reliability of the detected tangent point is high, the tangent point obtained by the detection is directly adopted and used as the control point for fitting the quadratic Bezier curve; When the reliability of the detected tangent point is low, the sum of the distances between the two adjacent points of the other tangent intersections is calculated, and the average distance is calculated as Distribute the calculated average distance to the tangent point of tangent line L1 and tangent line L n The distance from the tangent point to the adjacent intersection point forms a new tangent point as the control point.
6. The complex curve interpolation method based on a CNC machine tool according to claim 1, characterized in that: In step 2, the two adjacent intersection points and the tangent point are used as the three control points of the curve segment, and fitting processing is performed separately according to different fitting methods based on the number of tangent lines.
7. The complex curve interpolation method based on a CNC machine tool according to claim 6, characterized in that: When the number of tangents n=2, the tangent points of the two adjacent tangents are set to P1 and P2 respectively, and the intersection point of the tangents is M1. According to the quadratic Bezier curve formula B(t)=(1-t) 2 P1+2t(1-t)M1+t 2 P2,t∈[0,1], fit the curve; When n>2, curve fitting is performed segment by segment according to the intersection points of each tangent line to obtain multiple quadratic Bezier curves. The three control points of each quadratic Bezier curve are determined by the corresponding tangent points and intersection points.
8. The complex curve interpolation method based on a CNC machine tool according to claim 7, characterized in that: In step 3, the t value is determined based on the position of the current proposed curve segment in the overall complex curve, the connection relationship with the adjacent curve segments, and the preset difference accuracy requirements. The calculation formula of the t value is: Where, v x represents the x-coordinate of the tangent direction; v y Represents the y-coordinate of the tangent direction; p1(x1,y1), p2(x2,y2), and M1(x3,y3) represent the three control points of the current quadratic Bezier curve segment.
9. The complex curve interpolation method based on a CNC machine tool according to claim 1, characterized in that: In step 1, the tangent information is expressed in the form of a straight line parameter equation, which is expressed as L(a)=p+a·v; where a is a parameter; p represents the tangent point of the tangent; and v is the tangent direction.
10. The complex curve interpolation method based on a CNC machine tool according to claim 8, characterized in that: It also includes determining the coordinates of each point on the quadratic Bezier curve according to the t value, and the calculated t value interpolation point must meet the established tangent on the corresponding quadratic Bezier curve.