Microstrip line surrounding hole automatic punching method based on EDA software
The automatic hole drilling method of automatically generating a microstrip line surrounding the hole through EDA software, using auxiliary lines to calculate the number and position of the ground holes, form a linked list structure, and realize automatic hole drilling, solving the problem of inefficient traditional manual click drilling and significantly improving the hole drilling efficiency.
Patent Information
- Application Number
- CN202510120470.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-25
- Publication Date
- 2025-05-09
AI Technical Summary
In PCB design, manually punching holes for microstrips is time-consuming and labor-intensive, especially with the increase in the number of microstrips and the complexity of PCB boards, traditional manual clicking holes are inefficient.
Through EDA software, the surrounding holes of microstrip lines are automatically generated, and the number and position of ground holes are calculated using auxiliary lines to form a linked list structure to achieve automatic hole drilling.
The hole drilling efficiency of the microstrip line surrounds the hole. Compared with traditional manual clicking hole drilling, automatic hole drilling can be completed in a few milliseconds, significantly saving time and cost and improving work efficiency.
Smart Images

Figure CN119967714A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of circuit design, in particular to an automatic punching method for microstrip line surrounding holes based on EDA software. Background Art
[0002] The microstrip line is composed of a dielectric substrate and metal strips and metal ground planes applied on the upper and lower surfaces of the dielectric substrate. It is a commonly used transmission line structure and is widely used in radio frequency circuits. In PCB design, in order to reduce interference and loss of signals during transmission and improve the stability of the PCB, it is a common practice to punch ground holes on both sides of the microstrip line. The traditional way of punching holes in EDA software is still to click manually one by one. In order to further reduce interference and loss of signals during transmission and improve the stability of the PCB, it takes a lot of time to optimize and adjust the details. Moreover, with the increase in the number of microstrip lines and the increase in the complexity of the PCB board, manual ground hole drilling requires more effort. Summary of the invention
[0003] The purpose of the present invention is to provide a method for automatically punching microstrip line surrounding holes based on EDA software to automatically generate surrounding holes for microstrip lines and improve the punching efficiency of microstrip line surrounding holes.
[0004] In order to achieve the above-mentioned purpose, the technical methods adopted by the present invention are as follows:
[0005] A method for automatically punching microstrip line surrounding holes based on EDA software, comprising the following steps:
[0006] S1. Through EDA software, the user customizes the punching properties of the microstrip line surrounding hole;
[0007] S2. Draw microstrip lines, traverse all microstrip lines, generate an auxiliary line parallel to the corresponding microstrip line on both sides of each microstrip line, and determine the length of each auxiliary line;
[0008] S3, according to the length and punching properties of each auxiliary line, determine the number of punching holes on the side of the microstrip line corresponding to each auxiliary line, and then calculate the actual distance between the centers of adjacent ground holes on the side of the microstrip line corresponding to each auxiliary line according to the number of punching holes;
[0009] S4, determining the center position of the first ground hole on each side of each microstrip line, and calculating the center positions of subsequent ground holes on each side of the corresponding microstrip line in sequence according to the actual distance between the centers of adjacent ground holes on each side of the corresponding microstrip line, and forming a linked list structure based on the front-to-back order of the center positions of the ground holes on each side of the microstrip line;
[0010] S5. Traverse the linked list structure and automatically punch holes in sequence.
[0011] As a limitation: the drilling attributes in step S1 include the initial layer, the end layer, the radius of the ground hole, the closest distance between adjacent ground holes, and the closest distance from the ground hole to the microstrip line.
[0012] As a further limitation: in step S2, the distance between the auxiliary lines on both sides of each microstrip line and the corresponding microstrip line is equal to the shortest distance from the ground hole to the microstrip line, that is, the auxiliary lines on both sides of each microstrip line are tangent to the ground holes to be drilled on both sides of the corresponding microstrip line; the starting point position and the ending point position of the auxiliary lines on both sides of each microstrip line correspond to the starting point position and the ending point position of the corresponding microstrip line.
[0013] As a limitation: the length of the auxiliary line is determined in step S2 specifically as follows: the auxiliary line on the outside of the corresponding microstrip line needs to be extended on the outside of the intersection of every two intersecting microstrip lines until the two auxiliary lines intersect, and the auxiliary line on the inside of the intersection of every two intersecting microstrip lines needs to be shortened until the two auxiliary lines intersect, and the length of the auxiliary line is from the starting point of the auxiliary line to the intersection point; step S2 also includes taking a microstrip line without an intersection at one end as the first microstrip line, and the auxiliary lines on both sides of the first microstrip line as the starting auxiliary lines, and storing the memory addresses of all auxiliary lines in the order of the front and back auxiliary lines.
[0014] As a further limitation: the calculation formula for the number of holes punched on one side of each auxiliary line corresponding to the microstrip line in step S3 is:
[0015]
[0016] Where N is the number of holes on the auxiliary line, L is the length of the auxiliary line, R is the radius of the ground hole in the drilling attribute, and I is the shortest distance between adjacent ground holes set in the drilling attribute. is the floor rounding symbol;
[0017] The calculation formula for the actual distance between the centers of adjacent ground holes on one side of the microstrip line corresponding to each auxiliary line is:
[0018] i=L / N,
[0019] Where i is the actual distance between the centers of adjacent ground holes on one side of the microstrip line corresponding to each auxiliary line.
[0020] As a further limitation: the method for calculating the center position of the ground hole in step S4 is specifically as follows: the distance from the starting point of the starting auxiliary line on the first microstrip line to the starting auxiliary line by a ground hole radius is used as the tangent point of the first ground hole on the first microstrip line and the starting auxiliary line, and the center coordinates of the first ground hole on the first microstrip line are calculated according to the ground hole radius in the punching attribute, and then the center coordinates of the subsequent ground holes on the first microstrip line are calculated in sequence according to the actual distance between the centers of adjacent ground holes on the first microstrip line; the center coordinates of the first ground hole on the microstrip line corresponding to the remaining auxiliary lines are calculated according to the center coordinates of the first ground hole on the previous auxiliary line. The center coordinates of the last ground hole on the side of the microstrip line corresponding to the previous auxiliary line are determined. The center of the last ground hole on the side of the microstrip line corresponding to the previous auxiliary line is taken as the center of the circle, and the actual distance between the centers of adjacent ground holes on the side of the microstrip line corresponding to the previous auxiliary line is taken as the radius. A virtual circle is drawn, and the intersection of the virtual circle and the current auxiliary line is taken as the tangent point of the first ground hole on the side of the microstrip line corresponding to the current auxiliary line and the current auxiliary line. The center coordinates of the circle are calculated according to the radius of the ground hole in the drilling properties, and then the center coordinates of the subsequent ground holes on the side of the microstrip line corresponding to the current auxiliary line are calculated in sequence according to the actual distance between the centers of adjacent ground holes on the side of the microstrip line corresponding to the current auxiliary line.
[0021] As a further limitation: the linked list structure formed in step S4 is a bidirectional linked list structure, specifically: an information class is created for each ground hole, and the information class of each ground hole stores the location information of each ground hole, as well as the memory address of the previous ground hole information class and the memory address of the next ground hole information class. The memory address of the previous ground hole information class in the first ground hole information class on the side of the first microstrip line is empty, and the memory address of the next ground hole information class in the last ground hole information class on the side of the last microstrip line is empty; the memory address of the previous ground hole information class in the first ground hole information class on the side of the remaining microstrip lines is the memory address of the last ground hole information class on the side of the previous microstrip line, and the memory address of the next ground hole information class in the last ground hole information class is the memory address of the first ground hole information class on the side of the next microstrip line; the information classes of all ground holes on one side of the microstrip line are used as nodes to form a bidirectional linked list structure.
[0022] As a limitation: Step S5 is specifically: traverse the linked list structure, select each ground hole position in turn as the current ground hole position, determine whether there are other packages at the current ground hole position, if there are no other packages, then punch a hole at the current ground hole position; if there are other packages, then skip the current ground hole position, select the next ground hole position as the current ground hole position, and repeat the above process until the linked list structure traversal is completed.
[0023] Due to the adoption of the above scheme, the present invention has the following beneficial effects compared with the prior art:
[0024] The present invention provides an automatic punching method for microstrip line surrounding holes based on EDA software. By generating auxiliary lines, the number and positions of ground holes on one side of the microstrip line corresponding to the auxiliary lines are calculated, a linked list structure is formed based on the front-to-back order of the ground hole positions, and the linked list structure is traversed to select the ground hole positions in order to punch holes in sequence. Compared with traditional manual clicking and punching, the average time for punching the same microstrip line by manual clicking is about two minutes. However, the method of the present invention realizes automatic punching, which can be completed within a few milliseconds, saving time cost and improving work efficiency.
[0025] The invention is suitable for automatic drilling of microstrip line surrounding holes. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Figure 1 This is a flow chart of a method for automatically punching microstrip line surrounding holes based on EDA software according to an embodiment of the present invention;
[0028] Figure 2 A schematic diagram of drilling ground holes on both sides of a microstrip line according to an embodiment of the present invention;
[0029] In the figure: 1. The first microstrip line; 2. The starting auxiliary line; 3. The ground hole; 4. The virtual circle. DETAILED DESCRIPTION
[0030] The present invention is further described below in conjunction with embodiments, but those skilled in the art should understand that the present invention is not limited to the following embodiments, and any improvements and equivalent changes made based on the specific embodiments of the present invention are within the scope of protection of the claims of the present invention.
[0031] Embodiment A method for automatically punching microstrip line surrounding holes based on EDA software
[0032] A method for automatically punching microstrip line surrounding holes based on EDA software, such as Figure 1 As shown, the following steps are included:
[0033] S1. Through EDA software, the user customizes the punching properties of the microstrip line surrounding hole, and the punching properties include the initial layer, the end layer, the radius of the ground hole 3, the closest distance between adjacent ground holes 3, and the closest distance from the ground hole 3 to the microstrip line;
[0034] S2. Draw microstrip lines, traverse all microstrip lines, and generate an auxiliary line parallel to the corresponding microstrip line on both sides of each microstrip line. The distance between the auxiliary lines on both sides of each microstrip line and the corresponding microstrip line is equal to the shortest distance between the ground hole 3 and the microstrip line, that is, the auxiliary lines on both sides of each microstrip line are tangent to the ground holes 3 to be drilled on both sides of the corresponding microstrip line; the starting point position and the ending point position of the auxiliary lines on both sides of each microstrip line correspond to the starting point position and the ending point position of the corresponding microstrip line, and the outer side of the intersection of each two intersecting microstrip lines needs to be extended to The auxiliary line on the outside of the microstrip line should be shortened to the intersection of the two auxiliary lines. The inner side of the intersection of each two intersecting microstrip lines needs to shorten the auxiliary line on the inside of the corresponding microstrip line to the intersection of the two auxiliary lines. The length of the auxiliary line is from the starting point of the auxiliary line to the intersection point. The side with an angle less than 180° between the two intersecting microstrip lines is the inner side, and the other side is the outer side. The microstrip line without an intersection at one end is the first microstrip line 1, and the auxiliary lines on both sides of the first microstrip line 1 are the starting auxiliary lines 2. The memory addresses of all auxiliary lines are stored in the order of the front and back of the auxiliary lines.
[0035] S3. According to the length and punching properties of each auxiliary line, determine the number of punching holes on the side of the microstrip line corresponding to each auxiliary line, and then calculate the actual distance between the centers of adjacent ground holes 3 on the side of the microstrip line according to the number of punching holes; the calculation formula for the number of punching holes on the side of the microstrip line corresponding to each auxiliary line is:
[0036]
[0037] Where N is the number of holes on the auxiliary line, L is the length of the auxiliary line, R is the radius of the ground hole 3 in the drilling properties, and I is the shortest distance between adjacent ground holes 3 set in the drilling properties. is the floor rounding symbol;
[0038] The calculation formula for the actual distance between the centers of the adjacent ground holes 3 on one side of the microstrip line corresponding to each auxiliary line is:
[0039] i=L / N,
[0040] Where i is the actual distance between the centers of adjacent ground holes 3 on one side of the microstrip line corresponding to each auxiliary line;
[0041] S4, taking the distance from the starting point of the starting auxiliary line 2 on the first microstrip line 1 to the starting point of the starting auxiliary line 2 by a radius of the ground hole 3 as the tangent point between the first ground hole 3 on the first microstrip line 1 and the starting auxiliary line 2, calculating the center coordinates of the first ground hole 3 on the first microstrip line 1 according to the radius of the ground hole 3 in the punching attribute, and then calculating the center coordinates of subsequent ground holes 3 on the first microstrip line 1 in sequence according to the actual distance between the centers of adjacent ground holes 3 on the first microstrip line 1; the center coordinates of the first ground hole 3 on the microstrip line side corresponding to the remaining auxiliary lines are determined according to the center coordinates of the last ground hole 3 on the microstrip line side corresponding to the previous auxiliary line, such as Figure 2 As shown, a virtual circle 4 is drawn with the center of the last ground hole 3 on the side of the microstrip line corresponding to the previous auxiliary line as the center of the circle, and the actual distance between the centers of adjacent ground holes 3 on the side of the microstrip line corresponding to the previous auxiliary line as the radius, and the intersection of the virtual circle 4 and the current auxiliary line is used as the tangent point of the first ground hole 3 on the side of the microstrip line corresponding to the current auxiliary line and the current auxiliary line, and then the center coordinates of the ground hole 3 are calculated according to the radius of the drilling attribute, and then the center coordinates of subsequent ground holes 3 on the side of the microstrip line corresponding to the current auxiliary line are calculated in sequence according to the actual distance between the centers of adjacent ground holes 3 on the side of the microstrip line corresponding to the current auxiliary line; a linked list structure is formed based on the front-to-back order of the center coordinates of the ground holes 3 on each side of the microstrip line;
[0042] The formed linked list structure is a bidirectional linked list structure, specifically: an information class is created for each ground hole 3, and the information class of each ground hole 3 stores the position information of each ground hole 3, as well as the memory address of the previous ground hole 3 information class and the memory address of the next ground hole 3 information class. The memory address of the previous ground hole 3 information class in the first ground hole 3 information class on the side of the first microstrip line 1 is empty, and the memory address of the next ground hole 3 information class in the last ground hole 3 information class on the side of the last microstrip line is empty; the memory address of the previous ground hole 3 information class in the first ground hole 3 information class on the side of the remaining microstrip lines is the memory address of the last ground hole 3 information class on the side of the previous microstrip line, and the memory address of the next ground hole 3 information class in the last ground hole 3 information class is the memory address of the first ground hole 3 information class on the side of the next microstrip line; the information classes of all ground holes 3 on one side of the microstrip line are used as nodes to form a bidirectional linked list structure;
[0043] S5, traverse the bidirectional linked list structure, select each ground hole 3 position in turn as the current ground hole 3 position, determine whether there is other package at the current ground hole 3 position, if there is no other package, then punch a hole at the current ground hole 3 position; if there is other package, then skip the current ground hole 3 position, select the next ground hole 3 position as the current ground hole 3 position, and repeat the above process until the bidirectional linked list structure traversal is completed.
Claims
1. A method for automatically punching microstrip line surrounding holes based on EDA software, characterized in that: The following steps are involved: S1. Through EDA software, the user customizes the punching properties of the microstrip line surrounding hole; S2. Draw microstrip lines, traverse all microstrip lines, generate an auxiliary line parallel to the corresponding microstrip line on both sides of each microstrip line, and determine the length of each auxiliary line; S3, according to the length and punching properties of each auxiliary line, determine the number of punching holes on the side of the microstrip line corresponding to each auxiliary line, and then calculate the actual distance between the centers of adjacent ground holes on the side of the microstrip line corresponding to each auxiliary line according to the number of punching holes; S4, determining the center position of the first ground hole on each side of each microstrip line, and calculating the center positions of subsequent ground holes on each side of the corresponding microstrip line in sequence according to the actual distance between the centers of adjacent ground holes on each side of the corresponding microstrip line, and forming a linked list structure based on the front-to-back order of the center positions of the ground holes on each side of the microstrip line; S5. Traverse the linked list structure and automatically punch holes in sequence.
2. The method for automatically punching microstrip line surrounding holes based on EDA software according to claim 1, characterized in that: The drilling attributes in step S1 include the initial layer, the end layer, the radius of the ground hole, the shortest distance between adjacent ground holes, and the shortest distance from the ground hole to the microstrip line.
3. The method for automatically punching microstrip line surrounding holes based on EDA software according to claim 2, characterized in that: In step S2, the distance between the auxiliary lines on both sides of each microstrip line and the corresponding microstrip line is equal to the shortest distance from the ground hole to the microstrip line, that is, the auxiliary lines on both sides of each microstrip line are tangent to the ground holes to be drilled on both sides of the corresponding microstrip line; the starting point position and the ending point position of the auxiliary lines on both sides of each microstrip line correspond to the starting point position and the ending point position of the corresponding microstrip line.
4. A method for automatically punching microstrip line surrounding holes based on EDA software according to any one of claims 1 to 3, characterized in that: The length of the auxiliary line is determined in step S2 specifically as follows: the auxiliary line on the outside of the corresponding microstrip line needs to be extended on the outside of the intersection of every two intersecting microstrip lines until the two auxiliary lines intersect, and the auxiliary line on the inside of the intersection of every two intersecting microstrip lines needs to be shortened until the two auxiliary lines intersect, and the length of the auxiliary line is from the starting point of the auxiliary line to the intersection point. Step S2 also includes taking a microstrip line without an intersection at one end as the first microstrip line, and the auxiliary lines on both sides of the first microstrip line as the starting auxiliary lines, and storing the memory addresses of all auxiliary lines in the order of the front and back auxiliary lines.
5. The method for automatically punching microstrip line surrounding holes based on EDA software according to claim 2, characterized in that: The calculation formula for the number of holes punched on one side of each auxiliary line corresponding to the microstrip line in step S3 is: Where N is the number of holes on the auxiliary line, L is the length of the auxiliary line, R is the radius of the ground hole in the drilling attribute, and I is the shortest distance between adjacent ground holes set in the drilling attribute. is the floor rounding symbol; The calculation formula for the actual distance between the centers of adjacent ground holes on one side of the microstrip line corresponding to each auxiliary line is: i=L / N, Where i is the actual distance between the centers of adjacent ground holes on one side of the microstrip line corresponding to each auxiliary line.
6. The method for automatically punching microstrip line surrounding holes based on EDA software according to claim 4, characterized in that: The method for calculating the center position of the ground hole in step S4 is specifically as follows: the distance from the starting point of the starting auxiliary line on the first microstrip line to the starting auxiliary line by a ground hole radius is used as the tangent point of the first ground hole on the first microstrip line and the starting auxiliary line, and the center coordinates of the first ground hole on the first microstrip line are calculated according to the ground hole radius in the punching attribute, and then the center coordinates of subsequent ground holes on the first microstrip line are calculated in sequence according to the actual distance between the centers of adjacent ground holes on the first microstrip line; the center coordinates of the first ground hole on the microstrip line corresponding to the remaining auxiliary lines are calculated according to the center coordinates of the first ground hole on the microstrip line corresponding to the previous auxiliary line. The center coordinates of the last ground hole on one side of the strip line are determined. The center of the last ground hole on the side of the microstrip line corresponding to the previous auxiliary line is taken as the center of the circle, and the actual distance between the centers of adjacent ground holes on the side of the microstrip line corresponding to the previous auxiliary line is taken as the radius. A virtual circle is drawn, and the intersection of the virtual circle and the current auxiliary line is taken as the tangent point of the first ground hole on the side of the microstrip line corresponding to the current auxiliary line and the current auxiliary line. The center coordinates of the circle are calculated according to the radius of the ground hole in the drilling attribute, and then the center coordinates of the subsequent ground holes on the side of the microstrip line corresponding to the current auxiliary line are calculated in sequence according to the actual distance between the centers of adjacent ground holes on the side of the microstrip line corresponding to the current auxiliary line.
7. The method for automatically punching microstrip line surrounding holes based on EDA software according to claim 4, characterized in that: The linked list structure formed in step S4 is a bidirectional linked list structure, specifically: an information class is created for each ground hole, and the information class of each ground hole stores the location information of each ground hole, as well as the memory address of the previous ground hole information class and the memory address of the next ground hole information class. The memory address of the previous ground hole information class in the first ground hole information class on the side of the first microstrip line is empty, and the memory address of the next ground hole information class in the last ground hole information class on the side of the last microstrip line is empty; the memory address of the previous ground hole information class in the first ground hole information class on the side of the remaining microstrip lines is the memory address of the last ground hole information class on the side of the previous microstrip line, and the memory address of the next ground hole information class in the last ground hole information class is the memory address of the first ground hole information class on the side of the next microstrip line; the information classes of all ground holes on one side of the microstrip line are used as nodes to form a bidirectional linked list structure.
8. A method for automatically punching microstrip line surrounding holes based on EDA software according to any one of claims 1-3 and 5-7, characterized in that: Step S5 is specifically as follows: traverse the linked list structure, select each ground hole position in turn as the current ground hole position, determine whether there are other packages at the current ground hole position, if there are no other packages, drill a hole at the current ground hole position; if there are other packages, skip the current ground hole position, select the next ground hole position as the current ground hole position, and repeat the above process until the linked list structure traversal is completed.