Clothing cutting path optimization method and system based on greedy K-means and 3-Opt

By planning the cutting path as a TSP model and using K-means clustering and 3-Opt optimization algorithms, an efficient global cutting path is generated, which solves the real-time and accuracy problems of cutting path optimization in large-scale nesting diagrams and improves cutting efficiency and material utilization.

CN121581345APending Publication Date: 2026-02-27GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511611463.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing cutting path optimization algorithms struggle to simultaneously meet accuracy and real-time requirements in large-scale nesting diagrams, and traditional algorithms cannot balance runtime and result quality in industrial applications.

Method used

The pruning path planning problem is set as a standard Traveling Salesman Problem (TSP) model. The K-means clustering algorithm is used to decompose it into local subproblems. The greedy algorithm and the 3-Opt optimization algorithm are combined to generate initial local paths. The global pruning path is formed by optimizing the path through link breakage and reconnection.

Benefits of technology

Significantly reduces the idle travel distance of the cutting blade, increases the total length of the cutting path, ensures rapid response in large-scale pattern layout scenarios, and improves cutting efficiency and material utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121581345A_ABST
    Figure CN121581345A_ABST
Patent Text Reader

Abstract

The invention discloses a clothes tailoring path optimization method and system based on greedy K-means and 3-Opt, and the method is characterized in that the method comprises the following steps: setting a tailoring path planning problem as a standard traveling salesman problem TSP model based on the contour information of clothes pieces to be tailored, and determining the tailoring starting point of each clothes piece; grouping all the cutting starting points by adopting a clustering algorithm, and decomposing the global combination optimization set into a plurality of local subsets; in each group, an initial local path covering all starting points in the corresponding group is rapidly generated by adopting a first path search algorithm, and for each initial local path, optimization processing is performed by adopting a second path optimization algorithm; and splicing all the optimized local paths through a path connection strategy to form a continuous global cutting path, and outputting the global cutting path to cutting execution equipment so as to control the cutting execution equipment to complete cutting operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of clothing cutting path optimization technology, and in particular to a clothing cutting path optimization method and system based on greedy K-means and 3-Opt. Background Technology

[0002] In modern garment manufacturing, with the continuous improvement of digitalization and automation, automated cutting systems have gradually replaced traditional manual cutting. Traditional garment cutting usually relies on manual path planning, which is not only inefficient but also prone to errors due to human factors. In automated cutting systems, the cutting blade moves on the layout diagram according to a pre-planned path. The quality of path planning directly determines cutting efficiency, material utilization, equipment wear, and the accuracy of the final product. Therefore, cutting path optimization algorithms have become one of the core technologies of intelligent cutting systems. Widely used algorithms include: Greedy Algorithms: These algorithms (such as the nearest neighbor algorithm) have a simple structure, run quickly, and can rapidly generate feasible paths. Ant Colony Algorithms: This algorithm performs a global search by simulating the pheromone mechanism in ant colony foraging behavior, and can usually obtain high-quality paths. Genetic Algorithms: This algorithm draws on biological evolution theory, is suitable for global search, and has strong optimization potential.

[0003] With the development of personalized clothing customization, the number of garment pieces in nesting diagrams is increasing and the graphic outlines are becoming more complex. This places higher demands on the solution quality and real-time performance of path planning algorithms. Traditional algorithms can no longer balance accuracy and real-time performance, especially in large-scale nesting diagrams, where the algorithm's running time and result quality cannot simultaneously meet the needs of industrial applications. Therefore, there is an urgent need for a path optimization algorithm that can improve operational efficiency and real-time performance while ensuring optimization effectiveness. Summary of the Invention

[0004] In order to overcome the above-mentioned shortcomings of the prior art, the purpose of this invention is to provide a clothing cutting path optimization method based on greedy K-means and 3-Opt to solve the problems mentioned in the background art.

[0005] The technical solution adopted by this invention to solve its technical problem is: a clothing cutting path optimization method based on greedy K-means and 3-Opt, including the following steps: S1. Based on the outline information of the garment pieces to be cut, the cutting path planning problem is set as a standard Traveling Salesman Problem (TSP) model, and the cutting starting point of each garment piece is determined. S2. Use a clustering algorithm to group all the clipping starting points, decomposing the global combinatorial optimization set into multiple local subsets; S3. Within each group, the first path search algorithm is used to quickly generate an initial local path covering all starting points within the corresponding group. For each initial local path, the second path optimization algorithm is used for optimization. S4. All optimized local paths are spliced ​​together using a path connection strategy to form a continuous global clipping path. The global clipping path is then output to the clipping execution device to control the device to complete the clipping operation.

[0006] As a further improvement of the present invention: step S1 specifically includes: The clothing cutting path planning is defined as the generalized traveling salesman problem (GTSP). Based on the outline corner points of each garment piece in the cutting diagram, and with the preset coordinate center point C as the reference point, the distance from all corner points to the coordinate center point C is calculated. Then, the corner point closest to the coordinate center point C is selected from the set of corner points of each garment piece as the cutting start point of the corresponding garment piece. The generalized traveling salesman problem (GTSP) is set as the standard traveling salesman problem (TSP), thus completing the construction of the path optimization model.

[0007] As a further improvement of the present invention: Step S2 specifically includes: using the K-means clustering algorithm, with Euclidean distance as the clustering basis, to cluster all the obtained clipping starting points, decomposing the original standard Traveling Salesman Problem (TSP) into multiple local sub-TSP problems, wherein the clustering effect is evaluated by the silhouette coefficient to determine the optimal number of clusters K, thereby achieving reasonable grouping of path points.

[0008] As a further improvement of the present invention: the step of evaluating the clustering effect by silhouette coefficient to determine the optimal number of clusters K specifically includes: calculating the silhouette coefficient under different values ​​of the number of clusters K, the value range of the silhouette coefficient is [-1, 1], the closer the silhouette coefficient value is to 1, the better the clustering effect; selecting the K value that makes the silhouette coefficient reach the maximum value as the optimal number of clusters, so as to achieve the most effective grouping of path points.

[0009] As a further improvement of the present invention: Step S3 includes: within each cluster formed by K-means clustering, a local initial path is constructed using the nearest neighbor strategy in the greedy algorithm. The nearest neighbor strategy means that starting from the current point, each step selects the nearest unvisited node as the next visit point until all nodes in the cluster have been visited, thereby generating an initial local path for each cluster.

[0010] As a further improvement of the present invention: step S3 further includes: within each cluster, the initial local path constructed by the greedy algorithm is optimized by the 3-Opt optimization algorithm, by selecting three edges in the path to perform chain breaking operation, and calculating the remaining seven connection methods, calculating and judging whether the length of the new path is shortened, if so, the new path is adopted, and the quality of the local path is optimized through iterative operation.

[0011] As a further improvement of the present invention: the calculation of the remaining seven connection methods specifically includes: enumerating all possible permutations and connection combinations of the remaining path segments after removing three edges, recalculating the total path length for each combination, and selecting the connection method with the shortest length as the optimization result by comparison, so as to ensure that each 3-Opt operation can be carried out in the direction of shortening the path.

[0012] As a further improvement of the present invention: Step S4 specifically includes: after completing the local path optimization of all clusters, the nearest neighbor adjacency algorithm is used to splice the optimized local sub-paths to form a complete global cutting path. The process includes: planning the connection order between sub-regions, identifying the nearest endpoints between adjacent regions as the set of connection points, establishing entry and exit points for the selected connection points to form connections and disconnect links, and calculating the optimal global path connection scheme based on the optimization objective function. The generated optimal global path connection scheme is transmitted to the cutting control system, and the cutting control system drives the cutting blade to perform the cutting task of the garment layout diagram according to the cutting path of the global path connection scheme.

[0013] As a further improvement of the present invention: the optimization objective function is used to minimize the total global path length, and the expression of the optimization objective function is: minZ = ΣZ k -ΣSᵢ + ΣSⱼ; Among them, Z k Let Sᵢ represent the optimized path length of the k-th sub-region, Sᵢ represent the length of the original link when connecting sub-regions, and Sⱼ represent the length of the newly added connection link when connecting different sub-regions. The optimal fusion of global paths is achieved by minimizing the optimization objective function value.

[0014] On the other hand, the present invention also provides a clothing cutting path optimization system for implementing the method, comprising: The path modeling module is used to receive the garment layout data, extract the outline corner points of each garment piece, and set the cutting path planning as a standard Traveling Salesman Problem (TSP) model. The clustering analysis module is communicatively connected to the path modeling module. It is used to receive node information in the TSP model, execute the K-means clustering algorithm, divide all nodes into multiple clusters according to Euclidean distance, and output the grouping results. The local path planning module is communicatively connected to the clustering analysis module and is used to quickly generate the initial local path within each cluster using a greedy nearest neighbor strategy. The local optimization module, which is communicatively connected to the local path planning module, is used to perform the 3-Opt optimization algorithm on the initial local path of each cluster, and iteratively shorten the local path length through the link breakage and reconnection operation. The global path fusion module is communicatively connected to the local optimization module. It is used to receive all optimized local sub-paths and use the nearest neighbor adjacency algorithm to splice these sub-paths into a continuous global optimal pruning path. The path control output module is communicatively connected to the global path fusion module and is used to convert and send the global optimal cutting path to the cutting control system to drive the cutting blade movement.

[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention, based on the contour information of the garment pieces to be cut, sets the cutting path planning problem as a standard Traveling Salesman Problem (TSP) model. It decomposes the large-scale TSP problem into local subproblems using K-means, and combines a greedy algorithm to quickly generate the initial path. Then, the 3-Opt algorithm is used to break and reconnect the three edges, enumerating seven connection methods, effectively overcoming the local optimum trap. This results in a shorter total cutting path length compared to traditional greedy and ant colony algorithms, significantly reducing the unnecessary distance the cutting blade travels. K-means clusters using Euclidean distance and determines the optimal cluster number through contour coefficients, resulting in low computational complexity. Combined with the efficient path construction of the greedy algorithm, it can still respond quickly in large-scale garment piece layout scenarios. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0017] Figure 2 This is a schematic diagram of the system framework of the present invention.

[0018] Figure 3 This is a schematic diagram of the basic path model of the present invention.

[0019] Figure 4 This is a schematic diagram illustrating the principle of the K-means algorithm of this invention.

[0020] Figure 5 This is a schematic diagram of the clustering experiment results of the K-means algorithm of the present invention.

[0021] Figure 6 This is a schematic diagram of the 3-Opt optimization algorithm exchange method of the present invention.

[0022] Figure 7 This is a schematic diagram of the greedy algorithm after 3-Opt optimization of the present invention.

[0023] Figure 8 This is a schematic diagram of the overall global path flow of the present invention. Detailed Implementation

[0024] In order to clearly and completely understand the technical solution, the present invention will be further described in conjunction with the embodiments and accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0027] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] Embodiments of the present invention provide a method for optimizing clothing cutting paths based on greedy K-means and 3-Opt, including the following steps: S1. Based on the outline information of the garment pieces to be cut, the cutting path planning problem is set as a standard Traveling Salesman Problem (TSP) model, and the cutting starting point of each garment piece is determined.

[0029] The clothing cutting path planning is defined as the Generalized Traveling Salesman Problem (GTSP). Based on the outline corner points of each garment piece in the cutting diagram, and using a preset coordinate center point C as the reference point, the distance from all corner points to the coordinate center point C is calculated. Then, the corner point closest to the coordinate center point C is selected from the set of corner points of each garment piece as the cutting start point for that garment piece. This GTSP is then set as the standard Traveling Salesman Problem (TSP), completing the construction of the path optimization model. More specifically, the coordinate center point is the origin. Using the coordinate center point C as the reference point, the distance dij between the j-th corner point of the i-th garment piece and the coordinate center point C is defined as follows: ; The distance from all corner points of the garment pieces to the coordinate center point C can be calculated. Then, from the set of corner points of each garment piece, the corner point closest to point C is selected as the cutting start point for that garment piece, thus simplifying GTSP to the standard TSP form, providing, for example... Figure 3 The basic path model shown.

[0030] S2. A clustering algorithm is used to group all the clipping starting points, decomposing the global combinatorial optimization set into multiple local subsets.

[0031] Using the K-means clustering algorithm, with Euclidean distance as the clustering criterion, all the obtained clipping starting points are clustered, decomposing the original standard Traveling Salesman Problem (TSP) into multiple local sub-TSP problems. The clustering effect is evaluated by the silhouette coefficient to determine the optimal number of clusters K, thus achieving reasonable grouping of path points.

[0032] The large-scale TSP problem is decomposed into multiple spatially related local subproblems, thereby reducing computational complexity. K-means clustering based on Euclidean distance ensures that path points within the same cluster are spatially adjacent. The optimal number of clusters K is determined adaptively by the contour coefficient, enabling the ability to adapt to different nesting diagram complexities.

[0033] The step of evaluating the clustering effect through silhouette coefficient to determine the optimal number of clusters K specifically includes: calculating the silhouette coefficient for different values ​​of the number of clusters K, where the value of the silhouette coefficient is in the range of [-1, 1], and the closer the silhouette coefficient value is to 1, the better the clustering effect; selecting the K value that makes the silhouette coefficient reach its maximum value as the optimal number of clusters to achieve the most effective grouping of path points.

[0034] By calculating the silhouette coefficient under different K values ​​and selecting the K value corresponding to the maximum value, the limitation of the traditional K-means algorithm relying on manual experience to set the number of clusters is overcome. It can optimize the grouping strategy according to the path point distribution characteristics of different layout diagrams. By utilizing the mathematical properties of the silhouette coefficient [-1,1], it provides an accurate measurement standard for the clustering effect, ensuring that each cluster has high compactness while maintaining sufficient separation between clusters. The optimal grouping scheme determined by the silhouette coefficient achieves the best balance between controlling the size of subproblems and maintaining global coordination, avoiding the problem of excessive subproblem size caused by too few groups and preventing path fragmentation caused by too many groups. Thus, it improves computational efficiency while ensuring the quality of the final path.

[0035] The K-means clustering algorithm is used to cluster nodes in the clothing cutting path, decomposing the original large-scale TSP problem into multiple local sub-TSP problems. K-means uses Euclidean distance as the clustering criterion, grouping spatially close path points into the same cluster, which helps with subsequent local path optimization. Compared with complex community detection algorithms, K-means has a faster convergence speed and lower computational complexity, making it more suitable for real-time cutting needs. The K-means algorithm principle diagram is shown below. Figure 4 As shown, the key to the K-means algorithm lies in determining the number of groups. The silhouette coefficient is typically used to measure the clustering effect; a higher silhouette coefficient indicates better clustering. Experimental results are shown below. Figure 5 When the number of clusters is K=4, the silhouette coefficient reaches its maximum value, indicating the best clustering effect; when the number of clusters exceeds 4, the silhouette coefficient gradually decreases, indicating that too many clusters lead to a worse clustering effect.

[0036] S3. Within each group, the first path search algorithm is used to quickly generate an initial local path covering all starting points within the corresponding group. For each initial local path, the second path optimization algorithm is used for optimization.

[0037] Within each cluster formed by K-means clustering, a local initial path is constructed using the nearest neighbor strategy in a greedy algorithm. The nearest neighbor strategy means that starting from the current point, each step selects the nearest unvisited node as the next visit point until all nodes in the cluster have been visited, thereby generating an initial local path for each cluster.

[0038] Within each cluster, a local initial path is constructed using the nearest neighbor strategy from a greedy algorithm. At each step, the node closest to the current point and not yet visited is selected until all points have been visited, generating an initial local path. This strategy can quickly obtain a feasible solution and provide a basic path for subsequent optimization.

[0039] Within each cluster, the initial local path constructed by the greedy algorithm is optimized by the 3-Opt optimization algorithm. This involves selecting three edges in the path to break the chain, calculating the remaining seven connection methods, and determining whether the length of the new path has been shortened. If so, the new path is adopted, and the quality of the local path is optimized through iterative operations. To avoid the greedy algorithm getting trapped in local optima, this method introduces a 3-Opt optimization algorithm based on the greedy path algorithm, with the exchange method as follows: Figure 6As shown. By breaking and reconnecting the three edges in the path, seven other different connection methods are tried to determine whether the path length is shortened. If the path is shorter, the new path is retained. The 3-Opt optimization operation improves the path quality locally and increases the probability of a global solution, effectively enhancing the search capability. The 3-Opt optimized greedy algorithm flow is as follows: Figure 7 As shown.

[0040] The calculation of the remaining seven connection methods specifically includes: enumerating all possible permutations and connection combinations of the remaining path segments after removing three edges, recalculating the total path length for each combination, and selecting the connection method with the shortest length as the optimization result by comparison, ensuring that each 3-Opt operation can be performed in the direction of shortening the path.

[0041] By exhaustively enumerating all seven possible reconnection combinations after removing three edges, and calculating and comparing the path length of each combination, we ensure that the optimal connection scheme in the current neighborhood can be found in each 3-Opt operation. The strategy of full enumeration overcomes the defect of simple optimization algorithms that tend to terminate too early, so that the path can fully converge to the optimal state in the local range, and ensure that each iteration strictly moves in the direction of path shortening.

[0042] S4. All optimized local paths are spliced ​​together using a path connection strategy to form a continuous global clipping path. The global clipping path is then output to the clipping execution device to control the device to complete the clipping operation.

[0043] After optimizing the local paths of all clusters, the nearest neighbor adjacency algorithm is used to stitch together the optimized local sub-paths to form a complete global cutting path. This process includes: planning the connection order between sub-regions, identifying the closest endpoints between adjacent regions as the set of connection points, establishing entry and exit points for the selected connection points to form and disconnect links, and calculating the optimal global path connection scheme based on the optimization objective function. This optimal global path connection scheme is then transmitted to the cutting control system, which drives the cutting blade to execute the cutting task of the garment layout according to the cutting path of the global path connection scheme. The final shortest cutting path is exported to the cutting control system to guide the cutting blade movement and complete the cutting task of the entire garment layout. This method supports standard path file formats and is compatible with mainstream cutting software.

[0044] The optimization objective function is used to minimize the total length of the global path, and its expression is: minZ = ΣZ k -ΣSᵢ + ΣSⱼ; Among them, Z kLet Sᵢ represent the optimized path length of the k-th sub-region, Sᵢ represent the length of the original link when connecting sub-regions, and Sⱼ represent the length of the newly added connection link when connecting different sub-regions. The optimal fusion of global paths is achieved by minimizing the optimization objective function value.

[0045] After optimizing all local sub-paths, they need to be concatenated into a complete path. The nearest neighbor adjacency algorithm is used for inter-class path connection, and the function expression for the optimal inter-class connection path is: minZ = ΣZ k -ΣSᵢ + ΣSⱼ, when applying the nearest neighbor adjacency method, the connection order between sub-regions must first be planned; secondly, points that are close to each other between adjacent regions must be identified as a set of possible connection points; subsequently, corresponding entry and exit points are selected from these connection points to establish the links for connection and disconnection; finally, the optimal path is calculated according to the formula, thus obtaining the solution to the problem. Based on the optimization results, the sub-paths are merged into a global path, and the overall flowchart is as follows: Figure 8 As shown.

[0046] On the other hand, the present invention also provides a clothing cutting path optimization system for implementing the method, comprising: The path modeling module is used to receive the garment layout data, extract the outline corner points of each garment piece, and set the cutting path planning as a standard Traveling Salesman Problem (TSP) model. The clustering analysis module is communicatively connected to the path modeling module. It is used to receive node information in the TSP model, execute the K-means clustering algorithm, divide all nodes into multiple clusters according to Euclidean distance, and output the grouping results. The local path planning module is communicatively connected to the clustering analysis module and is used to quickly generate the initial local path within each cluster using a greedy nearest neighbor strategy. The local optimization module, which is communicatively connected to the local path planning module, is used to perform the 3-Opt optimization algorithm on the initial local path of each cluster, and iteratively shorten the local path length through the link breakage and reconnection operation. The global path fusion module is communicatively connected to the local optimization module. It is used to receive all optimized local sub-paths and use the nearest neighbor adjacency algorithm to splice these sub-paths into a continuous global optimal pruning path. The path control output module is communicatively connected to the global path fusion module and is used to convert and send the global optimal cutting path to the cutting control system to drive the cutting blade movement.

[0047] In summary, after reading this invention document, those skilled in the art can make various other corresponding modifications to the technical solutions and concepts based on this invention without creative mental effort, and all of these modifications fall within the scope of protection of this invention.

Claims

1. A method for optimizing clothing cutting paths based on greedy K-means and 3-Opt, characterized in that, Includes the following steps: S1. Based on the outline information of the garment pieces to be cut, the cutting path planning problem is set as a standard Traveling Salesman Problem (TSP) model, and the cutting starting point of each garment piece is determined. S2. Use a clustering algorithm to group all the clipping starting points, decomposing the global combinatorial optimization set into multiple local subsets; S3. Within each group, the first path search algorithm is used to quickly generate an initial local path covering all starting points within the corresponding group. For each initial local path, the second path optimization algorithm is used for optimization. S4. All optimized local paths are spliced ​​together using a path connection strategy to form a continuous global clipping path. The global clipping path is then output to the clipping execution device to control the device to complete the clipping operation.

2. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 1, characterized in that, Step S1 specifically includes: The clothing cutting path planning is defined as the generalized traveling salesman problem (GTSP). Based on the outline corner points of each garment piece in the cutting diagram, and with the preset coordinate center point C as the reference point, the distance from all corner points to the coordinate center point C is calculated. Then, the corner point closest to the coordinate center point C is selected from the set of corner points of each garment piece as the cutting start point of the corresponding garment piece. The generalized traveling salesman problem (GTSP) is set as the standard traveling salesman problem (TSP), thus completing the construction of the path optimization model.

3. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 1, characterized in that, Step S2 specifically includes: using the K-means clustering algorithm, with Euclidean distance as the clustering basis, to cluster all the obtained clipping starting points, decomposing the original standard Traveling Salesman Problem (TSP) into multiple local sub-TSP problems, wherein the clustering effect is evaluated by the silhouette coefficient to determine the optimal number of clusters K, thereby achieving reasonable grouping of path points.

4. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 3, characterized in that, The step of evaluating the clustering effect through silhouette coefficient to determine the optimal number of clusters K specifically includes: calculating the silhouette coefficient for different values ​​of the number of clusters K, where the value of the silhouette coefficient is in the range of [-1, 1], and the closer the silhouette coefficient value is to 1, the better the clustering effect; selecting the K value that makes the silhouette coefficient reach its maximum value as the optimal number of clusters to achieve the most effective grouping of path points.

5. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 1, characterized in that, Step S3 includes: within each cluster formed by K-means clustering, a local initial path is constructed using the nearest neighbor strategy in the greedy algorithm. The nearest neighbor strategy means that starting from the current point, each step selects the nearest unvisited node as the next visit point until all nodes in the cluster have been visited, thereby generating an initial local path for each cluster.

6. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 1, characterized in that, Step S3 further includes: within each cluster, optimizing the initial local path constructed by the greedy algorithm using the 3-Opt optimization algorithm, selecting three edges in the path to break the chain, calculating the remaining seven connection methods, calculating and determining whether the length of the new path is shortened, and if so, adopting the new path, and optimizing the quality of the local path through iterative operations.

7. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 6, characterized in that, The calculation of the remaining seven connection methods specifically includes: enumerating all possible permutations and connection combinations of the remaining path segments after removing three edges, recalculating the total path length for each combination, and selecting the connection method with the shortest length as the optimization result by comparison, ensuring that each 3-Opt operation can be performed in the direction of shortening the path.

8. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 1, characterized in that, Step S4 specifically includes: after completing the local path optimization of all clusters, the nearest neighbor adjacency algorithm is used to stitch together the optimized local sub-paths to form a complete global cutting path. The process includes: planning the connection order between sub-regions, identifying the nearest endpoints between adjacent regions as the set of connection points, establishing entry and exit points for the selected connection points to form connections and disconnect links, and calculating the optimal global path connection scheme based on the optimization objective function. The generated optimal global path connection scheme is then transmitted to the cutting control system, which drives the cutting blade to perform the cutting task of the garment layout diagram according to the cutting path of the global path connection scheme.

9. The method for optimizing clothing cutting paths based on greedy K-means and 3-Opt as described in claim 8, characterized in that, The optimization objective function is used to minimize the total length of the global path, and its expression is: minZ = ΣZ k -ΣSᵢ + ΣSⱼ Among them, Z k Let Sᵢ represent the optimized path length of the k-th sub-region, Sᵢ represent the length of the original link when connecting sub-regions, and Sⱼ represent the length of the newly added connection link when connecting different sub-regions. The optimal fusion of global paths is achieved by minimizing the optimization objective function value.

10. A clothing cutting path optimization system for implementing the method of any one of claims 1-9, comprising: The path modeling module is used to receive the garment layout data, extract the outline corner points of each garment piece, and set the cutting path planning as a standard Traveling Salesman Problem (TSP) model. The clustering analysis module is communicatively connected to the path modeling module. It is used to receive node information in the TSP model, execute the K-means clustering algorithm, divide all nodes into multiple clusters according to Euclidean distance, and output the grouping results. The local path planning module is communicatively connected to the clustering analysis module and is used to quickly generate the initial local path within each cluster using a greedy nearest neighbor strategy. The local optimization module, which is communicatively connected to the local path planning module, is used to perform the 3-Opt optimization algorithm on the initial local path of each cluster, and iteratively shorten the local path length through the link breakage and reconnection operation. The global path fusion module is communicatively connected to the local optimization module. It is used to receive all optimized local sub-paths and use the nearest neighbor adjacency algorithm to splice these sub-paths into a continuous global optimal pruning path. The path control output module is communicatively connected to the global path fusion module and is used to convert and send the global optimal cutting path to the cutting control system to drive the cutting blade movement.