A cutting trajectory planning method, apparatus, and computer-readable storage medium
Patent Information
- Application Number
- CN202511935752.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-12-19
AI Technical Summary
这一过程不仅耗时且易因人为疏漏导致路径冲突或加工偏差,尤其在多工件协同加工场景下,效率瓶颈尤为显著
Smart Images

Figure CN121704334B_ABST
Abstract
Description
Technical Field
[0001] This article relates to industrial processing technology, and in particular to a cutting trajectory planning method, apparatus and computer-readable storage medium. Background Technology
[0002] Wire EDM is a precision manufacturing technology developed from electrical discharge machining. It is widely used in mold processing, forming electrode processing, and single-piece and small-batch parts processing.
[0003] In existing technologies, wire electrical discharge machining often relies on manual matching of workpiece graphics with wire-threading holes and manual planning of the cutting paths for punches and dies. This process is not only time-consuming but also prone to path conflicts or machining deviations due to human error, especially in scenarios involving the collaborative machining of multiple workpieces, where efficiency bottlenecks are particularly significant. Summary of the Invention
[0004] This application provides a cutting trajectory planning method, apparatus, and computer-readable storage medium, which can realize batch programming of multiple punches and dies, and improve the efficiency of generating machining programs.
[0005] This application provides a cutting trajectory planning method, the method comprising: A bipartite graph model is established for the workpiece graphic set and the wire-threading hole set, and a weight matrix is constructed based on the edge set in the established bipartite graph model; wherein, the workpiece graphic set includes one or more workpiece graphics to be cut trajectory planned, and the wire-threading hole set includes wire-threading holes set for performing electrical discharge wire cutting on one or more workpiece graphics in the workpiece graphic set. Based on the obtained weight matrix, the bipartite graph matching algorithm is used to perform optimal matching on the set of workpiece graphic nodes and the set of wire-threading hole nodes in the established bipartite graph model, and the matching pairs between workpiece graphic and wire-threading hole are determined according to the workpiece graphic nodes and wire-threading hole nodes that can match each other. Based on the obtained matching pairs, the workpiece graphics in the workpiece graphic set are classified into a set of die workpiece graphics and a set of punch workpiece graphics. Then, combined with the starting point position of the workpiece graphics, a first correspondence between the die workpiece graphics in the set of die workpiece graphics and their starting point position is obtained, and a second correspondence between the punch workpiece graphics in the set of punch workpiece graphics and their starting point position is obtained. The starting point position of the workpiece graphics is determined according to the wire threading hole of the workpiece graphics. Based on the obtained first and second correspondences, the cutting trajectory is planned for the workpiece graphics in the set of concave die workpiece graphics and the set of convex die workpiece graphics.
[0006] This application embodiment also provides a cutting trajectory planning device, including: a memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program, and to execute the cutting trajectory planning method as described above.
[0007] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it can implement the cutting trajectory planning method as described above.
[0008] Compared with related technologies, the cutting trajectory planning method, apparatus, and computer-readable storage medium provided in this application generate matching pairs between workpiece graphics and wire-threading holes by introducing a matching algorithm for workpiece graphics and wire-threading holes. Based on the obtained matching pairs, the die / punch workpiece graphics are divided to obtain a set of die workpiece graphics and a set of punch workpiece graphics. The first correspondence between the die workpiece graphics in the set of die workpiece graphics and their starting point position is obtained by combining the starting point position of the workpiece graphics. The second correspondence between the punch workpiece graphics in the set of punch workpiece graphics and their starting point position is obtained. Then, the cutting trajectory of the workpiece graphics is planned according to the first and second correspondences, thereby significantly reducing the amount of manual intervention, greatly improving the speed of trajectory planning in wire EDM, and improving the efficiency of machining program generation.
[0009] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. Other advantages of this application can be realized and obtained by means of the embodiments described in the description and the accompanying drawings. Attached Figure Description
[0010] The accompanying drawings are used to provide an understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0011] Figure 1 This is a flowchart illustrating a cutting trajectory planning method according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating the process of obtaining a set of punch workpiece graphics and a set of die workpiece graphics according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating the correspondence between a workpiece graphic and a cutting point according to an embodiment of this application; Figure 4 This is a flowchart illustrating another cutting trajectory planning method according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a cutting trajectory planning device according to an embodiment of this application; Figure 6 This is a schematic diagram of another cutting trajectory planning device according to an embodiment of this application. Detailed Implementation
[0012] This application describes several embodiments, but these descriptions are exemplary and not limiting, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.
[0013] This application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this application can also be combined with any conventional features or elements to form unique inventive solutions. Any feature or element of any embodiment can also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application can be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes can be made within the scope of the appended claims.
[0014] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.
[0015] This disclosure provides a cutting trajectory planning method, such as... Figure 1 As shown, the method includes: Step 100: Establish a bipartite graph model of the workpiece graphic set and the wire-threading hole set, and construct a weight matrix based on the edge set in the established bipartite graph model; wherein, the workpiece graphic set includes one or more workpiece graphics to be cut trajectory planned, and the wire-threading hole set includes wire-threading holes set for performing electrical discharge wire cutting on one or more workpiece graphics in the workpiece graphic set.
[0016] The construction of the workpiece graphic set and the wire-threading hole set requires graphic preprocessing. Preprocessing includes two core steps: first, the integration of graphic elements, combining connected straight lines, arcs, spline curves, elliptical arcs, and polylines into a continuous overall structure; second, redundancy elimination, ensuring the uniqueness and accuracy of the dataset by removing overlapping or duplicate graphic elements. This process aims to optimize the geometric representation of the machining path, providing standardized basic data for subsequent calculation of process parameters. During the construction of the workpiece graphic set and the wire-threading hole set, all graphic elements can be scanned sequentially. When a maximum diameter threshold for the wire-threading hole is set, circles with a diameter not exceeding that threshold are identified as wire-threading holes; if no threshold is set, all circles are identified as wire-threading holes by default, and other non-circular geometric shapes are classified as workpieces to be processed.
[0017] The wire-threading holes in the wire-threading hole set may be set in a one-to-one correspondence with the workpiece graphics in the workpiece graphics set, or they may not be set in a one-to-one correspondence with the workpiece graphics in the workpiece graphics set. That is, the number of wire-threading holes is greater than the number of workpiece graphics in the workpiece graphics set, or the number of wire-threading holes is less than the number of workpiece graphics in the workpiece graphics set.
[0018] A bipartite graph model can be composed of a set of workpiece graphic nodes, a set of wire-threading hole nodes, and a set of edges connecting these two sets. By constructing this bipartite graph model, the inefficient process of manually comparing workpiece graphics with wire-threading holes one by one can be transformed into a mathematical optimization problem, significantly improving the efficiency of wire-threading hole allocation and reducing human error. The established bipartite graph model has dynamic adjustment capabilities. When a wire-threading hole fault is detected or the number of workpiece graphics changes, the workpiece graphic nodes in the workpiece graphic node set and the wire-threading hole nodes in the wire-threading hole node set can be adjusted, and the weights of the edge set can be recalculated to reconstruct the bipartite graph model. This dynamic adjustment mechanism enables the cutting trajectory planning method to respond to changes in the processing environment in real time, thereby improving its adaptability to varying production conditions and ensuring that the matching between workpiece graphics and wire-threading holes is always in an optimal state.
[0019] Step 101: Based on the obtained weight matrix, the bipartite graph matching algorithm is used to perform optimal matching on the set of workpiece graphic nodes and the set of wire-threading hole nodes in the established bipartite graph model, and the matching pairs between the workpiece graphic and wire-threading hole are determined according to the workpiece graphic nodes and wire-threading hole nodes that can match each other.
[0020] There is a one-to-one mapping between workpiece graphic nodes and workpiece graphics, and a similar one-to-one mapping between threading hole nodes and threading holes. Based on this mapping, the matching pairs between workpiece graphics and threading holes can be directly derived from the matching results of the workpiece graphic node set and the threading hole node set in the bipartite graph model. Specifically, if a workpiece graphic node and a threading hole node are determined to be the optimal match in the bipartite graph, then the corresponding workpiece graphic and threading hole form a valid matching pair.
[0021] Step 102: Based on the obtained matching pairs, classify the workpiece graphics in the workpiece graphic set into a set of die workpiece graphics and a set of punch workpiece graphics. Combine the starting point position of the workpiece graphics to obtain the first correspondence between the die workpiece graphics in the set of die workpiece graphics and their starting point position, and the second correspondence between the punch workpiece graphics in the set of punch workpiece graphics and their starting point position; wherein, the starting point position of the workpiece graphics is determined according to the wire threading hole of the workpiece graphics.
[0022] Based on the matching pairs, the relative positional relationship between the workpiece pattern and the wire-threading hole can be determined, thus classifying the workpiece patterns into two categories: die-cutting workpiece patterns and punch-cutting workpiece patterns. The first correspondence refers to the correspondence between each die-cutting workpiece pattern in the die-cutting workpiece pattern set and its starting point position, while the second correspondence refers to the correspondence between each punch-cutting workpiece pattern in the punch-cutting workpiece pattern set and its starting point position.
[0023] The starting point of the cutting of the workpiece pattern can be determined based on the center of the wire threading hole of the workpiece pattern.
[0024] Step 103: According to the obtained first correspondence and second correspondence, perform cutting trajectory planning for the workpiece graphics in the set of concave die workpiece graphics and the set of convex die workpiece graphics.
[0025] The first correspondence reveals the correspondence between each die workpiece graphic in the die workpiece graphic set and its starting point position, and the second correspondence reveals the correspondence between each punch workpiece graphic in the punch workpiece graphic set and its starting point position. Therefore, based on the obtained first and second correspondences, cutting trajectory planning is performed on the workpiece graphics in the die workpiece graphic set and the punch workpiece graphic set.
[0026] The cutting trajectory planning method provided in this application generates matching pairs between workpiece graphics and wire-threading holes by introducing a matching algorithm for workpiece graphics and wire-threading holes. Based on the obtained matching pairs, the die / punch workpiece graphics are divided to obtain a set of die workpiece graphics and a set of punch workpiece graphics. The first correspondence between the die workpiece graphics in the set of die workpiece graphics and their starting point position is obtained by combining the starting point position of the workpiece graphics. The second correspondence between the punch workpiece graphics in the set of punch workpiece graphics and their starting point position is obtained. Then, the cutting trajectory of the workpiece graphics is planned according to the first and second correspondences, thereby significantly reducing the amount of manual intervention, greatly improving the speed of trajectory planning in wire EDM, and improving the efficiency of machining program generation.
[0027] In one exemplary instance, step 100 above includes: Step 100a: Map each workpiece graphic in the workpiece graphic set to a workpiece graphic node to obtain the workpiece graphic node set in the bipartite graph model; map each wire hole in the wire hole set to a wire hole node to obtain the wire hole node set in the bipartite graph model; and construct the edge set in the bipartite graph model according to the processing relationship between each workpiece graphic in the workpiece graphic set and each wire hole in the wire hole set.
[0028] In mold manufacturing or precision machining scenarios, the process of constructing a bipartite graph model aims to transform the complex machining relationship between workpieces and wire-threading holes into a computable graph structure, thereby achieving efficient optimization. Specifically, firstly, each workpiece graphic in the workpiece graphic set is abstracted as a workpiece graphic node, forming the first part of the bipartite graph model; simultaneously, each wire-threading hole in the wire-threading hole set is mapped as a wire-threading hole node, forming the second part. These two sets of nodes correspond to two independent vertex sets of the bipartite graph, and their partitioning is based on the physical separation characteristics of the workpiece and wire-threading holes in actual machining, i.e., the workpiece is the object being machined, while the wire-threading hole is an auxiliary structure used to guide the machining path or fix the tool.
[0029] Next, an edge set is constructed based on the machining relationship between the workpiece graphic and the wire-threading hole. This relationship is usually determined by process requirements, such as whether a wire-threading hole can serve as the starting cutting point for a specific workpiece graphic, whether the position of the wire-threading hole satisfies the accessibility of the workpiece machining path, or whether the size of the wire-threading hole matches the geometric features of the workpiece. The existence of each edge means that the corresponding workpiece graphic can be machined through that wire-threading hole, and the weight of the edge may further reflect the priority in actual operation. For example, in wire EDM, if a workpiece needs to be cut starting from wire-threading hole A, an edge is established between the workpiece node and wire-threading hole A; if wire-threading hole B cannot be used for the workpiece due to positional limitations, no connection is established.
[0030] Through this modeling method, the bipartite graph model transforms the machining constraints in physical space into a graph theory problem, accurately matching each workpiece graphic with its corresponding wire-threading hole, i.e., the starting point position, thereby providing a reliable basis for automatically planning the cutting path.
[0031] Step 100b: Assign corresponding weights to each edge based on the minimum Euclidean distance between the workpiece graphic associated with each edge in the edge set and the wire-threading hole, so as to obtain the weight matrix.
[0032] In constructing a bipartite graph model, assigning weights to each edge in the edge set is a crucial step in optimizing the machining path. Specifically, the weights are set based on the minimum Euclidean distance between workpiece graphic nodes and threading hole nodes. Euclidean distance, as a measure of the shortest path between two points in geometric space, represents the straight-line distance between the geometric center or key feature point (such as the contour edge) of the workpiece graphic and the center point of the threading hole in this scenario. By calculating the minimum Euclidean distance between all workpiece graphics and threading holes, the proximity of the two in physical space can be quantified, thus assigning weights to the edges.
[0033] This process can be implemented by the following steps: First, extract the complete geometric boundary information of each workpiece graphic (including all line segments, arcs, and other edge elements) and the coordinate position of the threading hole; second, for each edge (whether a straight line segment or an arc), calculate the minimum Euclidean distance between it and the threading hole. For example, for a line segment, it is necessary to determine whether the foot of the perpendicular from the threading hole to the line segment falls inside the line segment. If so, the distance from the foot of the perpendicular to the threading hole is the minimum distance; otherwise, take the closer of the two endpoints. For an arc, it is necessary to consider the shortest distance from any point on the arc to the threading hole. This closest point may be located inside the arc rather than at an endpoint; finally, take the minimum value among all the minimum distances between the edges and the threading hole as the weight of the edge between the workpiece graphic and the threading hole. Extract the geometric feature points (such as the centroid or contour vertices) and the coordinate position of the threading hole of each workpiece graphic; second, use the Euclidean distance formula to calculate the distance between the workpiece graphic and the threading hole, and take the minimum value as the weight of the edge. For example, if the outline of a workpiece is composed of multiple points, it is necessary to traverse all the coordinate combinations of the points and the wire-threading holes to find the minimum distance value. This value reflects the convenience of the wire-threading hole as a machining starting point or path node—the smaller the distance, the more beneficial it is to reduce the tool movement path and energy consumption.
[0034] In one exemplary instance, step 100b in the above embodiments includes: Determine whether the number of workpiece patterns in the workpiece pattern set is consistent with the number of wire-threading holes in the wire-threading hole set; In response to the judgment result of consistent quantity, the weight matrix is obtained according to the weights assigned to each edge; In response to the determination of inconsistent quantities, virtual nodes are created based on the difference between the number of workpiece graphics and the number of wire-threading holes. The maximum weight among the weights assigned to each edge is used as the weight of the edge associated with the virtual node, and the weight matrix is obtained by combining the weights assigned to each edge. The created virtual nodes are either workpiece graphics virtual nodes or wire-threading hole virtual nodes.
[0035] In a bipartite graph model, if the number of workpiece graphic nodes and the number of threading hole nodes are inconsistent (e.g., the number of workpiece graphics is greater than the number of threading holes, or vice versa), virtual nodes need to be created to balance the scale of the two sets of nodes to meet the requirements of subsequent matching algorithms (such as minimum weight matching) for the bipartite graph structure. The specific operation is as follows: If the number of workpiece graphics is greater than the number of threading holes, virtual threading hole nodes are added (the number is the difference between the two). These virtual nodes are only used for mathematical modeling and do not correspond to actual threading holes. If the number of threading holes is greater than the number of workpiece graphics, virtual workpiece graphic nodes are added (the number is the difference between the two). These virtual nodes also do not correspond to actual workpiece graphics.
[0036] The edge weights between virtual nodes and all nodes in another set are uniformly set to the maximum value in the original weight matrix. This setting offers the following advantages: 1. It avoids the algorithm prioritizing virtual nodes. Since virtual nodes represent "infeasible" or "high-cost" matches, assigning them the maximum weight ensures that the algorithm prioritizes matching real nodes during optimization, and virtual nodes are only selected when allocation is necessary. 2. It maintains mathematical consistency. By using a uniformly high weight value, it ensures that the introduction of virtual nodes does not interfere with the matching logic between real nodes.
[0037] The cutting trajectory planning method provided in this application introduces virtual nodes (including virtual nodes for workpiece graphics or virtual nodes for threading holes) when the number of workpiece graphics and the number of threading holes are inconsistent. The maximum value among the actual weights is used as the weight of the virtual edge, effectively expanding the matching structure of the bipartite graph. This mechanism ensures that the graph model always possesses a complete, square matrix weight matrix, thus providing a foundation for applying bipartite graph matching algorithms. More importantly, the introduction of virtual nodes avoids the forced neglect or omission of some real workpiece graphics or threading holes due to quantity mismatch, significantly reducing the probability of missed matches and improving the completeness and reliability of starting point identification, laying the foundation for automatic and accurate cutting trajectory planning.
[0038] In one exemplary instance, step 101 of the above embodiment, based on the obtained weight matrix, uses a bipartite graph matching algorithm to perform optimal matching on the workpiece graphic node set and the wire-threading hole node set in the established bipartite graph model, including: Construct a set of dual variables corresponding to the set of workpiece graphic nodes and the set of wire-threading hole nodes in the bipartite graph model.
[0039] Repeat the following steps until the matching process between all workpiece graphic nodes and wire-threading hole nodes is completed, and the final set of matching edges is obtained: construct an equality subgraph based on the current dual variable values and the weight matrix; execute the augmented path search algorithm in the constructed equality subgraph, and update the set of matching edges based on the augmented path search results.
[0040] The optimal matching is performed on the workpiece graphic node set and the wire-threading hole node set based on the finally obtained matching edge set.
[0041] For example, after the algorithm completes the iterative process (including constructing an equal subgraph, augmenting path search, and updating the dual variable), the final set of matching edges is the optimal solution that satisfies the following conditions: Maximum matching: The number of matching edges reaches the theoretical maximum value, and as many workpiece graphics as possible are paired with wire-threading holes. The implementation of minimum weight matching does not simply pursue the shortest physical distance between the workpiece graphics and wire-threading holes, but rather establishes the optimal correlation between the workpiece graphics and wire-threading holes through a global optimization strategy of the graph theory matching model. Specifically, the algorithm aims at globally optimal matching, comprehensively considers the weight distribution of all potential matching relationships, and prioritizes the combination scheme that maximizes the overall matching accuracy. This global-perspective optimization mechanism ensures that the matching results are reliable not only in single-point matching but also guarantee the accuracy of the correspondence between the workpiece graphics and wire-threading holes at the overall level. Through this strategy, the starting point position (i.e., the coordinates of the wire-threading hole corresponding to the workpiece graphics) can be accurately identified, significantly improving the detection accuracy of the starting point and providing high-confidence input data for subsequent automatic planning of the cutting trajectory. Compared to local matching optimization (such as focusing only on the matching of a single workpiece or wire hole), the global weight minimization matching method can effectively avoid the trap of local optima and achieve a more robust matching effect.
[0042] The cutting trajectory planning method provided in this application introduces a dual variable mechanism, thereby transforming the original optimal matching problem into a form that can be efficiently solved on an equality subgraph. Through dynamic adjustment of the dual variables, the optimal solution satisfying the complementary relaxation condition can be gradually approximated, significantly improving the algorithm's convergence efficiency while ensuring matching accuracy. Furthermore, the equality subgraph constructed based on the dual variables effectively reduces the search space, making the search for augmenting paths more focused and efficient, avoiding blind traversal of the entire graph, and thus improving the stability and accuracy of the matching between the workpiece graphic and the threading hole.
[0043] In one exemplary instance, the above instance involves performing an augmenting path search algorithm on the constructed equality subgraph and updating the matching edge set based on the augmenting path search results, including: Find augmenting paths in the equality subgraph; In response to finding an augmenting path, the matching state of the edges along that augmenting path is flipped to update the set of matching edges; In response to the case where no augmenting path is found, adjust the value of the dual variable, reconstruct the equality subgraph, and continue searching for augmenting paths.
[0044] For example, in the bipartite graph matching problem, the matching process of all workpiece graphic nodes and wire-threading hole nodes can be completed step by step by repeatedly performing the following steps: Construct an equality subgraph: based on the current dual variable u p (Workpiece graphic node) and v q The value of (threading hole node) is selected to satisfy u. p +v q =W pq The edges (i.e., edges whose weights equal the sum of their dual variables) form an equality subgraph. The edges in the equality subgraph represent current possible matching candidates because their weights have reached the upper bound of the dual variable constraints. For example, if the dual variable u of a workpiece graphic node p... p =2, the dual variable v of the wire-threading node q. q =3, and weight W pq If the value is 5, then the edge (p, q) will be included in the equality subgraph.
[0045] Perform augmenting path search: In the equality subgraph, find augmenting paths using either Depth-First Search (DFS) or Breadth-First Search (BFS). An augmenting path is a path that starts from an unmatched workpiece graphic node, alternates between matched and unmatched edges, and finally reaches the unmatched wire hole node. For example, if the current matched edge is (p1, q1), and the augmenting path is p1 → q1 → p2 → q2, then by flipping the matching states on the path (i.e., canceling (p1, q1) and adding (p2, q1) and (p1, q2)), the overall number of matches can be increased.
[0046] Update the matching edge set: If an augmenting path is found, adjust the matching edge set according to the path: unmatched edges on the path become matched edges, and matched edges become unmatched edges. For example, if the augmenting path is p→q→p′→q′, then the matched edge (p′,q) is removed, and (p,q) and (p′,q′) are added. This operation increases the number of matches by 1. If no augmenting path is found, the dual variables need to be adjusted. Calculate the difference between the dual variables of all reachable workpiece graphic nodes and unreachable wire hole nodes in the equality subgraph, and adjust the dual variables to expand the range of the equality subgraph. For example, reduce the u of the workpiece graphic nodes. p Or increase the v of the wire threading hole node q This makes the original unsatisfactory u p +v q =Wpq The edges enter the equal subgraph.
[0047] Repeat the iteration until completion: The above steps are executed cyclically until all workpiece graphic nodes and wire-threading hole nodes are matched (i.e., the set of matched edges covers all nodes). At this point, there are no augmenting paths in the equality subgraph, and the dual variable adjustment has optimized the matching result. For example, when virtual nodes exist, the algorithm will prioritize matching real nodes, and only introduce virtual nodes when real nodes cannot be completely matched, thereby ensuring the optimality of the actual machining path.
[0048] The core of this process is to gradually expand the feasible matching range by dynamically adjusting the dual variables and equal subgraphs, ultimately achieving the goal of maximum matching or minimum weighted matching. For example, in a mold cutting scenario, this method can ensure that each workpiece graphic is associated with a suitable wire-threading hole through the shortest path, thereby optimizing cutting efficiency and reducing resource waste.
[0049] In the cutting trajectory planning method provided in this application, the process of optimally matching the workpiece graphic node set and the wire-threading hole node set (i.e., obtaining the workpiece graphic nodes and wire-threading hole nodes that can match each other, that is, the automatic matching of workpiece graphic nodes and wire-threading hole nodes) can be as follows: 1. Establish a bipartite graph model G = (X,Y,E), where X represents the set of workpiece shapes, Y represents the set of wire-threading holes, E represents the edges between all nodes in X and all nodes in Y, n1 is the number of workpiece shapes, n2 is the number of wire-threading hole shapes, and w is the weight of each edge. ij (i=1,2,…,n1, j=1,2,…,n2) is set as the minimum Euclidean distance from the center of the j-th wire-threading hole (i.e., the center of the circle) to the i-th graphic. A weight matrix is established, transforming the matching relationship between the workpiece graphic and the wire-threading hole into finding the optimal matching of the bipartite graph G, which is obtained using the following formula: If n1 and n2 are the same, let n = n1 = n2, then proceed to step 3.
[0050] 2. If the number of workpiece graphics and the number of wire-threading holes are different, i.e., the values of n1 and n2 are not equal, then calculate the maximum value of the current weight matrix. w max Create a virtual node and set the weight of the edge associated with the virtual node to the maximum value. w max To ensure that the number of rows and columns of the weight matrix is the same, both being max(n1,n2), let n = max(n1,n2).
[0051] 3. Based on duality theory, create dual variables for sets X and Y. , Where i', j' = 1, 2, ..., n, the solution will be... Transform this into solving the following problem: 4. Search for augmenting paths in the equality subgraph (the subgraph containing all edges satisfying u[i'] + v[j'] = w(i', j')). Once an augmenting path is found, invert the edges, turning matching edges into unmatched edges and unmatched edges into matching edges. If no augmenting path is found, adjust the dual variable and continue searching for an augmenting path. Repeat this process until all nodes have been processed, recording all matching edges to obtain the set of matching edges.
[0052] 5. Perform optimal matching on the workpiece graphic node set and the wire-threading hole node set based on the obtained matching edge set.
[0053] In an exemplary instance, in step 102 of the above embodiment, the workpiece graphics in the workpiece graphic set are classified by type according to the obtained matching pairs to obtain a punch workpiece graphic set and a die workpiece graphic set, such as... Figure 2 As shown, it includes: Step 200: From the obtained matching pairs, determine all first matching pairs where neither the workpiece graphic node corresponding to the workpiece graphic nor the wire-threading hole node corresponding to the wire-threading hole is a virtual node. For each first matching pair, perform the following operation: determine whether the wire-threading hole in the first matching pair is located inside the matched workpiece graphic; if the wire-threading hole in the first matching pair is located inside the matched workpiece graphic, determine that the workpiece graphic in the first matching pair is a die workpiece graphic; if the wire-threading hole in the first matching pair is not located inside the matched workpiece graphic, determine that the workpiece graphic in the first matching pair is a punch workpiece graphic.
[0054] For example, a geometric algorithm (such as a point-in-polygon detection algorithm) can be used to determine whether the wire-threading hole in the matching pair is located inside the matched workpiece graphic. For instance, if the coordinates of the wire-threading hole satisfy the enclosing condition of the workpiece contour line (such as ray casting), it is determined to be an "internal position".
[0055] If the wire-threading hole is located in the inner area of the workpiece pattern, the workpiece is determined to be a die; if the wire-threading hole is located in the outer area of the workpiece pattern, it is determined to be a punch.
[0056] Step 201: Adjust the determination of the die workpiece pattern based on the matching pairs other than the first matching pair and the unmatched wire threading hole nodes.
[0057] The determination of the die workpiece shape depends not only on the geometric relationship of the initial matching pair (i.e., the "first matching pair"), but also requires further optimization based on the global matching situation. Specifically, when relying solely on the first matching pair (i.e., the matching where neither the workpiece shape node nor the wire-threading hole node is a virtual node) for die determination, misjudgment may occur due to the limitations of local matching. Therefore, it is necessary to combine "matching pairs other than the first matching pair" (including matching pairs where the workpiece shape node corresponding to the workpiece shape is a virtual node, and matching pairs where the wire-threading hole node corresponding to the wire-threading hole is a virtual node) and "unmatched wire-threading hole nodes" for global adjustment.
[0058] Step 202: Obtain a set of die workpiece graphics based on all die workpiece graphics, and obtain a set of punch workpiece graphics based on all punch workpiece graphics.
[0059] In one exemplary instance, step 201 in the above embodiments includes: When there is a second matching pair where the wire-threading hole node corresponding to the workpiece graphic is a virtual node, the workpiece graphic in the second matching pair is determined to be the die workpiece graphic. When there exists a third matching pair of workpiece graphic nodes corresponding to wire-threading holes that are virtual nodes, it is determined that the wire-threading hole in the third matching pair is a die workpiece graphic. If there is an unmatched wire-threading hole node, it is determined that the unmatched wire-threading hole node is a die workpiece pattern.
[0060] For example, the punch workpiece graphic set and the die workpiece graphic set can be obtained in the following way: 1. Processing of normal nodes If the matching node is a valid node, it is necessary to verify whether the wire-threading hole is located inside the workpiece graphic using a geometric determination method (such as ray casting, angle casting, etc.): if the wire-threading hole is completely contained inside the graphic, it is classified into the die set H (corresponding to the die workpiece graphic set in the above embodiment); if the wire-threading hole is located outside the graphic, it is classified into the punch set S (corresponding to the punch workpiece graphic set in the above embodiment).
[0061] 2. Virtual Node Processing If the matching node is a virtual node and is a workpiece graphic node, skip the processing flow of the workpiece graphic (i.e., there is no corresponding wire threading hole), or include the workpiece graphic corresponding to the workpiece graphic node into the die set H.
[0062] If the matching node is a virtual node and is a wire-threading hole node, the wire-threading hole corresponding to the wire-threading hole node is included in the die set H.
[0063] 3. Handling of mismatched wire threading hole nodes The wire holes corresponding to the unmatched wire hole nodes are treated as independent circular hole objects and included in the die set H.
[0064] This process classifies and assigns workpiece graphics and wire-threading holes by determining spatial relationships, thus forming a standardized set of punches and dies.
[0065] The cutting trajectory planning method provided in this disclosure significantly improves adaptability and robustness to complex working conditions by specially processing virtual nodes or mismatched wire-threading hole nodes. This mechanism not only effectively avoids the problem of missed matching due to inconsistent quantities, but also further enhances the ability to handle various abnormal situations that may occur in the actual production environment, ensuring comprehensive coverage and high accuracy of automatically planned cutting trajectories, and improving the efficiency and reliability of the entire processing flow.
[0066] In one exemplary instance, step 103 in the above embodiments includes: Step 103a: For each die workpiece graphic in the die workpiece graphic set, determine the entry point based on its starting point position and the geometric relationship of the die workpiece graphic. Based on the determined entry point and the pre-set cutting direction, generate the cutting trajectory of the die workpiece graphic.
[0067] For example, in generating the cutting trajectory for a die workpiece, each die shape needs to be processed sequentially. First, based on the starting point (usually the center of symmetry or a geometric feature point) and its contour shape, hole distribution, and other geometric relationships, the entry point is determined to ensure the shortest path principle is met and to facilitate fitter repair, while avoiding stress concentration areas. Subsequently, based on the entry point and the preset cutting direction (clockwise or counterclockwise), and combined with the special requirements of die machining, the cutting trajectory is generated: the electrode wire needs to be offset inward by the sum of the electrode wire radius and the discharge gap to ensure that the trajectory gradually shifts along the contour to the inside of the target hole. The trajectory must satisfy the requirement that the offset direction always points to the inside of the contour, the path is continuous and without interference, and the cutting sequence for multi-hole dies is planned according to the shortest path principle.
[0068] Step 103b: Adjust the order of the punch workpiece graphics in the punch workpiece graphic set according to the cutting dependency relationship. For each punch workpiece graphic in the punch workpiece graphic set after the order adjustment, determine the entry point according to its starting point position and the geometric relationship of the punch workpiece graphic. Based on the determined entry point and the pre-set cutting direction, generate the cutting trajectory of the punch workpiece graphic.
[0069] For example, the die cutting trajectory generation first determines the entry point based on the spatial relationship between the workpiece graphic and the starting point. There are two selection methods: one is to take the intersection point on the workpiece boundary according to a specified angle, and the other is to take the boundary point closest to the starting point as the entry point. Subsequently, the workpiece graphic can be connected into a continuous trajectory with a unified direction according to the preset cutting direction (clockwise or counterclockwise) to ensure the geometric consistency of the cutting path.
[0070] Generating the punch cutting trajectory requires prioritizing the optimization of the cutting sequence. For workpiece graphics in the punch set S, if the center of the wire-threading hole of one workpiece is located inside another graphic, the cutting sequence needs to be adjusted to avoid processing conflicts. For example... Figure 3 As shown, X1 should be cut before X2 and X3, and X2 should be cut before X4. When there are many workpieces, the number of comparisons of the containment relationship between graphics can be effectively reduced by constructing a spatial index (such as an R-tree or quadtree), thereby improving sorting efficiency. After completing the order optimization, the workpiece graphics are also transformed into continuous trajectories based on the entry point and cutting direction, consistent with the die cutting logic.
[0071] The above process, through spatial relationship analysis and topological sorting, not only ensures the geometric integrity of the die cutting trajectory, but also avoids potential process conflicts by dynamically adjusting the processing sequence. At the same time, it improves the efficiency of large-scale data processing by combining spatial indexing technology.
[0072] This application also provides a cutting trajectory planning method, such as... Figure 4 As shown, it includes the following steps: Step 300: Graphic preprocessing; Step 301: Identify the workpiece pattern and wire threading hole; Step 302: Matching the workpiece pattern with the wire threading hole; Step 303: Separate the die and the punch; Step 304: Generate the die cutting trajectory; Step 305: Generate the punch cutting trajectory.
[0073] The cutting trajectory planning method provided in this application is based on graph theory modeling for intelligent matching of workpiece graphics and wire-threading holes. By constructing a bipartite graph optimal matching model, the problem of solving the workpiece starting point is transformed into a mathematical optimization problem. This method has the dual advantages of high precision and high efficiency. It can not only accurately identify the starting point of the inner hole, but also simultaneously locate the starting points of multiple punches, significantly improving its applicability in complex workpiece scenarios. In terms of trajectory planning, a layered processing strategy is adopted: first, the association between the workpiece and the wire-threading hole is established through an automatic matching algorithm, and then the features of the inner hole and the punch are distinguished through spatial analysis technology. When generating cutting trajectories for the inner hole and the punch respectively, the system comprehensively considers geometric constraints and process requirements, breaking through the technical limitation of traditional batch programming that only supports inner hole machining. Therefore, it can simultaneously process multi-inner-hole, multi-punch, and mixed-type workpiece graphics, achieving full-scene coverage from single features to composite structures, greatly reducing the need for manual intervention, significantly improving the automation level and program generation efficiency of wire EDM trajectory planning, and providing key technical support for the intelligent transformation of wire EDM machining.
[0074] Corresponding to the above-described cutting trajectory planning method, this application also provides a cutting trajectory planning device. For example... Figure 5 As shown, the cutting trajectory planning includes: The construction module 41 is used to establish a bipartite graph model of the workpiece graphic set and the wire-threading hole set, and to construct a weight matrix based on the edge set in the established bipartite graph model; wherein, the workpiece graphic set includes one or more workpiece graphics to be cut trajectory planned, and the wire-threading hole set includes wire-threading holes set for performing electrical discharge wire cutting on one or more workpiece graphics in the workpiece graphic set. The matching module 42 is used to perform optimal matching of the set of workpiece graphic nodes and the set of wire-threading hole nodes in the established bipartite graph model based on the obtained weight matrix and the bipartite graph matching algorithm, and to determine the matching pairs between the workpiece graphic and the wire-threading hole according to the workpiece graphic nodes and wire-threading hole nodes that can match each other. Processing module 43 is used to classify the workpiece graphics in the workpiece graphic set according to the obtained matching pairs to obtain a set of die workpiece graphics and a set of punch workpiece graphics, and to obtain a first correspondence between the die workpiece graphics in the set of die workpiece graphics and their starting point positions, and a second correspondence between the punch workpiece graphics in the set of punch workpiece graphics and their starting point positions, based on the starting point positions of the workpiece graphics; wherein, the starting point position of the workpiece graphics is determined according to the wire threading hole of the workpiece graphics. The planning module 44 is used to plan the cutting trajectory of the workpiece graphics in the set of concave die workpiece graphics and the set of convex die workpiece graphics according to the obtained first correspondence and second correspondence.
[0075] In one exemplary instance, the construction module 41 is further configured to: Each workpiece graphic in the workpiece graphic set is mapped to a workpiece graphic node to obtain the workpiece graphic node set in the bipartite graph model. Each wire hole in the wire hole set is mapped to a wire hole node to obtain the wire hole node set in the bipartite graph model. The edge set in the bipartite graph model is constructed according to the processing relationship between each workpiece graphic in the workpiece graphic set and each wire hole in the wire hole set. The weight matrix is obtained by assigning a corresponding weight to each edge based on the minimum Euclidean distance between the workpiece graphic associated with each edge in the edge set and the wire-threading hole.
[0076] In one exemplary instance, the construction module 41 is further configured to: Determine whether the number of workpiece patterns in the workpiece pattern set is consistent with the number of wire-threading holes in the wire-threading hole set; In response to the judgment result of consistent quantity, the weight matrix is obtained according to the weights assigned to each edge; In response to the determination of inconsistent quantities, virtual nodes are created based on the difference between the number of workpiece graphics and the number of wire-threading holes. The maximum weight among the weights assigned to each edge is used as the weight of the edge associated with the virtual node, and the weight matrix is obtained by combining the weights assigned to each edge. The created virtual nodes are either workpiece graphics virtual nodes or wire-threading hole virtual nodes.
[0077] In one exemplary instance, the matching module 42 is further configured to: Construct a set of dual variables corresponding to the set of workpiece graphic nodes and the set of wire-threading hole nodes in the bipartite graph model; Repeat the following steps until the matching process between all workpiece graphic nodes and wire-threading hole nodes is completed, and the final set of matching edges is obtained: construct an equality subgraph based on the current dual variable values and the weight matrix; execute the augmented path search algorithm in the constructed equality subgraph, and update the set of matching edges based on the augmented path search results; The optimal matching is performed on the workpiece graphic node set and the wire-threading hole node set based on the finally obtained matching edge set.
[0078] In one exemplary instance, the matching module 42 is further configured to: Find augmenting paths in the equality subgraph; In response to finding an augmenting path, the matching state of the edges along that augmenting path is flipped to update the set of matching edges; In response to the case where no augmenting path is found, adjust the value of the dual variable, reconstruct the equality subgraph, and continue searching for augmenting paths.
[0079] In one exemplary instance, the processing module 43 is further configured to: From the obtained matching pairs, identify all first matching pairs where neither the workpiece graphic node corresponding to the workpiece graphic nor the wire-threading hole node corresponding to the wire-threading hole is a virtual node. For each first matching pair, perform the following operation: determine whether the wire-threading hole in the first matching pair is located inside the matched workpiece graphic; if the wire-threading hole in the first matching pair is located inside the matched workpiece graphic, determine that the workpiece graphic in the first matching pair is a die workpiece graphic; if the wire-threading hole in the first matching pair is not located inside the matched workpiece graphic, determine that the workpiece graphic in the first matching pair is a punch workpiece graphic. The determination of the die workpiece pattern is based on the matching pairs other than the first matching pair and the unmatched wire-threading hole nodes. A set of die workpiece graphics is obtained based on all die workpiece graphics, and a set of punch workpiece graphics is obtained based on all punch workpiece graphics.
[0080] In one exemplary instance, the processing module 43 is further configured to: When there is a second matching pair where the wire-threading hole node corresponding to the workpiece graphic is a virtual node, the workpiece graphic in the second matching pair is determined to be the die workpiece graphic. When there exists a third matching pair of workpiece graphic nodes corresponding to wire-threading holes that are virtual nodes, it is determined that the wire-threading hole in the third matching pair is a die workpiece graphic. If there is an unmatched wire-threading hole node, it is determined that the unmatched wire-threading hole node is a die workpiece pattern.
[0081] In one exemplary instance, the planning module 44 is further configured to: For each die workpiece graphic in the die workpiece graphic set, the entry point is determined according to its starting point position and the geometric relationship of the die workpiece graphic. Based on the determined entry point and the pre-set cutting direction, the cutting trajectory of the die workpiece graphic is generated. According to the cutting dependency, the punch workpiece graphics in the punch workpiece graphic set are sequentially adjusted. For each punch workpiece graphic in the sequentially adjusted punch workpiece graphic set, the entry point is determined according to its starting point position and the geometric relationship of the punch workpiece graphic. Based on the determined entry point and the pre-set cutting direction, the cutting trajectory of the punch workpiece graphic is generated.
[0082] The cutting trajectory planning device provided in this application generates matching pairs between workpiece graphics and wire-threading holes by introducing a matching algorithm for workpiece graphics and wire-threading holes. Based on the obtained matching pairs, the die / punch workpiece graphics are divided to obtain a set of die workpiece graphics and a set of punch workpiece graphics. The device combines the starting point position of the workpiece graphics to obtain a first correspondence between the die workpiece graphics in the set of die workpiece graphics and their starting point position, and a second correspondence between the punch workpiece graphics in the set of punch workpiece graphics and their starting point position. Then, the cutting trajectory of the workpiece graphics is planned according to the first and second correspondences, thereby significantly reducing the amount of manual intervention, greatly improving the speed of trajectory planning in wire EDM, and improving the efficiency of machining program generation.
[0083] This application also provides a cutting trajectory planning device, such as... Figure 6 As shown, it includes: memory 500 and processor 510; The memory 500 is connected to the processor 510 and is used to store programs; The processor 510 is used to implement the cutting trajectory planning method described in any of the above embodiments by running the program in the memory 500.
[0084] Specifically, the aforementioned electronic device may also include: a bus, a communication interface 520, an input device 530, and an output device 540.
[0085] The processor 510, memory 500, communication interface 520, input device 530, and output device 530 are interconnected via a bus. Among them: A bus can include a pathway for transmitting information between various components of a computer system.
[0086] The processor 510 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0087] The processor 510 may include a main processor, as well as a baseband chip, modem, etc.
[0088] The memory 500 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 500 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.
[0089] Input device 530 may include a device for receiving data and information input by a user, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor.
[0090] Output device 530 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0091] The communication interface 520 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0092] The processor 510 executes the program stored in the memory 500 and calls other devices, which can be used to implement each step of any of the cutting trajectory planning methods provided in the above embodiments of this application.
[0093] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the cutting trajectory planning methods according to various embodiments of this application as described in any of the above embodiments of this specification.
[0094] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0095] Furthermore, this application embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the namespace bandwidth allocation method described in any of the above embodiments.
[0096] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
Claims
1. A method for planning cutting trajectories, characterized in that, The method includes: A bipartite graph model is established for the workpiece graphic set and the wire-threading hole set, and a weight matrix is constructed based on the edge set in the established bipartite graph model; wherein, the workpiece graphic set includes one or more workpiece graphics to be cut trajectory planned, and the wire-threading hole set includes wire-threading holes set for performing electrical discharge wire cutting on one or more workpiece graphics in the workpiece graphic set. Based on the obtained weight matrix, the bipartite graph matching algorithm is used to perform optimal matching on the set of workpiece graphic nodes and the set of wire-threading hole nodes in the established bipartite graph model, and the matching pairs between workpiece graphic and wire-threading hole are determined according to the workpiece graphic nodes and wire-threading hole nodes that can match each other. Based on the obtained matching pairs, the workpiece graphics in the workpiece graphic set are classified into a set of concave die workpiece graphics and a set of convex die workpiece graphics. Then, combined with the starting point position of the workpiece graphics, a first correspondence between the concave die workpiece graphics in the set of concave die workpiece graphics and its starting point position is obtained, and a second correspondence between the convex die workpiece graphics in the set of convex die workpiece graphics and its starting point position is obtained. The starting point position of the workpiece graphics is determined according to the wire threading hole of the workpiece graphics. Based on the obtained first and second correspondences, the cutting trajectory is planned for the workpiece graphics in the set of concave die workpiece graphics and the set of convex die workpiece graphics. Based on the obtained weight matrix, a bipartite graph matching algorithm is used to perform optimal matching on the set of workpiece graphic nodes and the set of wire-threading hole nodes in the established bipartite graph model, including: Construct a set of dual variables corresponding to the set of workpiece graphic nodes and the set of wire-threading hole nodes in the bipartite graph model; Repeat the following steps until the matching process between all workpiece graphic nodes and wire-threading hole nodes is completed, and the final set of matching edges is obtained: construct an equality subgraph based on the current dual variable values and the weight matrix; execute the augmented path search algorithm in the constructed equality subgraph, and update the set of matching edges based on the augmented path search results; The optimal matching is performed on the workpiece graphic node set and the wire-threading hole node set based on the finally obtained matching edge set; Based on the obtained matching pairs, the workpiece graphics in the workpiece graphic set are classified by type to obtain a set of concave die workpiece graphics and a set of convex die workpiece graphics, including: From the obtained matching pairs, identify all first matching pairs where neither the workpiece graphic node corresponding to the workpiece graphic nor the wire-threading hole node corresponding to the wire-threading hole is a virtual node. For each first matching pair, perform the following operation: determine whether the wire-threading hole in the first matching pair is located inside the matched workpiece graphic; if the wire-threading hole in the first matching pair is located inside the matched workpiece graphic, determine that the workpiece graphic in the first matching pair is a die workpiece graphic; if the wire-threading hole in the first matching pair is not located inside the matched workpiece graphic, determine that the workpiece graphic in the first matching pair is a punch workpiece graphic. The determination of the die workpiece pattern is based on the matching pairs other than the first matching pair and the unmatched wire-threading hole nodes. A set of die workpiece graphics is obtained based on all die workpiece graphics, and a set of punch workpiece graphics is obtained based on all punch workpiece graphics.
2. The method according to claim 1, characterized in that, The process of establishing a bipartite graph model of the workpiece graphic set and the wire-threading hole set, and constructing a weight matrix based on the edge set in the established bipartite graph model, includes: Each workpiece graphic in the workpiece graphic set is mapped to a workpiece graphic node to obtain the workpiece graphic node set in the bipartite graph model. Each wire hole in the wire hole set is mapped to a wire hole node to obtain the wire hole node set in the bipartite graph model. The edge set in the bipartite graph model is constructed according to the processing relationship between each workpiece graphic in the workpiece graphic set and each wire hole in the wire hole set. The weight matrix is obtained by assigning a corresponding weight to each edge based on the minimum Euclidean distance between the workpiece graphic associated with each edge in the edge set and the wire-threading hole.
3. The method according to claim 2, characterized in that, Each edge in the edge set is assigned a corresponding weight based on the minimum Euclidean distance between the workpiece graphic associated with each edge and the wire-threading hole, to obtain the weight matrix, which includes: Determine whether the number of workpiece patterns in the workpiece pattern set is consistent with the number of wire-threading holes in the wire-threading hole set; In response to the judgment result of consistent quantity, the weight matrix is obtained according to the weights assigned to each edge; In response to the determination of inconsistent quantities, virtual nodes are created based on the difference between the number of workpiece graphics and the number of wire-threading holes. The maximum weight among the weights assigned to each edge is used as the weight of the edge associated with the virtual node, and the weight matrix is obtained by combining the weights assigned to each edge. The created virtual nodes are either workpiece graphics virtual nodes or wire-threading hole virtual nodes.
4. The method according to claim 1, characterized in that, Perform augmenting path search algorithm on the constructed equality subgraph, and update the matching edge set according to the augmenting path search results, including: Find augmenting paths in the equality subgraph; In response to finding an augmenting path, the matching state of the edges along that augmenting path is flipped to update the set of matching edges; In response to the case where no augmenting path is found, adjust the value of the dual variable, reconstruct the equality subgraph, and continue searching for augmenting paths.
5. The method according to claim 1, characterized in that, The determination of adjusting the die workpiece pattern based on matching pairs other than the first matching pair and unmatched wire-threading hole nodes includes: When there is a second matching pair where the wire-threading hole node corresponding to the workpiece graphic is a virtual node, the workpiece graphic in the second matching pair is determined to be the die workpiece graphic. When there exists a third matching pair of workpiece graphic nodes corresponding to wire-threading holes that are virtual nodes, it is determined that the wire-threading hole in the third matching pair is a die workpiece graphic. If there is an unmatched wire-threading hole node, it is determined that the unmatched wire-threading hole node is a die workpiece pattern.
6. The method according to claim 1, characterized in that, Based on the obtained first and second correspondences, cutting trajectory planning is performed on the workpiece graphics in the set of concave die workpiece graphics and the set of convex die workpiece graphics, including: For each die workpiece graphic in the die workpiece graphic set, the entry point is determined according to its starting point position and the geometric relationship of the die workpiece graphic. Based on the determined entry point and the pre-set cutting direction, the cutting trajectory of the die workpiece graphic is generated. According to the cutting dependency, the punch workpiece graphics in the punch workpiece graphic set are sequentially adjusted. For each punch workpiece graphic in the sequentially adjusted punch workpiece graphic set, the entry point is determined according to its starting point position and the geometric relationship of the punch workpiece graphic. Based on the determined entry point and the pre-set cutting direction, the cutting trajectory of the punch workpiece graphic is generated.
7. A cutting trajectory planning device, characterized in that, include: A memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program, and to execute the cutting trajectory planning method as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a computer program, wherein when the computer program is executed by a processor, it can implement the cutting trajectory planning method as described in any one of claims 1-6.
Citation Information
Patent Citations
Making method of digital die model
CN104573276A
Automatic cutting programming method and device and computer readable storage medium
CN114265586A