Polygon cutting method and circuit pattern parallel cutting method
By constructing an initial edge list and an intersection list of polygons, and combining this with a parallel cutting method, the inefficiency of rectangular cutting in complex polygons and irregular shapes is solved, enabling fast polygon cutting and efficient processing of circuit graphics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU YUANZHUO OPTOELECTRONICS TECH CO LTD
- Filing Date
- 2025-03-22
- Publication Date
- 2026-06-09
Smart Images

Figure CN119849419B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of polygon cutting technology, and in particular to a polygon cutting method and a parallel cutting method for circuit patterns. Background Technology
[0002] In the electronic files of a Printed Circuit Board (PCB), circuit diagrams are typically represented by a combination of positive and negative images. This is equivalent to subtracting the overlapping portion of the negative image from the positive image, leaving the desired shape. Since the shapes required in actual circuit design are often irregular polygons, the designed positive and negative images are also correspondingly irregular polygons. Therefore, a suitable polygon trimming method needs to be designed to obtain the difference between the positive and negative images to achieve the desired shape.
[0003] Rectangular cutting is a commonly used method in existing polygon cutting techniques. However, it has several drawbacks in practical applications: First, traditional rectangular cutting requires trimming each cell individually, resulting in a large amount of repetitive calculations. This is especially problematic when dealing with complex polygons or massive amounts of data, significantly increasing computational resource consumption and leading to a decrease in overall processing efficiency. Second, the mechanical division of rectangular meshes may result in multiple cuts of polygons or textures, requiring repeated reading and processing of the same element, thus increasing the burden on geometry and texture processing. When the number of polygons is large, it can easily cause buffer overflows, further degrading performance. Furthermore, for irregular or non-rectangular shapes, rectangular cutting relies on optimization of the bounding rectangle, which may lead to deviations in the actual cutting size or additional post-processing steps (such as edge trimming), affecting accuracy and efficiency. Therefore, while rectangular cutting is efficient and easy to use in simple scenarios, it has significant limitations in handling complex polygons, resource optimization, and adapting to irregular shapes. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a polygon cutting method and a parallel circuit pattern cutting method, which can improve the efficiency of polygon cutting.
[0005] As one of the objectives of the invention, the present invention provides a polygon cutting method, the method comprising:
[0006] Obtain information about each vertex of the polygon and construct an initial edge list for the polygon. The vertex information includes at least the coordinate information of the vertex.
[0007] Set a cutting line, obtain the intersection information of the cutting line with all edges of the polygon, add the intersection information to the corresponding initial edge list, and obtain the updated edge list. The intersection information includes the in-point attributes and coordinate information of each intersection point.
[0008] Based on the entry and exit point attributes of each intersection point, the intersection points are selected and discarded, and a linked list of intersection points of the polygon is constructed.
[0009] Traverse the updated edge list and the intersection list, and generate closed paths by alternating jumps to cut multiple sub-polygons.
[0010] In one possible implementation of this application, obtaining information about each vertex of the polygon and constructing an initial edge list for the polygon includes:
[0011] Obtain the vertex information of the outer contour and the vertex information of the inner hole of the polygon, and construct the first initial edge linked list and the second initial edge linked list of the polygon respectively.
[0012] In one possible implementation of this application, the first initial edge list stores the vertex information of each vertex of the outer contour in a clockwise direction; the second initial edge list stores the vertex information of each vertex of the inner hole in a counterclockwise direction.
[0013] In one possible implementation of this application, the intersection information of the cutting line and all edges of the polygon is obtained, and the intersection information is added to the corresponding initial edge linked list to obtain an updated edge linked list, including:
[0014] Obtain the intersection information of all edges of the cutting line and the outer contour of the polygon, and add the intersection information to the first initial edge list according to the coordinate order of each intersection point to obtain the first updated edge list;
[0015] Obtain the intersection information of the cutting line and all the edges of the inner hole of the polygon. According to the coordinate order of each intersection point, add the intersection information to the second initial edge linked list to obtain the second updated edge linked list.
[0016] In one possible implementation of this application, each intersection point is selected based on its entry / exit point attributes, including:
[0017] When two adjacent sides of a polygon are on the same side of the cutting line, discard the common intersection point of the two adjacent sides and the cutting line;
[0018] When two adjacent sides of a polygon are on different sides of a cutting line, the common intersection point of the two adjacent sides and the cutting line is retained.
[0019] In one possible implementation of this application, each intersection point is selected based on its entry / exit point attributes, including:
[0020] When one of the two adjacent sides of a polygon coincides with the cutting line, the intersection of the non-coincident side and the cutting line is replaced by the intersection of the coincident side and the cutting line.
[0021] When a coincident edge and a cutting line have multiple intersection points, the intersection point of a non-coincident edge and a cutting line is replaced by the last intersection point traversed by the coincident edge.
[0022] In one possible implementation of this application, a bisecting cutting line is provided, which cuts the polygon into a first sub-polygon and a second sub-polygon with similar areas.
[0023] For the first sub-polygon, all intersection points are sorted in ascending order by either x-coordinate or y-coordinate and then added to the intersection point linked list;
[0024] For the second sub-polygon, all intersection points are sorted in descending order of their horizontal or vertical coordinates and added to the intersection point linked list. Furthermore, the entry and exit point attributes of all intersection points in the second sub-polygon are the opposite of the entry and exit point attributes of the corresponding intersection points in the first sub-polygon.
[0025] In one possible implementation of this application, the updated edge list and the intersection list are traversed, and a closed path is generated by alternating jumps to cut multiple sub-polygons, including:
[0026] In the updated edge list, find the intersection of the in (out) point attributes. When traversing down to the intersection of the in (out) point attributes, jump to the intersection list at that intersection point and traverse it sequentially. When traversing to the next intersection of the in (out) point attributes, return to the corresponding intersection point in the updated edge list and continue traversing until the intersection of the original in (out) point attributes is reached.
[0027] This application also provides a method for parallel cutting of circuit patterns, including:
[0028] Set N cutting lines, where N is a natural number greater than 2. The first cutting line and the Nth cutting line are located at the two ends of the circuit diagram, respectively. Set each pair of adjacent cutting lines as a group of cutting lines to obtain N-1 groups of cutting lines.
[0029] Obtain the initial circuit diagram. Cut the initial circuit diagram with two cutting lines in each group in sequence to obtain the sub-circuit diagram between the two cutting lines in each group at the same time.
[0030] Each cutting line is cut using the polygon cutting method described in any of the above technical solutions to cut the circuit pattern.
[0031] This application also provides a method for parallel cutting of circuit patterns, including:
[0032] Obtain the initial circuit pattern, and use the first cutting line to cut the initial circuit pattern into a first strip and a second strip;
[0033] Set M cutting lines to the first strip to cut it into M+1 first sub-strips. At the same time, set N cutting lines to the second strip to cut it into N+1 second sub-strips. The values of M and N can be the same or different.
[0034] Each cutting line is cut using the polygon cutting method described in any of the above technical solutions to cut the circuit pattern.
[0035] The polygon cutting method of this application can achieve rapid cutting of polygons, cutting the original polygon into multiple closed sub-polygons. The polygon cutting method of this application can achieve rapid cutting of polygons, and the polygon cutting method of this application is combined with parallel cutting, overcoming the problem that rectangular cutting cannot be combined with parallel cutting, and improving the processing efficiency of polygon graphics. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating a polygon cutting method according to an exemplary embodiment of the present invention;
[0037] Figure 2 This is a polygonal schematic diagram illustrating an exemplary embodiment of the present invention;
[0038] Figure 3 yes Figure 2 A schematic diagram of the intersection points of the polygon and the cutting line;
[0039] Figure 4 This is a schematic diagram showing the intersection of two adjacent sides of a polygon located on the same side of the cutting line.
[0040] Figure 5 This is a schematic diagram showing the intersection of two adjacent sides of a polygon located on different sides of the cutting line;
[0041] Figure 6 This is a schematic diagram showing the intersection point where one of the two adjacent sides of a polygon coincides with the cutting line.
[0042] Figure 7 A schematic diagram showing the polygon before cutting and the first and second sub-polygons after cutting into closed shapes;
[0043] Figure 8 A flowchart illustrating a parallel cutting method for circuit patterns is shown in an exemplary embodiment of the present invention;
[0044] Figure 9 A schematic diagram showing the initial circuit pattern being cut by the first set of cutting lines;
[0045] Figure 10 This is a schematic diagram showing the cutting of the initial circuit pattern by the second set of cutting lines;
[0046] Figure 11 This is a schematic diagram of a parallel-cut circuit pattern shown in an exemplary embodiment of the present invention;
[0047] Figure 12A flowchart illustrating a method for parallel cutting of circuit patterns, as shown in another exemplary embodiment of the present invention;
[0048] Figure 13 This is a schematic diagram of a parallel-cut circuit pattern shown in another exemplary embodiment of the present invention. Detailed Implementation
[0049] To facilitate understanding of the present invention, a more comprehensive description of the invention will be provided below in conjunction with specific embodiments. Preferred embodiments of the invention are given in the specific embodiments. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the present invention.
[0050] The terms "optionally" and similar expressions used in this invention refer to embodiments of the invention that may provide certain beneficial effects in certain circumstances. However, other embodiments may also be optional in the same or other circumstances. Furthermore, the description of one or more optional embodiments does not imply that other embodiments are unavailable, nor is it intended to exclude other embodiments from the scope of this invention.
[0051] Figure 1 This is a flowchart illustrating a polygon cutting method according to an exemplary embodiment. This method can be applied to electronic devices, or to polygon processing devices connected to or located within electronic devices. The following description uses an example of this method applied to an electronic device to illustrate the method. Figure 1 As shown, the polygon cutting method includes the following steps:
[0052] S10. Obtain the information of each vertex of the polygon and construct the initial edge list of the polygon. The vertex information includes at least the coordinate information of the vertex.
[0053] In this context, the vertices of the polygon are its turning points. The initial edge list of the polygon can be multiple.
[0054] In a specific embodiment, the polygon includes an outer contour and an inner hole. As one possible implementation, the electronic device traverses the outer contour and inner hole of the polygon to be processed to obtain the vertex information of each vertex of the polygon to be processed. Step S10 specifically includes:
[0055] Obtain the vertex information of the outer contour and the vertex information of the inner hole of the polygon, and construct the first initial edge linked list and the second initial edge linked list of the polygon respectively.
[0056] The following example illustrates the method for constructing an edge list. Figure 2 A polygonal schematic diagram of a specific embodiment, such asFigure 2 As shown, the polygon includes an outer contour ABCD and an inner hole EFG. The coordinates of the four vertices of the outer contour are obtained by acquiring the information of each vertex: A(4,2), B(4,10), C(12,10), and D(12,2). The coordinates of the three points of the inner hole are obtained by acquiring the information of each vertex: E(6,4), F(10,4), and G(8,8). After acquiring the information of each vertex of the outer contour and the inner hole, corresponding initial edge linked lists are constructed. The initial edge linked lists store the information of each vertex sequentially. In this embodiment, the initial edge linked list ELL contains two edge linked lists: a first initial edge linked list el1 and a second initial edge linked list el2. The first initial edge linked list stores the information of each vertex of the outer contour in a clockwise direction; the second initial edge linked list stores the information of each vertex of the inner hole in a counterclockwise direction. The first initial edge list el1: A->B->C->D contains the coordinates of four points: A(4,2), B(4,10), C(12,10), and D(12,2). The second initial edge list el2: E->F->G contains the coordinates of three points: E(6,4), F(10,4), and G(8,8).
[0057] S20. Set the cutting line, obtain the intersection information of the cutting line and all the edges of the polygon, add the intersection information to the corresponding initial edge list to obtain the updated edge list. The intersection information includes the in-point attributes and coordinate information of each intersection point.
[0058] In some implementations, the cutting line can be selected as a line parallel to the x-axis or the y-axis of the coordinate system. The number of cutting lines can be one or more, adjusted as needed.
[0059] As one possible implementation, the electronic device iterates through all intersections of the cutting line with the outer contour and inner hole of the polygon to be processed, obtaining the coordinate information of each intersection point. The in / out point attribute of each intersection point indicates whether it is an in or out point. Figure 2 As we know, each edge of a polygon has a directionality, so each intersection point is determined to be either an entry or exit point according to a pre-defined rule. For example, the intersection of an edge from left to right with a cutting line is defined as an entry point, and the intersection of an edge from right to left with a cutting line is defined as an exit point. It is understandable that the rules for determining entry and exit points are not limited to this.
[0060] In one specific embodiment, after setting the cutting line, step S20 includes:
[0061] Obtain the intersection information of all edges of the cutting line and the outer contour of the polygon, and add the intersection information to the first initial edge list according to the coordinate order of each intersection point to obtain the first updated edge list;
[0062] Obtain the intersection information of the cutting line and all the edges of the inner hole of the polygon. According to the coordinate order of each intersection point, add the intersection information to the second initial edge linked list to obtain the second updated edge linked list.
[0063] like Figure 3 As shown, in one embodiment, there is one cutting line, and the cutting line is a bisecting cutting line. A bisecting cutting line can be understood as cutting the polygon into a first sub-polygon and a second sub-polygon with similar areas. Specifically, the bisecting cutting line is selected as a line parallel to the y-axis in the coordinate system, and the x-coordinate of the cutting line is x=8. The edges in the outer contour of the polygon that intersect the cutting line include: BC and DA. There is an intersection point I1 between vertices B and C of the outer contour of the polygon, and an intersection point I4 between vertices D and A of the outer contour of the polygon. The coordinate information of the intersection points is I1(8,10) and I4(8,2), respectively. The edges in the inner hole of the polygon that intersect the cutting line include: EF, FG, and GE. There is an intersection point I3 between vertices E and F of the inner hole of the polygon, and a common intersection point I2 between vertices F and G of the inner hole of the polygon, and between vertices G and E of the inner hole of the polygon. The coordinate information of the intersection points is I3(8,4) and I2(8,8), respectively.
[0064] In this embodiment, the intersection of the edge from left to right with the cutting line is defined as the in point, and the intersection of the edge from right to left with the cutting line is defined as the out point. The in-point and out-point attributes of the intersection points of the polygon's outer contour are determined using defined rules. I1 is the in point, and I4 is the out point. Based on the coordinate order of each intersection point, the in-point and out-point attributes and coordinate information of intersection points I1 and I4 are added to the first initial edge linked list to obtain the first updated edge linked list E1: A->B-> I1 (in)->C->D-> I4 (out).
[0065] Furthermore, in the intersection of the inner holes of the polygon, the coordinate information of the intersection is as follows: I3 is the in point and I2 is the out point. According to the coordinate order of each intersection, the in-point and out-point attributes and coordinate information of intersection I3 and I2 are added to the second initial edge linked list to obtain the second updated edge linked list El2: E->I3(in)->F->I2(out) / G.
[0066] S30. Based on the entry and exit point attributes of each intersection point, select and discard intersection points to construct a linked list of intersection points of the polygon.
[0067] It should be noted that for an intersection point that intersects the cutting line once, the intersection point has only one entry / exit point attribute, and the intersection point is retained and added to the intersection point linked list.
[0068] When two adjacent edges of a polygon intersect with a cutting line, the method for selecting or discarding each intersection point in step S30 based on the entry / exit point attributes of each intersection point includes:
[0069] When two adjacent sides of a polygon are on the same side of the cutting line, the common intersection point of the two adjacent sides and the cutting line is discarded.
[0070] When two adjacent sides of a polygon are on different sides of a cutting line, the common intersection point of the two adjacent sides and the cutting line is retained.
[0071] The following examples illustrate the selection and rejection methods, such as... Figure 4 As shown in Figure a, the two adjacent sides l1 and l2 of the polygon are located on the same side of the cutting line. pt2 is the common intersection point of sides l1 and l2. When pt2 is the intersection point of side l1 and cutting line y, the intersection point is an out point. When pt2 is the intersection point of side l2 and cutting line y, the intersection point is an in point. Since pt2 is both an out point and an in point, the intersection point is discarded and not added to the intersection point list. Figure 4 As shown in Figure b, the intersection point pt2 of edge l1 and tangent line y has the attribute of being an in point, and the intersection point pt2 of edge l2 and tangent line y has the attribute of being an out point. Since pt2 is both an out point and an in point, this intersection point is discarded and not added to the intersection point list.
[0072] like Figure 5 As shown in Figure a, the two adjacent sides l1 and l2 of the polygon are located on different sides of the cutting line. pt2 is the common intersection point of sides l1 and l2. When pt2 is the intersection point of side l1 and cutting line y, the intersection point has the entry / exit point attribute as an entry point. When pt2 is the intersection point of side l2 and cutting line y, the intersection point has the entry / exit point attribute as an entry point. Since pt2 is both an endpoint and has the entry point attribute twice, only one entry point attribute is retained and it is added to the intersection point linked list. Figure 5 As shown in Figure b, when pt2 is the intersection of edge l1 and tangent line y, the intersection point has the attribute of being an out point. When pt2 is the intersection of edge l2 and tangent line y, the intersection point also has the attribute of being an out point. Since pt2 is both an endpoint and has the attribute of being an out point in both instances, only one out point attribute is retained and it is added to the intersection point linked list.
[0073] Furthermore, step S30, which selects or discards intersection points based on their entry / exit point attributes, also includes the following methods:
[0074] When one of the two adjacent sides of a polygon coincides with the cutting line, the intersection of the non-coincident side and the cutting line is replaced by the intersection of the coincident side and the cutting line.
[0075] It should be noted that the overlapping edge and the cutting line may have one intersection point or multiple intersection points. When the overlapping edge and the cutting line have multiple intersection points, the intersection point of the non-overlapping edge and the cutting line is replaced by the last intersection point when the overlapping edge is traversed.
[0076] like Figure 6As shown, the intersection of the tangent line y with the adjacent sides l1 and l2 of the polygon is pt2. The tangent line y passes through the side l2 of the polygon, and the intersection of the tangent line y with the side l2 is pt2. 3、 pt 4、 If pt5 is entered into the intersection list instead of pt2, the entry and exit point attributes remain unchanged.
[0077] In step S30, after discarding each intersection point, each intersection point is sorted in the intersection point linked list in ascending or descending order according to its coordinate information.
[0078] S40. Traverse the updated edge list and the intersection list, and generate closed paths by alternating jumps to cut multiple sub-polygons.
[0079] In some implementations, the intersection of the in-point (out-point) attributes is searched in the updated edge list. When the intersection of the in-point (out-point) attributes is reached, the process jumps to the intersection list and iterates through the intersection point. When the next intersection of the in-point (out-point) attributes is reached, the process returns to the corresponding intersection point in the updated edge list and continues until the intersection of the initial in-point (out-point) attributes is reached.
[0080] by Figure 3 Taking the shown graphic as an example, steps S30-S40 are explained in detail: the cutting line is bisected to cut the polygon into a first sub-polygon and a second sub-polygon with similar areas; specifically, the first sub-polygon is... Figure 3 The first sub-polygon is on the right side of the diagram, and the second sub-polygon is on the left side of the diagram.
[0081] The first updated edge list El1 of the first sub-polygon is: A->B->I1(in)->C->D->I4(out), and the second updated edge list El2 of the first sub-polygon is: E->I3(in)->F->I2(out) / G. For the first sub-polygon, all intersection points are sorted in ascending order by their x-coordinates or y-coordinates and then added to the intersection point list. In this embodiment, all intersection points have the same x-coordinate, and the intersection points of the first sub-polygon are sorted in ascending order by their y-coordinates, resulting in the intersection point list: I4(out)->I3(in)->I2(out)->I1(in). In this embodiment, traversal starts from the intersection point with the in-point attribute; however, it is understood that in other embodiments, traversal can start from the intersection point with the out-point attribute. Find the intersection of the in-point attributes in the first updated edge list. Starting from I1, traverse the first updated edge list sequentially to get I1(in)->C->D->I4(out), where I4 is the out-point. Jump to the orthogonal point list and continue traversing to get I4(out)->I3(in), where I3 is the in-point. Jump to the second updated edge list and continue traversing to get I3(in)->F->I2(out), where I2 is the out-point. Jump to the intersection point list and continue traversing to get I2(out)->I1(in). At this point, the traversal reaches the initial in-point I1, and the traversal ends. The first sub-polygon is: I1->C->D->I4->I3->F->I2->I1, resulting in a closed first sub-polygon.
[0082] For the second sub-polygon, all intersection points are sorted in descending order of their x-coordinates or y-coordinates and then added to the intersection point linked list. Furthermore, the entry and exit point attributes of all intersection points in the second sub-polygon are the opposite of the entry and exit point attributes of their corresponding intersection points in the first sub-polygon. Figure 3For example, the first updated edge list E1 of the second sub-polygon is: A->B-> I1(out)->C->D-> I4(in), and the second updated edge list E12 of the second sub-polygon is: E-> I3(out)-> F-> I2(in) / G. For the second sub-polygon, all intersection points are entered into the intersection point list after being sorted in ascending order of their x-coordinates or y-coordinates. In this embodiment, all intersection points have the same x-coordinate, and all intersection points of the second sub-polygon are entered into the intersection point list after being sorted in descending order of their y-coordinates: I1(out)-> I2(in)-> I3(out)->I4(in). Find the intersection of the in-point attributes in the first updated edge list. Starting from I4, traverse the first updated edge list sequentially: I4 (in) -> A -> B -> I1 (out), where I1 is the out point. Jump to the intersection list and continue traversing to get I1 (out) -> I2 (in), where I2 is the in point. Jump to the second updated edge list and continue traversing to get I2 (in) -> E > I3 (out), where I3 is the out point. Jump to the intersection list and continue traversing to get I3 (out) -> I4 (in). At this point, the traversal reaches the initial in-point I4, and the traversal of the second sub-polygon ends. The second sub-polygon is: I4 -> A -> B -> I1 -> I2 -> E > I3 -> I4, resulting in a closed second sub-polygon.
[0083] The polygon cutting method of this application, through the execution of steps S10-S40, such as... Figure 7 As shown, this method enables rapid cutting of polygons, dividing the original polygon into closed first and second sub-polygons, thereby improving the processing efficiency of polygon graphics. Furthermore, the polygon cutting method of this application is applicable to complex polygons, thus solving the problems of slow rectangular cutting efficiency and inability to handle complex polygons in the prior art.
[0084] The present invention further provides a method for parallel cutting of circuit patterns, wherein the circuit patterns can be graphic files stored in the electronic archives of a printed circuit board (PCB), such as... Figure 8 As shown, in one specific embodiment, the parallel cutting method for circuit patterns specifically includes the following steps:
[0085] S100, set N cutting lines, where N is a natural number greater than 2, and the first cutting line and the Nth cutting line are located at the two ends of the circuit diagram respectively. Set each pair of adjacent cutting lines as a group of cutting lines to obtain N-1 groups of cutting lines;
[0086] In one specific embodiment, such as Figure 11As shown, the circuit diagram is represented by ABCD. N=10, that is, ten cut lines are set. The first cut line coincides with side AB, the tenth cut line coincides with side CD, and each pair of adjacent cut lines is set as a group of cut lines, resulting in a total of nine groups of cut lines. The first group of cut lines includes the first cut line 1 and the second cut line 2, the second group of cut lines includes the second cut line 2 and the third cut line 3, the third group of cut lines includes the third cut line 3 and the fourth cut line 4, and so on, with the ninth group of cut lines including the ninth cut line 9 and the tenth cut line 10.
[0087] S200, Obtain the initial circuit pattern. Two cutting lines in each group of cutting lines cut the initial circuit pattern in sequence to simultaneously obtain the sub-circuit pattern between the two cutting lines in each group of cutting lines.
[0088] In one specific embodiment, the process of cutting the initial circuit pattern sequentially using two cutting lines in each group includes the following steps:
[0089] like Figure 9 As shown, the initial circuit diagram ABCD is cut using the first cutting line 1 in the first set of cutting lines. Since the first cutting line 1 coincides with side AB, the resulting circuit diagram is still ABCD. Then, the circuit diagram ABCD cut by the first cutting line is cut again using the second cutting line 2 in the first set of cutting lines, thus obtaining the sub-circuit diagram ABMN between the first cutting line 1 and the second cutting line 2, which will be simplified to p1 in the following description. Simultaneously with the cutting by the first set of cutting lines, as... Figure 10 As shown, the second cleaving line 2 in the second group of cleaving lines cuts the initial circuit pattern ABCD. Then, the third cleaving line 3 in the second group of cleaving lines cuts the circuit pattern NMCD, which was cut by the second cleaving line 2, again, obtaining the sub-strip NMOP between the second cleaving line 2 and the third cleaving line 3, which will be simplified to p2 in the following description. It can be understood that while the first and second groups of cleaving lines are cutting the initial circuit pattern, the third to (N-1)th groups of cleaving lines are also cutting the initial circuit pattern in the same way. This results in the initial circuit pattern being cut into nine sub-circuit patterns at the same time, such as... Figure 11 As shown, p1, p2, p3, p4, p5, p6, p7, p8, and p9 are used to achieve parallel cutting of the circuit pattern.
[0090] In step S200, each cutting line is cut into the circuit pattern using the polygon cutting method described above. This application uses the polygon cutting method to achieve rapid polygon cutting and cuts the circuit pattern in parallel using multiple sets of cutting lines, thereby obtaining N-1 sub-circuit patterns and thus accelerating the cutting of the circuit pattern.
[0091] In another embodiment of the present invention, such as Figure 12 As shown, the parallel cutting method for circuit patterns includes the following steps:
[0092] S100', Obtain the initial circuit pattern, and use the first cutting line to cut the initial circuit pattern into the first strip and the second strip;
[0093] S200', Set M cutting lines for the first strip to cut the first strip into M+1 first sub-strips, and set N cutting lines for the second strip to cut the second strip into N+1 second sub-strips. The values of M and N can be the same or different.
[0094] In the above steps, each cutting line is cut using the polygon cutting method described above. This application uses the polygon cutting method to achieve rapid polygon cutting, and cuts the circuit pattern in parallel with multiple sets of cutting lines to obtain N sub-circuit patterns at the same time, thereby achieving the purpose of accelerating the cutting of circuit patterns.
[0095] In one specific embodiment of the present invention, such as Figure 13 As shown, an initial circuit pattern ABCD is obtained, and the initial circuit pattern is cut into a first strip d1 and a second strip d2 using the first cutting line 1. In this embodiment, both M and N are set to 3. Three cutting lines (2, 3, 4) are set for the first strip, cutting the first strip d1 into four first sub-strips. At the same time, three cutting lines (5, 6, 7) are set for the second strip, cutting the second strip d2 into four second sub-strips, thereby speeding up the cutting speed of the initial circuit pattern.
[0096] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for cutting and processing polygonal circuit graphic data, characterized in that, The method includes: Obtain the initial circuit pattern, and use the first cutting line to cut the initial circuit pattern into a first strip and a second strip; Set M cutting lines to the first strip to cut it into M+1 first sub-strips. At the same time, set N cutting lines to the second strip to cut it into N+1 second sub-strips. The values of M and N can be the same or different. The methods for processing circuit graphic data for each cut line include: Obtain the information of each vertex of the polygonal circuit graph data, and construct an initial edge linked list of the polygonal circuit graph data. The information of the vertex includes at least the coordinate information of the vertex. Set a bisecting cutting line, obtain the intersection information of all edges of the bisecting cutting line and the polygon circuit graphic data, add the intersection information to the corresponding initial edge linked list to obtain the updated edge linked list, the intersection information includes the in-and-out point attributes and coordinate information of each intersection point; Based on the entry and exit point attributes of each intersection point, the intersection points are selected and discarded, and a linked list of intersection points of the polygon is constructed. The intersection point is formed by the intersection of a bisecting cutting line and the outer contour edge or inner hole edge of the polygonal circuit graphic data; The bisecting cutting line cuts the polygon into a first sub-polygon and a second sub-polygon with similar areas. For the first sub-polygon, all intersection points are sorted in ascending order of coordinates and added to the intersection point linked list. For the second sub-polygon, all intersection points are sorted in descending order of coordinates and added to the intersection point linked list. Furthermore, the entry and exit point attributes of all intersection points in the second sub-polygon are opposite to the entry and exit point attributes of the corresponding intersection points in the first sub-polygon. Traverse the updated edge list and the intersection list, and generate closed paths by alternating jumps to obtain the first sub-polygon circuit graphic data and the second sub-polygon circuit graphic data.
2. The method for cutting and processing polygonal circuit graphic data according to claim 1, characterized in that, Obtain information for each vertex of the polygonal circuit graph data, and construct an initial edge list for the polygonal circuit graph data, including: Obtain the vertex information of the outer contour and the vertex information of the inner hole in the polygonal circuit graphic data, and construct the first initial edge linked list and the second initial edge linked list of the polygonal circuit graphic data respectively.
3. The method for cutting and processing polygonal circuit graphic data according to claim 2, characterized in that, The first initial edge linked list stores the vertex information of each vertex of the outer contour in a clockwise direction; the second initial edge linked list stores the vertex information of each vertex of the inner hole in a counterclockwise direction.
4. The method for cutting and processing polygonal circuit graphic data according to claim 2, characterized in that, Obtain the intersection information of all edges between the bisecting cutting line and the polygonal circuit graphic data, add the intersection information to the corresponding initial edge linked list, and then update the edge linked list, including: Obtain the intersection information of all edges of the bisecting cutting line and the outer contour in the polygonal circuit graphic data. Based on the coordinate order of each intersection point, add the intersection information to the first initial edge linked list to obtain the first updated edge linked list. Obtain the intersection information of all edges of the bisecting cutting line and the inner hole in the polygonal circuit graphic data. Based on the coordinate order of each intersection point, add the intersection information to the second initial edge linked list to obtain the second updated edge linked list.
5. The method for cutting and processing polygonal circuit graphic data according to claim 1, characterized in that, Based on the entry and exit point attributes of each intersection point, the intersection points are selected for rejection, including: When two adjacent sides of a polygonal circuit graphic data lie on the same side of the bisecting line, discard the common intersection point of the two adjacent sides and the bisecting line. When two adjacent sides of a polygonal circuit graphic data are on different sides of a bisecting cutting line, the common intersection point of the two adjacent sides and the bisecting cutting line is retained.
6. The method for cutting and processing polygonal circuit graphic data according to claim 1, characterized in that, Based on the entry and exit point attributes of each intersection point, each intersection point is selected for rejection, including: When one of the two adjacent sides of a polygonal circuit graphic data coincides with the bisecting bisector, the intersection of the non-coincident side and the bisecting bisector is replaced by the intersection of the coincident side and the bisecting bisector. When a coincident edge and a bisecting cutting line have multiple intersection points, the intersection point of a non-coincident edge and a bisecting cutting line is replaced by the intersection point of the last traversal of the coincident edge.
7. The method for cutting and processing polygonal circuit graphic data according to claim 1, characterized in that, Traverse the updated edge list and the intersection list, and generate closed paths by alternating jumps to cut multiple sub-polygons, including: In the updated edge list, find the intersection of the in-point attribute. When traversing down to the intersection of the out-point attribute, jump to the intersection list at that intersection and traverse it sequentially. When traversing to the next intersection of the in-point attribute, return to the corresponding intersection in the updated edge list and continue traversing until the intersection of the original in-point attribute is reached.