A filling type copper cladding method, system, device and storage medium supporting arc edges
Through the improved method of rounded corner expansion and scanning line boolean algorithm, the copper clad error problem of circular pads and polygon corners in printed circuit board copper clad algorithm is solved, and efficient and accurate copper clad area grouping and filling is achieved, reducing the work burden of designers.
Patent Information
- Application Number
- CN201910729389.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-08
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2039-08-08
AI Technical Summary
In the electronic design automation design of printed circuit boards, when using the copper cladding algorithm of executing polygon scanning lines, the copper cladding results at circular pads, vias and polygon corners are caused by large differences between the shapes expected by users, extended copper cladding time and increased designer adjustment burden.
The fill-type copper clad method that supports arc edges is adopted. Through the rounded corner expansion processing, intersection point calculation and scan line boolean algorithm, the polygon edges are split into disjoint edges, and scan line boolean algorithm is used to group scan areas to realize edge grouping and filling of copper clad areas.
It reduces the work burden and time of designers, improves the efficiency and performance of copper clad, supports efficient filling of complex polygons, and avoids the error of traditional linear fitting arc edges.
Smart Images

Figure CN112347727B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer graphics processing, and in particular to a filling type copper cladding system and device supporting arc edges. Background Art
[0002] A printed circuit board (PCB) is an important electronic component, a support for electronic components, and a carrier for electrical connection of various functional electronic components.
[0003] In the prior art, in the electronics design automation (EDA) design of a printed circuit board, a copper cladding algorithm based on an inscribed polygon scan line is often used to perform filling type copper cladding on the printed circuit board. The basic idea of the polygon scan line filling algorithm is as follows: for a given polygon, a set of horizontal or vertical scan lines are used for scanning. For each scan line, the intersection points with the polygon edges can be obtained. These intersection points divide the scan line into line segments inside the polygon and line segments outside the polygon, and the two are arranged alternately; all points on the line segments inside the polygon are assigned values (i.e., filled in the PCB). The specific implementation method is as follows: find the minimum Y value and the maximum Y value of the polygon, and then use each horizontal line within this range to intersect the polygon to obtain the intersection points, and then draw the line segments. Obviously, a scan line and a polygon have an even number of intersection points. These intersection points are arranged in ascending order of the X value, and then the 1st and 2nd ones are drawn, the 3rd and 4th ones are drawn... until all intersection points are taken.
[0004] However, when using the copper cladding algorithm of the inscribed polygon scan line to perform filling type copper cladding on a printed circuit board, the following disadvantages will occur in places such as circular pads, vias and polygon corners of the printed circuit board:
[0005] 1. If the inscribed edges are sparse, there will be a large difference between the generated copper cladding result and the shape expected by the user;
[0006] 2. If the inscribed edges are dense, the copper cladding time will be greatly prolonged;
[0007] 3. It increases the burden on designers to adjust the arc fitting degree according to the actual situation. Summary of the Invention
[0008] Aiming at the deficiencies of the prior art, the present invention provides a filling type copper cladding system and device supporting arc edges to solve the disadvantages of poor performance caused by using a single copper cladding algorithm that only supports straight lines, such as directly fitting arc edges with denser straight lines in the prior art. The specific solution is as follows:
[0009] In a first aspect, the present invention provides a filling type copper cladding method supporting arc edges, and the method includes:
[0010] Perform a fillet expansion process on all the primitives on the printed circuit board that need to be isolated from the copper cladding area to obtain fillet-expanded primitives;
[0011] Calculate the intersection points of all the edges on the printed circuit board after the fillet expansion process, and split all the edges into non-intersecting edges except for the vertices according to the intersection points;
[0012] Use the scan line Boolean algorithm to scan the non-intersecting edges to obtain a scan area, and group the edges of the scan area to obtain several groups of edges of the copper cladding area.
[0013] Preferably, the method further includes: filling and copper cladding according to the grouped edges of the copper cladding area.
[0014] Preferably, the fillet expansion process includes: smoothing the sharp corners of the primitives with fillets having a smoothness corresponding to the preset spacing according to the preset spacing between the copper cladding area and the primitives.
[0015] Preferably, the sharp corners and the edges of the primitives are both represented by arcs.
[0016] Preferably, for calculating the intersection points of all the edges on the printed circuit board after the fillet expansion process, the method includes:
[0017] Calculate the intersection points of all the edges of the fillet-expanded primitives and all the edges of the copper cladding area on the printed circuit board after the fillet expansion process.
[0018] Preferably, the intersection points of all the edges include any one of the intersection points of arc edges with arc edges, the intersection points of arc edges with straight edges, and the intersection points of straight edges with straight edges.
[0019] Preferably, for splitting all the edges into non-intersecting edges except for the vertices according to the intersection points, the method includes:
[0020] Sort all the intersection points of each edge according to the distance from the starting point of each edge, and connect the intersection points in sequence from the starting point through the sorted intersection points to the end point to form a new set of line segments.
[0021] In a second aspect, the present invention provides a filling type copper cladding system supporting arc edges, and the system includes:
[0022] A fillet expansion module for performing a fillet expansion process on all the primitives on the printed circuit board that need to be isolated from the copper cladding area to obtain fillet-expanded primitives;
[0023] An intersection splitting module, configured to calculate intersections of all edges on the printed circuit board after the fillet expansion process, and split all the edges into non-intersecting edges except vertices according to the intersections;
[0024] A scanning and grouping module, configured to use a scan line Boolean algorithm to scan the non-intersecting edges to obtain a scanning area, and group the edges of the scanning area to obtain several groups of edges of the copper-clad area.
[0025] In a third aspect, the present invention provides a filling type copper-clad device supporting arc edges, and the device includes:
[0026] A communication bus, configured to implement connection communication between a processor and a memory;
[0027] A memory, configured to store a computer program;
[0028] A processor, configured to execute the computer program to implement the following steps:
[0029] Perform fillet expansion processing on all primitives on the printed circuit board that need to be isolated from the copper-clad area to obtain fillet-expanded primitives;
[0030] Calculate intersections of all edges on the printed circuit board after the fillet expansion process, and split all the edges into non-intersecting edges except vertices according to the intersections;
[0031] Use a scan line Boolean algorithm to scan the non-intersecting edges to obtain a scanning area, and group the edges of the scanning area to obtain several groups of edges of the copper-clad area.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method in the first aspect is implemented.
[0033] Advantages of the present invention: Through the improvement of the polygon Boolean operation based on the scan line, the present invention proposes a filling type copper-clad method, system, device and storage medium directly supporting arcs, which supports any complex polygons including concave polygons, self-intersecting polygons, polygons with holes or polygons compounded according to edge weights, avoids the traditional single copper-clad algorithm that only supports straight lines such as directly fitting arc edges with denser straight lines, reduces errors, reduces the workload and working time of designers, and improves the copper-clad efficiency and performance. Description of the Drawings
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and the embodiments in the drawings do not constitute any limitation to the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0035] Figure 1 It is a schematic flowchart of the first embodiment of the filling type copper cladding method supporting arc edges in the present invention.
[0036] Figure 2 It is a schematic structural diagram of the first embodiment of the filling type copper cladding system supporting arc edges in the present invention.
[0037] Figure 3 It is a schematic structural diagram of the first embodiment of the filling type copper cladding device supporting arc edges in the present invention. Specific embodiments
[0038] The following further details the technical solutions of the present invention in conjunction with the drawings and embodiments. This is a preferred embodiment of the present invention. It should be understood that the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0039] The main idea of the technical solution in the embodiment of the present invention: perform fillet expansion processing on all the primitives on the printed circuit board that need to be isolated from the copper cladding area to obtain fillet-expanded primitives; calculate the intersection points of all the edges on the printed circuit board after the fillet expansion processing, and split all the edges into non-intersecting edges except for the vertices according to the intersection points; use the scan line Boolean algorithm to scan the non-intersecting edges to obtain a scanned area, and group the edges of the scanned area to obtain the edges of the copper cladding area.
[0040] To better understand the above technical solution, the following will detail the above technical solution in conjunction with the specification drawings and specific embodiments.
[0041] Embodiment 1
[0042] An embodiment of the present invention provides a filling type copper cladding method supporting arc edges, as Figure 1 shown, which specifically may include the following steps:
[0043] Step S101, perform fillet expansion processing on all the primitives on the printed circuit board that need to be isolated from the copper cladding area to obtain fillet-expanded primitives.
[0044] In this embodiment, the fillet expansion process specifically rounds the sharp corners of the primitive according to the preset distance between the copper-clad area and the primitive, using a fillet with a smoothness corresponding to the preset distance. Preferably, both the sharp corners and the edges of the primitive can be directly represented by arcs.
[0045] Among them, the expression of the arc: taking the counterclockwise arc as an example, the starting angle is , the ending angle is , , , It is required to be from 0 to , the unit vector of the starting angle of the arc is , the unit vector of the ending angle of the arc is .
[0046] Step S102: Calculate the intersection points of all the edges on the printed circuit board after the fillet expansion process, and split all the edges into non-intersecting edges except for the vertices according to the intersection points.
[0047] In this embodiment, calculating the intersection points of all the edges on the printed circuit board after the fillet expansion process includes two aspects: The first aspect is to calculate the intersection points of all the edges of the fillet-expanded primitives on the printed circuit board after the fillet expansion process, and the second aspect is to calculate the intersection points of all the edges of the copper-clad area on the printed circuit board after the fillet expansion process.
[0048] It should be noted that the above intersection points of all the edges can be the intersection points of arc edges and arc edges, the intersection points of arc edges and straight edges, or the intersection points of straight edges and straight edges. Their mathematical principles are described separately below: As can be seen from the above, the expression of the arc takes the counterclockwise arc as an example, the starting angle is , the ending angle is , , , It is required to be from 0 to , the unit vector of the starting angle of the arc is , the unit vector of the ending angle of the arc is , the unit vector of the angle between any point on the circle and the positive direction of the X-axis is set as ; The cross product of OS and OC is: , the cross product of OE and OC is: . Then, when , , and , this point is a point on the arc; when , , or , this point is a point on the arc.
[0049] The formula of a known straight line: ax + by + c = 0. When two straight lines intersect, the intersection point can be obtained by solving the simultaneous equations of Line Equation 1 and Line Equation 2:
[0050] a1x + b1y + c1 = 0
[0051] a2x + b2y + c2 = 0
[0052] to find the intersection point.
[0053] Similarly, when a straight line intersects with an arc, the intersection point can be obtained by solving the simultaneous equations of the straight line equation and the arc equation:
[0054] ax + by + c = 0
[0055]
[0056] to find the intersection point.
[0057] Then, according to the intersection points, all sides are split into non-intersecting sides except for the vertices. Specifically, for each side, all intersection points are sorted according to the distance from the starting point of each side, and in the order from the starting point through the sorted intersection points to the end point, the intersection points are successively connected before and after to form a new set of line segments.
[0058] Step S103: Use the scan line Boolean algorithm to scan the non-intersecting sides to obtain a scan area, and group the sides of the scan area to obtain several groups of sides of the copper cladding area.
[0059] Specifically, for a scan line, the work to be done can be divided into three steps:
[0060] 1. Find the intersection points of the scan line and each side of the polygon;
[0061] 2. Sort these intersection points in ascending order of the X coordinate;
[0062] 3. Pair up the sorted intersection points two by two (i.e., determine those line segments that fall inside the polygon from left to right), and then draw the corresponding line segments;
[0063] 4. Fill the line segments that fall inside the polygon.
[0064] Repeatedly use the above scan line method to scan the area where the primitive is located from top to bottom or from left to right. Each scan line will generate a series of intersection points with the sides of the primitive until all scan lines no longer intersect any part of the sides of the primitive. Connect the mutually contacting sides of the scan area into one body, and several groups of sides of the copper cladding area will be obtained, realizing the grouping of the sides of the scan area.
[0065] In actual application, since it is not necessary to actually fill yet and only the edges of the copper-clad area are marked, the edges of the copper-clad area that have been scanned are excluded during each scan, thus improving the efficiency.
[0066] Embodiment 2
[0067] An embodiment of the present invention provides a filling type copper cladding method supporting arc edges, which may specifically include the following steps:
[0068] Step S201, perform fillet expansion processing on all the primitives on the printed circuit board that need to be isolated from the copper-clad area to obtain fillet-expanded primitives.
[0069] In this embodiment, the fillet expansion processing specifically uses a fillet with a smoothness corresponding to the preset spacing to smooth the sharp corners of the primitive according to the preset spacing between the copper-clad area and the primitive. Preferably, both the sharp corners and the edges of the primitive can be directly represented by arcs.
[0070] Among them, the expression of the arc: taking the counterclockwise arc as an example, the starting angle is , the ending angle is , , , It is required to be from 0 to , the unit vector of the starting angle of the arc is , the unit vector of the ending angle of the arc is .
[0071] Step S202, calculate the intersection points of all the edges on the printed circuit board after the fillet expansion processing, and split all the edges into non-intersecting edges except for the vertices according to the intersection points.
[0072] In this embodiment, calculating the intersection points of all the edges on the printed circuit board after the fillet expansion processing includes two aspects: the first aspect is to calculate the intersection points of all the edges of the fillet-expanded primitives on the printed circuit board after the fillet expansion processing, and the second aspect is to calculate the intersection points of all the edges of the copper-clad area on the printed circuit board after the fillet expansion processing.
[0073] It should be noted that the above intersection points of all the edges can be the intersection points of arc edges and arc edges, the intersection points of arc edges and straight edges, or the intersection points of straight edges and straight edges. The following describes their mathematical principles respectively: As described above, the expression of the arc is taking the counterclockwise arc as an example, the starting angle is , the ending angle is , , , It is required to be from 0 to , the unit vector of the starting angle of the arc is , the unit vector of the ending angle of the arc is , circle Any point on Let the unit vector of the angle with the positive direction of the X-axis be ; The cross product of OS and OC is: , and the cross product of OE and OC is: . Then, when , , and , this point is a point on the circular arc; when , , or , this point is a point on the circular arc.
[0074] Given the formula of a straight line: ax + by + c = 0, when two straight lines intersect, the intersection point can be obtained by solving the joint equations of straight line equation 1 and straight line equation 2:
[0075] a1x + b1y + c1 = 0
[0076] a2x + b2y + c2 = 0
[0077] to find the intersection point.
[0078] Similarly, when finding the intersection of a straight line and a circular arc, the intersection point can be obtained by solving the joint equations of the straight line equation and the circular arc equation:
[0079] ax + by + c = 0
[0080]
[0081] to find the intersection point.
[0082] Then, according to the intersection points, all sides are split into non-intersecting sides except the vertices. Specifically, for each side, all intersection points are sorted by the distance to the starting point of each side, and in the order from the starting point through the sorted intersection points to the end point, the intersection points are connected in sequence to form a new set of line segments.
[0083] Step S203, use the scan line Boolean algorithm to scan the non-intersecting sides to obtain a scan area, and group the sides of the scan area to obtain several groups of sides of the copper-clad area.
[0084] Specifically, for a scan line, the work to be done can be divided into three steps:
[0085] 1. Find the intersection points of the scan line and each side of the polygon;
[0086] 2. Sort these intersection points in ascending order of the X coordinate;
[0087] 3. Pair the sorted intersection points in pairs (that is, determine the line segments that fall inside the polygon from left to right), and then draw the corresponding line segments;
[0088] 4. Fill the line segments that fall inside the polygon.
[0089] Repeatedly scan the area where the primitive is located from top to bottom or from left to right using the above scan line method. Each scan line will generate a series of intersection points with the edges of the primitive until all scan lines no longer intersect any part of the edges of the primitive. Connect the mutually contacting edges of the scan area into one body, and several groups of edges of the copper-clad area will be obtained, realizing the edge grouping of the scan area.
[0090] In actual application, since it is not necessary to actually fill yet, but only mark the edges of the copper-clad area, the edges of the copper-clad area that have been scanned are excluded each time of scanning, thus improving the efficiency.
[0091] Step S204, perform copper-clad filling according to the grouped edges of the copper-clad area.
[0092] In this example, the above several groups of edges of the copper-clad area are the actual copper-clad areas after subtracting the rounded corner expansion area from the entire area of the printed circuit board. Fill the interval segments of the copper-clad area in order of coordinates, stop when encountering the boundary, until all groups are copper-clad, that is, the filling type copper-clad of the entire printed circuit board is implemented.
[0093] Embodiment Three
[0094] An embodiment of the present invention provides a filling type copper-clad system that supports arc edges, as Figure 2 shown, and specifically may include the following modules:
[0095] A rounded corner expansion module, configured to perform rounded corner expansion processing on all primitives on the printed circuit board that need to be isolated from the copper-clad area to obtain rounded corner expanded primitives.
[0096] In this embodiment, the rounded corner expansion processing is specifically to smooth the sharp corners of the primitive with rounded corners having a smoothness corresponding to the preset spacing according to the preset spacing between the copper-clad area and the primitive. Preferably, both the sharp corners of the primitive and the edges of the primitive can be directly represented by arcs.
[0097] Among them, the expression of the arc: taking the counterclockwise arc as an example, the starting angle is , the ending angle is , , , requiring 0 to , the unit vector of the starting angle of the arc is , the unit vector of the ending angle of the arc is .
[0098] An intersection splitting module is used to calculate the intersections of all the edges on the printed circuit board after the fillet expansion process, and split all the edges into non-intersecting edges except for the vertices according to the intersections.
[0099] In this embodiment, calculating the intersections of all the edges on the printed circuit board after the fillet expansion process includes two aspects: the first aspect is to calculate the intersections of all the edges of the fillet expansion primitives on the printed circuit board after the fillet expansion process, and the second aspect is to calculate the intersections of all the edges of the copper-clad area on the printed circuit board after the fillet expansion process.
[0100] It should be noted that the intersections of all the above-mentioned edges can be the intersections of arc edges and arc edges, the intersections of arc edges and straight edges, or the intersections of straight edges and straight edges. Their mathematical principles are described separately below: As mentioned above, taking the counterclockwise arc as an example, the expression of the arc has a starting angle of , an ending angle of , , , It is required that from 0 to , the unit vector of the starting angle of the arc is , the unit vector of the ending angle of the arc is , and for any point on the circle , the unit vector of the angle between it and the positive direction of the X-axis is set as ; The cross product of OS and OC is: , and the cross product of OE and OC is: . Then, when , , and , this point is a point on the arc; when , , or , this point is a point on the arc.
[0101] Given the formula of a straight line: ax + by + c = 0, when two straight lines intersect, the intersection point can be obtained by solving the combined equations of straight line equation 1 and straight line equation 2:
[0102] a1x + b1y + c1 = 0
[0103] a2x + b2y + c2 = 0
[0104] to find the intersection point.
[0105] Similarly, when finding the intersection of a straight line and an arc, the intersection point can be obtained by solving the combined equations of the straight line equation and the arc equation:
[0106] ax + by + c = 0
[0107]
[0108] to solve for the intersection points.
[0109] Then, all edges are split into non - intersecting edges except for vertices according to the intersection points. Specifically, for each edge, all intersection points are sorted by the distance to the starting point of each edge, and in the order from the starting point through the sorted intersection points to the end point, the intersection points are sequentially connected before and after to form a new set of line segments.
[0110] The scan - grouping module is used to scan the non - intersecting edges using the scan - line Boolean algorithm to obtain a scan area, and group the edges of the scan area to obtain several groups of edges of the copper - clad area.
[0111] Specifically, for a scan line, the work to be done can be divided into three steps:
[0112] 1. Find the intersection points of the scan line and each side of the polygon;
[0113] 2. Sort these intersection points in ascending order of the X - coordinate;
[0114] 3. Pair up the sorted intersection points (i.e., determine those line segments that fall inside the polygon from left to right), and then draw the corresponding line segments;
[0115] 4. Fill the line segments that fall inside the polygon.
[0116] Repeatedly use the above - mentioned scan - line method to scan the area where the primitive is located from top to bottom or from left to right. Each scan line will generate a series of intersection points with the edges of the primitive until all scan lines no longer intersect any part of the edges of the primitive. Connect the mutually - contacting edges of the scan area into one body, and several groups of edges of the copper - clad area will be obtained, realizing the grouping of the edges of the scan area.
[0117] In actual application, since it is not necessary to actually fill, but only mark the edges of the copper - clad area, so each scan excludes the edges of the copper - clad area that have been scanned, thus improving the efficiency.
[0118] In an alternative embodiment, it may further include a copper - clad filling module for filling the copper - clad according to the grouped edges of the copper - clad area.
[0119] In this example, the above - mentioned several groups of edges of the copper - clad area are the actual copper - clad areas after subtracting the rounded - corner expansion area from the entire printed circuit board area. Fill the interval segments of the copper - clad area in order of coordinates, stopping at the boundary until all groups are copper - clad, that is, the filling - type copper - clad of the entire printed circuit board is implemented.
[0120] Embodiment Four
[0121] An embodiment of the present invention provides a filling type copper-clad device supporting arc edges, as Figure 3 shown, which may specifically include the following modules:
[0122] A communication bus for realizing the connection and communication between the processor and the memory;
[0123] A memory for storing computer programs; the memory may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory. Optionally, the memory may include at least one storage device.
[0124] A processor for executing the above computer program to implement the following steps:
[0125] Step S301: Perform a fillet expansion process on all the primitives on the printed circuit board that need to be isolated from the copper-clad area to obtain fillet-expanded primitives.
[0126] In this embodiment, the fillet expansion process specifically uses a fillet with a smoothness corresponding to the preset spacing to smooth the sharp corners of the primitive according to the preset spacing between the copper-clad area and the primitive. Preferably, both the sharp corners and the edges of the primitive can be directly represented by arcs.
[0127] Among them, the expression of the arc: taking the counterclockwise arc as an example, the starting angle is , the ending angle is , , , It is required that from 0 to , the unit vector of the starting angle of the arc is , and the unit vector of the ending angle of the arc is .
[0128] Step S302: Calculate the intersections of all the edges on the printed circuit board after the fillet expansion process, and split all the edges into non-intersecting edges except for the vertices according to the intersections.
[0129] In this embodiment, calculating the intersections of all the edges on the printed circuit board after the fillet expansion process includes two aspects: the first aspect is to calculate the intersections of all the edges of the fillet-expanded primitives on the printed circuit board after the fillet expansion process, and the second aspect is to calculate the intersections of all the edges of the copper-clad area on the printed circuit board after the fillet expansion process.
[0130] It should be noted that the intersections of all the above edges can be intersections of arc edges and arc edges, intersections of arc edges and straight edges, or intersections of straight edges and straight edges. The following describes their mathematical principles respectively: As mentioned above, the expression of the arc takes the counterclockwise arc as an example, the starting angle is , the ending angle is , , , It is required that from 0 to , and the unit vector of the starting angle of the arc is , and the unit vector of the ending angle of the arc is , the circle any point on it and the unit vector of the angle with the positive direction of the X-axis is set as ; The cross product of OS and OC is: , and the cross product of OE and OC is: . Then, when , , and , this point is a point on the arc; when , , or , this point is a point on the arc.
[0131] Given the formula of a straight line: ax + by + c = 0, when two straight lines intersect, the intersection point can be obtained by solving the combined equations of the straight line equation 1 and the straight line equation 2:
[0132] a1x + b1y + c1 = 0
[0133] a2x + b2y + c2 = 0
[0134] to find the intersection point.
[0135] Similarly, when finding the intersection of a straight line and an arc, the intersection point can be obtained by solving the combined equations of the straight line equation and the arc equation:
[0136] ax + by + c = 0
[0137]
[0138] to find the intersection point.
[0139] Then, according to the intersection points, all the sides are split into non-intersecting sides except the vertices. Specifically, for each side, all the intersection points are sorted according to the distance from the starting point of each side, and in the order from the starting point through the sorted intersection points to the end point, the intersection points are connected in sequence before and after to form a new set of line segments.
[0140] Step S303, use the scan line Boolean algorithm to scan the non-intersecting sides to obtain a scan area, and group the sides of the scan area to obtain several groups of sides of the copper-clad area.
[0141] Specifically, for a scan line, the work to be done can be divided into three steps:
[0142] 1. Find the intersection points of the scan line and each side of the polygon;
[0143] 2. Sort these intersection points in ascending order of the X coordinate;
[0144] 3. Pair up the sorted intersection points two by two (i.e., determine those line segments that fall inside the polygon from left to right), and then draw the corresponding line segments;
[0145] 4. Fill the line segments that fall inside the polygon.
[0146] Repeatedly use the above scan line method to scan the area where the primitive is located from top to bottom or from left to right. Each scan line will generate a series of intersection points with the edges of the primitive until all scan lines no longer intersect any part of the edges of the primitive. Connect the mutually contacting edges of the scan area into one body, and several groups of edges of the copper cladding area will be obtained, realizing the grouping of the edges of the scan area.
[0147] In practical applications, since it is not necessary to actually fill, but only mark the edges of the copper cladding area, the edges of the copper cladding area that have been scanned are excluded each time, thus improving the efficiency.
[0148] Step S304, perform copper cladding filling according to the grouped edges of the copper cladding area.
[0149] In this example, the above several groups of edges of the copper cladding area are the actual copper cladding areas after subtracting the rounded corner expansion area from the entire area of the printed circuit board. Fill the interval segments of the copper cladding area in sequence according to the coordinate order until reaching the boundary, until all groups are copper clad, that is, the filling type copper cladding of the entire printed circuit board is implemented.
[0150] The processor in this embodiment may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor or by instructions in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The above processor may be a microprocessor or the above processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed by the hardware processor, or be executed by a combination of the hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0151] Example 5
[0152] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for hidden encrypted transmission of data is realized.
[0153] In summary, through the improvement of polygon Boolean operation based on scan lines, the present invention proposes a method, system, device and storage medium for directly supporting the filling type copper cladding with arcs, which supports any complex polygons including concave polygons, self-intersecting polygons, polygons with holes or polygons compounded by edge weights, etc. It avoids the single copper cladding algorithm that only supports straight lines in the traditional technology, such as directly fitting the arc edge with denser straight lines, reduces the error, reduces the workload and working time of designers, and improves the copper cladding efficiency and performance.
[0154] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0155] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more collections of available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0156] Those of ordinary skill in the art will appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0157] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0158] Those skilled in the art can clearly understand that for the sake of convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0159] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0160] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0163] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, apparatuses (devices), and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0164] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in this computer-readable memory generate a manufactured article including an instruction device, and this instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0166] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising said element.
[0167] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A filling type copper cladding method supporting arc edges, characterized in that, The method includes: The outer contour of the graphic elements on the printed circuit board consists of straight lines or curves to form geometric elements. There are sharp corners in the geometric elements. By controlling the radius parameter, an arc segment with a certain radius is introduced to replace the original sharp corner turning, making the corners of the graphic more rounded and continuous, and realizing the rounding expansion of the graphic elements. Perform rounding expansion processing on all graphic elements on the printed circuit board that need to be isolated from the copper-clad area to obtain rounded expanded graphic elements. The rounded expanded graphic elements are closed geometric figures composed of straight lines or curves, and the straight lines or curves are called sides. The sides have clear starting points and ending points, and the starting points and ending points of the sides are defined as the vertices of the sides. Except for the points where the vertices of the sides are the same, there may be other intersecting or tangent positions between the sides, which are called intersection points. Calculate the intersection points of all sides on the printed circuit board after the rounding expansion processing, and disconnect all the original sides at the intersection points according to the intersection points, and split them into non-intersecting sides except for the vertices. Use the scan-line Boolean algorithm to scan the non-intersecting sides to obtain a scanned area, and group the sides of the scanned area to obtain several groups of sides of the copper-clad area. Connect the obtained several groups of sides of the copper-clad area into a closed polygon, and group them according to the nesting relationship between the marked contours and holes during scanning to obtain a copper-clad area polygon that may have holes, and then fill the polygon. The method further includes: Using the scan-line Boolean algorithm, subtract the area after rounding expansion from the entire area of the printed circuit board to obtain the sides of the copper-clad area that actually need to be processed, connect the sides into the contour of the copper-clad area, group them according to the nesting relationship between the contour and the hole, and fill the copper-clad area according to the grouped copper-clad areas. The rounding expansion processing includes: According to the preset distance between the copper-clad area and the graphic element, smooth the sharp corners of the graphic element with a rounded corner with a smoothness corresponding to the preset distance. The sharp corners of the graphic element and the sides of the graphic element are both represented by arcs.
2. The filling type copper cladding method for supporting arc edges according to claim 1, wherein For calculating the intersection points of all sides on the printed circuit board after the rounding expansion processing, the method includes: Calculate the intersection points of all sides of the rounded expanded graphic elements on the printed circuit board after the rounding expansion processing and the intersection points of all sides of the copper-clad area.
3. The filling type copper cladding method supporting arc edges according to claim 2, characterized in that The intersection points of all the sides include any one of the intersection points of arc sides and arc sides, the intersection points of arc sides and straight sides, and the intersection points of straight sides and straight sides.
4. The filling type copper cladding method for supporting an arc edge according to claim 3, wherein For splitting all the sides into non-intersecting sides except for the vertices according to the intersection points, the method includes: Sort all the intersection points of each side according to the distance from the starting point of each side, and connect the intersection points in sequence from the starting point through the sorted intersection points to the ending point to form a new set of line segments.
5. A system for a filling type copper cladding method supporting an arc edge according to claim 1, characterized in that, The system includes: A rounding expansion module for performing rounding expansion processing on all graphic elements on the printed circuit board that need to be isolated from the copper-clad area to obtain rounded expanded graphic elements. An intersection point splitting module for calculating the intersection points of all sides on the printed circuit board after the rounding expansion processing, and splitting all the sides into non-intersecting sides except for the vertices according to the intersection points. A scan grouping module, which is used to scan the non-intersecting edges using a scan line Boolean algorithm to obtain a scan area, and group the edges of the scan area to obtain several groups of edges of the copper-clad area.
6. The device for a filling type copper cladding method supporting arc edges according to claim 1, characterized in that, The device includes: A communication bus, which is used to realize the connection and communication between the processor and the memory; A memory, which is used to store computer programs; A processor, which is used to execute the computer program to implement the following steps: Perform fillet expansion processing on all the primitives on the printed circuit board that need to be isolated from the copper-clad area to obtain fillet-expanded primitives; Calculate the intersection points of all the edges on the printed circuit board after the fillet expansion processing, and split all the edges into non-intersecting edges except for the vertices according to the intersection points; Use a scan line Boolean algorithm to scan the non-intersecting edges to obtain a scan area, and group the edges of the scan area to obtain several groups of edges of the copper-clad area.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by the processor, implements the method described in any one of claims 1-4.
Citation Information
Patent Citations
Triangularization method of polygon in computer image processing and system using the same
CN103164864A
Partition-based 3D printing filling path generation method
CN104325638A