Improved numerical control programming path optimization method based on process fusion

By abstracting the processing process of CNC machine tools into polygon cutting problems and using algorithms to optimize the processing path, the problem of redundant cutting and rough intersection points in traditional CNC machine tools is solved, improving machining efficiency and reducing the learning time of technicians.

CN119902488APending Publication Date: 2025-04-29SHENYANG GOLDING NC & INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311406873.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In traditional CNC machine tools, problems such as redundant cutting and rough intersection points are prone to occur, and technicians need long-term learning and practice to optimize CNC programs.

Method used

Abstract the processing process into a polygon cropping problem, and optimize the processing path through algorithms, including intersectivity judgment, outward-directed misshear transformation and intersection point calculation, construct the path diagram of the resulted polygon, and finally obtain the path diagram after the process fusion.

Benefits of technology

By optimizing the machining path, avoiding redundant cutting, reducing rough intersection points, significantly improving processing efficiency, and reducing the learning and practice time of technicians.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902488A_ABST
    Figure CN119902488A_ABST
Patent Text Reader

Abstract

The invention provides an improved numerical control programming path optimization method based on process fusion, which comprises the following steps of: firstly, converting an actual processing problem into a polygon cutting problem according to geometrical characteristics and processing requirements of a workpiece, and establishing a mathematical model for solving; then, a new data structure and a polygon cutting algorithm are adopted, cutting of the process sequence is combined, and therefore the machining path of the cutter is simplified. And finally, generating a more efficient and reliable process execution flow, and converting the process execution flow into a numerical control code for processing. According to the numerical control programming algorithm, the operation efficiency of the algorithm is improved under the condition that the machining accuracy is guaranteed through outward staggered cutting of the coincident edges of the cut polygon. In addition, the robustness of the algorithm is improved by adopting intersection verification, and the unreasonable coincidence condition of two polygons is avoided, so that the robustness of the algorithm is improved. Through a simulation calculation experiment, compared with a traditional numerical control programming method, the method has remarkable advantages in the aspects of improving machining efficiency and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of numerical control machining, and in particular to an improved numerical control programming path optimization method based on process fusion. Background Art

[0002] With the rapid development of NC programming technology and computer systems, many algorithms in computer graphics have been put into practical use and widely verified in the field of NC systems. Among them, polygon clipping, as an important research direction of computer graphics, is of great significance in the fields of computer-aided design and manufacturing, simulation processing, etc.

[0003] In traditional CNC machine tool processing, problems such as redundant cutting and rough intersections are prone to occur. Although technicians can optimize CNC programs, it takes a long time for them to learn and practice. If the processing flow can be abstracted into a polygon clipping problem and the processing path is optimized through algorithms, the efficiency and quality of processing can be improved, which will undoubtedly achieve a breakthrough. Summary of the invention

[0004] In order to solve the problems of redundant cutting and rough intersection that are easy to occur in traditional CNC machine tool processing, as well as the problem that technicians need to spend a long time learning and practicing to optimize CNC programs, the present invention proposes an improved CNC programming path optimization method based on process fusion.

[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present invention is: by abstracting the processing flow into a polygon clipping problem and optimizing the processing path through an algorithm, the processing efficiency and quality are improved.

[0006] An improved NC programming path optimization method based on process fusion includes the following steps:

[0007] 1) Given an entity polygon E and a clipping polygon C, select one edge E from each of the two polygons according to their geometric features. i With C i Whether they intersect or overlap;

[0008] 2) If they intersect and overlap, the clipping polygon is subjected to an outward shear transformation to separate the overlapping edges or vertices of the two polygons; if they intersect and do not overlap, the intersection result of the current clipping polygon and the entity polygon is marked according to the number of intersection points between the two;

[0009] 3) According to the intersection results and the entry and exit properties of the intersection points, construct the current result polygon path graph;

[0010] 4) Traverse the solid polygons and clipping polygons to obtain the final process fusion path map.

[0011] The intersection determination is a rapid repulsion test and a straddle test.

[0012] The outward shearing transformation is to add an offset to the current clipping edge to generate a new clipping polygon linked list.

[0013] The method of marking the intersection result of the current clipping polygon and the entity polygon according to the number of intersection points between the two includes: if the number of intersection points is an even number, the two polygons are marked as intersecting; if the number of intersection points is an odd number, the two polygons are marked as non-intersecting.

[0014] According to the intersection results and the intersection entry and exit properties, the current result polygon path diagram is constructed, including:

[0015] Start traversing from the entity polygon head pointer, intersect with the clipping polygon in a clockwise direction, check the entry and exit properties of the intersection points, find the first entry point, and insert it into the path graph;

[0016] Traverse the remaining clipping polygons from the entry point, use the remaining clipping polygon edges to intersect with the solid polygon edges in a counterclockwise direction until the first exit point is found and inserted into the path graph;

[0017] Then, traverse the remaining solid polygons from the exit point, and use the remaining solid polygons to intersect with the edges of the clipping polygon to find the next entry point;

[0018] Check one by one, get each entry and exit point, and insert the path diagram.

[0019] The method of obtaining the final process-fused path map is as follows: obtaining the path map after traversing the path, and alternately traversing the solid polygons and the clipping polygons from the first entry point to obtain the final process-fused path map.

[0020] The entry point is the point where the physical path enters the clipping path, and the exit point is the point where the clipping path enters the physical path.

[0021] The present invention has the following beneficial effects and advantages:

[0022] 1. Optimize processing paths and improve efficiency: Traditional CNC machine tool processing has problems such as redundant cutting and rough intersections, which will affect processing efficiency and waste time and resources. Through CNC programming technology based on process fusion, the processing path can be optimized through algorithms, redundant cutting can be avoided, and rough intersections can be reduced, thereby significantly improving processing efficiency.

[0023] 2. Reduce the learning and practice time of technicians: The optimization of traditional CNC programs requires technicians to spend a long time learning and practicing, which can be an expensive and time-consuming task for many companies. CNC programming technology based on process fusion uses an algorithmic approach to make the optimization of processing paths no longer dependent on the experience and skill level of individual technicians. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a method flow chart;

[0025] Figure 2 This is an example diagram of the polygon clipping algorithm;

[0026] Figure 3 A comparison of the polygon clipping algorithm results of the method of the present invention;

[0027] Figure 4 It is a schematic diagram of tool processing path;

[0028] Figure 5 It is a schematic diagram of the process fusion algorithm results;

[0029] Figure 6 It is a schematic diagram of the cross section of independent process and process fusion;

[0030] Figure 7 It is a schematic diagram of the process sub-process; DETAILED DESCRIPTION

[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation method of the present invention is described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the invention, so the present invention is not limited by the specific implementation disclosed below.

[0032] Figure 1 The flowchart of the method includes: Outward shear transformation algorithm: remove the overlapping parts by micro-offset. Line segment intersection judgment algorithm: mainly realized by fast exclusion and straddle judgment. Intersection calculation algorithm: find the intersection point by vector method and insert it into the entity polygon list. Real clipping conversion algorithm: traverse the entity polygon and clipping polygon part alternately.

[0033] Reference Figure 2 Abstract data structure pruning and Figure 3 Example of polygon clipping algorithm results, where: Figure 2 For the intersection of the solid polygon and the clipping polygon, interpolate the entry and exit points: I1 is the entry point, I2 is the exit point, I3 is the entry point, and I4 is the exit point. Figure 3In the figure, (a) is the basic polygon clipping algorithm and (b) is the improved polygon clipping algorithm.

[0034] A method for optimizing a multi-process machining path of a numerical control system comprises the following steps:

[0035] Step 1: Without affecting the accuracy of the result, separate the overlapping edges or vertices between the solid polygon and the clipping polygon by using an outward shear transformation method;

[0036] Step 2: Improve the robustness of the algorithm by judging the intersection of polygon clipping edges;

[0037] Step 3: Use the in-and-out properties of the intersection of the solid polygon and the clipping polygon edges to construct a path graph of the result polygon;

[0038] Step 4: Based on the structural polygons generated in step 3, the final process fusion path map is obtained through the path traversal algorithm.

[0039] Furthermore, in step 1: without affecting the accuracy of the result, an outward shearing transformation method is used to separate the overlapping edges or vertices in the solid polygon and the clipping polygon, which mainly includes two steps.

[0040] Step 1.1: Intersection judgment. This is achieved through fast exclusion experiment and straddle experiment. The fast exclusion experiment means that if two line segments do not intersect, then their projections on the x-axis and y-axis must not intersect, which can exclude the situation where the line segments do not intersect with low cost, but this is not a sufficient and necessary condition for the intersection of two line segments. In addition to the fast exclusion experiment, by judging whether the endpoints of a line segment are on both sides of another line segment through the straddle experiment, other non-intersection situations can be quickly excluded to achieve the intersection judgment of the two line segments. Then, if the two line segments intersect, the vectors of the line segments are used to calculate whether the two line segments are parallel. If the two line segments have an intersection and are parallel, there must be some overlap of line segments or vertices. In polygon clipping, the probability of this special situation of edge or vertex overlap is relatively small, but it will affect the execution of the algorithm, so it is necessary to separate the overlapping parts without affecting the accuracy of the results.

[0041] Step 2.1: Outward shear transformation. The overlapping edges or vertices of the solid polygon and the clipping polygon are separated without affecting the result accuracy. This separation is essentially a slight offset of the overlapping edges of the clipping polygon to the outside area. This offset will not affect the actual processing accuracy because the clipped result polygon does not contain the offset edge, and the offset is set to 10 in this experiment. -15 , and the ultra-precision CNC machining accuracy is only 10 -9The number level, so as long as a sufficiently small value is set, it will not affect the processing accuracy of the current CNC system. The tool processing path diagram is as follows Figure 4 , which is a schematic diagram of a boundary processing path.

[0042] In step 2: the robustness of the algorithm is improved by judging the intersection of polygon clipping edges, which mainly includes three steps.

[0043] Step 2.1: Determine whether two polygons intersect by counting the number of intersection points.

[0044] Step 2.2: If the number of intersection points is even, the two polygons are marked as intersecting.

[0045] Step 2.3: If the number of intersection points is odd, the two polygons are marked as non-intersecting.

[0046] Here is a proof that the number of intersection points of two non-overlapping polygons must be an even number. Assuming that the number of intersection points of the two polygons is odd, and the first n-1 intersection points are in pairs, then the in and out properties of the nth intersection point are the same as the first intersection point, which contradicts the assumption that the in and out properties of the intersection points on the clipping polygon are alternating, so the number of intersection points of the two polygons clipped by non-overlapping polygons must be an even number.

[0047] In step 3: using the in-and-out properties of the intersection of the solid polygon and the clipping polygon edge, construct a path graph of the result polygon, which mainly includes three steps.

[0048] Step 3.1: Start traversing from the entity polygon head pointer, intersect with the clipping polygon in a clockwise direction, check the entry and exit properties of the intersection point, find the first entry point, and add it to the path graph.

[0049] Step 3.2: Starting from the entry point, traverse the remaining clipping polygons, use the edges of the remaining clipping polygons to intersect with the edges of the solid polygon in a counterclockwise direction until the first exit point is found and added to the path graph.

[0050] Step 3.3: Start from the exit point and traverse the remaining solid polygons. Use the remaining solid polygons to intersect with the edges of the clipping polygon to find the next entry point. The schematic diagram of the process fusion algorithm result is as follows: Figure 5 , where E i Represents the vertex of the solid polygon, C i Represented as the clipping polygon vertex, I i It represents the intersection of the two, and they form the graph after the process fusion through pointers.

[0051] In step 4: according to the structure polygon generated in step 3, the path traversal algorithm is used to alternately traverse the solid polygon and the clipping polygon from the first entry point to obtain the final process fusion path diagram. The schematic diagram of the cross section of the independent process and the process fusion is shown in Figure 6 , where (a) represents the result of two independent processes. It can be clearly seen that there is a burr problem at the intersection of the workpiece process, while the fused process in (b) eliminates this problem. Figure 7 Specifically, each linear processing can be divided into three parts: the acceleration part, the uniform speed part and the deceleration part. The proportion of the uniform speed part mainly determines the processing efficiency. The use of process fusion can increase the proportion of the uniform speed part, thereby improving the processing efficiency.

[0052] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. An improved CNC programming path optimization method based on process fusion, characterized in that: The following steps are involved: 1) Given an entity polygon E and a clipping polygon C, select one edge E from each of the two polygons according to their geometric features. i With C i Whether they intersect or overlap; 2) If they intersect and overlap, an outward shear transformation is performed on the clipping polygon to separate the overlapping edges or vertices of the two polygons; If they intersect and do not overlap, the intersection result of the current clipping polygon and the entity polygon is marked according to the number of intersection points between the two; 3) According to the intersection results and the intersection entry and exit properties, construct the current result polygon path diagram; 4) Traverse the solid polygons and clipping polygons to obtain the final process fusion path map.

2. According to the improved CNC programming path optimization method based on process fusion according to claim 1, it is characterized in that: The intersection determination is a rapid repulsion test and a straddle test.

3. The improved CNC programming path optimization method based on process fusion according to claim 1 is characterized in that: The outward shearing transformation is to add an offset to the current clipping edge to generate a new clipping polygon linked list.

4. The improved CNC programming path optimization method based on process fusion according to claim 1 is characterized in that: The method of marking the intersection result of the current clipping polygon and the entity polygon according to the number of intersection points between the two includes: if the number of intersection points is an even number, the two polygons are marked as intersecting; if the number of intersection points is an odd number, the two polygons are marked as non-intersecting.

5. The improved CNC programming path optimization method based on process fusion according to claim 1 is characterized in that: According to the intersection results and the intersection entry and exit properties, the current result polygon path diagram is constructed, including: Start traversing from the entity polygon head pointer, intersect with the clipping polygon in a clockwise direction, check the entry and exit properties of the intersection points, find the first entry point, and insert it into the path graph; Traverse the remaining clipping polygons from the entry point, use the remaining clipping polygon edges to intersect with the solid polygon edges in a counterclockwise direction until the first exit point is found and inserted into the path graph; Then, traverse the remaining solid polygons from the exit point, and use the remaining solid polygons to intersect with the edges of the clipping polygon to find the next entry point; Check one by one, get each entry and exit point, and insert the path diagram.

6. The improved CNC programming path optimization method based on process fusion according to claim 1 is characterized in that: The method of obtaining the final process-fused path map is as follows: obtaining the path map after traversing the path, and alternately traversing the solid polygons and the clipping polygons from the first entry point to obtain the final process-fused path map.

7. The improved CNC programming path optimization method based on process fusion according to claim 1 is characterized in that: The entry point is the point where the physical path enters the clipping path, and the exit point is the point where the clipping path enters the physical path.