Numerical control machining tool path regulation method and system based on dynamic coordinate system and pre-judgment of excessive cutting
By introducing a dynamic coordinate system and overcut prediction into CNC grinding, the problem of trajectory and pose disconnection in the machining of complex curved surfaces has been solved, thereby improving accuracy and efficiency and meeting the needs of high-end manufacturing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG ADVANCED CNC MASCH TOOL TECH INNOVATION CENT CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-19
AI Technical Summary
Existing CNC grinding systems suffer from deficiencies in trajectory control foresight, pose and trajectory coordination, parameter compatibility, state perception capability, and deviation handling strategies when machining complex curved surfaces, resulting in low machining accuracy, low efficiency, and low fault tolerance.
A CNC machining toolpath control method based on dynamic coordinate system and overcut prediction is adopted. By constructing the equation of the rotating file cutting edge, establishing a dynamic coordinate system, predicting the risk of overcutting by the grinding wheel, and making dynamic deflection angle correction, a closed-loop control is formed.
It improves processing accuracy and consistency, reduces trial and error debugging time, enhances processing efficiency and reliability, and meets the needs of high-precision batch processing.
Smart Images

Figure CN121670446B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC machining technology, and relates to CNC machining toolpath control methods and systems, particularly to CNC machining toolpath control methods and systems based on dynamic coordinate systems and overcut prediction. Background Technology
[0002] In the field of CNC grinding of complex curved surfaces such as rotary files, existing technologies mainly employ offline programming and static trajectory planning methods based on ideal geometric models. This "pre-programming-execution" open-loop control mode reveals the following fundamental defects in actual dynamic machining processes:
[0003] 1. **Deficiency in Foresight of Trajectory Control:** The fundamental contradiction between static planning for trajectory generation and the dynamic machining environment. Existing CNC systems perform offline trajectory planning based on ideal geometric models, essentially an open-loop model of "static pre-programming + mechanical execution." This architecture has a fundamental limitation: the planning stage cannot predict dynamic variables during machining, leading to a severe disconnect between theoretical trajectories and actual requirements. Specifically: a) Lack of overcutting risk warning mechanism: the system lacks the ability to predict the relative positions of the workpiece and tool, meaning the machining result relies entirely on the operator's experience; b) Lagging compensation strategy: error correction relies on post-processing detection, resulting in long debugging times and high costs. 2. **Deficiency in the Coordination of Pose and Trajectory:** During machining, the actual pose and theoretical trajectory of the rotary file often follow a unidirectional process of "calculation first, execution later," lacking a mechanism for monitoring the real-time pose of the rotary file and dynamically matching the trajectory. This makes it impossible to promptly correct issues such as rotary file head offset and grinding wheel-workpiece contact errors, making machining accuracy susceptible to fluctuations in equipment status. 3. **Deficiency in Parameter Compatibility:** Core parameters such as rotary file specifications, grinding wheel parameters, and workpiece machining points are often input independently without unified formatting. 4. Inadequate state awareness: Existing algorithms lack a centralized identification and real-time feedback mechanism for key information such as rotary file pose, grinding wheel status, and processing progress during processing. This makes it impossible to identify processing anomalies in a timely manner, and problems can only be found through finished product inspection, resulting in low processing error tolerance and high defect rate. 5. Defective deviation handling strategy: For processing trajectory deviations, existing systems mostly use a single threshold judgment and uniform correction method, without differentiating the processing logic according to the degree of deviation. It is difficult to balance correction accuracy and processing efficiency, and it is easy to have problems of "overcorrection for small deviations" or "undercorrection for large deviations".
[0004] The aforementioned defects make it difficult for existing rotary file machining systems to meet the demands of high-precision, mass production in terms of accuracy control, machining efficiency, and fault tolerance. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems in the prior art by providing a CNC machining toolpath control method and system based on a dynamic coordinate system and overcut prediction, thereby solving these problems.
[0006] The objective of this invention can be achieved through the following technical solution: a CNC machining toolpath control method based on a dynamic coordinate system and overcut prediction, characterized by comprising the following steps:
[0007] Step S1: Construct the equation of the rotating file cutting edge, and establish a dynamic coordinate system for any point on the cutting edge based on the equation. The dynamic coordinate system takes the current cutting edge point as the origin and the tangent direction, normal direction and binormal direction of the point as the coordinate axes.
[0008] Step S2: Based on the aforementioned cutting edge equation, construct the adjacent cutting edges of the rotary file and solve for the theoretical machining trajectory points of the grinding wheel center during the grinding process;
[0009] Step S3: Pre-set neighboring points near the theoretical contact point of the grinding wheel. By calculating the theoretical tangent distance and the actual distance of the neighboring points in the dynamic coordinate system, predict whether there is a risk of overcutting of the grinding wheel.
[0010] Step S4: When an overcut risk is predicted, the dynamic deflection angle correction of the grinding wheel is calculated and executed based on the positional relationship between the neighborhood point and the theoretical position in the dynamic coordinate system to eliminate the overcut.
[0011] In the above-mentioned CNC machining toolpath control method based on dynamic coordinate system and overcut prediction, the establishment of the dynamic coordinate system in step S1 specifically involves:
[0012] Obtain the tangent vector rt, normal vector rn, and binormal vector rb at any point on the cutting edge, where rb is obtained by the cross product of rt and rn. Take the position of this point as the origin, and take the directions of rt, rn, and rb as the X-axis, Y-axis, and Z-axis directions of the dynamic coordinate system, respectively.
[0013] In the above-mentioned CNC machining toolpath control method based on dynamic coordinate system and overcut prediction, step S2 involves calculating the theoretical machining trajectory point of the grinding wheel center:
[0014] Determine the first cutting edge point (point1) and the theoretical contact point (point2) between the rake face of the grinding wheel and the adjacent cutting edge. Solve for point2 based on the dot product formula F=(point2 - point1)·rt = 0.
[0015] Based on the grinding wheel cone angle and grinding depth parameters, the deeppoint of the groove bottom is calculated using geometric relationships;
[0016] According to the radius of the grinding wheel wheelR, offset from the bottom point of the groove deeppoint in a specific direction, and calculate the center point of the grinding wheel wheelcenterpoint.
[0017] In the above CNC machining tool path control method based on a dynamic coordinate system and overcut prediction, the specific prediction of the grinding wheel overcut risk in step S3 is as follows:
[0018] Select a number of neighborhood points within the neighborhood range of the theoretical contact point point2, and convert the coordinates of each point to the dynamic coordinate system of the current cutting edge point;
[0019] Calculate the theoretical tangential distance local_R and the actual distance local_dis from each neighborhood point to the grinding wheel axis in the dynamic coordinate system;
[0020] Compare local_dis with local_R. If local_dis < local_R, it is determined that there is an overcut risk.
[0021] In the above CNC machining tool path control method based on a dynamic coordinate system and overcut prediction, the calculation of the dynamic deflection angle correction of the grinding wheel in step S4 is as follows:
[0022] In the dynamic coordinate system, calculate the angle localAngle between the actual position vector local_adjacent of the neighborhood point and the direction vector local_t of the X axis of the dynamic coordinate system;
[0023] According to the specific position where overcut occurs, use different formulas to calculate the required correction deflection angle wheelRevisionDeg of the grinding wheel. The overcut positions include the previous machining point or the next machining point of the current machining point;
[0024] Control the center of the grinding wheel to rotate around the Z axis of the dynamic coordinate system by the correction deflection angle wheelRevisionDeg.
[0025] In the above CNC machining tool path control method based on a dynamic coordinate system and overcut prediction, different correction strategies are dynamically matched according to the classification determination result of the overcut risk. The classification determination at least includes no overcut risk, overcut at the next machining point, and overcut at the previous machining point
[0026] In the above CNC machining tool path control method based on a dynamic coordinate system and overcut prediction, it further includes a closed-loop feedback step: after performing the grinding wheel correction, re-enter step S3 to predict the overcut risk until it is determined that there is no overcut risk, forming a closed-loop control.
[0027] A CNC machining tool path control system based on a dynamic coordinate system and overcut prediction, characterized in that it includes:
[0028] The parameter input and standardization module is used to receive and standardize grinding wheel parameters, workpiece geometric parameters, and process parameters.
[0029] The dynamic coordinate system construction module is used to calculate the pose of the rotating file line points in real time and establish a dynamic coordinate system that changes with the processing position.
[0030] The trajectory calculation and overcut prediction module is used to calculate the theoretical machining trajectory of the grinding wheel and predict the risk of overcut based on the neighborhood point analysis method in the dynamic coordinate system.
[0031] The dynamic correction module is used to calculate and output the pose adjustment command of the grinding wheel when the risk of overcutting is anticipated, and to perform real-time deflection angle correction.
[0032] The post-processing and code generation module is used to convert the corrected toolpath trajectory data into CNC code that can be executed by the machine tool.
[0033] The CNC machining toolpath control system based on dynamic coordinate system and overcut prediction also includes a real-time pose monitoring module, which is used to acquire the actual pose information of the grinding wheel and the workpiece during the machining process, and feed the information back to the dynamic coordinate system construction module and the overcut prediction module.
[0034] In the above-mentioned CNC machining toolpath control system based on dynamic coordinate system and overcut prediction, the trajectory calculation and overcut prediction module is pre-set with overcut risk classification judgment logic, which is used to trigger the corresponding classification correction strategy in the dynamic correction module according to the prediction result.
[0035] Compared with existing technologies, this CNC machining toolpath control method and system based on dynamic coordinate systems and overcut prediction achieves precise coupling between the theoretical tool trajectory and the actual pose by establishing a dynamic coordinate system that updates in real time with the cutting edge, fundamentally changing the traditional static programming mode. Its core innovation lies in introducing an intelligent overcut prediction mechanism based on neighborhood quantization analysis, which can provide early warning of risks before machining; and employing a graded judgment strategy to trigger differentiated dynamic angle corrections, forming a "perception-prediction-correction" closed loop. This technology effectively solves key problems in complex surface grinding, such as the disconnect between trajectory and pose, difficulty in controlling overcut, and reliance on manual correction, significantly improving machining accuracy, product consistency, and process reliability, while reducing trial-and-error debugging time, providing an efficient solution for achieving intelligent adaptive machining in CNC grinding. Attached Figure Description
[0036] Figure 1 It is a flowchart of the collaborative algorithm for pose, dynamic coordinate system, intelligent overcut judgment and dynamic adjustment of grinding wheel.
[0037] Figure 2 This is a flowchart of the algorithm for dynamic toolpath adjustment technology based on real-time pose feedback and predictive overcutting of rotary file.
[0038] Figure 3 This is a flowchart for the pre-judgment of overcutting of a rotary file grinding wheel.
[0039] Figure 4 This is a flowchart of the algorithm for correcting overcutting of a rotary file on a grinding wheel.
[0040] Figure 5 This is a schematic diagram of a rotary file grinding product before algorithm correction.
[0041] Figure 6 This is a schematic diagram of a grinding product using a rotary file for pre-judgment of overcutting of the grinding wheel and a closed-loop correction algorithm.
[0042] Figure 7 This is a schematic diagram of the machining process before correction during rotary file grinding.
[0043] Figure 8 This is a schematic diagram of the machining process after correction during rotary file grinding.
[0044] Figure 9 It is the establishment of a dynamic coordinate system for the cutting edge points.
[0045] Figure 10 This is a structural diagram of the grinding wheel machining process.
[0046] Figure 11 This is a schematic diagram for judging overcutting by the grinding wheel.
[0047] Figure 12 It is the angle between the actual and theoretical points in the neighborhood and the X-axis of the dynamic coordinate system. Detailed Implementation
[0048] The following are specific embodiments of the present invention, which are described in conjunction with the accompanying drawings. However, the present invention is not limited to these embodiments.
[0049] This invention is based on a deeply coupled intelligent toolpath control method. The core of this invention lies in the following: "real-time perception" provides the data foundation for "advance prediction"; the results of "advance prediction" drive the precise execution of the "tiered correction" strategy; and the effect of "tiered correction" further optimizes the perception and prediction model through "closed-loop feedback." This close collaboration and iterative optimization between technical modules produces technical effects that surpass the simple sum of individual parts, effectively solving fundamental problems such as decoupling of trajectory generation and dynamic pose, parameter rigidity, and lag in state perception. This systematically improves machining accuracy, efficiency, and reliability, meeting the demands of high-end manufacturing.
[0050] Step 1: Construct the equation of the rotating file cutting edge and establish a dynamic coordinate system for any point on the cutting edge;
[0051] Helix equation: ;
[0052] equation of tangent to a spiral: ;
[0053] The equation of the normal to the spiral: ;
[0054] Equation of the binormal line of the spiral: ;
[0055] Based on the above calculation equations, a dynamic coordinate system is constructed with the cutting edge point of the designed helix as the origin and rt, rn, and rb as directions, for any point on the cutting edge. Figure 9 As shown, this lays the foundation for subsequent design calculations.
[0056] Step 2: Construct the adjacent cutting lines of the rotary file and initially solve the machining trajectory of the grinding wheel center;
[0057] By solving for the spatial coordinates of adjacent cutting edges, theoretically, the rake and flank faces of the grinding wheel are tangent to the cutting edges during the grinding process, thus achieving groove grinding. Let point1 in the design coordinate system be the first cutting edge point, and point2 in the design coordinate system be the intersection of the rake face and the cutting edge at the current position of the grinding wheel. Solve for the formula for point2. According to the dot product of vectors, if the two vectors are perpendicular, the dot product is 0, thus obtaining point2.
[0058] ;
[0059] Given that point1, point2, and deeppoint (the effective grinding depth of the grinding wheel) form a right-angled triangle with respect to the wheel's cone angle. For example... Figure 10 The diagram shows a grinding wheel, where the red line represents the depth to which the grinding wheel penetrates. By solving for the angle between vector k and the line connecting point1 and point2, and using the teaching triangle and trigonometric functions to determine the length between point1 and deeppoint, the groove bottom point corresponding to any cutting edge point of deeppoint in the design coordinate system can be calculated. The calculation formula is as follows:
[0060] ;
[0061] Where k is a unit vector;
[0062] The center of the grinding wheel is in the k direction and passes through the center of the grinding wheel;
[0063] In the design coordinate system, the center of the grinding wheel can be obtained by adding the direction of the bottom point of the grinding wheel groove to the radius of the grinding wheel. The calculation formula is as follows:
[0064] .
[0065] Step 3: Preset neighborhood points and intelligently predict whether the grinding wheel is over-cutting;
[0066] Through the calculation in the second step, we temporarily store the grinding wheel data processed to the current edge point and import the data into the algorithm for predicting whether the grinding wheel is over-cutting;
[0067] The spatial dynamic coordinate systems of the corresponding edge points, rt, rn, rb, have been obtained above, corresponding to the x, y, and z axes of the edge point dynamic coordinate system respectively. Since the directions of the design coordinate system and the dynamic coordinate system are inconsistent, and the spatial vector only has a direction, only the rotation transformation matrix Rtemp is required;
[0068] By presetting the α neighborhood δ range within the neighborhood of point2 on the grinding wheel, the adjacent points within the neighborhood of point2 are solved, and the positions of each edge point in the dynamic coordinate system are calculated respectively. As Figure 11 shown, the distance formula from a point to a line is used to solve. local_R is the theoretical tangency distance of the neighborhood point and will not cause over-cutting; while local_dis represents the distance from the actual edge point to the axis of the grinding wheel. If the two are equal, there will be no over-cutting. If local_dis < local_R, there will be over-cutting.
[0069] Step 4: Correct the deflection angle of the grinding wheel during the grinding process when over-cutting occurs;
[0070] Through the above, we already know that the grinding wheel is over-cutting during the grinding process. Given that the construction of the dynamic coordinate system is on the edge point, the angle formed by the vector local_adjacent in the dynamic coordinate system and the tangent direction local_t = [1 0 0] obtained by subtracting the theoretical tangency point and the actual point within the neighborhood point is as Figure 12 shown;
[0071] Because point1 and point2 are theoretical calculation points, through theoretical calculation at these points, the cutting requirements are always met and there will be no over-cutting. The over-cutting occurs at the next grinding point or the previous grinding point at the current position of point2. Due to the different positions of the grinding points, the correction deflection angles required for the grinding wheel are also different. The calculation formula is:
[0072] ;
[0073] If the grinding wheel is tangent to the previous grinding point, the deflection angle of the grinding wheel is: [[ID=3l]];
[0074] If the grinding wheel is tangent to the next grinding point, the deflection angle of the grinding wheel is: ;<r
[0075] Next, in the dynamic coordinate system, the center of the grinding wheel rotates around the Z-axis of the dynamic coordinate system, which can effectively avoid overcutting. The essence of this correction is to ensure that the theoretical and actual points of the grinding wheel's neighborhood points, which will not be overcut, are on the x-axis in the dynamic coordinate system.
[0076] like Figure 1 This invention provides a flowchart of a collaborative algorithm for pose, dynamic coordinate system, intelligent overcut detection, and dynamic adjustment of the grinding wheel, including:
[0077] After the program starts, the algorithm automatically identifies the real-time pose of the grinding wheel and constructs a dynamic coordinate system based on this. It transforms the coordinates of points in the design coordinate system to the dynamic coordinate system, intelligently identifying the relationship between the added groove shape and the cutting edge of the grinding wheel, and determining the relationship between the grinding wheel cone edge and the cutting edge point. However, this relationship determination is relatively difficult, so it is converted into the distance between the cutting edge point and the grinding wheel axis and the theoretical distance between the cutting edge axis and the rake face of the grinding wheel. The two values are compared to quantitatively determine whether overcutting has occurred. If the grinding wheel overcuts, the grinding wheel deflection angle is adjusted in the dynamic coordinate system. The innovation lies in the fact that it is not a simple superposition of real-time pose feedback, coordinate system transformation, and prediction algorithm, but rather a synergistic effect among the three. The dynamic coordinate system provides a unified benchmark for real-time pose and overcut prediction algorithms, enabling synchronous updates of data-driven dynamic coordinates and prediction algorithms, achieving closed-loop control, and generating synergistic benefits that cannot be achieved by a single technology. The specific manifestation of these synergistic benefits is the "grind wheel's self-correction capability during grinding."
[0078] As shown in Figure 2, this invention provides a method for generating and adaptively correcting toolpath trajectories in grinding wheel machining, including:
[0079] After the program starts, it enters the parameter input stage: This stage receives multi-dimensional parameters of the workpiece to be processed and the grinding wheel, and completes the parameter standardization conversion. The parameter types include grinding wheel parameters, geometric parameters, design parameters, process parameters, and post-processing parameters. At the same time, it presets basic data collection files such as cutting edge lines and grinding wheel trajectory points, and completes the conversion from design to machine tool coordinate system, laying the parameter foundation for subsequent machining trajectory calculation.
[0080] After the parameters are input, the central angles corresponding to the arc segments and cylindrical segments are calculated: specifically, the central angle, the starting angle of the cutting edge, and the ending angle of the cutting edge corresponding to different arc segments are solved. These angle parameters are used to clarify the geometric positioning reference of the grinding wheel machining and ensure the matching of the trajectory with the workpiece surface.
[0081] Based on the aforementioned center angle parameters, the linear points and orientation vectors of the grinding wheel are solved sequentially to determine the basic motion trajectory nodes of the grinding wheel during the machining process, thus completing the initial position reference construction of the toolpath trajectory.
[0082] After solving the grinding wheel trajectory nodes, it is determined whether there is an overcut risk in the grinding wheel machining process: if the determination result is "no", the grinding wheel toolpath machining trajectory generation stage is directly entered; if the determination result is "yes", the azimuth angle of the grinding wheel is adjusted and corrected to eliminate the overcut risk before generating the grinding wheel toolpath machining trajectory.
[0083] After generating the grinding wheel toolpath machining trajectory, the post-processing stage begins: the design coordinate system is converted into the machine tool coordinate system, and machine tool executable G-code is generated, realizing the standardized conversion of trajectory data into machining instructions.
[0084] Referring to Figure 3, this embodiment addresses the need for pre-control of grinding wheel overcutting risk in CNC machining of complex curved surfaces. Specifically, it implements a machining method for pre-judgment and dynamic correction of grinding wheel overcutting: After the program starts, the machining target point set (Point1, Point2), the dynamic adjustment amount of grinding wheel pose (Adjustment), and the tangent vector (T) and normal vector (k) of the current position cutting edge point are input first. The precise input of such multi-dimensional parameters is different from the limitation of single parameter dimension in traditional machining, and provides a quantifiable benchmark for subsequent risk judgment.
[0085] When entering the data point conversion stage, this implementation method innovatively constructs a dynamic coordinate system that updates in real time with the current machining posture of the grinding wheel. The machining points under the design coordinate system are converted to the dynamic coordinate system, and three types of feature points are generated simultaneously: the grinding wheel reference point, the theoretical tangent point, and the overcut risk point. The dynamic adaptation design of this dynamic coordinate system solves the industry pain point of large deviation between the machining points and the actual posture of the grinding wheel under the fixed coordinate system, and makes the point mapping error control far superior to the accuracy level of the traditional fixed coordinate system.
[0086] Based on the aforementioned feature points, the distance between the grinding wheel and the workpiece curve under theoretical conditions (Local_R) and the distance between the grinding wheel and the workpiece curve under actual conditions (Local_dis) are further quantified using the Euclidean distance algorithm. This replaces the crude method of "qualitatively judging overcutting risk" in traditional machining, giving risk assessment a quantifiable and traceable technical foundation. Subsequently, the overcutting risk is accurately identified through the judgment logic of "whether Local_dis is less than Local_R". This judgment logic breaks through the limitations of misjudgment by traditional single thresholds and can be judged based on actual numerical comparisons and quantitative analysis. Furthermore, the grinding wheel correction axis re-enters the judgment procedure to determine whether the grinding wheel has overcut, continuously iterating to approach the ideal value.
[0087] If the judgment result indicates that the overcut risk is established, the dynamic correction mechanism of the grinding wheel is triggered: the grinding wheel feed angle or trajectory is adaptively corrected based on the pose adjustment amount in the dynamic coordinate system, rather than the inefficient method of "manual adjustment by stopping the machine" in traditional machining, which effectively shortens the correction time; if the judgment result indicates that the risk is not established, the current machining trajectory is directly executed.
[0088] like Figure 4 To address the industry pain points of "single judgment dimension, poor coordinate system adaptability, and insufficient correction angle accuracy" in grinding wheel overcut correction during CNC machining of complex curved surfaces, this implementation method provides a machining method with multi-level quantitative judgment and dynamic angle correction for grinding wheel overcut: After the program starts, the machining target point set (Point1, point2) and the spatial direction of the grinding wheel at the current cutting point (T, k) are first input. This multi-dimensional parameter system breaks through the limitation of traditional machining that only inputs basic points, and provides a quantitative benchmark for subsequent accurate judgment and correction.
[0089] Subsequently, in the data point conversion stage, an innovative dynamic coordinate system was constructed that updates in real time with the current machining posture of the grinding wheel (unlike the traditional fixed coordinate system which is prone to posture matching deviation). The machining points under the design coordinate system were mapped to this dynamic coordinate system, and three types of feature points were generated simultaneously: the grinding wheel reference point, the theoretical tangent point, and the existing over-tangent point. This achieved dynamic adaptation between the machining points and the actual posture of the grinding wheel, which greatly improved the accuracy of subsequent judgments.
[0090] After obtaining the grinding wheel correction tangent point based on the above feature points, the position deviation is quantitatively characterized by solving the difference between the theoretical tangent point and the existing over-tangent point in the X-axis direction. Then, the vector angle between the grinding wheel feed direction and the correction direction is obtained by the vector angle algorithm. This process replaces the crude method of "qualitative judgment of deviation" in traditional machining with "quantitative difference + vector operation", so that the characterization of over-cut deviation has a traceable mathematical basis.
[0091] Subsequently, the overcut risk is classified and identified through a three-level Flag judgment logic (Flag0, Flag1, Flag2): Flag0 corresponds to no overcut risk at the current grinding wheel machining position, Flag1 corresponds to overcut at the next machining point at the current grinding wheel machining position, and Flag2 corresponds to overcut at the previous machining point at the current grinding wheel machining position. This classified judgment mechanism breaks through the limitations of traditional single threshold judgment, which is prone to misjudgment or omission. It fully considers various possibilities of overcutting during the machining process and can dynamically match differentiated correction strategies according to different overcutting situations.
[0092] Figure 5 and Figure 6 This is a schematic diagram of the simulated processing effect. We will use a C-type rotary file as an example. Figure 5This corresponds to the toolpath trajectory in a traditional fixed coordinate system. The cutting edge equation is a helical equation, and the cutting edge points of the two helices form a groove. The traditional solution method is to solve for the tangent and normal vectors at any point on the cutting edge to determine the position of the grinding wheel. Traditional toolpath machining algorithms are prone to overcutting due to deviations in tool position. As shown in the figure, after grinding, the parent cutting edge separates from the solid, indicating overcutting during the machining process. Figure 6 This corresponds to a dynamic correction algorithm during the grinding process. Based on static cutting, it automatically determines whether there is an overcut signal during machining. If overcutting is detected, it automatically adjusts the deflection angle of the grinding wheel dynamically, re-evaluates whether overcutting has occurred, and iterates continuously. It can be seen that... Figure 6 The blue cutting edge of the grinding wheel and the generatrix of the cylinder are closely attached to the edge of the groove. This is a visual representation of the "pose-trajectory dynamic coupling" in the innovative algorithm, which solves the problem of mismatch between the trajectory and the actual machining pose under a fixed coordinate system.
[0093] Figure 7 and Figure 8 This is a schematic diagram of the actual processing effect. We will take a C-type rotary file as an example. Figure 7 As can be seen, the outer contour of the rotary file, marked with a thick red line, shows that the product after machining exhibits a larger diameter at the ball end and a smaller diameter at the cylindrical end. When cutting the cylinder and the ball end, theoretically, the diameters of the C-type rotary file bar and the ball end should be equal, since their diameters are the same. However, in actual machining, due to overcutting, the diameter of the cylindrical bar decreases, while the reduction in the ball end is smaller, resulting in a distinct bulge at the junction of the cylinder and the ball end. For example... Figure 8 The diagram shown is a product processing schematic after algorithm correction. The product's outer surface has a uniform halo, without any protrusions, and the groove shape is more consistent. Figure 7 and Figure 8 It is evident that the introduction of the correction capability in rotary file grinding significantly improves the grinding process. Based on... Figure 3 As can be seen, the algorithm determines and corrects the lag wheel angle in real time by adjusting the values of local_R and local_dis of the lag wheel, and iterates until the requirements are met.
[0094] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
[0095] Although this document uses a great deal of technical terms, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of the invention; interpreting them as any additional limitation would be contrary to the spirit of the invention.
Claims
1. A CNC machining toolpath control method based on dynamic coordinate system and overcut prediction, characterized in that, Includes the following steps: Step S1: Construct the equation of the rotating file cutting edge, and establish a dynamic coordinate system for any point on the cutting edge based on the equation. The dynamic coordinate system takes the current cutting edge point as the origin and the tangent direction, normal direction and binormal direction of the point as the coordinate axes. Step S2: Based on the aforementioned cutting edge equation, construct the adjacent cutting edges of the rotary file and solve for the theoretical machining trajectory points of the grinding wheel center during the grinding process; Step S3: Pre-set neighboring points near the theoretical contact point of the grinding wheel. By calculating the theoretical tangent distance and the actual distance of the neighboring points in the dynamic coordinate system, predict whether there is a risk of overcutting of the grinding wheel. Step S4: When an overcut risk is predicted, the dynamic deflection angle correction of the grinding wheel is calculated and executed based on the positional relationship between the neighborhood point and the theoretical position in the dynamic coordinate system to eliminate the overcut.
2. The CNC machining toolpath control method based on dynamic coordinate system and overcut prediction according to claim 1, characterized in that, The establishment of the dynamic coordinate system in step S1 specifically involves: Obtain the tangent vector rt, normal vector rn, and binormal vector rb at any point on the cutting edge, where rb is obtained by the cross product of rt and rn. Take the position of this point as the origin, and take the directions of rt, rn, and rb as the X-axis, Y-axis, and Z-axis directions of the dynamic coordinate system, respectively.
3. The CNC machining toolpath control method based on dynamic coordinate system and overcut prediction according to claim 1, characterized in that, In step S2, the theoretical machining trajectory point of the grinding wheel center is calculated: Determine the first cutting edge point (point1) and the theoretical contact point (point2) between the rake face of the grinding wheel and the adjacent cutting edge. Solve for point2 based on the dot product formula F=(point2 - point1)·rt = 0. Based on the grinding wheel cone angle and grinding depth parameters, the deeppoint of the groove bottom is calculated using geometric relationships; Based on the grinding wheel radius wheelR, the grinding wheel center point wheelcenterpoint is calculated by offsetting the groove bottom point deeppoint along the direction from the grinding wheel center to the groove bottom point.
4. The CNC machining toolpath control method based on dynamic coordinate system and overcut prediction according to claim 1, characterized in that, The specific steps for predicting the risk of overcutting by the grinding wheel in step S3 are as follows: Select several neighborhood points within the neighborhood of the theoretical contact point 2, and transform the coordinates of each point to the dynamic coordinate system of the current cutting edge point; Calculate the theoretical tangent distance local_R and the actual distance local_dis from each neighboring point to the grinding wheel axis in the dynamic coordinate system; Compare local_dis with local_R. If local_dis < local_R, then there is a risk of over-switching.
5. The CNC machining toolpath control method based on dynamic coordinate system and overcut prediction according to claim 1, characterized in that, The dynamic deflection angle correction of the grinding wheel is calculated in step S4 as follows: In the dynamic coordinate system, calculate the angle localAngle between the actual position vector local_adjacent of the neighborhood point and the X-axis direction vector local_t of the dynamic coordinate system; Depending on whether the overcutting risk occurs at the previous or next machining point, different formulas are used to calculate the required wheel correction deflection angle wheelRevisionDeg. The rotation of the grinding wheel center around the Z-axis of the dynamic coordinate system is controlled to correct the deflection angle wheelRevisionDeg.
6. The CNC machining toolpath control method based on dynamic coordinate system and overcut prediction according to claim 1, characterized in that, Different correction strategies are dynamically matched based on the classification results of overcutting risk. The classification includes at least no overcutting risk, overcutting at the next processing point, and overcutting at the previous processing point.
7. The CNC machining toolpath control method based on dynamic coordinate system and overcut prediction according to any one of claims 1 to 6, characterized in that, It also includes a closed-loop feedback step: after performing grinding wheel correction, it re-enters step S3 to predict overcutting risk until it is determined that there is no overcutting risk, thus forming a closed-loop control.
8. A CNC machining toolpath control system based on a dynamic coordinate system and overcut prediction, employing the method described in claim 1, characterized in that, include: The parameter input and standardization module is used to receive and standardize grinding wheel parameters, workpiece geometric parameters, and process parameters. The dynamic coordinate system construction module is used to calculate the pose of the rotating file line points in real time and establish a dynamic coordinate system that changes with the processing position. The trajectory calculation and overcut prediction module is used to calculate the theoretical machining trajectory of the grinding wheel and predict the risk of overcut based on the neighborhood point analysis method in the dynamic coordinate system. The dynamic correction module is used to calculate and output the pose adjustment command of the grinding wheel when the risk of overcutting is anticipated, and to perform real-time deflection angle correction. The post-processing and code generation module is used to convert the corrected toolpath trajectory data into CNC code that can be executed by the machine tool.
9. The CNC machining toolpath control system based on dynamic coordinate system and overcut prediction according to claim 8, characterized in that, It also includes a real-time pose monitoring module, which is used to acquire the actual pose information of the grinding wheel and the workpiece during the machining process, and feed the information back to the dynamic coordinate system construction module and the overcut prediction module.
10. The CNC machining toolpath control system based on dynamic coordinate system and overcut prediction according to claim 8, characterized in that, The trajectory calculation and overcut prediction module is pre-set with overcut risk classification judgment logic, which is used to trigger the corresponding classification correction strategy in the dynamic correction module based on the prediction result.