Steel mesh trepanning detection method and device, computer equipment and storage medium

By using hole position matching algorithm and bounding box generation technology in PCB manufacturing, the problem of low efficiency in manual inspection of steel mesh position and pad position matching is solved, and efficient and accurate hole position detection and reporting output is achieved.

CN120147276APending Publication Date: 2025-06-13SHENZHEN MENGRUI ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510237062.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-01
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

During PCB manufacturing, when manually checking the matching of hole positions on the steel mesh and the pad positions, it is inefficient and easy to miss or make mistakes, especially when the number of holes is large.

Method used

By obtaining the design hole position and preset hole position in the PCB drawing, a design bounding box and a preset bounding box are generated, and the hole position matching algorithm is used to determine the overlap between the design bounding box and the preset bounding box based on the coordinate value, and a detection information is generated and a detection report is output.

Benefits of technology

It improves the efficiency and accuracy of steel mesh hole detection, can accurately match the design hole position and preset hole position, identify abnormal situations of multiple holes and leak holes, and provides intuitive detection results, which facilitates designers to correct the design hole position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147276A_ABST
    Figure CN120147276A_ABST
Patent Text Reader

Abstract

The invention relates to a steel mesh trepanning detection method and device, computer equipment and a storage medium. The steel mesh trepanning detection method comprises the steps of obtaining a plurality of design hole sites of a trepanning layer and a plurality of preset hole sites of a bonding pad layer in a PCB drawing; generating a design bounding box according to the boundary line of the design hole site, and generating a preset bounding box according to the boundary line of the preset hole site; based on a hole site matching algorithm, according to the coordinate value of the design bounding box and the coordinate value of the preset bounding box, determining whether the design bounding box only has an overlapping region with one preset bounding box, and generating detection information; and determining whether the designed hole site is matched with the corresponding preset hole site according to the detection information, and outputting a detection report. The method has the advantages that the designed hole site and the preset hole site are accurately matched, the abnormal conditions of multiple holes and missing holes can be accurately recognized, and the detection efficiency and accuracy of the designed hole site are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of PCB manufacturing, and in particular, to a method and device for detecting steel mesh openings, a computer device, and a storage medium. Background Art

[0002] Currently, when manufacturing a PCB, a steel mesh is used to make pads on the PCB. To ensure the quality of the solder joints, the hole positions on the steel mesh must correspond to the pad positions on the PCB. Designers design the hole positions on the steel mesh according to the pad positions on the PCB to ensure that the positions of the hole positions on the steel mesh correspond to the pad positions. After the hole positions on the steel mesh are designed, the designers need to check the positions of the hole positions on the steel mesh and the pad positions to avoid the situation where the positions of the hole positions on the steel mesh do not match the pad positions.

[0003] However, when the number of hole positions on the steel mesh is large, manual inspection becomes extremely cumbersome, time-consuming, and prone to omission or misjudgment. Therefore, the traditional manual inspection method not only has low detection efficiency but also is prone to misjudgment or omission, resulting in low detection accuracy. Summary of the Invention

[0004] In order to improve the detection efficiency and accuracy of the designed hole positions, the present application provides a method and device for detecting steel mesh openings, a computer device, and a storage medium.

[0005] The first above-mentioned invention object of the present application is achieved by the following technical solutions: A method for detecting steel mesh openings, the method for detecting steel mesh openings includes: Obtaining a plurality of designed hole positions on an opening layer and a plurality of preset hole positions on a pad layer in a PCB drawing; Generating a designed bounding box according to the boundary lines of the designed hole positions, and generating a preset bounding box according to the boundary lines of the preset hole positions, wherein the designed hole positions are located within the designed bounding box, and the preset hole positions are located within the preset bounding box; Based on a hole position matching algorithm, determining whether the designed bounding box has an overlapping area only with one of the preset bounding boxes according to the coordinate values of the designed bounding box and the coordinate values of the preset bounding box, and generating detection information, wherein the coordinate values include X coordinate values and Y coordinate values; Determining whether the designed hole positions match the corresponding preset hole positions according to the detection information, and outputting a detection report.

[0006] By adopting the above technical solution, by obtaining a plurality of designed hole positions on the opening layer and a plurality of preset hole positions on the pad layer in the PCB drawing, generating a designed boundary box according to the boundary lines of the designed hole positions, and generating a preset boundary box according to the boundary lines of the preset hole positions, it is possible to convert hole positions with complex shapes into standardized rectangular boxes, thereby simplifying the matching calculation and improving the detection efficiency. By determining whether the designed boundary box has an overlapping area only with one preset boundary box based on the hole position matching algorithm according to the coordinate values of the designed boundary box and the coordinate values of the preset boundary box and generating detection information, it is possible to accurately match the designed hole positions and the preset hole positions, and accurately identify abnormal situations such as multiple openings and missing openings, thereby improving the accuracy of stencil opening detection. By determining whether the designed hole positions and the corresponding preset hole positions match according to the detection information and outputting a detection report, it is possible to intuitively provide the detection result, facilitating the designer to correct the designed hole positions according to the detection result, thereby improving the detection efficiency and accuracy of the designed hole positions.

[0007] In one example, the present application can be further configured as follows: The step of determining whether the designed boundary box has an overlapping area only with one preset boundary box based on the hole position matching algorithm according to the coordinate values of the designed boundary box and the coordinate values of the preset boundary box includes the following steps: Obtain the coordinate value of the designed center point of the designed boundary box, and judge whether the designed center point is located within the preset boundary box according to the coordinate value of the designed center point and the coordinate value of the preset boundary box; If the designed center point is not located within the preset boundary box, then judge whether the designed boundary box intersects only with one preset boundary box according to the coordinate value of the designed boundary box and the coordinate value of the preset boundary box; If the designed boundary box does not intersect with the preset boundary box or the designed boundary box intersects with multiple preset boundary boxes, then obtain the coordinate value of the preset center point of the preset boundary box, determine the distance difference between the designed center point and the preset center point according to the coordinate value of the designed center point and the coordinate value of the preset center point, and judge whether the distance difference is not greater than a preset tolerance value; If the distance difference is not greater than the preset tolerance value, it is determined that the designed boundary box has an overlapping area only with one preset boundary box.

[0008] By adopting the above technical solution, by judging whether the design center point is located within the preset bounding box, primary screening can be performed on the matching design hole positions and preset hole positions, reducing the computational amount in subsequent detections and improving the detection efficiency. Then, by judging whether the design bounding box intersects with only one preset bounding box, further detection can be performed on the design hole positions and preset hole positions that do not match in the primary screening, so that the design hole positions and preset hole positions that do not match in the primary screening can be corrected to avoid mislabeling the design hole positions and preset hole positions. Finally, by calculating the distance difference between the design center point and the preset center point and judging whether the distance difference is within the preset tolerance range, further detection can be performed on the design hole positions and preset hole positions that do not match in the secondary screening, so as to accurately match the design hole positions and preset hole positions and accurately identify abnormal situations such as multiple drilled holes and missing drilled holes.

[0009] In one example, the present application can be further configured as follows: judging whether the design center point is located within the preset bounding box according to the coordinate values of the design center point and the coordinate values of the preset bounding box includes the following steps: obtaining the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the preset bounding box; judging whether the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box; If the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box, judge whether the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset bounding box; If the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset bounding box, it is determined that the design center point is located within the preset bounding box.

[0010] By adopting the above technical solution, by obtaining the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the preset bounding box, the spatial position of the preset bounding box can be accurately defined, providing an accurate coordinate basis for matching calculations. By judging whether the coordinates of the design center point are within the range of the preset bounding box, it can be quickly determined whether the design hole position matches the preset hole position, reducing unnecessary calculations and improving the detection efficiency. By determining that the design hole position and the preset hole position match only when the design center point is located within the preset bounding box, mis-matching can be avoided and the reliability of the detection result can be improved.

[0011] In one example, the present application can be further configured as follows: judging whether the design bounding box intersects with the preset bounding box according to the coordinate values of the design bounding box and the coordinate values of the preset bounding box includes the following steps: Obtain the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the design bounding box, and obtain the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the preset bounding box; determine whether the minimum X coordinate value of the design bounding box is not greater than the maximum X coordinate value of the preset bounding box, and whether the maximum X coordinate value of the design bounding box is not less than the minimum X coordinate value of the preset bounding box; If the minimum X coordinate value of the design bounding box is not greater than the maximum X coordinate value of the preset bounding box, and the maximum X coordinate value of the design bounding box is not less than the minimum X coordinate value of the preset bounding box, then determine whether the minimum Y coordinate value of the design bounding box is not greater than the maximum Y coordinate value of the preset bounding box, and whether the maximum Y coordinate value of the design bounding box is not less than the minimum Y coordinate value of the preset bounding box; If the minimum Y coordinate value of the design bounding box is not greater than the maximum Y coordinate value of the preset bounding box, and the maximum Y coordinate value of the design bounding box is not less than the minimum Y coordinate value of the preset bounding box, then determine that the design bounding box and the preset bounding box intersect.

[0012] By adopting the above technical solution, by obtaining the coordinate values of the design bounding box and the preset bounding box, and by respectively judging whether there is an overlap between the preset bounding box and the design bounding box in the X-axis and Y-axis directions, irrelevant matches can be effectively filtered out, the calculation efficiency of the match judgment can be improved, and when the design bounding box and the preset bounding box intersect only in both the X-axis and Y-axis, it is determined that the design hole position and the preset hole position match, so that misrecognition can be reduced and the detection accuracy can be improved.

[0013] In one example of the present application, it can be further configured that: determining the distance difference between the design center point and the preset center point according to the coordinate values of the design center point and the preset center point includes the following steps: through the distance calculation formula: Calculate the distance difference between the design center point and the preset center point, where S is the distance difference, X 1 is the X coordinate value of the design center point, X 2 is the X coordinate value of the preset center point, Y 1 is the Y coordinate value of the design center point, Y 2 is the Y coordinate value of the preset center point.

[0014] By adopting the above technical solution, by obtaining the coordinate values of the design center point and the coordinate values of the preset center point, calculating the distance difference between the design center point and the preset center point, and then taking the absolute value of the distance difference, it is possible to avoid the distance difference being negative due to the positional relationship between the design center point and the preset center point, thereby being able to provide an accurate distance difference between the design center point and the preset center point.

[0015] In one example of the present application, it can be further configured that: before the output of the detection report, the stencil opening detection method further includes the following steps; Obtain a plurality of plug holes on the drilling layer in the PCB drawing, and obtain the coordinate values of the center points of the plug holes; According to the coordinate values of the center points of the plug holes and the coordinate values of the preset bounding box, determine whether the center points of the plug holes are located within the preset bounding box; If the center point of the plug hole is located within the preset bounding box, then mark the preset hole corresponding to the preset bounding box as a PTH pad, and then determine whether there is a matching design hole for the preset hole marked as a PTH pad; if there is a matching design hole for the preset hole marked as a PTH pad, then mark the corresponding preset hole as PTH-M.

[0016] By adopting the above technical solution, by obtaining the coordinate values of the plug holes in the PCB drawing and determining whether the plug holes are located within the preset bounding box, that is, determining whether the plug holes overlap with the preset holes, it is possible to accurately identify the PTH pads from multiple preset holes, ensure the accuracy of distinguishing the PTH pads from the ordinary pads, and by further checking whether there is a matching design hole for the PTH pads after matching the PTH pads, when there is a matching design hole for the PTH pads, mark the corresponding PTH pads as PTH-M, thereby being able to classify the PTH pads and facilitating the designers to identify the types of preset holes according to the detection results.

[0017] The second above-mentioned invention object of the present application is achieved by the following technical solution: A stencil opening detection device, the stencil opening detection device includes: A data acquisition module, configured to acquire a plurality of design holes on the opening layer and a plurality of preset holes on the pad layer in the PCB drawing; A bounding box generation module, configured to generate a design bounding box according to the boundary lines of the design holes and generate a preset bounding box according to the boundary lines of the preset holes, wherein the design holes are located within the design bounding box and the preset holes are located within the preset bounding box; A hole position matching module, configured to determine whether the design bounding box only has an overlapping area with one of the preset bounding boxes based on a hole position matching algorithm according to the coordinate values of the design bounding box and the coordinate values of the preset bounding box, and generate detection information; a detection report output module, configured to determine whether the design hole positions and the corresponding preset hole positions match according to the detection information, and output a detection report.

[0018] By adopting the above technical solutions, by obtaining a plurality of design hole positions on the opening layer and a plurality of preset hole positions on the pad layer in the PCB drawing, generating a design bounding box according to the boundary lines of the design hole positions, and generating a preset bounding box according to the boundary lines of the preset hole positions, the hole positions with complex shapes can be converted into standardized rectangular boxes, thereby simplifying the matching calculation and improving the detection efficiency. By determining whether the design bounding box only has an overlapping area with one preset bounding box based on the hole position matching algorithm according to the coordinate values of the design bounding box and the preset bounding box, and generating detection information, the design hole positions and the preset hole positions can be accurately matched, and the abnormal situations of multiple openings and missing openings can be accurately identified, thereby improving the accuracy of stencil opening detection. By determining whether the design hole positions and the corresponding preset hole positions match according to the detection information and outputting a detection report, the detection result can be intuitively provided, which is convenient for designers to correct the design hole positions according to the detection result, thereby improving the detection efficiency and accuracy of the design hole positions.

[0019] The above object three of the present application is achieved by the following technical solutions: A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above stencil opening detection method are implemented.

[0020] The above object four of the present application is achieved by the following technical solutions: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above stencil opening detection method are implemented.

[0021] In summary, the present application includes the following beneficial technical effects: 1. By obtaining multiple designed hole positions on the opening layer of the PCB drawing and multiple preset hole positions on the pad layer, generating a designed boundary box based on the boundary lines of the designed hole positions, and generating a preset boundary box based on the boundary lines of the preset hole positions, it is possible to convert hole positions with complex shapes into standardized rectangular boxes, thereby simplifying the matching calculation and improving the detection efficiency. By determining whether the designed boundary box has an overlapping area with only one preset boundary box and generating detection information based on the hole position matching algorithm according to the coordinate values of the designed boundary box and the preset boundary box, it is possible to accurately match the designed hole positions and the preset hole positions, and accurately identify abnormal situations such as multiple openings and missing openings, thereby improving the accuracy of stencil opening detection. By determining whether the designed hole positions match the corresponding preset hole positions based on the detection information and outputting a detection report, it is possible to intuitively provide the detection results, facilitating designers to correct the designed hole positions according to the detection results, thereby improving the detection efficiency and accuracy of the designed hole positions; 2. By obtaining the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the preset boundary box, it is possible to accurately define the spatial position of the preset boundary box, providing accurate coordinate basis for the matching calculation. By determining whether the coordinates of the designed center point are within the range of the preset boundary box, it is possible to quickly determine whether the designed hole position matches the preset hole position, reducing unnecessary calculations and improving the detection efficiency. By determining that the designed hole position and the preset hole position match only when the designed center point is within the preset boundary box, it is possible to avoid incorrect matching and improve the reliability of the detection results; 3. By obtaining the coordinate values of the plug-in hole positions in the PCB drawing and determining whether the plug-in hole positions are within the preset boundary box, that is, determining whether the plug-in holes overlap with the preset hole positions, it is possible to accurately identify the PTH pads from multiple preset hole positions, ensuring the accuracy of distinguishing the PTH pads from the ordinary pads. By further checking whether the PTH pads have matching designed hole positions after matching the PTH pads, when the PTH pads have matching designed hole positions, marking the corresponding PTH pads as PTH-M, it is possible to classify the PTH pads, facilitating designers to identify the types of preset hole positions according to the detection results. Description of the Drawings

[0022] Figure 1 is a flowchart of a stencil opening detection method in an embodiment of the present application; Figure 2 is an implementation flowchart of step S10 in the stencil opening detection method in an embodiment of the present application; Figure 3 is an implementation flowchart of step S20 in the stencil opening detection method in an embodiment of the present application; Figure 4 is an implementation flowchart of step S30 in the stencil opening detection method in an embodiment of the present application; Figure 5It is the implementation flowchart of step S40 in the steel mesh opening detection method in an embodiment of the present application; Figure 6 It is the implementation flowchart of step S50 in the steel mesh opening detection method in an embodiment of the present application; Figure 7 It is a principle block diagram of a steel mesh opening detection device in an embodiment of the present application; Figure 8 It is a schematic diagram of the device in an embodiment of the present application. Detailed implementation manners

[0023] The following further elaborates on the present application in conjunction with the accompanying drawings.

[0024] In one embodiment, as Figure 1 shown, the present application discloses a steel mesh opening detection method, which specifically includes the following steps: S10: Obtain multiple design hole positions on the opening layer and multiple preset hole positions on the pad layer in the PCB drawing.

[0025] In this embodiment, the PCB drawing includes a pad layer and an opening layer. The preset hole positions are the pads on the pad layer, and multiple preset hole positions are provided on the pad layer. The design hole positions are the hole positions set on the opening layer according to the positions of the pads on the pad layer. That is to say, the multiple design hole positions and the multiple preset hole positions are set in one-to-one correspondence, and the design hole positions on the opening layer are used to create openings on the steel mesh.

[0026] S20: Generate a design boundary box according to the boundary line of the design hole positions, and generate a preset boundary box according to the boundary line of the preset hole positions, where the design hole positions are located inside the design boundary box, and the preset hole positions are located inside the preset boundary box.

[0027] In this embodiment, both the design boundary box and the preset boundary box are constructed as rectangular boxes. The design boundary box is the rectangular box with the smallest area that completely encloses the design hole positions, and the preset boundary box is the rectangular box with the smallest area that completely encloses the preset hole positions.

[0028] Specifically, select a design reference point on the opening layer and a preset reference point on the pad layer. The positions of the design reference point and the preset reference point in the PCB drawing are the same. Construct an XY plane coordinate system on the opening layer with the design reference point as the center, and construct an XY plane coordinate system on the pad layer with the preset reference point as the center.

[0029] The boundary line of the designed hole positions is formed by sequentially connecting multiple design points. Obtain the X coordinates and Y coordinates of the multiple design points, obtain the maximum X coordinate and the minimum X coordinate from the X coordinates of the multiple design points, and obtain the maximum Y coordinate and the minimum Y coordinate from the Y coordinates of the multiple design points. Generate a design bounding box based on the maximum X coordinate, minimum X coordinate, maximum Y coordinate, and minimum Y coordinate among the multiple design points. The width of the design bounding box is equal to the maximum X coordinate value among the multiple design points minus the minimum X coordinate value, and the length of the design bounding box is equal to the maximum Y coordinate value among the multiple design points minus the minimum Y coordinate value.

[0030] The boundary line of the preset hole positions is formed by sequentially connecting multiple preset points. Obtain the X coordinates and Y coordinates of the multiple preset points, obtain the maximum X coordinate and the minimum X coordinate from the X coordinates of the multiple preset points, and obtain the maximum Y coordinate and the minimum Y coordinate from the Y coordinates of the multiple preset points. Generate a preset bounding box based on the maximum X coordinate, minimum X coordinate, maximum Y coordinate, and minimum Y coordinate among the multiple preset points. The width of the preset bounding box is equal to the maximum X coordinate value among the multiple preset points minus the minimum X coordinate value, and the length of the preset bounding box is equal to the maximum Y coordinate value among the multiple preset points minus the minimum Y coordinate value.

[0031] By generating a design bounding box based on the boundary line of the designed hole positions and generating a preset bounding box based on the boundary line of the preset hole positions, irregularly shaped designed hole positions and irregularly shaped preset hole positions can both be converted into rectangles.

[0032] S30: Based on the hole position matching algorithm, determine whether the design bounding box has an overlapping area with only one preset bounding box according to the coordinate values of the design bounding box and the coordinate values of the preset bounding box, where the coordinate values include X coordinate values and Y coordinate values.

[0033] In this embodiment, the coordinate values of the design bounding box include the coordinate values of the center point of the design bounding box and the coordinate values of all points on the boundary line of the design bounding box. The coordinate values of the preset bounding box include the coordinate values of the center point of the preset bounding box and the coordinate values of all points on the boundary line of the preset bounding box.

[0034] Specifically, to determine whether the design bounding box has an overlapping area with only one preset bounding box by comparing the coordinate values, first obtain the X coordinate values and Y coordinate values of the design bounding box, and obtain the X coordinate values and Y coordinate values of the preset bounding box. Calculate whether the design bounding box has an overlapping area with only one preset bounding box according to the X coordinate values and Y coordinate values of the design bounding box and the X coordinate values and Y coordinate values of the preset bounding box through the hole position matching algorithm.

[0035] S40: Determine whether the designed hole positions and the corresponding preset hole positions match according to the detection information, and output a detection report.

[0036] Specifically, if the design bounding box only has an overlapping area with one preset bounding box, it is determined that the design hole position corresponding to the design bounding box matches the preset hole position corresponding to the preset bounding box. If the design bounding box does not have an overlapping area with multiple preset bounding boxes, it is determined that the design hole position corresponding to the design bounding box is a multi-opening hole position. If the preset bounding box does not have an overlapping area with multiple design bounding boxes, it is determined that the preset hole position corresponding to the preset bounding box is a missing opening hole position. If the design bounding box has an overlapping area with multiple preset bounding boxes, it is determined that the design hole position corresponding to the design bounding box is an abnormal hole position, and then a detection report is output, and the abnormal hole position is detected by the designer.

[0037] By obtaining multiple design hole positions on the opening layer and multiple preset hole positions on the pad layer in the PCB drawing, generating a design bounding box according to the boundary line of the design hole position, and generating a preset bounding box according to the boundary line of the preset hole position, the hole positions with complex shapes can be converted into standardized rectangular boxes, thereby simplifying the matching calculation and improving the detection efficiency. By determining whether the design bounding box only has an overlapping area with one preset bounding box based on the hole position matching algorithm according to the coordinate values of the design bounding box and the preset bounding box and generating detection information, the design hole position and the preset hole position can be accurately matched, and the abnormal situations of multi-opening and missing opening can be accurately identified, thereby improving the accuracy of stencil opening detection. By determining whether the design hole position and the corresponding preset hole position match according to the detection information and outputting a detection report, the detection result can be intuitively provided, which is convenient for the designer to correct the design hole position according to the detection result, thereby improving the detection efficiency and accuracy of the design hole position.

[0038] In one embodiment, as Figure 2 shown, in step S30, that is, based on the hole position matching algorithm, according to the coordinate values of the design bounding box and the preset bounding box, it is determined whether the design bounding box only has an overlapping area with one preset bounding box, which specifically includes the following steps: S301: Obtain the coordinate value of the design center point of the design bounding box, and judge whether the design center point is located inside the preset bounding box according to the coordinate value of the design center point and the coordinate value of the preset bounding box.

[0039] In this embodiment, the coordinate value of the design center point includes the X coordinate value and the Y coordinate value of the design center point.

[0040] Specifically, the coordinate value of the design center point is obtained by calculating the average position of all the corner points of the design bounding box. The coordinate value of the design center point is compared with the coordinate value of the preset bounding box to determine whether the design center point is within the preset bounding box. If the coordinate value of the design center point is within the X coordinate value and Y coordinate value ranges of the preset bounding box, it is determined that the design center point is within the preset bounding box, and then it is determined that the corresponding design hole position matches the corresponding preset hole position. If the coordinate value of the design center point is not within the X coordinate value and Y coordinate value ranges of the preset bounding box, it is determined that the design center point is not within the preset bounding box.

[0041] Furthermore, the coordinate value of the preset center point of the preset bounding box is obtained. The preset center point coordinate value is obtained by calculating the average position of all the corner points of the preset bounding box. A first spatial index is constructed using KDTree based on the coordinate value of the preset center point. The preset bounding box closest to the design center point is queried within the first spatial index according to the coordinate value of the design center point. It is determined whether the design center point is within the closest preset bounding box. If the design center point is within the closest preset bounding box, it is determined that the corresponding design hole position matches the preset hole position, and then it is determined whether the next design center point is within the preset boundary according to the above steps. If the design center point is not within the closest preset bounding box, the next preset bounding box closest to the design center point is queried within the first spatial index, and it is determined whether the design center point is within the next preset bounding box closest to the design center point. This cycle continues until all the design center points and all the preset bounding boxes are judged. By the above steps, it is successively determined whether all the design center points are within the preset bounding boxes. By using the spatial index, the search process of hole position matching is optimized, the calculation time is reduced, and the matching determination of each design center point and the preset center point is ensured.

[0042] S302: If the design center point is not within the preset bounding box, then according to the coordinate value of the design bounding box and the coordinate value of the preset bounding box, it is judged whether the design bounding box intersects with only one preset bounding box.

[0043] In this embodiment, the coordinate value of the design bounding box includes the X coordinate value range and Y coordinate value range of the design bounding box, and the coordinate value of the preset bounding box includes the X coordinate value range and Y coordinate value range of the preset bounding box.

[0044] Specifically, if the design center point is not located within the preset bounding box, an intersection judgment is made between the design bounding box and the preset bounding box. First, obtain the X coordinate value range and Y coordinate value range of the design bounding box, as well as the X coordinate value range and Y coordinate value range of the preset bounding box. By comparing whether there is an overlapping part between the X coordinate value range of the design bounding box and the X coordinate value range of the preset bounding box, and whether there is an overlapping part between the Y coordinate value range of the design bounding box and the Y coordinate value range of the preset bounding box, it is judged whether the design bounding box intersects with only one preset bounding box. If the design bounding box intersects with only one preset bounding box, it is determined that the corresponding design hole position and the corresponding preset hole position match. If the design bounding box does not intersect with any preset bounding box, it is determined that the corresponding design hole position is a multi-opening hole position. If the preset bounding box does not intersect with any design bounding box, it is determined that the corresponding preset hole position is a missing-opening hole position. If the design bounding box intersects with multiple preset bounding boxes, it is determined that the corresponding design hole position and the corresponding preset hole position are both abnormal hole positions.

[0045] Further, exclude the design hole positions and preset hole positions that have been matched in step S301. Then, use the preset center points of the preset bounding boxes corresponding to the unmatched preset hole positions to construct a second spatial index using KDTree. Query the 5 preset bounding boxes closest to the design center point within the second spatial index according to the coordinate value of the design center point. Judge whether the design bounding box corresponding to the design center point intersects with the 5 preset bounding boxes closest to the design center point. If the design bounding box intersects with only one preset bounding box, it is determined that the corresponding design hole position and the preset hole position match. Then, judge whether the design bounding box corresponding to the next design center point intersects with the preset bounding box according to the above steps. If the design bounding box intersects with multiple preset bounding boxes, it is determined that the corresponding design hole position and the corresponding preset hole position are abnormal hole positions. Then, judge whether the design bounding box corresponding to the next design center point intersects with the preset bounding box according to the above steps. If the design bounding box does not intersect with any of the 5 preset bounding boxes, query the next batch of 5 preset bounding boxes closest to the design bounding box within the second spatial index, and judge whether the design bounding box intersects with the next batch of 5 preset bounding boxes closest to the design bounding box. Loop like this until it is judged whether the design bounding box intersects with all the preset bounding boxes. By judging whether all the design bounding boxes intersect with the preset bounding boxes in the above steps in turn, and by using the second spatial index and the method of step-by-step query, the efficiency and accuracy of hole position matching are improved, and at the same time, the comprehensive detection of each design hole position and preset hole position is ensured.

[0046] S303: If the design bounding box does not intersect with the preset bounding box or the design bounding box intersects with multiple preset bounding boxes, obtain the coordinate value of the preset center point of the preset bounding box, determine the distance difference between the design center point and the preset center point according to the coordinate value of the design center point and the coordinate value of the preset center point, and judge whether the distance difference is not greater than the preset tolerance value.

[0047] In this embodiment, the coordinate values of the preset center point include the X coordinate value and the Y coordinate value. The designer can set a preset tolerance value according to the diameter size of the designed hole position and the diameter size of the preset hole position. When the distance difference between the designed center point and the preset center point is not greater than the preset tolerance value, the designed hole position only matches one preset hole position. In some specific embodiments, the preset tolerance value can be 0.1 mm.

[0048] Specifically, if the designed bounding box and the preset bounding box do not intersect or the designed bounding box intersects with multiple preset bounding boxes, calculate the distance difference between the designed center point and the center point of the preset bounding box. If the distance difference is less than or equal to the preset tolerance value, it is determined that the corresponding designed hole position matches the corresponding preset hole position. If the distance difference is greater than the preset tolerance value, it is determined that the corresponding designed hole position does not match the corresponding preset hole position. And when the distance differences between the designed center point and all the preset center points are greater than the preset tolerance value, it is determined that the corresponding designed hole position is an over-drilled hole position. When the distance differences between the preset center point and all the designed center points are greater than the preset tolerance value, it is determined that the corresponding preset hole position is a missed-drilled hole position.

[0049] S304: If the distance difference is not greater than the preset tolerance value, it is determined that the designed bounding box only has an overlapping area with one preset bounding box.

[0050] Specifically, if the calculated distance difference is less than or equal to the preset tolerance value, it is determined that the corresponding designed bounding box and the corresponding preset bounding box have an overlapping area, and then it is determined that the corresponding designed hole position matches the corresponding preset hole position.

[0051] By judging whether the designed center point is located within the preset bounding box, a primary screening of the matching designed hole positions and preset hole positions can be performed, reducing the calculation amount in subsequent detections and improving the detection efficiency. Then, by judging whether the designed bounding box only intersects with one preset bounding box, the designed hole positions and preset hole positions that do not match in the primary screening can be further detected, so that the designed hole positions and preset hole positions that do not match in the primary screening can be corrected to avoid mislabeling the designed hole positions and preset hole positions. Finally, by calculating the distance difference between the designed center point and the preset center point and judging whether the distance difference is within the preset tolerance range, the designed hole positions and preset hole positions that do not match in the secondary screening can be further detected, so that the designed hole positions and preset hole positions can be accurately matched, and the abnormal situations of over-drilling and missed-drilling can be accurately identified.

[0052] In one embodiment, as Figure 3 shown, in step S301, that is, according to the coordinate values of the designed center point and the coordinate values of the preset bounding box, judge whether the designed center point is located within the preset bounding box, which specifically includes the following steps: S3011: Obtain the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the preset bounding box.

[0053] Specifically, first obtain the coordinate values of the four corner points of the preset bounding box, and obtain the maximum X coordinate value, minimum X coordinate value, maximum Y coordinate value, and minimum Y coordinate value of the preset bounding box through the coordinate values of the four corner points of the preset bounding box. These four coordinate values jointly define the position and size of the preset bounding box.

[0054] S3012: Determine whether the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box.

[0055] Specifically, by comparing the X coordinate value of the design center point with the minimum X coordinate value and the maximum X coordinate value of the preset bounding box, determine whether the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box. If the X coordinate value of the design center point is not between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box, it is determined that the design center point is not within the preset bounding box.

[0056] It should be noted that if the X coordinate value of the design center point is equal to the minimum X coordinate value or the maximum X coordinate value of the preset bounding box, it is also determined that the design center point is not within the preset bounding box.

[0057] S3013: If the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box, determine whether the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset bounding box.

[0058] Specifically, if the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset bounding box, then determine whether the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset bounding box. If the Y coordinate value of the design center point is not between the minimum Y coordinate value and the maximum Y coordinate value of the preset bounding box, it is determined that the design center point is not within the preset bounding box.

[0059] It should be noted that if the Y coordinate value of the design center point is equal to the minimum Y coordinate value or the maximum Y coordinate value of the preset bounding box, it is also determined that the design center point is not within the preset bounding box.

[0060] S3014: If the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset bounding box, it is determined that the design center point is within the preset bounding box.

[0061] Specifically, if the X - coordinate value of the design center point is between the minimum X - coordinate value and the maximum X - coordinate value of the preset bounding box, and the Y - coordinate value of the design center point is between the minimum Y - coordinate value and the maximum Y - coordinate value of the preset bounding box, it is determined that the design center point is within the preset bounding box, and the design hole position corresponding to the design center point matches the preset hole position corresponding to the preset bounding box.

[0062] By obtaining the maximum X - coordinate value, minimum X - coordinate value, maximum Y - coordinate value, and minimum Y - coordinate value of the preset bounding box, the spatial position of the preset bounding box can be accurately defined, providing an accurate coordinate basis for the matching calculation. By judging whether the coordinates of the design center point are within the range of the preset bounding box, it can be quickly determined whether the design hole position matches the preset hole position, reducing unnecessary calculations and improving the detection efficiency. By determining that the design hole position and the preset hole position match only when the design center point is within the preset bounding box, false matching can be avoided and the reliability of the detection result can be improved.

[0063] In one embodiment, as Figure 4 shown, in step S302, that is, according to the coordinate values of the design bounding box and the coordinate values of the preset bounding box, it is judged whether the design bounding box intersects with the preset bounding box, which specifically includes the following steps: S3021: Obtain the maximum X - coordinate value, minimum X - coordinate value, maximum Y - coordinate value, and minimum Y - coordinate value of the design bounding box, and obtain the maximum X - coordinate value, minimum X - coordinate value, maximum Y - coordinate value, and minimum Y - coordinate value of the preset bounding box.

[0064] Specifically, obtain the coordinate values of the four corner points of the preset bounding box and the coordinate values of the four corner points of the design bounding box. Obtain the maximum X - coordinate value, minimum X - coordinate value, maximum Y - coordinate value, and minimum Y - coordinate value of the preset bounding box through the coordinate values of the four corner points of the preset bounding box, and obtain the maximum X - coordinate value, minimum X - coordinate value, maximum Y - coordinate value, and minimum Y - coordinate value of the design bounding box through the coordinate values of the four corner points of the design bounding box.

[0065] S3022: Judge whether the minimum X - coordinate value of the design bounding box is not greater than the maximum X - coordinate value of the preset bounding box, and whether the maximum X - coordinate value of the design bounding box is not less than the minimum X - coordinate value of the preset bounding box.

[0066] Specifically, compare the minimum X - coordinate value of the design bounding box with the maximum X - coordinate value of the preset bounding box, and compare the maximum X - coordinate value of the design bounding box with the minimum X - coordinate value of the preset bounding box. If the minimum X - coordinate value of the design bounding box is greater than the maximum X - coordinate value of the preset bounding box, and the maximum X - coordinate value of the design bounding box is less than the minimum X - coordinate value of the preset bounding box, then the design bounding box does not intersect with the preset bounding box along the X - axis direction, and thus it is determined that the design bounding box does not intersect with the preset bounding box.

[0067] S3023: If the minimum X coordinate value of the design bounding box is not greater than the maximum X coordinate value of the preset bounding box, and the maximum X coordinate value of the design bounding box is not less than the minimum X coordinate value of the preset bounding box, then determine whether the minimum Y coordinate value of the design bounding box is not greater than the maximum Y coordinate value of the preset bounding box, and whether the maximum Y coordinate value of the design bounding box is not less than the minimum Y coordinate value of the preset bounding box.

[0068] Specifically, compare the minimum Y coordinate value of the design bounding box with the maximum Y coordinate value of the preset bounding box, and compare the maximum Y coordinate value of the design bounding box with the minimum Y coordinate value of the preset bounding box. If the minimum Y coordinate value of the design bounding box is greater than the maximum Y coordinate value of the preset bounding box, and the maximum Y coordinate value of the design bounding box is less than the minimum Y coordinate value of the preset bounding box, then the design bounding box and the preset bounding box do not intersect in the Y-axis direction, thereby determining that the design bounding box does not intersect the preset bounding box.

[0069] S3024: If the minimum Y coordinate value of the design bounding box is not greater than the maximum Y coordinate value of the preset bounding box, and the maximum Y coordinate value of the design bounding box is not less than the minimum Y coordinate value of the preset bounding box, then determine that the design bounding box and the preset bounding box intersect.

[0070] Specifically, if the minimum X coordinate value of the design bounding box is not greater than the maximum X coordinate value of the preset bounding box, and the maximum X coordinate value of the design bounding box is not less than the minimum X coordinate value of the preset bounding box, then the design bounding box and the preset bounding box intersect in the X-axis direction. If the minimum Y coordinate value of the design bounding box is not greater than the maximum Y coordinate value of the preset bounding box, and the maximum Y coordinate value of the design bounding box is not less than the minimum Y coordinate value of the preset bounding box, then the design bounding box and the preset bounding box intersect in the Y-axis direction. When the design bounding box and the preset bounding box intersect in the X-axis direction and the design bounding box and the preset bounding box intersect in the Y-axis direction, determine that the design bounding box intersects the preset bounding box.

[0071] By obtaining the coordinate values of the design bounding box and the coordinate values of the preset bounding box, and by respectively determining whether there is an overlap between the preset bounding box and the design bounding box in the X-axis and Y-axis directions, irrelevant matches can be effectively filtered out, improving the computational efficiency of the matching judgment. By determining that the design hole position and the preset hole position match only when the design bounding box and the preset bounding box intersect in both the X-axis and Y-axis directions, misidentifications can be reduced and the accuracy of detection can be improved.

[0072] In one embodiment, as Figure 5 shown, in step S303, that is, determining the distance difference between the design center point and the preset center point according to the coordinate values of the design center point and the coordinate values of the preset center point, specifically includes the following steps: S3031: Calculate the distance difference between the design center point and the preset center point through the distance calculation formula: where S is the distance difference, X 1 is the X coordinate value of the design center point, X 2 is the X coordinate value of the preset center point, Y 1 is the Y coordinate value of the design center point, Y 2 is the Y coordinate value of the preset center point.

[0073] Specifically, use the distance calculation formula to calculate the distance difference between the design center point and the preset center point through the coordinate values of the design center point and the preset center point, and then take the absolute value of the distance difference between the design center point and the preset center point.

[0074] By obtaining the coordinate values of the design center point and the preset center point, calculating the distance difference between the design center point and the preset center point, and then taking the absolute value of the distance difference, it is possible to avoid the distance difference being negative due to the positional relationship between the design center point and the preset center point, thereby being able to provide an accurate distance difference between the design center point and the preset center point.

[0075] In one embodiment, as Figure 6 shown, in step S40, that is, before outputting the detection report, the steel mesh opening detection method further includes the following steps: S401: Obtain multiple plug-in hole positions on the drilling layer in the PCB drawing, and obtain the coordinate values of the center points of the plug-in hole positions.

[0076] In this embodiment, multiple plug-in hole positions are provided on the drilling layer, and the plug-in hole positions are used to accommodate the pins of electronic components.

[0077] Specifically, by reading the drilling layer information in the PCB drawing, extracting the positions of all plug-in hole positions, selecting a coordinate reference point on the drilling layer, constructing an XY plane coordinate system on the drilling layer with the coordinate reference point of the drilling layer, and obtaining the center point coordinates of each plug-in hole position.

[0078] It should be noted that the coordinate reference point, design reference point, and preset reference point of the drilling layer are in the same position in the PCB drawing.

[0079] S402: Determine whether the center point of the plug-in hole position is located within the preset bounding box according to the coordinate values of the center point of the plug-in hole position and the coordinate values of the preset bounding box.

[0080] In this embodiment, the coordinate values of the center point of the plug-in hole position include the X coordinate value and the Y coordinate value.

[0081] Specifically, compare the center point coordinates of the plug-in hole positions with the coordinate values of the preset bounding box to determine whether the X coordinate value of the plug-in hole position is between the maximum X coordinate value and the minimum X coordinate value of the preset bounding box, and whether the Y coordinate value of the plug-in hole position is between the maximum Y coordinate value and the minimum Y coordinate value of the preset bounding box.

[0082] If the X coordinate value of the plug-in hole position is between the maximum X coordinate value and the minimum X coordinate value of the preset bounding box, and the Y coordinate value of the plug-in hole position is between the maximum Y coordinate value and the minimum Y coordinate value of the preset bounding box, then it is determined that the center point of the plug-in hole position is within the preset bounding box.

[0083] If the X coordinate value of the plug-in hole position is not between the maximum X coordinate value and the minimum X coordinate value of the preset bounding box, or the Y coordinate value of the plug-in hole position is not between the maximum Y coordinate value and the minimum Y coordinate value of the preset bounding box, then it is determined that the center point of the plug-in hole position is not within the preset bounding box.

[0084] S403: If the center point of the plug-in hole position is within the preset bounding box, then mark the preset hole position corresponding to the preset bounding box as a PTH pad, and then determine whether there is a matching design hole position for the preset hole position marked as a PTH pad.

[0085] Specifically, determine whether there is a matching design hole position for the preset hole position marked as a PTH pad according to the detection information.

[0086] S404: If there is a matching design hole position for the preset hole position marked as a PTH pad, then mark the corresponding preset hole position as PTH-M.

[0087] Specifically, if there is a matching design hole position for the preset hole position marked as a PTH pad, then mark the corresponding preset hole position as PTH-M; if there is no matching design hole position for the preset hole position marked as a PTH pad, then keep it unchanged.

[0088] By obtaining the coordinate values of the plug-in hole positions in the PCB drawing and determining whether the plug-in hole positions are within the preset bounding box, that is, determining whether the plug-in holes overlap with the preset hole positions, it is possible to accurately identify the PTH pads from multiple preset hole positions, ensuring the accuracy of distinguishing the PTH pads from the ordinary pads. By further checking whether there is a matching design hole position for the PTH pads after matching the PTH pads, when there is a matching design hole position for the PTH pads, mark the corresponding PTH pads as PTH-M, so as to classify the PTH pads and facilitate the designers to identify the types of the preset hole positions according to the detection results.

[0089] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0090] In one embodiment, a stencil opening detection device is provided, and the stencil opening detection device corresponds one-to-one with the stencil opening detection method in the above embodiment. As Figure 7 shown, the stencil opening detection device includes a data acquisition module, a bounding box generation module, a hole position matching module, and a detection report output module. The detailed description of each functional module is as follows: The data acquisition module is used to acquire a plurality of designed hole positions on the opening layer and a plurality of preset hole positions on the pad layer in the PCB drawing.

[0091] The bounding box generation module is used to generate a designed bounding box according to the boundary line of the designed hole position and generate a preset bounding box according to the boundary line of the preset hole position. Among them, the designed hole position is located within the designed bounding box, and the preset hole position is located within the preset bounding box.

[0092] The hole position matching module is used to determine whether the designed bounding box has an overlapping area with only one preset bounding box based on the hole position matching algorithm according to the coordinate values of the designed bounding box and the preset bounding box, and generate detection information.

[0093] The detection report output module is used to determine whether the designed hole position and the corresponding preset hole position match according to the detection information, and output a detection report.

[0094] Optionally, the hole position matching module specifically includes: The center point acquisition module is used to acquire the coordinate value of the designed center point of the designed bounding box, and judge whether the designed center point is located within the preset bounding box according to the coordinate value of the designed center point and the coordinate value of the preset bounding box.

[0095] The boundary intersection judgment module is used to, if the designed center point is not located within the preset bounding box, judge whether the designed bounding box intersects with only one preset bounding box according to the coordinate values of the designed bounding box and the preset bounding box.

[0096] The distance calculation module is used to, if the designed bounding box does not intersect with the preset bounding box or the designed bounding box intersects with multiple preset bounding boxes, acquire the coordinate value of the preset center point of the preset bounding box, determine the distance difference between the designed center point and the preset center point according to the coordinate value of the designed center point and the coordinate value of the preset center point, and judge whether the distance difference is not greater than the preset tolerance value.

[0097] The matching confirmation module is used to, if the distance difference is not greater than the preset tolerance value, determine that the designed bounding box has an overlapping area with only one preset bounding box.

[0098] Optionally, the center point acquisition module specifically includes: The coordinate value acquisition module is used to acquire the maximum X coordinate value, the minimum X coordinate value, the maximum Y coordinate value, and the minimum Y coordinate value of the preset bounding box.

[0099] The X - coordinate judgment module is used to judge whether the X - coordinate value of the design center point is between the minimum X - coordinate value and the maximum X - coordinate value of the preset boundary box.

[0100] The Y - coordinate judgment module is used to judge whether the Y - coordinate value of the design center point is between the minimum Y - coordinate value and the maximum Y - coordinate value of the preset boundary box if the X - coordinate value of the design center point is between the minimum X - coordinate value and the maximum X - coordinate value of the preset boundary box.

[0101] The matching confirmation module is used to determine that the design center point is within the preset boundary box if the Y - coordinate value of the design center point is between the minimum Y - coordinate value and the maximum Y - coordinate value of the preset boundary box.

[0102] Optionally, the boundary intersection judgment module specifically includes: The boundary box coordinate acquisition module is used to acquire the maximum X - coordinate value, the minimum X - coordinate value, the maximum Y - coordinate value and the minimum Y - coordinate value of the design boundary box, and to acquire the maximum X - coordinate value, the minimum X - coordinate value, the maximum Y - coordinate value and the minimum Y - coordinate value of the preset boundary box.

[0103] The X - axis intersection judgment module is used to judge whether the minimum X - coordinate value of the design boundary box is not greater than the maximum X - coordinate value of the preset boundary box, and whether the maximum X - coordinate value of the design boundary box is not less than the minimum X - coordinate value of the preset boundary box.

[0104] The Y - axis intersection judgment module is used to judge whether the minimum Y - coordinate value of the design boundary box is not greater than the maximum Y - coordinate value of the preset boundary box, and whether the maximum Y - coordinate value of the design boundary box is not less than the minimum Y - coordinate value of the preset boundary box if the minimum X - coordinate value of the design boundary box is not greater than the maximum X - coordinate value of the preset boundary box, and the maximum X - coordinate value of the design boundary box is not less than the minimum X - coordinate value of the preset boundary box.

[0105] The intersection confirmation module is used to determine that the design boundary box and the preset boundary box intersect if the minimum Y - coordinate value of the design boundary box is not greater than the maximum Y - coordinate value of the preset boundary box, and the maximum Y - coordinate value of the design boundary box is not less than the minimum Y - coordinate value of the preset boundary box.

[0106] Optionally, the distance calculation module specifically includes: It is used to calculate the distance difference between the design center point and the preset center point through the distance calculation formula where S is the distance difference, X 1 is the X - coordinate value of the design center point, X 2 is the X - coordinate value of the preset center point, Y 1 is the Y - coordinate value of the design center point, Y 2 is the Y - coordinate value of the preset center point.

[0107] Optionally, the stencil opening detection device further includes the following modules: A plug-in hole position acquisition module, configured to acquire a plurality of plug-in hole positions on the drilling layer in the PCB drawing, and acquire the coordinate values of the center points of the plug-in hole positions.

[0108] A plug-in hole position determination module, configured to determine whether the center point of the plug-in hole position is located within a preset bounding box according to the coordinate values of the center point of the plug-in hole position and the coordinate values of the preset bounding box.

[0109] A PTH pad marking module, configured to mark the preset hole position corresponding to the preset bounding box as a PTH pad if the center point of the plug-in hole position is located within the preset bounding box.

[0110] A PTH pad matching module, configured to determine whether there is a matching design hole position for the preset hole position marked as a PTH pad.

[0111] A PTH-M marking module, configured to mark the corresponding preset hole position as PTH-M if there is a matching design hole position for the preset hole position marked as a PTH pad.

[0112] For the specific limitations of the stencil opening detection device, reference may be made to the limitations of the stencil opening detection method in the foregoing text, which will not be elaborated herein. Each module in the above stencil opening detection device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above modules.

[0113] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 8 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a stencil opening detection method.

[0114] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: Obtain multiple design hole positions on the opening layer and multiple preset hole positions on the pad layer of the PCB drawing.

[0115] Generate a design bounding box based on the boundary lines of the design hole positions, and generate a preset bounding box based on the boundary lines of the preset hole positions. Among them, the design hole positions are located within the design bounding box, and the preset hole positions are located within the preset bounding box.

[0116] Based on the hole position matching algorithm, determine whether the design bounding box has an overlapping area with only one preset bounding box based on the coordinate values of the design bounding box and the preset bounding box, and generate detection information. Among them, the coordinate values include the X coordinate value and the Y coordinate value.

[0117] Determine whether the design hole positions and the corresponding preset hole positions match according to the detection information, and output a detection report.

[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Obtain multiple design hole positions on the opening layer and multiple preset hole positions on the pad layer of the PCB drawing.

[0119] Generate a design bounding box based on the boundary lines of the design hole positions, and generate a preset bounding box based on the boundary lines of the preset hole positions. Among them, the design hole positions are located within the design bounding box, and the preset hole positions are located within the preset bounding box.

[0120] Based on the hole position matching algorithm, determine whether the design bounding box has an overlapping area with only one preset bounding box based on the coordinate values of the design bounding box and the preset bounding box, and generate detection information. Among them, the coordinate values include the X coordinate value and the Y coordinate value.

[0121] Determine whether the design hole positions and the corresponding preset hole positions match according to the detection information, and output a detection report.

[0122] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0123] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0124] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application 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 described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting steel mesh openings, characterized in that: The steel mesh opening detection method comprises: Get multiple designed hole positions of the opening layer and multiple preset hole positions of the pad layer in the PCB drawing; Generating a design boundary box according to the boundary lines of the design hole positions, and generating a preset boundary box according to the boundary lines of the preset hole positions, wherein the design hole positions are located within the design boundary box, and the preset hole positions are located within the preset boundary box; Based on the hole position matching algorithm, according to the coordinate values ​​of the designed boundary box and the coordinate values ​​of the preset boundary box, determining whether the designed boundary box has an overlapping area with only one of the preset boundary boxes and generating detection information, wherein the coordinate values ​​include X coordinate values ​​and Y coordinate values; Determine whether the designed hole position matches the corresponding preset hole position according to the detection information, and output a detection report.

2. The steel mesh opening detection method according to claim 1, characterized in that: The method of determining whether the design boundary box has an overlapping area with only one of the preset boundary boxes based on the hole position matching algorithm according to the coordinate values ​​of the design boundary box and the coordinate values ​​of the preset boundary box includes: Obtaining a coordinate value of a design center point of the design boundary box, and determining whether the design center point is located within the preset boundary box according to the coordinate value of the design center point and the coordinate value of the preset boundary box; If the design center point is not within the preset bounding box, determining whether the design bounding box intersects only one of the preset bounding boxes according to the coordinate values ​​of the design bounding box and the coordinate values ​​of the preset bounding box; If the design boundary box and the preset boundary box do not intersect or the design boundary box intersects with multiple preset boundary boxes, obtaining the coordinate value of the preset center point of the preset boundary box, determining the distance difference between the design center point and the preset center point according to the coordinate value of the design center point and the coordinate value of the preset center point, and judging whether the distance difference is not greater than a preset tolerance value; If the distance difference is not greater than the preset tolerance value, it is determined that the design boundary box has an overlapping area with only one of the preset boundary boxes.

3. The steel mesh opening detection method according to claim 2, characterized in that: The determining, based on the coordinate value of the design center point and the coordinate value of the preset boundary box, whether the design center point is located within the preset boundary box includes: Obtain the maximum X coordinate value, the minimum X coordinate value, the maximum Y coordinate value, and the minimum Y coordinate value of the preset bounding box; Determine whether the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset boundary box; If the X coordinate value of the design center point is between the minimum X coordinate value and the maximum X coordinate value of the preset boundary box, determine whether the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset boundary box; If the Y coordinate value of the design center point is between the minimum Y coordinate value and the maximum Y coordinate value of the preset boundary box, it is determined that the design center point is within the preset boundary box.

4. The steel mesh opening detection method according to claim 2, characterized in that: The determining, based on the coordinate values ​​of the design boundary box and the coordinate values ​​of the preset boundary box, whether the design boundary box intersects with the preset boundary box includes: Obtaining the maximum X coordinate value, the minimum X coordinate value, the maximum Y coordinate value, and the minimum Y coordinate value of the design boundary box, and obtaining the maximum X coordinate value, the minimum X coordinate value, the maximum Y coordinate value, and the minimum Y coordinate value of the preset boundary box; determining whether the minimum X coordinate value of the design boundary box is not greater than the maximum X coordinate value of the preset boundary box, and whether the maximum X coordinate value of the design boundary box is not less than the minimum X coordinate value of the preset boundary box; If the minimum X coordinate value of the design boundary box is not greater than the maximum X coordinate value of the preset boundary box, and the maximum X coordinate value of the design boundary box is not less than the minimum X coordinate value of the preset boundary box, then determine whether the minimum Y coordinate value of the design boundary box is not greater than the maximum Y coordinate value of the preset boundary box, and whether the maximum Y coordinate value of the design boundary box is not less than the minimum Y coordinate value of the preset boundary box; If the minimum Y coordinate value of the design boundary box is not greater than the maximum Y coordinate value of the preset boundary box, and the maximum Y coordinate value of the design boundary box is not less than the minimum Y coordinate value of the preset boundary box, it is determined that the design boundary box and the preset boundary box intersect.

5. The steel mesh opening detection method according to claim 2, characterized in that: The determining the distance difference between the design center point and the preset center point according to the coordinate value of the design center point and the coordinate value of the preset center point includes: using a distance calculation formula: The distance difference between the design center point and the preset center point is calculated, where S is the distance difference, X1 is the X coordinate value of the design center point, X2 is the X coordinate value of the preset center point, Y1 is the Y coordinate value of the design center point, and Y2 is the Y coordinate value of the preset center point.

6. The steel mesh opening detection method according to claim 1, characterized in that: Before outputting the detection report, the method further includes: Obtain multiple plug-in hole positions of the drilling layer in the PCB drawing, and obtain the coordinate values ​​of the center points of the plug-in hole positions; According to the coordinate value of the center point of the plug-in hole and the coordinate value of the preset boundary box, determining whether the center point of the plug-in hole is located within the preset boundary box; If the center point of the plug-in hole is located within the preset boundary box, the preset hole corresponding to the preset boundary box is marked as a PTH pad, and then it is determined whether the preset hole marked as the PTH pad has a matching designed hole; if the preset hole marked as the PTH pad has a matching designed hole, the corresponding preset hole is marked as PTH-M.

7. A steel mesh hole detection device, characterized in that: The steel mesh opening detection device comprises: A data acquisition module, used to acquire multiple designed hole positions of the opening layer and multiple preset hole positions of the pad layer in the PCB drawing; A boundary box generation module, used to generate a design boundary box according to the boundary lines of the design hole positions, and to generate a preset boundary box according to the boundary lines of the preset hole positions, wherein the design hole positions are located within the design boundary box, and the preset hole positions are located within the preset boundary box; A hole position matching module, configured to determine whether the designed boundary box has an overlapping area with only one of the preset boundary boxes based on the coordinate values ​​of the designed boundary box and the coordinate values ​​of the preset boundary box based on a hole position matching algorithm and generate detection information; The test report output module is used to determine whether the designed hole position matches the corresponding preset hole position according to the test information, and output a test report.

8. The steel mesh opening detection device according to claim 7, characterized in that: The hole position matching module comprises: A center point acquisition module, used to acquire the coordinate value of the design center point of the design boundary box, and determine whether the design center point is located within the preset boundary box according to the coordinate value of the design center point and the coordinate value of the preset boundary box; A boundary intersection judgment module, used for judging whether the design boundary box intersects with only one of the preset boundary boxes according to the coordinate values ​​of the design boundary box and the coordinate values ​​of the preset boundary box if the design center point is not located in the preset boundary box; a distance calculation module, configured to obtain the coordinate value of the preset center point of the preset boundary box if the design boundary box does not intersect with the preset boundary box or the design boundary box intersects with a plurality of the preset boundary boxes, determine the distance difference between the design center point and the preset center point according to the coordinate value of the design center point and the coordinate value of the preset center point, and determine whether the distance difference is not greater than a preset tolerance value; The matching confirmation module is used to determine that the design boundary box has an overlapping area with only one of the preset boundary boxes if the distance difference is not greater than a preset tolerance value.

9. A computer 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, the steps of the steel mesh opening detection method as described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the steel mesh opening detection method as described in any one of claims 1 to 6 are implemented.