Route planning method and system for corner optimization

By generating smooth transition curves and performing precise compensation in 3D CNC machining, the transition processing problem between 3D tool path segments is solved, efficient and precise CNC machining is achieved, machining efficiency, precision and surface quality are improved, and the service life of tools and machine tools is extended.

CN120762418APending Publication Date: 2025-10-10NANJING LANHAO INTELLIGENT TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510962890.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-10

Smart Images

  • Figure CN120762418A_ABST
    Figure CN120762418A_ABST
Patent Text Reader

Abstract

The invention discloses a path planning method and system for corner optimization. The method and system are used for cutter radius compensation and machining instruction smooth transition of a three-dimensional path of a numerical control machine tool. The method comprises the steps that a machining instruction is pre-read, and a path point location is analyzed; calculating a path direction vector and a normal vector, and determining a path plane equation; calculating a plane included angle and an intersection direction vector through a normal vector; generating a compensation curve by translating along the perpendicular direction of the intersecting line by taking the radius of the cutter as a constraint; and generating a smooth control instruction through curve subdivision and inserting the instruction into an instruction queue. The problem that three-dimensional path corner transition is not smooth is solved, the machining precision and efficiency are remarkably improved, and the method is suitable for a numerical control machine tool for complex curved surface machining.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical control machining, and in particular to a path planning method and system for corner optimization. Background Art

[0002] During CNC machine tool processing, toolpath planning and optimization are crucial for improving efficiency, ensuring machining accuracy, and enhancing workpiece surface quality. When a tool moves in three dimensions along a complex path consisting of multiple straight or curved segments, sudden changes in speed and direction often occur at the junctions between segments. Without smooth transitions, these can cause shock and vibration in the machine tool, reduce machining speed, compromise surface finish, and even damage the tool or machine components.

[0003] Currently, most solutions for tool path radius compensation on the market focus on paths within a two-dimensional plane. For example, the compensated tool center trajectory is obtained by translating the tool radius in the normal direction of the two-dimensional contour line. However, in complex three-dimensional surface machining or multi-axis machining, the tool path itself is a spatial curve. Traditional two-dimensional compensation methods are difficult to directly apply to such three-dimensional paths, and the transition processing between three-dimensional path segments also faces challenges, making it difficult to achieve efficient and smooth machining.

[0004] For example, when a tool transitions from one 3D straight line segment to another, or from one 3D straight line segment to a circular arc segment in space, simply connecting the endpoints of the two path segments will cause discontinuity in the tool motion. To solve this problem, although some methods have attempted to introduce transition arcs, how to accurately define the geometric parameters of the transition arc in 3D space and effectively compensate for it in combination with the tool radius remains a technical challenge that needs to be solved. In particular, how to determine a suitable reference datum so that the compensated transition path can accurately reflect the actual cutting profile of the tool in 3D space is the key to achieving high-quality 3D machining.

[0005] Therefore, there is an urgent need for an optimization method that can effectively handle three-dimensional tool paths, especially the transition areas between path segments, to achieve smooth, efficient and precise CNC machining. Summary of the Invention

[0006] Purpose of the invention: The purpose of the present invention is to address the deficiencies in the prior art and provide a path planning method and system for corner optimization, so as to solve the problems in the prior art of difficulty in handling three-dimensional path transitions, difficulty in achieving smooth and efficient machining, and low accuracy of three-dimensional tool radius compensation.

[0007] Technical solution: The present invention provides a three-dimensional tool path optimization method, which is applied in the field of CNC machining and includes the following steps: acquire coordinates of a plurality of points on the three-dimensional machining path, including the inflection point p1; According to the point coordinates, at least three path segments connected in turn and intersecting at the inflection point p1 are calculated; Based on the path segments, a first operation plane including a first path segment from the point before the inflection point p0 to the inflection point p1 and a second path segment from the inflection point p1 to the point after the inflection point p2, and a second operation plane including the second path segment and a third path segment from the point after the inflection point p2 to the subsequent point p3 are determined; The intersection line of the first operation plane and the second operation plane is determined as the reference intersection line; In the first operation plane, an initial transition curve for connecting the first path segment and the second path segment is generated at the inflection point p1; Based on the reference intersection line and the preset tool radius, the initial transition curve is compensated in three dimensions to generate a compensated transition curve; The compensated transition curve is subdivided and interpolated to generate smooth path points, and numerical control machining control instructions are generated based on the smooth path points.

[0008] Further improve the above technical solutions, the step of acquiring path segments includes: by pre-reading numerical control instructions, the point coordinates are parsed, the point coordinates at least include inflection point , the point before the inflection point , the point after the inflection point And the point .

[0009] Further, the step of determining the first operation plane includes: calculating the direction vector of the first path segment and the direction vector of the second path segment, and solving the normal vector N1 of the first operation plane by vector cross multiplication ; The step of determining the second operation plane includes: calculating the direction vector of the third path segment, and solving the normal vector N2 of the second operation plane by vector cross multiplication .

[0010] Further, the step of determining the reference intersection line includes: The direction vector n of the reference intersection line is obtained by cross multiplication of the first plane normal vector N1 and the second plane normal vector N2, wherein ; determine the inflection point is a point on the reference intersection line, and the equation of the reference intersection line is obtained by combining the direction vector n.

[0011] Furthermore, the method further comprises calculating the angle between the first operating plane and the second operating plane , the calculation formula is: .

[0012] Furthermore, the step of generating the initial transition curve includes: determining the angle and path combination type formed by the first path segment and the second path segment at the inflection point p1, and based on the determined angle and path combination type, calculating the parameters required to generate the initial transition curve; the angle is an acute angle or a non-acute angle, and the path combination type includes: a straight line and a straight line, a straight line and an arc, an arc and a straight line, or an arc and an arc; the parameters of the initial transition curve include the arc radius, or the arc radius and the straight line compensation length.

[0013] Furthermore, the step of generating an initial transition curve includes: Determining whether the angle formed by the first path segment and the second path segment at the inflection point p1 is an acute angle; If the included angle is an acute angle, calculating an arc radius according to the included angle and path information, and generating the initial transition curve; If the included angle is not an acute angle, the arc radius and the straight line compensation length are calculated according to the included angle and path information, and the initial transition curve is generated.

[0014] Furthermore, performing three-dimensional compensation on the initial transition curve includes: Calculating an orthogonal vector of the reference intersection direction vector as a compensation direction, where the compensation direction is located in the first operating plane; The points on the initial transition curve are translated along the compensation direction with the tool radius as the translation distance to obtain the compensated transition curve.

[0015] A corner optimization path planning system for implementing the above method includes: A path parsing module is used to obtain point information on the three-dimensional processing path to define at least three path segments connected in sequence; a geometric analysis module, configured to determine a first and a second operating plane containing the path segment, and to solve a reference intersection line between the two operating planes; an initial path generation module, configured to generate an initial transition curve at a corner of the path segment in the first operation plane; A path compensation module, configured to perform three-dimensional compensation on the initial transition curve based on the reference intersection line and a preset tool radius to generate a final compensated transition curve; The instruction generation module is used to subdivide the compensation transition curve and generate the final numerical control machining control instruction.

[0016] Furthermore, the geometric analysis module is further used to calculate the normal vectors N1 and N2 of the first and second operation planes, and Calculate the direction vector of the reference intersection line, and Calculates the angle between two operating planes.

[0017] Beneficial effects: The present invention, through the above method and system, can effectively solve the problem of smooth transition and precise compensation of three-dimensional tool paths at the connection points, bringing the following significant beneficial effects: Improved machining efficiency and precision: Based on 3D geometric analysis (including operating planes and intersection lines), smooth transition curves are generated and precise 3D tool radius compensation is performed, avoiding deceleration, vibration, and machining errors caused by sudden changes in the path. This allows the machine tool to operate stably at higher average feed rates, shortening machining time while ensuring dimensional accuracy and contour conformance of the machined part, especially for complex free-form surface machining.

[0018] Improved surface quality: Smooth tool movement reduces impact and chatter marks during the cutting process, reduces vibration caused by sudden changes in the path, and makes the processed surface smoother, thereby significantly improving the finish and quality of the processed surface and meeting the processing requirements of high-precision parts.

[0019] Extended tool and machine life: By reducing the impact load and vibration during machining, tool wear is slowed and tool life is extended. Simultaneously, the impact on the machine tool's transmission components and structural parts is also reduced, helping to maintain machine tool accuracy and extend its service life.

[0020] Enhanced process adaptability: This method is not only applicable to connecting straight lines and arcs, but also provides a feasible optimization framework for transitions between more complex parametric curves (such as NURBS curves). By accurately calculating 3D geometric elements such as operating planes and intersection lines, it has excellent versatility and adaptability, and can adapt to various complex 3D machining scenarios.

[0021] Achieve automated optimization: This method can be integrated into CAM software or CNC controllers to automatically analyze and optimize the input tool path, reducing the need for manual intervention and improving programming efficiency and the level of automation in machining.

[0022] In summary, the present invention provides an effective three-dimensional tool path optimization method, which significantly improves the efficiency, precision and surface quality of three-dimensional CNC machining through precise geometric analysis and compensation strategy. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of the method provided by the present invention. DETAILED DESCRIPTION

[0024] The technical solution of the present invention is described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the embodiments.

[0025] Example 1: The core idea of ​​a corner-optimized path planning method proposed in the present invention is to determine a stable reference (i.e., the intersection of two operating planes) between two continuous three-dimensional path segments through geometric analysis, and then generate an initial transition curve. The initial transition curve is then accurately compensated in three dimensions based on the intersection and the tool radius.

[0026] Reference Figure 1 The specific steps of the method provided by the present invention are as follows: Step 1: Instruction pre-reading and path resolution Pre-read instructions (when pre-reading instructions, the system pre-configured parameters are used to control the pre-read quantity of instructions, and when parsing processing instructions, only the position and processing speed of the instructions are read), the instructions are processed in advance, the instructions are parsed and the processing path is analyzed, and several points including the inflection point p1 on the processing path are obtained. 、 、 、 The analysis process includes extracting coordinate points and related processing parameters (such as feed rate and tool type). These points constitute the processing path in three-dimensional space and provide basic data for subsequent calculations.

[0027] Step 2: Calculate the path direction vector According to the obtained point coordinates, the path direction vector between adjacent points is calculated.

[0028] Direction vector v1 of the first path segment (from p0 to p1): ; Direction vector v2 of the second path segment (from p1 to p2): ; Direction vector v3 of the third path segment (from p2 to p3): .

[0029] The direction vector is calculated using vector geometry operations to ensure that the accuracy meets the smoothness requirements of the three-dimensional space path.

[0030] Step 3: Solve for the plane normal vector The normal vector of the plane where the path lies is solved by performing a cross product operation on the adjacent path direction vectors.

[0031] The cross product of v1 and v2 gives the first plane normal vector ; The cross product of v2 and v3 gives the second plane normal vector .

[0032] The cross product operation is based on the principles of vector geometry and ensures that the normal vector accurately reflects the direction of the plane in which the path lies.

[0033] Step 4: Determine the plane equation The first plane normal vector , the second plane normal vector And take a point on the path and substitute it into the basic plane equation , to calculate the first plane equation , the second plane equation .

[0034] Step 5: Calculate the angle and intersection line of the planes Calculate the angle between the two planes by performing the dot product operation on the normal vectors N1 and N2 ,formula: Solve the intersection direction vector through two plane normal vectors N1 and N2 : The intersection of the paths can be calculated by the front and back path expressions, and a known point on the intersection line can be determined as a corner point. , thus obtaining the intersection line equation: The intersection line equation provides the geometric basis for tool radius compensation.

[0035] Step 6: Generate compensation curve At the corner p1, based on the geometric relationship between the front and rear path segments (e.g., angle, path type), a smooth initial transition curve, such as an arc segment, is generated in the first operating plane, connecting the first and second path segments. Using the tool radius r as a constraint, the initial transition curve is accurately compensated in three dimensions based on the reference intersection line determined in step 5. Specifically, an orthogonal vector to the reference intersection direction vector is calculated as the compensation direction, and the points on the initial transition curve are translated along this compensation direction by a translation distance of r, thereby obtaining the final compensation curve. The translation process ensures that the compensation curve maintains geometric consistency with the original curve while meeting the machining accuracy requirements.

[0036] Step 7: Curve subdivision and command generation The generated compensation curve is subdivided and interpolated according to a specific step size, set by a system parameter that is determined by the system's machining accuracy. An interpolation algorithm is used to generate smooth path points. Based on these subdivided path points, corresponding CNC machining control instructions are generated and inserted into the original instruction queue. The interpolation algorithm ensures smooth transitions between path points, avoiding sudden changes during machining and achieving a smooth transition in the tool path.

[0037] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A path planning method for corner optimization, characterized in that: The following steps are involved: Obtain the coordinates of several points including the inflection point p1 on the 3D machining path; According to the point coordinates, calculating at least three path segments that are sequentially connected and intersect at the inflection point p1; Based on the path segments, determining a first operation plane including a first path segment from a point before the inflection point p0 to a point p1 and a second path segment from the inflection point p1 to a point after the inflection point p2, and a second operation plane including the second path segment and a third path segment from a point after the inflection point p2 to a subsequent point p3; determining an intersection line between the first operating plane and the second operating plane as a reference intersection line; In the first operating plane, at the inflection point p1, generating an initial transition curve for connecting the first path segment and the second path segment; Based on the reference intersection line and a preset tool radius, performing three-dimensional compensation on the initial transition curve to generate a compensated transition curve; The compensation transition curve is subdivided and interpolated to generate smooth path points, and a numerical control machining control instruction is generated based on the smooth path points.

2. The corner-optimized path planning method according to claim 1, characterized in that: The step of obtaining the path segment includes: parsing the point coordinates through pre-calculated CNC instructions, and the point coordinates include at least the corner points , the point before the corner , point after corner point as well as Back point .

3. The corner-optimized path planning method according to claim 2, characterized in that: The step of determining the first operation plane includes calculating the direction vector of the first path segment: and the direction vector of the second path segment , and through the vector cross product operation Solve the normal vector N1 of the first operating plane; The step of determining the second operation plane includes calculating the direction vector of the third path segment: , and through the vector cross product operation , solve for the normal vector N2 of the second operating plane.

4. The corner-optimized path planning method according to claim 3, characterized in that: The step of determining the reference intersection line comprises: The direction vector n of the reference intersection line is obtained by performing a cross product operation on the first plane normal vector N1 and the second plane normal vector N2, wherein, ; Determine the inflection point is a point on the reference intersection line, and the equation of the reference intersection line is obtained by combining the direction vector n.

5. The corner-optimized path planning method according to claim 3, characterized in that: The method further includes calculating an angle between the first operating plane and the second operating plane , the calculation formula is: 。 6. The corner-optimized path planning method according to claim 1, characterized in that: The step of generating the initial transition curve includes: determining the angle and path combination type formed by the first path segment and the second path segment at the inflection point p1, and based on the determined angle and path combination type, calculating the parameters required to generate the initial transition curve; the angle is an acute angle or a non-acute angle, and the path combination type includes: a straight line and a straight line, a straight line and an arc, an arc and a straight line, or an arc and an arc; the parameters of the initial transition curve include the arc radius, or the arc radius and the straight line compensation length.

7. The corner-optimized path planning method according to claim 6, characterized in that: The step of generating the initial transition curve comprises: Determining whether the angle formed by the first path segment and the second path segment at the inflection point p1 is an acute angle; If the included angle is an acute angle, calculating an arc radius according to the included angle and path information, and generating the initial transition curve; If the included angle is not an acute angle, the arc radius and the straight line compensation length are calculated according to the included angle and path information, and the initial transition curve is generated.

8. The corner-optimized path planning method according to claim 6, characterized in that: The three-dimensional compensation of the initial transition curve comprises: Calculating an orthogonal vector of the reference intersection direction vector as a compensation direction, where the compensation direction is located in the first operating plane; The points on the initial transition curve are translated along the compensation direction with the tool radius as the translation distance to obtain the compensated transition curve.

9. A corner optimization path planning system for implementing the method of claim 1, characterized in that: include: A path parsing module is used to obtain point information on the three-dimensional processing path to define at least three path segments connected in sequence; a geometric analysis module, configured to determine a first and a second operating plane containing the path segment, and to solve a reference intersection line between the two operating planes; an initial path generation module, configured to generate an initial transition curve at a corner of the path segment in the first operation plane; A path compensation module, configured to perform three-dimensional compensation on the initial transition curve based on the reference intersection line and a preset tool radius to generate a final compensated transition curve; The instruction generation module is used to subdivide the compensation transition curve and generate the final numerical control machining control instruction.

10. The system according to claim 9, characterized in that The geometric analysis module is further used to calculate the normal vectors N1 and N2 of the first and second operation planes, and Calculate the direction vector of the reference intersection line, and Calculates the angle between two operating planes.

Citation Information

Cited By

  • Milling cutter path optimization method of numerical control milling machine

    CN121115674A

  • Parameterized NURBS curve cutter radius compensation method and device

    CN121477777A

  • A parameterized NURBS curve tool radius compensation method and device

    CN121477777B