Method, device, computer device and medium for machining path planning
By acquiring and updating the order and offset compensation direction of the processing pattern, the problems of pattern deformation and corner loss during tool cutting were solved, thus improving the finished product qualification rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN SIJIU TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-07-31
AI Technical Summary
Existing cutting methods result in problems such as deformation, incomplete closure, and loss of edges at corners, leading to a low finished product qualification rate.
By obtaining the first processing order of the processing pattern, the processing starting point is determined and the initial processing order is updated. The processing points are traversed according to the second processing order, and the offset compensation direction is determined. The target point is controlled to move along the offset compensation direction to replace the compensation point for processing.
It effectively avoids problems such as cutting deformation, incomplete closure, and loss of edges and corners, thereby improving the finished product qualification rate.
Smart Images

Figure CN122488641A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of processing technology, and in particular to a processing path planning method, apparatus, computer equipment, and medium. Background Technology
[0002] Currently, material processing equipment, including desktop cutting and processing equipment, is used not only in industrial processing but also in DIY crafting. Among them, cutting and processing equipment with cutting tools offers high processing precision, can adapt to materials of different hardness and thickness, and boasts high processing efficiency and flexible operation, making it widely used in DIY crafting.
[0003] Currently, existing cutting methods typically involve directly converting the designed pattern into a processing file of a certain size. The processing equipment then cuts according to this file. However, this can lead to problems such as deformation, incomplete closure, and loss of corners, resulting in a low yield rate of finished products. Summary of the Invention
[0004] Therefore, it is necessary to provide a processing path planning method, apparatus, computer equipment, and medium that can improve the pass rate in response to the above-mentioned technical problems.
[0005] A processing path planning method, the method comprising:
[0006] S1. Based on the judgment that there are multiple processing patterns, obtain the first processing order of each processing pattern;
[0007] S2. Traverse each of the processing patterns according to the first processing order, and determine the first processing starting point of the target pattern based on the processing direction and initial processing order of each processing point in the currently traversed target pattern. The processing direction of the first processing starting point is consistent with the processing direction of the processing ending point of the previous processing pattern.
[0008] S3. Update the initial processing order based on the first processing starting point to obtain the second processing order of each processing point in the target pattern;
[0009] S4. Traverse each processing point of the target pattern according to the second processing order, and determine the offset compensation direction of the target point being traversed. The offset compensation direction is the direction from the previous processing point to the target point.
[0010] S5. Control the target point to move along the offset compensation direction to obtain the offset compensation point of the target point, replace the target point with the offset compensation point, and process based on the offset compensation point.
[0011] In this application, based on the judgment result that there are multiple processing patterns, the first processing order of each processing pattern is obtained. Each processing pattern is traversed according to the first processing order. Based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, the first processing start point of the target pattern is determined. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern. The initial processing order is updated based on the first processing start point to obtain the second processing order of each processing point in the target pattern. Each processing point of the target pattern is traversed according to the second processing order, and the offset compensation direction of the currently traversed target point is determined. The offset compensation direction is the direction from the previous processing point to the target point. The target point is controlled to move along the offset compensation direction to obtain the offset compensation point of the target point. The target point is replaced with the offset compensation point. In this way, the processing pattern can be appropriately compensated and planned, effectively avoiding problems such as cutting deformation, non-closure, and loss of edges, thereby improving the finished product qualification rate.
[0012] In one embodiment, step S1 includes:
[0013] S11. Based on the judgment result that the number of processing patterns is multiple, obtain the number of container patterns of each processing pattern, and classify each processing pattern according to the number of container patterns of each processing pattern to obtain multiple processing pattern sets.
[0014] S12. Sort each set of processing patterns according to the number of processing patterns in each set of processing patterns to obtain a set sorting result;
[0015] S13. Traverse each processing pattern set according to the sorting result of the set, and determine the first center of each processing pattern in the current target set and the second center of the last processing pattern in the previous processing pattern set.
[0016] S14. Based on each of the first center and the second center, determine the third processing order of the processing patterns in the target set;
[0017] S15. Based on the third processing order of each processing pattern set and the sorting result of the set, a first processing order is obtained.
[0018] In this application, the number of container patterns for each processing pattern is obtained based on the judgment result that there are multiple processing patterns. The processing patterns are then classified according to the number of container patterns, resulting in multiple processing pattern sets. The processing pattern sets are sorted according to the number of processing patterns in each set, resulting in a set sorting result. Each processing pattern set is traversed according to the set sorting result, and the first center of each processing pattern in the current target set and the second center of the last processing pattern in the previous processing pattern set are determined. Based on the distance between each first center and second center, the third processing order of the processing patterns in the target set is determined. Based on the third processing order of each processing pattern set and the set sorting result, the first processing order is obtained. This ensures that the inner processing patterns are cut first during processing, preventing subsequent cutting offset problems caused by material falling off during cutting.
[0019] In one embodiment, step S14 includes:
[0020] Determine the target center that is closest to the second center from the first center;
[0021] The processing pattern associated with the target center is determined as the first initial processing pattern in the target set;
[0022] Based on the first initial processing pattern, determine the set of remaining processing patterns;
[0023] Using the first initial processing pattern as the current pattern to be processed, the processing pattern with the closest center distance to the current pattern to be processed is determined from the set of remaining processing patterns. The processing pattern with the closest distance is taken as the next current pattern to be processed, until all the remaining processing patterns are sorted, and a third processing order is obtained.
[0024] In this application, by determining the target center closest to the second center from the first center, the machining pattern associated with the target center is determined as the first initial machining pattern in the target set. Based on the first initial machining pattern, the remaining machining pattern set is determined, and the first initial machining pattern is taken as the current machining pattern to be processed. From the remaining machining pattern set, the machining pattern closest to the center of the current machining pattern to be processed is determined, and the closest machining pattern is taken as the next current machining pattern to be processed. This process continues until all remaining machining patterns are sorted, resulting in a third machining sequence. This effectively shortens the idle travel distance of the machining tool and improves machining efficiency and accuracy.
[0025] In one embodiment, step S2 includes:
[0026] According to the first processing order, each processing pattern is traversed, and based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, multiple candidate processing starting points of the target pattern are determined. The processing direction of the candidate processing starting points is consistent with the processing direction of the processing ending point of the previous processing pattern.
[0027] Calculate the distance between each of the candidate processing starting points and the processing endpoint of the previous processing pattern, and determine the candidate processing starting point closest to the processing endpoint as the first processing starting point.
[0028] In this application, by traversing each processing pattern according to the first processing order, and based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, multiple candidate processing starting points of the target pattern are determined. The processing direction of the candidate processing starting point is consistent with the processing direction of the processing end point of the previous processing pattern. The distance between each candidate processing starting point and the processing end point of the previous processing pattern is calculated, and the candidate processing starting point closest to the processing end point is determined as the first processing starting point. This can significantly reduce the idle travel in the non-processing state.
[0029] In one embodiment, step S5 includes:
[0030] Determine the target model of the machining tool, wherein the machining tool is the tool used to machine the machining pattern;
[0031] The eccentric radius of the machining tool is determined based on the target model, and the offset length is determined based on the eccentric radius;
[0032] The target point is controlled to move by the offset length along the offset compensation direction to obtain the offset compensation point of the target point. The target point is then replaced with the offset compensation point for processing based on the offset compensation point.
[0033] In this application, by determining the target model of the machining tool (the tool used to process the pattern), the eccentric radius of the machining tool is determined based on the target model, and the offset length is determined based on the eccentric radius. The target point is controlled to move along the offset compensation direction by the offset length to obtain the offset compensation point of the target point. The target point is replaced with the offset compensation point, and machining is performed based on the offset compensation point. This can avoid problems such as cutting deformation, incomplete closure, and loss of edges, thereby improving the finished product qualification rate.
[0034] In one embodiment, the method further includes:
[0035] Based on the second processing order of the target pattern, determine the previous and next processing points of the target point currently being traversed;
[0036] Determine the angle of the turning angle formed by the target point, the previous processing point, and the next processing point;
[0037] When the angle is less than a preset threshold, the offset length is moved along the direction from the target point to the next processing point to obtain the tool alignment point. The tool alignment point is used to turn the orientation of the machining tool to the next processing point.
[0038] In this application, when the angle is less than a preset threshold, the tool orientation return point is obtained by moving the offset length along the direction from the target point to the next processing point. This allows the orientation of the machining tool to turn to the next processing point, ensuring the machining accuracy of the corner and preventing corner blunting.
[0039] In one embodiment, the method further includes:
[0040] Based on the first processing sequence, a second initial processing pattern is determined among the plurality of processing patterns;
[0041] Based on the second processing sequence of the second initial processing pattern, determine the second processing starting point of the second initial processing pattern;
[0042] When the orientation of the machining tool is inconsistent with the machining direction of the second machining starting point, the orientation of the machining tool is adjusted to be consistent with the machining direction of the second machining starting point.
[0043] In this application, a second initial processing pattern is determined from multiple processing patterns based on a first processing sequence, and a second processing start point is determined based on a second processing sequence of the second initial processing pattern. When the orientation of the processing tool is inconsistent with the processing direction of the second processing start point, the orientation of the processing tool is adjusted to be consistent with the processing direction of the second processing start point. This can avoid processing abnormalities caused by the mismatch between the tool orientation and the processing direction.
[0044] A processing path planning device, the device comprising:
[0045] The first order determination module is used to obtain the first processing order of each processing pattern based on the judgment result that there are multiple processing patterns;
[0046] The first traversal module is used to traverse each of the processing patterns according to the first processing order, and determine the first processing start point of the target pattern based on the processing direction and initial processing order of each processing point in the currently traversed target pattern. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern.
[0047] The second sequence determination module is used to update the initial processing sequence based on the first processing starting point to obtain the second processing sequence of each processing point in the target pattern;
[0048] The second traversal module is used to traverse each processing point of the target pattern according to the second processing order, and determine the offset compensation direction of the target point being traversed. The offset compensation direction is the direction from the previous processing point to the target point.
[0049] The processing planning module is used to control the target point to move along the offset compensation direction, obtain the offset compensation point of the target point, replace the target point with the offset compensation point, and process based on the offset compensation point.
[0050] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described above.
[0051] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0052] The aforementioned processing path planning method, apparatus, computer equipment, and medium obtain the first processing order of each processing pattern based on the judgment result that there are multiple processing patterns. Each processing pattern is traversed according to the first processing order. Based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, the first processing starting point of the target pattern is determined. The processing direction of the first processing starting point is consistent with the processing direction of the processing end point of the previous processing pattern. The initial processing order is updated based on the first processing starting point to obtain the second processing order of each processing point in the target pattern. Each processing point of the target pattern is traversed according to the second processing order, and the offset compensation direction of the currently traversed target point is determined. The offset compensation direction is the direction from the previous processing point to the target point. The target point is controlled to move along the offset compensation direction to obtain the offset compensation point of the target point. The target point is then replaced with the offset compensation point. This allows for appropriate compensation and planning of the processing pattern, effectively avoiding problems such as cutting deformation, incomplete closure, and loss of edges, thereby improving the finished product qualification rate. Attached Figure Description
[0053] Figure 1 This is an application environment diagram of the processing path planning method in one embodiment;
[0054] Figure 2 This is a flowchart illustrating a processing path planning method in one embodiment;
[0055] Figure 3 This is a schematic diagram illustrating the determination of the first processing starting point of the target pattern in one embodiment;
[0056] Figure 4 This is a schematic diagram of the processing direction of each processing point in the target pattern in one embodiment;
[0057] Figure 5 This is a schematic diagram showing the relative positional relationship of the processed patterns in one embodiment;
[0058] Figure 6 This is a schematic diagram illustrating the movement of the target point along the offset compensation direction by an offset length in one embodiment.
[0059] Figure 7 This is a schematic diagram showing the addition of a tool return point and an offset compensation point in one embodiment;
[0060] Figure 8 This is a schematic diagram illustrating the adjustment of the orientation of the machining tool in one embodiment;
[0061] Figure 9 This is a schematic diagram of the overall process flow of a processing path planning method in one embodiment;
[0062] Figure 10 This is a structural block diagram of a processing path planning device in one embodiment;
[0063] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0065] The processing path planning method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 interacts with server 104 via a wired / wireless channel. A data storage system can store the data that server 104 needs to process. Based on the determination that there are multiple processing patterns, the server obtains the first processing order for each pattern. The server traverses each pattern according to the first processing order and, based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, determines the first processing starting point of the target pattern. The processing direction of the first processing starting point is consistent with the processing direction of the processing end point of the previous processing pattern. The server updates the initial processing order based on the first processing starting point to obtain the second processing order for each processing point in the target pattern. The server traverses each processing point of the target pattern according to the second processing order and determines the offset compensation direction of the currently traversed target point. The offset compensation direction is the direction from the previous processing point to the target point. The server controls the target point to move along the offset compensation direction to obtain the offset compensation point of the target point, and replaces the target point with the offset compensation point for processing based on the offset compensation point. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, etc. Server 104 can be a single server, a server cluster consisting of multiple servers, or a cloud computing center consisting of multiple servers.
[0066] In one embodiment, such as Figure 2 As shown, a processing path planning method is provided, which is applied to... Figure 1 Taking server 104 as an example, the following steps are included:
[0067] S1. Based on the judgment result that there are multiple processing patterns, obtain the first processing order of each processing pattern;
[0068] The processing pattern is the pattern to be processed. The processing pattern can be in the format of an image or a vector file.
[0069] The initial processing order of each pattern can be preset by the staff or determined based on the relative positions of the patterns. The initial processing order is the order in which the patterns are processed. For example, given pattern 1, pattern 2, pattern 3, and pattern 4, the initial processing order would be: Pattern 3 - Pattern 4 - Pattern 2 - Pattern 1.
[0070] S2. Traverse each processing pattern according to the first processing order, and determine the first processing start point of the target pattern based on the processing direction and initial processing order of each processing point in the current traversed target pattern. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern.
[0071] In each processing pattern, the first processing starting point is determined sequentially, not simultaneously.
[0072] The processing direction and initial processing sequence of each processing point are pre-set information. The initial processing sequence is the initial processing order of each processing point of the target pattern.
[0073] The first processing starting point is the first processing point in the target pattern. The preceding processing pattern refers to the processing pattern that precedes the target pattern in the first processing sequence. The processing ending point of the preceding processing pattern is the last processing point in that pattern. Since each processing pattern is traversed sequentially, and the second processing order of each pattern is determined sequentially, the second processing order of the preceding processing pattern is already determined when traversing the target pattern. Therefore, the processing ending point of the preceding processing pattern can be determined, and the first processing starting point of the target pattern can be determined based on the processing direction of the processing ending point of the preceding processing pattern.
[0074] The machining direction of the first machining starting point is consistent with the machining direction of the machining end point of the previous machining pattern. This reduces problems such as gaps or incomplete closure of the pattern caused by inconsistent tool directions at the starting points. A schematic diagram for determining the first machining starting point of the target pattern is shown below. Figure 3 As shown, Figure 3 In this diagram, the last point of the previous graphic is the processing endpoint of the preceding pattern, the current graphic is the target pattern, and the first processing point is the first processing start point. A schematic diagram of the processing direction of each processing point in the target pattern is shown below. Figure 4 As shown.
[0075] Furthermore, when the target pattern being traversed is the first processing pattern in the first processing order, the initial processing order of each processing point in the first processing pattern is taken as the second processing order of the first processing pattern. For example, if the initial processing order of each processing point in the first processing pattern is processing point 1-processing point 2-processing point 3, then the second processing order of each processing point in the first processing pattern is also processing point 1-processing point 2-processing point 3. The first processing pattern is the processing pattern that is ranked first in the first processing order.
[0076] Furthermore, when the target pattern being traversed is not the first processing pattern in the first processing sequence, the first processing start point of the target pattern is determined based on the processing direction of each processing point in the target pattern and the initial processing sequence. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern.
[0077] S3. Update the initial processing order based on the first processing starting point to obtain the second processing order of each processing point in the target pattern;
[0078] The second processing order is the processing order of each processing point of the target pattern. The second processing order takes the first processing starting point as the first position and determines the processing order of the remaining processing points based on the processing order of the processing points following the first processing starting point in the initial processing order. For example, if the target pattern has processing point 1, processing point 2, and processing point 3, and after step S2, processing point 2 is determined to be the first processing starting point, then the updated second processing order is processing point 2 - processing point 3 - processing point 1.
[0079] S4. Traverse each processing point of the target pattern according to the second processing order, and determine the offset compensation direction of the target point being traversed. The offset compensation direction is the direction from the previous processing point to the target point.
[0080] Among them, the target point is a non-first processing point of the target pattern, that is, the target point is not the first processing starting point.
[0081] The previous processing point is the processing point that precedes the target point in the second processing sequence.
[0082] Furthermore, when the currently traversed point is the first processing starting point, no offset compensation is performed on the currently traversed point.
[0083] S5. Control the target point to move along the offset compensation direction to obtain the offset compensation point of the target point. Replace the target point with the offset compensation point for processing based on the offset compensation point.
[0084] The distance the target point moves along the offset compensation direction can be set by the operator or determined based on the eccentricity radius of the machining tool. The machining tool is the tool used to process the pattern.
[0085] After obtaining the offset compensation points of each processing point, the first processing sequence, and the second processing sequence, a processing file can be generated based on the processing pattern, the offset compensation points of each processing point, the first processing sequence, and the second processing sequence, and then processing can be performed according to the processing file.
[0086] In the above processing path planning method, based on the judgment result that there are multiple processing patterns, the first processing order of each processing pattern is obtained. Each processing pattern is traversed according to the first processing order. Based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, the first processing start point of the target pattern is determined. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern. The initial processing order is updated based on the first processing start point to obtain the second processing order of each processing point in the target pattern. Each processing point of the target pattern is traversed according to the second processing order, and the offset compensation direction of the currently traversed target point is determined. The offset compensation direction is the direction from the previous processing point to the target point. The target point is controlled to move along the offset compensation direction to obtain the offset compensation point of the target point. The target point is replaced with the offset compensation point. In this way, the processing pattern can be appropriately compensated and planned, effectively avoiding problems such as cutting deformation, non-closure, and loss of edges, thereby improving the finished product qualification rate.
[0087] In one embodiment, step S1 includes:
[0088] S11. Based on the judgment result that there are multiple processing patterns, obtain the number of container patterns for each processing pattern, and classify each processing pattern according to the number of container patterns for each processing pattern to obtain multiple processing pattern sets.
[0089] The "number of container patterns" refers to the total number of patterns on the container. The "container pattern" refers to the number of patterns used in the packaging process. For example... Figure 5 As shown, the pattern of processing pattern 1 includes processing pattern 2, processing pattern 5, and processing pattern 8, so the number of container patterns in processing pattern 1 is 3; the pattern of processing pattern 2 includes processing pattern 5 and processing pattern 8, so the number of container patterns in processing pattern 2 is 2; the pattern of processing pattern 3 includes processing pattern 5 and processing pattern 8, so the number of container patterns in processing pattern 3 is 2; the pattern of processing pattern 4 includes processing pattern 5 and processing pattern 8, so the number of container patterns in processing pattern 4 is 2; the pattern of processing pattern 5 includes processing pattern 8, so the number of container patterns in processing pattern 5 is 1; the pattern of processing pattern 6 includes processing pattern 8, so the number of container patterns in processing pattern 6 is 1; the pattern of processing pattern 7 includes processing pattern 8, so the number of container patterns in processing pattern 7 is 1; the pattern of processing pattern 8 is 0, so the number of container patterns in processing pattern 8 is 0.
[0090] Classification involves grouping processed patterns with the same number of container patterns into the same set of processed patterns. For example, continuing from the example above, processed pattern 1 constitutes one set of processed patterns, processed patterns 2, 3, and 4 constitute another set of processed patterns, processed patterns 5, 6, and 7 constitute another set of processed patterns, and processed pattern 8 constitutes yet another set of processed patterns.
[0091] S12. Sort each set of processing patterns according to the number of processing patterns in each set of processing patterns to obtain the set sorting result;
[0092] Among them, each set of processed patterns is sorted from largest to smallest according to the number of container patterns, and the sorting result of the sets is obtained.
[0093] S13. Traverse each processing pattern set according to the set sorting result, and determine the first center of each processing pattern in the current target set and the second center of the last processing pattern in the previous processing pattern set.
[0094] The first center and the second center refer to the geometric center or the outline center of the circumscribed rectangle.
[0095] The previous processing pattern set refers to the processing pattern set that ranks before the target set in the set sorting result. The last processing pattern refers to the processing pattern that ranks last in the previous processing pattern set. Since each processing pattern set is traversed sequentially, the third processing order of the processing patterns in the previous processing pattern set is already determined when traversing the current set. Therefore, the last processing pattern in the previous processing pattern set can be determined directly based on the third processing order of the previous processing pattern set, thereby determining the second center.
[0096] Furthermore, when the target set is the first processing pattern set and there are multiple processing patterns in the first processing pattern set, the processing patterns in the first processing pattern set are randomly sorted to obtain the third processing order of the processing patterns in the first processing pattern set; the first processing pattern set refers to the processing pattern set that ranks first in the set sorting result.
[0097] S14. Based on each first center and second center, determine the third processing order of the processing patterns in the target set;
[0098] The third processing order of the patterns in the target set is determined based on the distance between each first center and second center.
[0099] S15. Based on the third processing order of each processing pattern set and the set sorting result, the first processing order is obtained.
[0100] The third processing order determines the processing order of each pattern in the pattern set, while the set sorting result determines the processing order of each pattern set. Therefore, based on the third processing order and the set sorting result of each pattern set, the first processing order can be obtained. For example, if the third processing order of pattern set A is pattern 3-pattern 2-pattern 5, the third processing order of pattern set B is pattern 4-pattern 6-pattern 1, and the third processing order of pattern set C is pattern 7-pattern 8, and the set sorting result is pattern set A-pattern set C-pattern set B, then the first processing order is pattern 3-pattern 2-pattern 5-pattern 7-pattern 8-pattern 4-pattern 6-pattern 1.
[0101] In one embodiment, the processing patterns can also be sorted based on the principle of shortest blank line distance to obtain the first processing order of each processing pattern.
[0102] In this embodiment, the number of container patterns for each processing pattern is obtained based on the judgment result that there are multiple processing patterns. The processing patterns are then classified according to the number of container patterns, resulting in multiple processing pattern sets. Each processing pattern set is sorted according to the number of processing patterns in each set, resulting in a set sorting result. Each processing pattern set is traversed according to the set sorting result, and the first center of each processing pattern in the current target set and the second center of the last processing pattern in the previous processing pattern set are determined. Based on the distance between each first center and the second center, the third processing order of the processing patterns in the target set is determined. Based on the third processing order of each processing pattern set and the set sorting result, the first processing order is obtained. This ensures that the inner processing patterns are cut first during processing, preventing subsequent cutting offset problems caused by material falling off during cutting.
[0103] In one embodiment, step S14 includes:
[0104] From the first center, determine the target center that is closest to the second center;
[0105] The processing pattern associated with the target center is determined as the first initial processing pattern in the target set;
[0106] Based on the first initial processing pattern, determine the set of remaining processing patterns;
[0107] The first initial processing pattern is taken as the current pattern to be processed. From the set of remaining processing patterns, the processing pattern with the closest center distance to the current pattern to be processed is determined. The processing pattern with the closest distance is taken as the next current pattern to be processed. This process continues until all remaining processing patterns are sorted, resulting in the third processing order.
[0108] In this context, the processing pattern associated with the target center refers to the processing pattern to which the target center belongs. For example, if the target center is the center of processing pattern 1, then the processing pattern associated with the target center is processing pattern 1.
[0109] The remaining processing pattern set refers to the set of processing patterns in the target set excluding the first initial processing pattern. Furthermore, if the processing order of a certain processing pattern in the remaining processing pattern set has been determined, then that processing pattern is removed from the remaining processing pattern set.
[0110] The first initial processing pattern is the first processing pattern in the third processing sequence.
[0111] In a specific application, the target set includes processing pattern 3, processing pattern 2, processing pattern 5, and processing pattern 6. Processing pattern 3 is the first initial processing pattern. The distance between the center of processing pattern 3 and the center of processing pattern 2 is x, the distance between the center of processing pattern 3 and the center of processing pattern 5 is y, and the distance between the center of processing pattern 3 and the center of processing pattern 6 is z. Since x is less than y and y is less than z, the second position in the third processing sequence is processing pattern 2. The distance between the center of processing pattern 2 and the center of processing pattern 5 is m, and the distance between the center of processing pattern 2 and the center of processing pattern 6 is n. Since m is less than n, the third position in the third processing sequence is processing pattern 5. The final third processing sequence is processing pattern 3 - processing pattern 2 - processing pattern 5 - processing pattern 6.
[0112] In this embodiment, by determining the target center closest to the second center from the first center, the machining pattern associated with the target center is determined as the first initial machining pattern in the target set. Based on the first initial machining pattern, the remaining machining pattern set is determined, and the first initial machining pattern is taken as the current machining pattern to be processed. From the remaining machining pattern set, the machining pattern closest to the center of the current machining pattern to be processed is determined, and the closest machining pattern is taken as the next current machining pattern to be processed. This process continues until all remaining machining patterns are sorted, resulting in the third machining sequence. This effectively shortens the idle travel distance of the machining tool and improves machining efficiency and accuracy.
[0113] In one embodiment, step S2 includes:
[0114] According to the first processing order, each processing pattern is traversed, and based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, multiple candidate processing starting points of the target pattern are determined. The processing direction of the candidate processing starting point is consistent with the processing direction of the processing ending point of the previous processing pattern.
[0115] Calculate the distance between each candidate processing starting point and the processing end point of the previous processing pattern, and determine the candidate processing starting point closest to the processing end point as the first processing starting point.
[0116] The calculated distance is the straight-line distance between the starting point of each candidate processing pattern and the processing endpoint of the previous processing pattern.
[0117] In this embodiment, by traversing each processing pattern according to the first processing order, and based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, multiple candidate processing starting points of the target pattern are determined. The processing direction of the candidate processing starting point is consistent with the processing direction of the processing end point of the previous processing pattern. The distance between each candidate processing starting point and the processing end point of the previous processing pattern is calculated, and the candidate processing starting point closest to the processing end point is determined as the first processing starting point. This can significantly reduce the idle travel in the non-processing state.
[0118] In one embodiment, step S5 includes:
[0119] Determine the target model of the machining tool; the machining tool is the tool used to machine the pattern.
[0120] The eccentric radius of the machining tool is determined based on the target model, and the offset length is determined based on the eccentric radius;
[0121] The target point is moved by an offset length along the offset compensation direction to obtain the offset compensation point of the target point. The target point is then replaced with the offset compensation point for processing based on the offset compensation point.
[0122] The target model of the machining tool can be pre-input into the server. The eccentric radius is the radial offset distance of the actual cutting point (tool tip) relative to the spindle rotation center (or theoretical trajectory center). The eccentric radius of the machining tool is related to its model; therefore, after determining the target model of the machining tool, the eccentric radius can be directly determined based on it.
[0123] The eccentricity radius is the offset length. A schematic diagram illustrating the movement of the target point along the offset compensation direction by the offset length is shown below. Figure 6 As shown. Figure 6 In the diagram, p1 is the previous processing point, p2 is the target point, p3 is the next processing point, A is the steering angle formed by the three points p1, p2, and p3, p2_c1 is the offset compensation point, and R is the offset length.
[0124] Furthermore, when the machining tool is installed eccentrically and its orientation is inconsistent with the eccentric direction, the compensation coefficient of the machining tool is obtained, and the product of the compensation coefficient and the eccentric radius is used as the offset length. The compensation coefficient is a dimensionless or unit-based scaling factor, mainly used to convert the "eccentric radius" into the actual offset length required under the current machining conditions.
[0125] Furthermore, the previous processing point for determining the offset compensation direction is not the offset compensation point, but the original processing point.
[0126] In this embodiment, by determining the target model of the machining tool (the tool used to process the pattern), the eccentric radius of the machining tool is determined based on the target model, and the offset length is determined based on the eccentric radius. The target point is controlled to move along the offset compensation direction by the offset length to obtain the offset compensation point of the target point. The target point is replaced with the offset compensation point, and machining is performed based on the offset compensation point. This can avoid problems such as cutting deformation, incomplete closure, and loss of edges, thereby improving the finished product qualification rate.
[0127] In one embodiment, the method further includes:
[0128] Based on the second processing order of the target pattern, determine the previous and next processing points of the target point being traversed.
[0129] Determine the angle of the turning angle formed by the target point, the previous processing point, and the next processing point;
[0130] When the angle is less than the preset threshold, the offset length is moved along the direction from the target point to the next processing point to obtain the tool return point. The tool return point is used to turn the orientation of the machining tool to the next processing point.
[0131] In this context, the preceding processing point is the processing point that precedes the target point in the second processing sequence of the target pattern, and the following processing point is the processing point that follows the target point in the second processing sequence of the target pattern.
[0132] The turning angle formed by the target point, the previous machining point, and the next machining point is the angle formed by connecting these three points. A schematic diagram of adding the tool return point and offset compensation point is shown below. Figure 7 As shown. Figure 7 In the diagram, p1 is the previous machining point, p2 is the target point, p3 is the next machining point, A is the turning angle formed by the three points p1, p2, and p3, p2_c1 is the offset compensation point, p2_c2 is the tool return point, and R is the offset length.
[0133] Furthermore, the eccentric radius of the machining tool is used as the offset length.
[0134] In this embodiment, when the angle is less than a preset threshold, the offset length is moved along the direction from the target point to the next processing point to obtain the tool return point. This allows the orientation of the machining tool to turn to the next processing point, ensuring the machining accuracy of the corner and preventing corner blunting.
[0135] In one embodiment, the method further includes:
[0136] Based on the first processing sequence, a second initial processing pattern is determined from among multiple processing patterns;
[0137] Based on the second processing sequence of the second initial processing pattern, determine the second processing starting point of the second initial processing pattern;
[0138] When the orientation of the machining tool is inconsistent with the machining direction of the second machining starting point, the orientation of the machining tool is adjusted to be consistent with the machining direction of the second machining starting point.
[0139] The second initial processing pattern is the processing pattern that is first in the first processing sequence. The second processing starting point is the processing point that is first in the second processing sequence of the second initial processing pattern.
[0140] The adjustment of machining tools can be achieved through control commands sent from the server.
[0141] The orientation adjustment of the machining tool is completed in a preset non-machining area, where there is no machining pattern. A schematic diagram of adjusting the orientation of the machining tool is shown below. Figure 8 As shown.
[0142] In this embodiment, a second initial processing pattern is determined among multiple processing patterns based on a first processing sequence. A second processing start point of the second initial processing pattern is determined based on a second processing sequence of the second initial processing pattern. When the orientation of the processing tool is inconsistent with the processing direction of the second processing start point, the orientation of the processing tool is adjusted to be consistent with the processing direction of the second processing start point. This can avoid processing abnormalities caused by the mismatch between the tool orientation and the processing direction.
[0143] In one embodiment, based on the determination that the number of processing patterns is one, the orientation of the processing tool is directly adjusted according to the processing direction of the processing starting point of the processing pattern, while offset compensation is performed for non-processing starting points.
[0144] This application also provides an application scenario in which the above-described processing path planning method is applied. Specifically, the processing path planning method is applied in this scenario as follows:
[0145] Import the machining pattern into the server, and at the same time determine the target model of the machining tool and the number of machining patterns to be imported.
[0146] Based on the judgment that there are multiple processing patterns, the orientation of the processing tool is adjusted according to the processing direction of the processing start point of the processing pattern, and offset compensation is performed on the non-processing start points of the processing pattern. Based on the processing sequence of each processing point in the processing pattern and the offset compensation point, the processing file is generated and output.
[0147] Based on the determination that there are multiple machining patterns, the first machining sequence for each pattern and the second machining sequence for each machining point within the pattern are determined according to their relative positions. The orientation of the machining tool is adjusted based on the machining direction of the second machining starting point, and offset compensation is applied to the machining points. Based on the machining patterns, the offset compensation points for each machining point, the first machining sequence, and the second machining sequence, a machining file is generated and output. The overall flowchart of the machining path planning method is shown below. Figure 9 As shown.
[0148] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0149] Based on the same inventive concept, this application also provides a processing path planning apparatus for implementing the processing path planning method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more processing path planning apparatus embodiments provided below can be found in the limitations of the processing path planning method described above, and will not be repeated here.
[0150] In one embodiment, such as Figure 10 As shown, a processing path planning device is provided, comprising:
[0151] The first order determination module is used to obtain the first processing order of each processing pattern when there are multiple processing patterns;
[0152] The first traversal module is used to traverse each of the processing patterns according to the first processing order, and determine the first processing start point of the target pattern based on the processing direction and initial processing order of each processing point in the currently traversed target pattern. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern.
[0153] The second sequence determination module is used to update the initial processing sequence based on the first processing starting point to obtain the second processing sequence of each processing point in the target pattern;
[0154] The second traversal module is used to traverse each processing point of the target pattern according to the second processing order, and determine the offset compensation direction of the target point being traversed. The offset compensation direction is the direction from the previous processing point to the target point.
[0155] The processing planning module is used to control the target point to move along the offset compensation direction, obtain the offset compensation point of the target point, replace the target point with the offset compensation point, and process based on the offset compensation point.
[0156] Each module in the aforementioned processing path planning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0157] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores various types of data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a processing path planning method.
[0158] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0159] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0160] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0161] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0162] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0163] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0164] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A processing path planning method, characterized in that, The method includes: S1. Based on the determination that there are multiple processing patterns, obtain the first processing order of each processing pattern; S2. Traverse each of the processing patterns according to the first processing order, and determine the first processing starting point of the target pattern based on the processing direction and initial processing order of each processing point in the currently traversed target pattern. The processing direction of the first processing starting point is consistent with the processing direction of the processing ending point of the previous processing pattern. S3. Update the initial processing order based on the first processing starting point to obtain the second processing order of each processing point in the target pattern; S4. Traverse each processing point of the target pattern according to the second processing order, and determine the offset compensation direction of the target point being traversed. The offset compensation direction is the direction from the previous processing point to the target point. S5. Control the target point to move along the offset compensation direction to obtain the offset compensation point of the target point, replace the target point with the offset compensation point, and process based on the offset compensation point.
2. The method according to claim 1, characterized in that, Step S1 includes: S11. Based on the judgment result that the number of processing patterns is multiple, obtain the number of container patterns of each processing pattern, and classify each processing pattern according to the number of container patterns of each processing pattern to obtain multiple processing pattern sets. S12. Sort each set of processing patterns according to the number of processing patterns in each set of processing patterns to obtain a set sorting result; S13. Traverse each processing pattern set according to the sorting result of the set, and determine the first center of each processing pattern in the current target set and the second center of the last processing pattern in the previous processing pattern set. S14. Based on each of the first center and the second center, determine the third processing order of the processing patterns in the target set; S15. Based on the third processing order of each processing pattern set and the sorting result of the set, a first processing order is obtained.
3. The method according to claim 2, characterized in that, Step S14 includes: Determine the target center that is closest to the second center from the first center; The processing pattern associated with the target center is determined as the first initial processing pattern in the target set; Based on the first initial processing pattern, determine the set of remaining processing patterns; Using the first initial processing pattern as the current pattern to be processed, determine the processing pattern with the closest center distance to the current pattern to be processed from the set of remaining processing patterns, and use the closest processing pattern as the next current pattern to be processed, until all remaining processing patterns are sorted to obtain the third processing order.
4. The method according to claim 1, characterized in that, Step S2 includes: According to the first processing order, each processing pattern is traversed, and based on the processing direction and initial processing order of each processing point in the currently traversed target pattern, multiple candidate processing starting points of the target pattern are determined. The processing direction of the candidate processing starting points is consistent with the processing direction of the processing ending point of the previous processing pattern. Calculate the distance between each of the candidate processing starting points and the processing endpoint of the previous processing pattern, and determine the candidate processing starting point closest to the processing endpoint as the first processing starting point.
5. The method according to claim 1, characterized in that, Step S5 includes: Determine the target model of the machining tool, wherein the machining tool is the tool used to machine the machining pattern; The eccentric radius of the machining tool is determined based on the target model, and the offset length is determined based on the eccentric radius; The target point is controlled to move by the offset length along the offset compensation direction to obtain the offset compensation point of the target point. The target point is then replaced with the offset compensation point for processing based on the offset compensation point.
6. The method according to claim 1, characterized in that, The method further includes: Based on the second processing order of the target pattern, determine the previous and next processing points of the target point currently being traversed; Determine the angle of the turning angle formed by the target point, the previous processing point, and the next processing point; When the angle is less than a preset threshold, the offset length is moved along the direction from the target point to the next processing point to obtain the tool alignment point. The tool alignment point is used to turn the orientation of the machining tool to the next processing point.
7. The method according to claim 1, characterized in that, The method further includes: Based on the first processing sequence, a second initial processing pattern is determined among the plurality of processing patterns; Based on the second processing sequence of the second initial processing pattern, determine the second processing starting point of the second initial processing pattern; When the orientation of the machining tool is inconsistent with the machining direction of the second machining starting point, the orientation of the machining tool is adjusted to be consistent with the machining direction of the second machining starting point.
8. A processing path planning device, characterized in that, The device includes: The first order determination module is used to obtain the first processing order of each processing pattern based on the judgment result that there are multiple processing patterns; The first traversal module is used to traverse each of the processing patterns according to the first processing order, and determine the first processing start point of the target pattern based on the processing direction and initial processing order of each processing point in the currently traversed target pattern. The processing direction of the first processing start point is consistent with the processing direction of the processing end point of the previous processing pattern. The second sequence determination module is used to update the initial processing sequence based on the first processing starting point to obtain the second processing sequence of each processing point in the target pattern; The second traversal module is used to traverse each processing point of the target pattern according to the second processing order, and determine the offset compensation direction of the target point being traversed. The offset compensation direction is the direction from the previous processing point to the target point. The processing planning module is used to control the target point to move along the offset compensation direction, obtain the offset compensation point of the target point, replace the target point with the offset compensation point, and process based on the offset compensation point.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.