Method and device for detecting acute angle of copper conductive structure of printed circuit board and electronic equipment
By detecting the acute angles formed by the merging of multiple copper conductive structures on a printed circuit board, the problem of not being able to identify hidden acute angles in existing technologies has been solved, achieving higher design and manufacturing reliability and avoiding process defects caused by acute angles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 成都融见软件科技有限公司
- Filing Date
- 2026-03-09
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies cannot effectively detect the sharp angles newly formed after multiple copper conductive structures intersect and merge in a printed circuit board, leading to problems such as uneven etching and copper foil tearing, which affect electrical performance and reliability.
By acquiring two-dimensional closed shapes of intersecting copper conductive structures on a printed circuit board, merging them into a merged shape, and calculating the included angles at each vertex on the outline ring of the merged shape, acute angles less than a preset acute angle threshold are detected. This method is applicable to various intersecting scenarios of copper conductive structures.
Accurate detection of hidden sharp angles improves the reliability of printed circuit board design and manufacturing, avoids process defects such as over-etching and uneven plating, and enhances electrical performance and manufacturability.
Smart Images

Figure CN121783080B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer-aided design and manufacturing technology of printed circuit boards (PCBs), and in particular to a method, apparatus and electronic device for detecting acute angles of copper conductive structures on printed circuit boards. Background Technology
[0002] In printed circuit board (PCB) design, sharp angles (usually less than 90°) on copper conductive structures (such as traces, pads, vias, and copper-clad areas) are a critical design flaw. These sharp angles can easily lead to uneven etching, residual copper, or copper foil tearing during manufacturing. Electrically, they can cause current density concentration and signal integrity issues, severely impacting PCB reliability and yield.
[0003] Currently, the industry generally relies on the Design Rule Check (DRC) function in EDA software (such as Altium Designer and Cadence) to manage such issues, with the "minimum angle" rule being a common approach. However, this method has inherent limitations: it can only detect the angles at the vertices of a single copper conductive structure drawn independently by the designer. In actual design, electrical connections are often achieved through the intersection and merging of multiple copper conductive structures. When these structures are merged, entirely new contours and vertices are generated at the connection points, and the acute angles that may be present are not present in any of the original design drawings. Therefore, traditional DRC methods cannot effectively detect these "hidden" acute angles newly generated after graphic merging, constituting a blind spot and reliability vulnerability in the current design process. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for detecting acute angles in copper conductive structures of printed circuit boards. It can automatically and accurately detect "hidden" acute angles that are newly generated after multiple copper conductive patterns intersect and merge, which cannot be identified by traditional DRC methods, thereby effectively improving the reliability and manufacturability of printed circuit board design.
[0005] In a first aspect, one embodiment of this application provides a method for detecting acute angles in copper conductive structures of printed circuit boards, including:
[0006] Obtain the two-dimensional closed shapes corresponding to each intersecting copper conductive structure on the printed circuit board;
[0007] The two-dimensional closed shapes are merged to form a merged shape defined only by the contour ring;
[0008] Calculate the included angle at each vertex on the contour ring of the merged graphic, and detect acute angles whose included angle is less than a preset acute angle threshold.
[0009] Optionally, the method further includes:
[0010] Determine the intersection points between the outlines of each of the two-dimensional closed figures;
[0011] The vertex on the outline ring of the merged graphic that is associated with the intersection point is determined as the target vertex;
[0012] The calculation of the included angles at each vertex of the contour ring of the merged graphic, and the detection of acute angles whose included angles are less than a preset acute angle threshold, includes:
[0013] Calculate the included angle at each of the target vertices, and detect the acute angles that are less than the preset acute angle threshold.
[0014] Optionally, the method further includes:
[0015] For each vertex on the outline ring of the merged graphic, determine whether the coordinate position of the vertex is located inside any copper conductive structure;
[0016] The calculation of the included angle at each vertex of the contour ring of the merged graphic includes:
[0017] The included angle is calculated only for vertices that are not located inside any of the copper conductive structures.
[0018] Optionally, calculating the included angle at each vertex of the contour ring of the merged graphic includes:
[0019] For each vertex on the contour ring of the merged graphic, determine the two contour lines that intersect at the vertex;
[0020] Calculate the angle less than 180° defined by the two contour lines at the vertex, and use it as the angle at the vertex.
[0021] Optionally, the step of merging the two-dimensional closed figures is implemented by performing a Boolean union operation.
[0022] Optionally, the copper conductive structure is at least one of the following elements on a printed circuit board: traces, pads, vias, and copper-clad areas.
[0023] Optionally, the method further includes:
[0024] Output acute angle detection results, which include the position coordinates of the vertex corresponding to the acute angle and the angle value of the acute angle.
[0025] Secondly, one embodiment of this application provides a device for detecting acute angles of copper conductive structures on printed circuit boards, comprising:
[0026] The image acquisition module is used to acquire two-dimensional closed images corresponding to each copper conductive structure that has an intersecting relationship on the printed circuit board.
[0027] The graphic merging module is used to merge the aforementioned two-dimensional closed graphics to form a merged graphic defined only by the contour ring;
[0028] The acute angle detection module is used to calculate the included angle at each vertex on the contour ring of the merged graphic and detect acute angles that are less than a preset acute angle threshold.
[0029] Thirdly, one embodiment of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0030] Fourthly, one embodiment of this application provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of any of the above methods.
[0031] Fifthly, one embodiment of this application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the first aspect described above.
[0032] The method, apparatus, electronic device, and storage medium for detecting sharp angles in copper conductive structures of printed circuit boards provided in this application effectively cover the sharp angle detection needs in scenarios where multiple copper conductive structures overlap, avoiding potential omissions. This method is no longer limited to the independent detection of the original contour of a single copper conductive structure, but rather identifies sharp angles in the overall contour ring after multiple intersecting copper conductive structures are merged. It can accurately capture newly generated hidden sharp angles that are difficult to detect with existing technologies, thus avoiding process defects and electrical performance problems such as over-etching, uneven plating, and stress concentration caused by these sharp angles from the source, thereby improving the reliability of printed circuit board design and manufacturing. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1This is a flowchart illustrating a method for detecting acute angles of copper conductive structures on printed circuit boards according to an embodiment of this application.
[0035] Figure 2 This is a schematic diagram illustrating the intersection of traces and pads into a single graphic, as provided in one embodiment of this application.
[0036] Figure 3 This is a schematic diagram showing the intersection and merging of traces, pads, and copper-clad areas into a single graphic according to an embodiment of this application.
[0037] Figure 4 This is a graphical schematic diagram illustrating vertex filtering logic after two copper conductive structures intersect and merge, as provided in one embodiment of this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive effort. For steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.
[0039] For ease of understanding, the terms used in the embodiments of this application are explained below:
[0040] Copper conductive structure: In this application, it refers to the geometrical structure made of copper on the printed circuit board during the printed circuit board design stage, used to realize electrical connection, including but not limited to: traces, pads, vias, and copper pours.
[0041] Two-dimensional closed figures refer to closed geometric figures formed by the boundary projection of a copper conductive structure in a plane, which are connected end to end and do not self-intersect. They are the basic carriers for contour loop extraction and figure merging. Two-dimensional closed figures can be divided into single-loop closed figures (without internal voids) and multi-loop closed figures (containing internal voids, such as the ring structure of the copper-clad area); the outer contour and the internal void contour of multi-loop closed figures are both closed sub-figures without self-intersect.
[0042] Contour loop: refers to a closed curve in a plane that is connected end to end and does not self-intersect, and is a basic geometric element describing the boundary of a two-dimensional closed figure. In this application, contour loop specifically refers to the closed boundary contour of a two-dimensional closed figure corresponding to a copper conductive structure, or the closed boundary contour of a merged figure formed by merging multiple such two-dimensional closed figures; the contour loop of a figure includes an outer contour loop that wraps around the outer boundary of the figure entity, and zero or more inner contour loops that define the boundaries of the internal voids of the figure.
[0043] Vertex: refers to the intersection point of two adjacent contour lines on the contour ring, and is also the core object for subsequent angle calculation and acute angle detection.
[0044] Vertex coordinates: In this application, vertex coordinates refer to the geometric position data of each vertex in a two-dimensional plane coordinate system of the outline loop of the two-dimensional closed or merged graphic corresponding to the copper conductive structure. This data is usually represented as (x,y) coordinate pairs. The vertex coordinates are directly derived from PCB design data, such as Gerber files or the internal graphic database of EDA software, and are a precise digital description of the geometry of the conductive structure.
[0045] Angle at the vertex: In this application, it refers to a geometric angle with a value of less than 180° defined by two adjacent contour lines with the vertex as the common endpoint on the outline of a two-dimensional closed or merged pattern of a copper conductive structure on a printed circuit board.
[0046] refer to Figure 1 This application provides a method for detecting acute angles in the copper conductive structure of a printed circuit board, including steps S100~S300:
[0047] S100: Obtain the two-dimensional closed graphs corresponding to each copper conductive structure that has an intersecting relationship on the printed circuit board.
[0048] This step aims to identify geometrically intersecting copper conductive structures from PCB design data and obtain their precise two-dimensional closed-loop diagrams.
[0049] First, an intersection relationship determination is performed. The "existence of an intersection relationship" described in this application refers to the overlap or boundary contact of the geometric contours of different copper conductive structures on a two-dimensional plane. This determination is based solely on their planar geometric positional relationship and is unrelated to whether a valid electrical connection is formed between them. This can be automatically achieved through computational geometry methods (such as detecting overlapping bounding boxes, polygon intersection testing, etc.).
[0050] Subsequently, for each copper conductive structure determined to have an intersecting relationship, a corresponding two-dimensional closed shape is generated based on the contour data of each copper conductive structure. The graphical generation method for various copper conductive structures (such as traces, pads, vias, and copper-clad areas) is a conventional technique in this field, and is described in detail in the subsequent embodiments and specific implementation methods of this specification.
[0051] The output of this step is a set of two-dimensional closed figures ready for merging.
[0052] S200. Merge each two-dimensional closed shape to form a merged shape defined only by the contour ring.
[0053] This step aims to merge multiple two-dimensional closed shapes obtained in S100 into a unified graphic entity and extract its geometric boundaries.
[0054] In practice, the two-dimensional closed graphics generated in step S100 are first preprocessed to confirm the contour boundaries of each graphic (which conform to the definition of "contour ring" in this application), ensuring that the coordinate systems of each graphic are consistent and avoiding merging errors caused by coordinate deviations. Subsequently, the two-dimensional closed graphics are merged using a conventional graphic fusion method, merging multiple graphics with intersecting relationships into a single graphic (i.e., the merged graphic). During the merging process, redundant contours in overlapping areas are automatically removed, preserving the complete boundaries of the merged graphic. Finally, based on the merged overall graphic, its closed boundary contour is calculated. This boundary contour constitutes the merged graphic as defined in this application, and it is entirely described by contour rings, including an outer contour ring that encloses the overall graphic entity, and zero or more inner contour rings if internal voids exist.
[0055] The final merged graphic is defined by the contour ring as the only boundary, and all its geometric features and subsequent detection operations are implemented based on its contour ring.
[0056] It should be noted that the above-mentioned image merging and contour extraction can be achieved through mature image algorithm libraries or built-in functions of EDA tools, and the specific implementation details can be adapted in conjunction with technologies known in the field.
[0057] S300: Calculate the included angle at each vertex on the contour ring of the merged graphic, and detect acute angles whose included angle is less than a preset acute angle threshold.
[0058] In practice, the process begins by traversing all contour rings of the merged graphic (including the outer contour ring and all inner contour rings) and extracting all vertices on each contour ring. Then, for each vertex, the two intersecting contour lines at that vertex are determined, and the included angle formed by the two contour lines is calculated using conventional geometric calculation methods (such as the vector dot product formula). Finally, the obtained included angles are compared with a preset acute angle threshold, and all included angles smaller than the preset acute angle threshold are selected as the acute angles to be detected.
[0059] In practice, the preset acute angle threshold is typically set to 90°, but it can also be flexibly configured within a range greater than 0° and less than 90°, depending on the specific PCB manufacturing process requirements. This flexible configuration mechanism facilitates rapid application by designers, balancing detection accuracy and processing efficiency.
[0060] The acute angle detection method for copper conductive structures on printed circuit boards provided in this application effectively covers the acute angle detection requirements in scenarios where multiple copper conductive structures overlap, avoiding potential risks. This method is no longer limited to the independent detection of the original contour of a single copper conductive structure, but rather identifies acute angles in the overall contour ring formed by the merging of multiple intersecting copper conductive structures. It can accurately capture newly generated, hidden acute angles that are difficult to detect with existing technologies, thus avoiding process defects and electrical performance problems such as over-etching, uneven plating, and stress concentration caused by these acute angles from the source, thereby improving the reliability of printed circuit board design and manufacturing.
[0061] The acute angle detection method for copper conductive structures on printed circuit boards disclosed in this application is applicable to all types of copper conductive structures in design data, mainly including traces, pads, vias, and copper pours. These copper conductive structures can be used individually or in any combination as detection inputs.
[0062] Two-dimensional closed-loop diagrams of copper conductive structures can be obtained from conventional data sources in this field, such as standard Gerber files for PCB manufacturing or the internal databases of EDA design software (such as Altium Designer, Cadence, etc.). The following explains the graphical conversion methods for various copper conductive structures:
[0063] Line routing: Its design data is usually defined as a line segment with a specific width. When converted into a two-dimensional closed figure, the line segment is used as the center line, and half of the line width is offset to both sides to construct a rectangle or a closed figure with semicircles at both ends.
[0064] Pads: Their design data defines their location, shape (circle, rectangle, ellipse, etc.), and size. Based on these parameters, corresponding regular closed shapes, such as circles, rectangles, or ellipses, can be directly generated.
[0065] Vias: The conductive portion of a via is determined by the outer diameter of the pad. The circle (or approximate regular polygon) corresponding to the outer diameter of the pad is extracted as a two-dimensional closed shape of the conductive portion, and the internal drill hole wall is usually not considered.
[0066] Copper-clad areas: Their design data itself contains complex polygons describing the boundaries of conductive areas. By directly reading these polygons, a two-dimensional closed shape that may contain internal voids can be obtained.
[0067] Furthermore, both teardrop and tapered traces fall under the category of traces, representing special structural / irregular design forms of traces. Therefore, the traces in this application include equal-width traces, tapered traces, and traces with teardrops.
[0068] For special reinforced or gradient shapes such as teardrops and tapered lines, their geometric definitions also fall under the category of two-dimensional closed shapes, and therefore are fully applicable to the detection method of this application. For special reinforced or gradient shapes such as teardrops and tapered lines, they are usually not stored as raw parameters in PCB design data, but rather as standard polygons automatically generated by EDA software according to design rules (such as connection width and smoothness). The two-dimensional closed shapes corresponding to these shapes can be directly read from the generated Gerber file or the graphic database of the design software. At the design data level, they are not fundamentally different from ordinary traces or pad graphics; they are all two-dimensional closed shapes defined by a series of vertex coordinates. Therefore, when implementing the solution of this application, it is only necessary to input special reinforced or gradient shapes such as teardrops and tapered lines as conventional two-dimensional closed shapes. For example, a teardrop shape is essentially a specific polygon at the connection between a trace and a pad; a tapered trace can be regarded as a complex polygon with continuously varying width. The method of this application will directly process its geometric contour and detect the acute angles generated by itself or by merging it with other shapes.
[0069] Using the above method, a two-dimensional closed shape defined by ordered vertex coordinates is ultimately generated for each copper conductive structure to be detected. This shape acquisition process can be automatically implemented by parsing standard files or calling software interfaces, providing accurate input for subsequent shape merging and acute angle detection steps.
[0070] exist Figure 2 In the scenario shown, the trace intersects with a circular pad. The inspection process includes:
[0071] Step 1: Graphic Acquisition: Acquire the two-dimensional closed graphics corresponding to the traces and pads respectively. For example... Figure 2 As shown, the trace is transformed into a shape 21 with semicircles at both ends, and the pad is transformed into a rectangular shape 22.
[0072] Step 2: Merging Process: Perform a Boolean union operation on graphics 21 and 22 to generate a single merged graphics 20. This operation will automatically merge the regions of the two graphics and generate a completely new outline at the intersection. For example... Figure 2 As shown, the merged figure 20 is a complex polygon with a continuous shape.
[0073] Step 3, Acute Angle Detection: Calculate the included angles of all vertices on the contour rings of the merged graphic 20 (e.g., ...). Figure 2 (The vertices Q1 and Q2 are marked in the middle); the calculation result is compared with the preset acute angle threshold (such as 90°), and the acute angle is identified and output.
[0074] The traditional method (DRC minimum angle rule) can only check the included angle at the vertices of the trace pattern 21 and the pad pattern 22 separately. Since the design is compliant when the two are independent, this method will not report any errors.
[0075] The method in this application, by detecting the vertices of the merged graphic 20, can identify and locate newly generated acute angles at the intersection points (such as...). Figure 2 The acute angle at the midpoint Q2 was not present in the original design and is a potential process risk point generated after the graphics were merged.
[0076] Having understood the basic detection scenario of the intersection and merging of the two aforementioned graphics, it is necessary to further explain that in actual PCB design, complex electrical connections often involve the interaction of more than two conductive structures. To demonstrate the ability of the method in this application to handle such common and complex situations, the following embodiment is provided. This embodiment shows that the core process of this application has inherent scalability, capable of seamlessly handling any number of intersecting graphics, and is not limited to simplified models of pairwise intersections.
[0077] Consider a typical complex connection scenario: such as Figure 3 As shown, a signal trace (Trace1) needs to connect to a rectangular pad (Pad1) and pass through a large copper area (Pour1). These three traces intersect in pairs, forming a complex connection at the intersection. The testing process includes:
[0078] Step 1: Image Acquisition: Acquire the two-dimensional closed images corresponding to Trace1, Pad1, and Pour1 respectively. For example... Figure 3 As shown, Trace1 is transformed into a closed shape 31 with semicircles at both ends, Pad1 corresponds to a rectangle 32, and the copper pour area Pour1 corresponds to a hexagon 33 with a rectangular hole.
[0079] Step 2: Merging Process: Input the three graphics simultaneously and perform a Boolean union operation to generate a single merged graphic 30. This operation automatically eliminates overlapping areas between the original graphics and generates new continuous contours at intersecting boundaries (including pairwise intersections and the points where all three meet). For example... Figure 3 As shown, the merged graphic 30 contains an outer contour ring and two inner contour rings (hole boundaries).
[0080] Step 3, acute angle detection: Calculate the included angle of each vertex on all contour rings of the merged graphic 30, compare it with the preset acute angle threshold, and finally output the position of all vertices identified as acute angles and their angle values.
[0081] The acute angle detection method for copper conductive structures on printed circuit boards according to this application can process any number of intersecting patterns at once, without the need for repeated steps of merging pairs, directly generating the final merged pattern, and has the ability to efficiently handle complex intersections. It can simultaneously capture all potential acute angles generated under complex connection patterns such as pairwise intersections and multi-sided intersections, with comprehensive and no omissions. This method is applicable to various real-world design scenarios from simple connections to complex interconnections, and its effectiveness is not limited by the number and complexity of intersecting patterns, making it highly versatile.
[0082] In some optional implementations, to improve detection efficiency, an optimized intersection preprocessing step is added to the basic process (steps S100~S300). The core of this step is: based on the geometric intersections between two-dimensional closed figures of intersecting copper conductive structures, the target vertices that require key calculations in the merged figure are intelligently selected, and only the included angles and acute angles are calculated for the target vertices. Therefore, the method of this application further includes the following steps S400 and S401:
[0083] S400, Determine the intersection points between the outlines of each two-dimensional closed figure.
[0084] In practice, geometric analysis is performed on each of the intersecting two-dimensional closed figures obtained in step S100 to determine all intersection points between the contours of each two-dimensional closed figure and their coordinate positions. This step is based solely on the two-dimensional geometric positional relationships of the figures and is unrelated to electrical properties.
[0085] It should be noted that step S400 is executed on a two-dimensional closed shape of an unmerged copper conductive structure, and can be executed after step S100 and before step S200.
[0086] S401. Determine the vertices on the outline ring of the merged graphic that are associated with the intersection point as the target vertices.
[0087] After merging the graphics (obtaining the merged graphics), the target vertices to be calculated are located on the contour ring of the merged graphics based on the intersection points and their coordinate positions determined in step S400. Specifically: for each intersection point obtained through step S400, based on the position information of that intersection point, a vertex that coincides with that intersection point is found on the contour ring of the merged graphics and marked as the target vertex. In practical applications, if the distance between a vertex on the contour ring of the merged graphics and an intersection point determined in step S400 is less than a preset process tolerance (e.g., the minimum precision of the printed circuit board manufacturing process), then that vertex is determined as the target vertex. These target vertices usually correspond to the newly formed contour inflection points after the graphics intersect and connect.
[0088] It should be noted that step S401 is executed after step S200 and before step S300.
[0089] Based on the target vertices obtained through steps S400 and S401, the specific implementation of step S300 includes step S402: calculating the included angle at each target vertex and detecting acute angles that are less than a preset acute angle threshold.
[0090] In this implementation, the included angle calculation and acute angle judgment are performed only on all target vertices determined in step S401. For other vertices on the merged graphic contour ring that are not marked as target vertices, the included angle calculation and acute angle judgment are skipped, thereby significantly improving computational efficiency while ensuring detection accuracy.
[0091] by Figure 4 For example, two-dimensional closed shape 41 corresponds to a trace, and two-dimensional closed shape 42 corresponds to a pad. When they intersect and merge, they form a merged shape 40. The intersection points P1 to P4 correspond to the four target vertices on the outline ring of the merged shape 40. The outline ring of the merged shape 40 has a total of 12 vertices. The original two-dimensional closed shapes 41 and 42 generally conform to relevant design rules and do not have acute angles. Therefore, acute angles can only occur at the intersection points (P1, P2, P3, P4) resulting from the intersection of the shapes. Therefore, this method pre-calculates the intersection points and only performs angle calculations and acute angle detection on the four newly generated target vertices P1, P2, P3, and P4. Compared to traversing all 12 vertices, this significantly reduces the computational load and improves detection efficiency, making it particularly suitable for complex, high-density PCB design scenarios.
[0092] In some optional implementations, to improve detection efficiency, pre-screening can be performed before calculating the included angle based on the geometric condition of whether the vertex falls inside other conductive structures, thus eliminating a large number of internal vertices that do not need to be calculated. Therefore, the method of this application further includes step S500: for each vertex on the contour ring of the merged graphic, determine whether the vertex's coordinate position is located inside any copper conductive structure. Accordingly, the specific implementation of step S300 includes step S501: calculating the included angle only for vertices that are not located inside any copper conductive structure.
[0093] In practice, each vertex on the merged graphic contour ring (including the outer contour ring and all inner contour rings) is traversed. For each vertex, the following judgment is performed: based on the coordinate position of the vertex (presented in the form of (x, y) coordinate pairs), it is determined whether it is located inside the two-dimensional closed graphic corresponding to any other copper conductive structure other than its own source graphic in the original PCB design layout; if the vertex is determined to be located inside other copper conductive structures, the included angle calculation and acute angle judgment are not performed on the vertex; if the vertex is determined not to be inside other copper conductive structures, the included angle calculation and acute angle judgment are performed on the vertex (the calculation method is the same as step S300).
[0094] The aforementioned pre-screening step of excluding internal vertices is particularly effective for PCB designs containing large copper areas or dense shielding layers. For example, when a thin trace passes through a large copper area, the outline of the merged pattern may contain dozens of trace vertices located inside the copper area. However, these vertices are physically completely surrounded by copper, eliminating the possibility of forming sharp angles in the process. Through the geometric judgment in step S500, all vertices located inside the copper area can be automatically identified and skipped, with only a few key vertices near the intersection of the trace and the copper area boundary being calculated. Compared to solutions that require traversing and calculating all vertices inside and outside the copper area, this significantly reduces redundant calculations and is particularly suitable for large-scale PCB designs with complex nesting and overlapping relationships, effectively improving the overall performance of the detection system.
[0095] Although the aforementioned graphic merging step (S200) is geometrically designed to eliminate internal structures (including vertices falling inside the copper conductive structure) surrounded by the merged graphics, step S500, as a supplementary and safeguarding filtering logic, is designed to handle vertices that may remain due to numerical precision, algorithm boundary conditions, or specific complex graphic relationships and have no practical detection significance, thereby ensuring the robustness and ultra-high computational efficiency of the detection system.
[0096] It should be noted that the "vertex filtering method based on contour intersection association" (steps S400~S402) and the "vertex filtering method based on internal structural position" (steps S500, S501) are two independent and complementary processing logics. Either vertex filtering method can be executed alone according to the needs of the actual PCB sharp angle detection scenario, or they can be executed together. Both execution methods can achieve accurate filtering of target vertices on the combined graphic contour ring, adapting to the needs of different detection scenarios.
[0097] When only the "vertex filtering method based on contour intersection association" is executed: This method focuses on efficiency and is particularly suitable for scenarios that require quick location of new acute angles caused by the intersection and connection of graphics. By pre-calculating the intersection points, the key area is directly locked, avoiding traversing all vertices.
[0098] When only the "vertex filtering method based on internal structural position" is executed: This method focuses on the robustness and specificity of the processing, and is especially suitable for designs with a large number of containment and coverage relationships between graphics (such as dense copper areas). It can effectively remove vertices that are surrounded by other copper areas and have no actual process risk, simplifying the calculation.
[0099] The two vertex selection methods can also be combined sequentially to form a stronger composite selection strategy, achieving maximum computational efficiency in complex designs. A typical merged execution logic is as follows:
[0100] The first merging method (intersection point filtering first, then internal elimination): First, a "vertex filtering method based on contour intersection point association" is applied to filter out "candidate key vertices" related to the intersection points from all vertices of the merged graphic contour ring. Then, a "vertex filtering method based on internal structural position" is applied to eliminate vertices that fall inside large copper areas from these "candidate key vertices". Finally, only vertices that are both associated with intersection points and located on the outside are calculated.
[0101] The second merging method (internal vertices first, then intersection point location): First, a "vertex filtering method based on internal structural positions" can be applied to remove all "internal vertices" from the total set of vertices, resulting in a pure "external vertex set." Then, a "vertex filtering method based on contour intersection point association" can be applied to this "external vertex set" to further locate vertices related to the intersection points. This method ensures that all subsequent calculations are based on meaningful "external" geometry.
[0102] Both vertex filtering methods described above, whether executed individually or in combination, aim to reduce unnecessary computation through intelligent filtering while ensuring detection accuracy. Furthermore, both vertex filtering methods are efficiently adapted to the core steps of "calculating the included angle of the vertices of the merged graphic contour ring and detecting acute angles," ensuring the integrity and flexibility of the overall technical solution.
[0103] For any vertex whose included angle needs to be calculated as determined by any of the foregoing embodiments (whether it is all vertices on the contour ring, target vertices filtered based on intersection points, or vertices after internal filtering), the included angle at that vertex can be calculated through the following steps S601 and S602:
[0104] S601. Determine the two contour lines that intersect at the vertex.
[0105] In practice, for the vertex being processed, two adjacent contour lines with the vertex as a common endpoint are obtained on the contour ring of the merged graphics. These two contour lines define the geometric features at the vertex.
[0106] S602. Calculate the angle less than 180° defined by the two contour lines at the vertex, and use it as the angle at the vertex.
[0107] In practice, this can be achieved by calculating the angle between the direction vectors of the two contour lines. Specifically, first, obtain the direction vectors of the two contour lines leaving the vertex, and then use the vector dot product formula to calculate the angle θ (0° ≤ θ ≤ 180°) between the two direction vectors. The calculated result θ is the "angle at the vertex" as defined in this application.
[0108] It is understood that the boundaries of a "two-dimensional closed figure" and its merged "contour ring" can be composed of straight line segments, circular arc segments, or other curved segments. When the boundary contains non-straight curved segments, it can be represented as a series of connected straight line segments using discretization methods known in the art (such as polygon approximation), thereby obtaining the "contour ring" and "vertices". The "angle at the vertex" refers to an angle of less than 180° formed by two adjacent boundary lines (whether straight line segments or discretized straight line segments) at that vertex.
[0109] The precise definition and calculation method provided in this embodiment form the geometric basis of the acute angle detection algorithm of this application. It ensures the completeness and correctness of the detection logic, fundamentally avoiding missed or false detections caused by ambiguity in geometric definitions, and providing a consistent and reliable acute angle judgment standard for PCB design.
[0110] In some alternative implementations, the step of "merging the various two-dimensional closed shapes" can be achieved by performing a Boolean union operation. It should be noted that the aforementioned Boolean union operation can be implemented using commonly used graphics processing algorithms or tools in existing PCB design.
[0111] by Figure 4For example, the outline of the merged graphic 40 generated by the Boolean union operation is the union of the outer outlines of graphic 41 and graphic 42, and the boundaries of the overlapping areas inside (i.e., the four sides of quadrilaterals P1P2P4P3) are automatically eliminated. Through the Boolean union operation, efficient and accurate graphic merging can be achieved, providing a correct geometric basis for acute angle detection.
[0112] In specific implementation, other algorithms such as polygon fusion, rasterized fill merging, Bézier curve contour fusion, and topological space merging can also be used to "merge the two-dimensional closed graphics", which is not limited in this application.
[0113] In some optional embodiments, the acute angle detection method for copper conductive structures on printed circuit boards provided in this application further includes the following steps: outputting acute angle detection results, wherein the acute angle detection results include the position coordinates of the vertex corresponding to the acute angle and the angle value of the acute angle.
[0114] In practice, the system generates and outputs a list of acute angle detection results, creating a record for each detected acute angle. Each record contains the position coordinates and angle value of the corresponding vertex. The acute angle detection results can be output in various formats, as shown in the following examples:
[0115] (1) Text report: Saved as a .txt or .csv file for designers to quickly view and verify;
[0116] (2) Graphical marking: In the graphical interface of PCB design software, the corresponding vertex position of the acute angle is highlighted directly, and the angle value of the acute angle is marked to achieve visual positioning;
[0117] (3) Structured data: Generate JSON or XML format files to adapt to the automatic reading and subsequent processing needs of other CAE software or data analysis tools.
[0118] This application embodiment, while completing accurate detection of acute angles, can output structured detection results that can be directly reused in engineering scenarios and contain precise coordinate positions and angle values, which greatly improves the efficiency of design correction and process review and reduces the operating costs of subsequent optimization.
[0119] Based on the same inventive concept, this application also provides a device for detecting acute angles of copper conductive structures on printed circuit boards. Since the principle of the above device and equipment in solving the problem is similar to that of a method for detecting acute angles of copper conductive structures on printed circuit boards, the implementation of the above device can refer to the implementation of the method, and repeated details will not be elaborated further. This device can be applied to electronic devices. This application does not limit the type of electronic device; it can be any suitable type of device, such as terminal devices and servers, etc., which will not be elaborated further in this application.
[0120] In some embodiments, the acute angle detection device for the copper conductive structure of the printed circuit board exemplified in this application includes:
[0121] The image acquisition module is used to acquire two-dimensional closed images corresponding to each copper conductive structure that has an intersecting relationship on the printed circuit board.
[0122] The graphic merging module is used to merge the aforementioned two-dimensional closed graphics to form a merged graphic defined only by the contour ring;
[0123] The acute angle detection module is used to calculate the included angle at each vertex on the contour ring of the merged graphic and detect acute angles that are less than a preset acute angle threshold.
[0124] In some alternative embodiments, the apparatus further includes:
[0125] The intersection point determination module is used to determine the intersection points between the outlines of each of the two-dimensional closed figures;
[0126] The target vertex determination module is used to determine the vertices on the contour ring of the merged graphic that are associated with the intersection point as target vertices;
[0127] The acute angle detection module is specifically used to: calculate the included angle at each of the target vertices, and detect acute angles that are less than the preset acute angle threshold.
[0128] In some alternative embodiments, the device further includes an internal vertex determination module for determining, for each vertex on the contour ring of the merged graphic, whether the coordinate position of the vertex is located inside any copper conductive structure.
[0129] The acute angle detection module is specifically used to calculate the included angle only for vertices that are not located inside any of the copper conductive structures.
[0130] In some alternative implementations, the acute angle detection module includes:
[0131] The contour line determination unit is used to determine two contour lines that intersect at each vertex on the contour ring of the merged graphic.
[0132] Angle calculation unit is used to calculate the angle less than 180° defined by the two contour lines at the vertex, and use it as the angle at the vertex.
[0133] In some alternative implementations, the graphic merging module merges the two-dimensional closed graphics by performing a Boolean union operation.
[0134] In some alternative embodiments, the copper conductive structure is at least one of the following elements on a printed circuit board: traces, pads, vias, and copper-clad areas.
[0135] In some alternative embodiments, the device further includes a result output module for outputting acute angle detection results, the acute angle detection results including the position coordinates of the vertex corresponding to the acute angle and the angle value of the acute angle.
[0136] The acute angle detection device for copper conductive structure of printed circuit board provided in this application embodiment adopts the same inventive concept as the above-mentioned acute angle detection method for copper conductive structure of printed circuit board and can achieve the same beneficial effect, so it will not be described again here.
[0137] Based on the same inventive concept as the above-mentioned method for detecting acute angles of copper conductive structures on printed circuit boards, this application also provides an electronic device, including a processor and a memory.
[0138] The processor can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0139] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited to this. The memory in the embodiments of this application can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0140] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned computer storage medium can be any available medium or data storage device that a computer can access, including but not limited to: mobile storage devices, random access memory (RAM), magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)) and other media capable of storing program code.
[0141] Alternatively, if the integrated units described above in this application are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes: mobile storage devices, random access memory (RAM), magnetic memory (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.) and other media capable of storing program code.
[0142] The above embodiments are only used to provide a detailed description of the technical solutions of this application. However, the description of the above embodiments is only for the purpose of helping to understand the methods of the embodiments of this application and should not be construed as a limitation on the embodiments of this application. Any changes or substitutions that can be easily conceived by those skilled in the art should be covered within the protection scope of the embodiments of this application.
Claims
1. A method for detecting acute angles in copper conductive structures of printed circuit boards, characterized in that, include: Obtain the two-dimensional closed shapes corresponding to each intersecting copper conductive structure on the printed circuit board; The two-dimensional closed shapes are merged to form a merged shape defined only by the contour ring; The contour ring includes an outer contour ring and multiple inner contour rings when there are holes inside the merged graphic. Determine the intersection points between the outlines of each of the two-dimensional closed figures; On the entire outline ring of the merged graphic, find the vertex that coincides with the intersection point, or the vertex whose distance from the intersection point is less than the preset process tolerance, and determine the vertex as the target vertex; For each target vertex, determine whether the coordinate position of the target vertex is located inside any copper conductive structure; The included angle is calculated only for the target vertices that are not located inside any of the copper conductive structures, and acute angles that are less than a preset acute angle threshold are detected.
2. The method according to claim 1, characterized in that, Calculating the included angle at each vertex of the contour ring of the merged graphic includes: For each vertex on the contour ring of the merged graphic, determine the two contour lines that intersect at the vertex; Calculate the angle less than 180° defined by the two contour lines at the vertex, and use it as the angle at the vertex.
3. The method according to claim 1 or 2, characterized in that, The step of merging the two-dimensional closed shapes is achieved by performing a Boolean union operation.
4. The method according to claim 1 or 2, characterized in that, The copper conductive structure is at least one of the following elements on a printed circuit board: traces, pads, vias, and copper-clad areas.
5. The method according to claim 1 or 2, characterized in that, The method further includes: Output acute angle detection results, which include the position coordinates of the vertex corresponding to the acute angle and the angle value of the acute angle.
6. A device for detecting acute angles of copper conductive structures on printed circuit boards, characterized in that, include: The image acquisition module is used to acquire two-dimensional closed images corresponding to each copper conductive structure that has an intersecting relationship on the printed circuit board. The graphic merging module is used to merge the aforementioned two-dimensional closed graphics to form a merged graphic defined only by the contour ring; The contour ring includes an outer contour ring and multiple inner contour rings when there are holes inside the merged graphic. The intersection point determination module is used to determine the intersection points between the outlines of each of the two-dimensional closed figures; The target vertex determination module is used to find vertices that coincide with the intersection point or whose distance from the intersection point is less than a preset process tolerance on all the contour rings of the merged graphic, and determine the vertex as the target vertex. An internal vertex determination module is used to determine, for each target vertex, whether the coordinate position of the target vertex is located inside any copper conductive structure; The acute angle detection module is used to: calculate the included angle of the target vertex that is not located inside any of the copper conductive structures, and detect acute angles that are less than a preset acute angle threshold.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the computer program instructions implement the steps of the method as described in any one of claims 1 to 5.