Pin and pad boundary distance detection method and device, electronic equipment and medium
By detecting the distance between pins and pads based on a printed circuit board assembly model, the high-cost detection problem in existing technologies is solved, achieving low-cost and high-efficiency detection results and preventing unstable component connections.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BAIXIN INTELLIGENT MFG TECH SHENZHEN CO LTD
- Filing Date
- 2022-10-31
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies can only detect the distance between pins and pads after the printed circuit board prototype is generated, resulting in high costs and failing to effectively prevent component "tombstoneing" and displacement.
The pin segments are determined based on the printed circuit board assembly model, and the target distance from each segment to the pad boundary is determined. The target distance is then combined with the pin direction to determine whether it meets the preset standard. The printed circuit board assembly model is used for detection.
It reduces the cost of detecting the distance between pins and pads, prevents component "tombstone" and displacement, and improves the efficiency and accuracy of detection.
Smart Images

Figure CN115597541B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of printed circuit board technology, specifically to a method, apparatus, electronic device, and storage medium for detecting the distance between pins and pad boundaries. Background Technology
[0002] The production process of Printed Circuit Boards (PCBs) involves various manufacturing processes. In actual production, the placement machine accurately mounts components onto the PCB according to a preset program. The connection center is the three links of "component pins-solder paste-pads". Solder paste is used to firmly connect the component pins to the PCB, and a certain distance is needed between the pins and the pads to allow some solder to climb up the pins (solder creep), increasing the adhesion between the pins and the pads. If the distance exceeds a reasonable range, the heating sequence of the pads on both sides of the same component package will be different, resulting in excessive solder creep on one side. After cooling and solidification, this creates a large pulling force, while the solder paste on the other side is not fully cured, which can easily cause the component to "tombstone". If a certain distance is not set, the solder paste cannot climb up the pins, and the adhesion between the pins and the pads is limited to the bottom of the pins, resulting in low adhesion and easy component displacement. Currently, the existing methods for detecting the safe distance between component pins and pad boundaries all involve optical inspection of the printed circuit board after it has been generated. This requires the preparation of samples before production, which increases the cost. As the number of tests and tests increases, the cost also becomes relatively high. Summary of the Invention
[0003] In view of this, this application provides a method, apparatus and electronic device for detecting the distance between pins and pad boundaries, which solves the technical problem that the distance between pins and pad boundaries can only be detected based on printed circuit board templates, resulting in high costs.
[0004] According to one aspect of this application, a method for detecting the distance between a pin and a pad boundary is provided, comprising:
[0005] The pin segments are determined based on the printed circuit board assembly model, and the target distance from each segment to the pad boundary is determined.
[0006] The pin direction of the line segment is determined based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front direction, the back direction, and the side direction.
[0007] Based on the target distance of the line segment and the pin direction, determine whether the target distance of the line segment meets the preset standard distance.
[0008] In one possible embodiment, determining the line segments of the pin blocks based on the printed circuit board assembly model, and determining the target distance from each line segment to the pad boundary, includes:
[0009] The pin vertices of the pin blocks are determined from the circuit board assembly model, and four line segments are formed by multiple pin vertices.
[0010] Determine the pad vertex of the pad;
[0011] The target distance from each line segment to the pad boundary is determined based on the pad vertex and the pin block center point.
[0012] In one possible embodiment, determining the target distance from each line segment to the pad boundary based on the pad vertex and the pin block center point includes:
[0013] Determine the center point of the pin block, and determine the first ray of the line segment based on the center point of the pin block and the first target point, wherein the first target point is the point in the line segment that is closest to the center point of the pin block;
[0014] Determine the pad vertex, and determine the second ray of the line segment based on the pad vertex and the second target point, wherein the second target point is the point in the extension line of the line segment that is closest to the pad vertex;
[0015] Determine whether the directions of the first ray and the second ray are the same;
[0016] If the first ray and the second ray are in opposite directions, then the distance between the pad vertex and the second target point in the second ray is determined as the target distance from the line segment to the pad boundary.
[0017] In one possible embodiment, the pin orientation corresponding to the line segment is determined based on the distance from the line segment to the center point of the pad group:
[0018] Determine a first distance between the first line segment and the center point of the pad group, and determine a second distance between the second line segment and the center point of the pad group, wherein the first line segment and the second line segment are two parallel line segments among the four line segments;
[0019] Calculate the difference between the first distance and the second distance;
[0020] If the difference is equal to the preset difference, then the pin directions corresponding to the four line segments are determined based on the first distance and the second distance, respectively.
[0021] If the difference is not equal to the preset difference, then the length of the four line segments is determined, and the direction corresponding to the four line segments is determined based on the length of the line segments.
[0022] In one possible embodiment, determining the corresponding directions of the four line segments based on the first distance and the second distance includes:
[0023] If the first distance is greater than the second distance, then the pin direction of the line segment corresponding to the first distance is marked as the front direction, and the pin direction of the line segment corresponding to the second distance is marked as the back direction.
[0024] The pin directions of the third and fourth line segments, which are perpendicular to the first and second line segments, are marked as the foot-side directions.
[0025] In one possible embodiment, determining the lengths of the four line segments and determining the directions of the four line segments based on the lengths of the line segments includes:
[0026] The lengths of the four line segments are determined. If the length of the first line segment is greater than the length of the third line segment, the pin directions corresponding to the four line segments are determined based on the first distance and the second distance.
[0027] In one possible embodiment, before determining the line segments of the pin blocks based on the printed circuit board assembly model and determining the target distances from the line segments to the pad boundaries, the method further includes:
[0028] The circuit board assembly model is constructed based on the printed circuit board production documents.
[0029] As another aspect of this application, a device for detecting the distance between a pin and a pad boundary is provided, comprising:
[0030] The distance determination module is used to determine the line segments of the pin blocks based on the printed circuit board assembly model, and to determine the target distance from the line segment to the pad boundary respectively;
[0031] A direction determination module is used to determine the pin direction of the line segment based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front pin direction, the back pin direction, and the side pin direction;
[0032] The distance comparison module is used to determine whether the target distance of the line segment meets the preset standard distance based on the target distance of the line segment and the pin direction.
[0033] As a third aspect of this application, an electronic device is provided, the electronic device comprising:
[0034] Processor; and
[0035] Memory used to store processor-executable information;
[0036] The processor is used to execute the method for detecting the distance between the pin and the pad boundary as described above.
[0037] As a third aspect of this application, a computer-readable storage medium is provided, on which a detection program for the distance between a pin and a pad boundary is stored, the detection program being executed by a processor to implement the steps of the method described above.
[0038] Compared to existing technologies, this application provides a method, apparatus, and electronic device for detecting the distance between pins and pad boundaries. The method includes determining line segments of pin blocks based on a printed circuit board assembly model, and determining the target distance from each line segment to the pad boundary; determining the pin direction of the line segment based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes a forward direction, a backward direction, and a side direction; and determining whether the target distance of the line segment meets a preset standard distance based on the target distance and the pin direction. Thus, the target distance between pin blocks and pads is detected based on a printed circuit board assembly model, reducing the cost of distance detection. Attached Figure Description
[0039] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0040] Figure 1 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to an embodiment of this application.
[0041] Figure 2 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to another embodiment of this application.
[0042] Figure 3 The diagram shown is a scenario illustration of a method for detecting the distance between a pin and a pad boundary provided in an embodiment of this application.
[0043] Figure 4 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to another embodiment of this application.
[0044] Figure 5 The diagram shown is another scenario illustration of a method for detecting the distance between a pin and a pad boundary provided in an embodiment of this application.
[0045] Figure 6The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to another embodiment of this application.
[0046] Figure 7 The diagram shown is a schematic representation of a pin-pad boundary distance detection device provided in an embodiment of this application.
[0047] Figure 8 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.
[0048] Specific implementation methods
[0049] In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, top, bottom, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movement of the components in a specific posture (as shown in the figures). If the specific posture changes, the directional indication will also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0050] Furthermore, the reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0052] Figure 1 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to an embodiment of this application. Figure 1 As shown, the steps of the method for detecting the distance between the pin and the pad boundary include:
[0053] Step S101: Determine the line segments of the pin blocks based on the printed circuit board assembly model, and determine the target distance from the line segment to the pad boundary respectively;
[0054] A printed circuit board (PCB) assembly model simulates the finished PCB assembly and allows us to understand various characteristics of the finished PCB assembly. Therefore, this embodiment can determine the distance between component pins and pad boundaries based on the PCB assembly model.
[0055] After obtaining the printed circuit board assembly model, the pins corresponding to each component are determined, and multiple pins corresponding to one component are marked as multiple pin blocks. Generally, the overall shape of the pin block is similar to a rectangle. Therefore, the four line segments of the outermost rectangle of the pin block can be further determined based on the outline of the pin block. Generally, the shape of the pad is rectangular, elliptical, or approximately rectangular, and its structure is not necessarily a straight line. In this embodiment, irregular pads are approximated as rectangles. Thus, the four line segments of the pin block are all within the rectangle represented by the pad block. Therefore, each line segment of the pin block has a certain distance from the boundary of the corresponding pad, where the boundary of the corresponding pad refers to the pad boundary that is parallel to the line segment and closest to it. This is the target distance, and thus the four target distances corresponding to the four line segments can be obtained respectively.
[0056] Step S102: Determine the pin direction of the line segment based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front direction, the back direction, and the side direction.
[0057] In this embodiment, the pad group is a pad corresponding to all the pins of a single component. The pin direction corresponding to the line segment farthest from the center point of the pad group is the front pin direction, the pin direction corresponding to another line segment parallel to the front pin direction is the back pin direction, and the two line segments perpendicular to the front pin direction line segment are the side pin directions.
[0058] Step S103: Determine whether the target distance of the line segment meets the preset standard distance based on the target distance of the line segment and the pin direction.
[0059] During PCB assembly, the pick-and-place machine uses solder paste according to a preset program to achieve a stable connection between component leads and pads. The boundary between component leads and pads needs to be limited within a certain range to ensure uniform heating of the solder paste between the component leads and pads, thereby achieving a uniform and stable connection.
[0060] Understandably, since each line segment is located at a different position on the pad, the preset distance requirement from each line segment to the pad boundary is also different.
[0061] The four line segments that make up a certain pin block in different pin directions are represented as a1, a2, b1, and b2, respectively. The pin direction of a1 is the front direction, the pin direction of a2 is the back direction, and the pin directions of b1 and b2 are the side directions. The pad boundaries corresponding to each line segment are represented as c1, c2, d1, and d2. The distance between a1 and c1 is represented as Lac1, the distance between a2 and c2 as Lac2, the distance between b1 and d1 as Lbd1, and the distance between b2 and d2 as Lbd2. The corresponding preset standard distances are shown in Table 1.
[0062] Table 1. Correspondence between line segments, pad boundaries, and their distances
[0063] a1 c1 Lac1 La a2 c2 Lac2 La* b1 d1 Lbd1 Lb b2 d2 Lbd2 Lb*
[0064] Thus, based on Table 1, each target distance is compared with the corresponding preset standard distance. If the target distance meets the preset standard distance, it means that the target distance meets the requirements; otherwise, if the target distance does not meet the preset standard distance, it means that the target distance does not meet the requirements.
[0065] This embodiment, through the above-described scheme, determines the line segments of the pin blocks based on the printed circuit board assembly model, and determines the target distance from each line segment to the pad boundary; it determines the pin direction of the line segment based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front direction, the back direction, and the side direction; and it determines whether the target distance of the line segment meets the preset standard distance based on the target distance and the pin direction. Therefore, based on the printed circuit board assembly model, the target distance between the pin blocks and the pads is detected, reducing the cost of distance detection.
[0066] Figure 2 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to an embodiment of this application. Figure 2 As shown, step S101 includes:
[0067] Step S1011: Determine the block vertices of the pin blocks from the circuit board assembly model, and determine the four line segments formed by the multiple block vertices;
[0068] The pin block is a quadrilateral, and its vertices are the four vertices of the quadrilateral. The line connecting any two adjacent vertices is a line segment, and four vertices can be obtained to form four line segments. These four line segments form the outline of the pin block.
[0069] Step S1012: Determine the pad vertex of the pad;
[0070] The shape of a pad is generally rectangular, elliptical, or approximately rectangular. Its structure is not necessarily a straight line. Therefore, the pad boundary is composed of many points, which are called the pad boundary vertices.
[0071] In reality, not all pad blocks are quadrilaterals. When the pad boundary is a curve, it is assumed that the outline is composed of multiple vertices. Calculations are performed on each vertex, and a suitable pad vertex is selected for distance calculation.
[0072] Step S1013: Determine the target distance from each line segment to the pad boundary based on the pad vertex and the pin block center point.
[0073] Determine the center point M of the pin block, and determine the first ray MN of the line segment based on the center point of the pin block and the first target point N, wherein the first target point is the point in the line segment that is closest to the center point of the pin block; for example, for line segment a1, the first target point is the point N in line segment a1 that is closest to the center point M of the pin block.
[0074] The pad vertex is determined, and the second ray A1O of the line segment is determined based on the pad boundary vertex and the second target point O, wherein the second target point O is the point in the extension line of the line segment that is closest to the pad vertex.
[0075] Determine whether the directions of the first ray and the second ray are the same;
[0076] If the first ray and the second ray are in opposite directions, then the distance between the pad vertex and the second target point in the second ray is determined as the target distance from the line segment to the pad boundary.
[0077] If the first ray and the second ray have the same direction, then the second ray is discarded.
[0078] Mark the straight-line distance from the vertex of the pad boundary to the line segment a1. Since the extension of a1 divides the pad vertex into two parts, there will be two distances in opposite directions from the pad vertex to the line segment a1.
[0079] Traverse all pad vertices, determine the distances from the pad vertex to line segment a1 that are in the same direction as the first ray, and mark the distance values as negative.
[0080] Remove all pad vertices with negative distance values.
[0081] The vertex with the largest straight-line distance from the remaining pad vertices to line segment a1 is designated as the second ray endpoint A1, where the endpoint of A1 with a straight-line distance of 0 from line segment a1 is 0.
[0082] The distance 0 between the pad vertex A1 in the second ray and the second target point is defined as the target distance from the line segment to the pad boundary.
[0083] Figure 3 The diagram shown is a scenario illustration of a method for detecting the distance between a pin and a pad boundary according to an embodiment of this application. Figure 3 As shown, the first ray MN and the second ray A1O have opposite directions, so the distance between the pad vertex A1 in the second ray A1O and the second target point O is the target distance.
[0084] This embodiment uses the above scheme to determine the line segments of the pin blocks based on the printed circuit board assembly model, and determines the target distance from the line segment to the pad boundary. Thus, the target distance is determined based on the printed circuit board assembly model, laying the foundation for detection based on the target distance.
[0085] Figure 4 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to an embodiment of this application. Figure 4 As shown, step S102 includes:
[0086] Step S1021: Determine the first distance between the first line segment and the center point of the pad group, and determine the second distance between the second line segment and the center point of the pad group, wherein the first line segment and the second line segment are two parallel line segments among the four line segments;
[0087] Figure 5 The diagram shown illustrates another scenario of a method for detecting the distance between a pin and a pad boundary, as provided in an embodiment of this application. Figure 5 As shown, the center point of the pad group is Q, the first line segment is a1, the second line segment is a2, then the first distance is L1, and the second distance is L2. The other two line segments perpendicular to the first line segment a1 and the second line segment a2 are b1 and b2.
[0088] Step S1022: Calculate the difference between the first distance and the second distance; that is, the difference between L2 and L1.
[0089] Step S1023: If the difference is equal to the preset difference, the pin direction corresponding to the four line segments is determined based on the first distance and the second distance respectively; generally, if there are two pin blocks on the pad, a difference equal to the preset difference can be obtained, and the preset difference is the length of the pin block.
[0090] If the first distance is greater than the second distance, then the pin direction of the line segment corresponding to the first distance is marked as the foot-forward direction, that is, L1>L2, then a1 is the foot-forward direction; the pin direction of the line segment corresponding to the second distance is marked as the foot-back direction, that is, L1>L2, then a2 is the foot-back direction; the pin direction of the third and fourth line segments perpendicular to the first and second line segments is marked as the foot-side direction.
[0091] That is, the line segment closer to the center point of the pad group is the back direction, and the line segment farther from the center point of the pad group is the front direction.
[0092] On the other hand, the vertical distance between line segments b1 and b2 and the center point Q of the pad group can be calculated. When there are only 2 pads, the difference in the vertical distance between line segments b1 and b2 and the center point Q of the pad group is less than the width of the pin. Thus, the pin side direction can be obtained.
[0093] Step S1024: If the difference is not equal to the preset difference, then determine the length of the four line segments, and determine the direction corresponding to the four line segments based on the length of the line segments.
[0094] The lengths of the four line segments are determined. If the length of the first line segment is greater than the length of the third line segment, the pin directions corresponding to the four line segments are determined based on the first distance and the second distance.
[0095] If the number of pin blocks corresponding to the pad group is greater than 2, for example, if there are 4 or 8 pin blocks side by side, the distance from the two sets of line segments to the center point Q of the pad group will be different, one being equal to the width and the other equal to the length, making it impossible to distinguish. Therefore, it is necessary to further determine the length of the line segments.
[0096] Specifically, the four line segments are divided into two groups according to their lengths. The first group consists of line segment a1 and line segment a2, where a1 and a2 have the same length. The second group consists of line segment b1 and line segment b2, where b1 and b2 have the same length. The lengths of each line segment are determined, and the lengths of the two groups are compared (i.e., comparing the lengths of line segment a1 and line segment b1, or comparing the lengths of line segment a2 and line segment b2). Based on the comparison results, the direction of the longer group of line segments is determined as the foot-side direction, and the direction of the shorter group of line segments is determined as the foot-forward-foot-backward direction. The line segment closer to the center point of the pad group is the foot-backward direction, and the line segment farther from the center point of the pad group is the foot-forward direction.
[0097] In this embodiment, after obtaining the length of the line segment and the target distance, the pin direction of the line segment is determined based on the distance from the line segment to the center point of the pad group, which helps to determine whether the target distance meets the requirements.
[0098] Figure 6 The diagram shown is a flowchart illustrating a method for detecting the distance between a pin and a pad boundary according to an embodiment of this application. Figure 6 As shown, the procedure before step S101 also includes:
[0099] Step S100: Construct the above circuit board assembly model based on the printed circuit board production file.
[0100] The printed circuit board (PCB) production documents include Gerber files, bill of materials (BOM) files, and coordinate files. The process of constructing a PCB assembly model based on the PCB production documents and BOM files includes:
[0101] Based on the Gerber file, obtain the model data of the printed circuit board;
[0102] According to the bill of materials file, obtain the parameter information of the components assembled on the printed circuit board, and match and search the model data of multiple components assembled on the printed circuit board in the component model database according to the parameter information of the components assembled on the printed circuit board.
[0103] Based on the coordinate file, obtain the position information of the components assembled on the printed circuit board on the printed circuit board; and
[0104] The circuit board assembly model is generated based on the model data of the printed circuit board, the model data of the components assembled on the printed circuit board, and the position information of the multiple components assembled on the printed circuit board on the circuit board.
[0105] This embodiment constructs a printed circuit board assembly model using Gerber files, bill of materials files, and coordinate files. This model is used to detect the distance between component pins and pads, thus eliminating the need to create a printed circuit board template and significantly reducing testing costs.
[0106] As another aspect of this application, a detection device for the distance between a pin and a pad boundary is provided, with reference to... Figure 7 , Figure 7 The diagram shown is a schematic representation of a pin-pad boundary distance detection device provided in an embodiment of this application; as shown... Figure 7 As shown, the device for detecting the distance between the pin and the pad boundary includes:
[0107] The distance determination module 10 is used to determine the line segments of the pin blocks based on the printed circuit board assembly model, and to determine the target distance from the line segment to the pad boundary respectively.
[0108] The direction determination module 11 is used to determine the pin direction of the line segment based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front direction, the back direction, and the side direction.
[0109] The distance comparison module 12 is used to determine whether the target distance of the line segment meets the preset standard distance based on the target distance of the line segment and the pin direction.
[0110] Below, for reference Figure 8 This describes an electronic device according to embodiments of the present application. Figure 8 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.
[0111] like Figure 8 As shown, the electronic device 600 includes one or more processors 601 and memory 602.
[0112] The processor 601 may be a central processing unit (CPU) or other form of processing unit with data processing and / or information execution capabilities, and may control other components in the electronic device 600 to perform desired functions.
[0113] The memory 602 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program information may be stored on the computer-readable storage medium, and the processor 601 may run the program information to implement the pin-pad boundary distance detection method or other desired functions described in the various embodiments of this application above.
[0114] In one example, the electronic device 600 may also include an input device 603 and an output device 604, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0115] The input device 603 may include, for example, a keyboard, a mouse, etc.
[0116] The output device 604 can output various information to the outside. The output device 604 may include, for example, a display, a communication network, and remote output devices connected thereto.
[0117] Of course, for the sake of simplicity, Figure 8Only some of the components of the electronic device 600 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 600 may include any other suitable components depending on the specific application.
[0118] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program information that, when run by a processor, causes the processor to perform the steps in the methods for detecting the distance between pins and pad boundaries according to various embodiments of this application as described in this specification.
[0119] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0120] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program information thereon, which, when run by a processor, causes the processor to perform the steps in the method for detecting the distance between pins and pad boundaries according to various embodiments of this application.
[0121] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0122] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0123] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0124] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0125] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features of the invention herein.
[0126] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Any modifications or equivalent substitutions made within the spirit and principles of the present application shall be included within the protection scope of the present application.
Claims
1. A method for detecting the distance between a pin and the boundary of a pad, characterized in that, include: The pin segments are determined based on the printed circuit board assembly model, and the target distance from each segment to the pad boundary is determined. The pin direction of the line segment is determined based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front direction, the back direction, and the side direction. Based on the target distance and the pin direction, determine whether the target distance of the line segment meets the preset standard distance; Determining the pin direction of the line segment based on the distance from the line segment to the center point of the pad group includes: Determine a first distance between the first line segment and the center point of the pad group, and determine a second distance between the second line segment and the center point of the pad group, wherein the first line segment and the second line segment are two parallel line segments among the four line segments; Calculate the difference between the first distance and the second distance; If the difference is equal to the preset difference, then the pin directions corresponding to the four line segments are determined based on the first distance and the second distance, respectively. If the difference is not equal to the preset difference, then the length of the four line segments is determined, and the direction corresponding to the four line segments is determined based on the length of the line segments.
2. The method according to claim 1, characterized in that, The process of determining the line segments for pin partitioning based on the printed circuit board assembly model, and determining the target distance from each line segment to the pad boundary, includes: The pin vertices of the pin blocks are determined from the circuit board assembly model, and four line segments are formed by multiple pin vertices. Determine the pad vertex of the pad; The target distance from each line segment to the pad boundary is determined based on the pad vertex and the pin block center point.
3. The method according to claim 2, characterized in that, The determination of the target distance from each line segment to the pad boundary based on the pad vertex and the pin block center point includes: Determine the center point of the pin block, and determine the first ray of the line segment based on the center point of the pin block and the first target point, wherein the first target point is the point in the line segment that is closest to the center point of the pin block; Determine the pad vertex, and determine the second ray of the line segment based on the pad vertex and the second target point, wherein the second target point is the point in the extension line of the line segment that is closest to the pad vertex; Determine whether the directions of the first ray and the second ray are the same; If the first ray and the second ray are in opposite directions, then the distance between the pad vertex and the second target point in the second ray is determined as the target distance from the line segment to the pad boundary.
4. The method according to claim 1, characterized in that, The step of determining the corresponding directions of the four line segments based on the first distance and the second distance includes: If the first distance is greater than the second distance, then the pin direction of the line segment corresponding to the first distance is marked as the front direction, and the pin direction of the line segment corresponding to the second distance is marked as the back direction. The pin directions of the third and fourth line segments, which are perpendicular to the first and second line segments, are marked as the foot-side directions.
5. The method according to claim 1, characterized in that, Determining the lengths of the four line segments and determining the directions of the four line segments based on their lengths includes: The lengths of the four line segments are determined. If the length of the first line segment is greater than the length of the third line segment, the pin directions corresponding to the four line segments are determined based on the first distance and the second distance, wherein the first line segment and the third line segment are perpendicular to each other.
6. The method according to claim 1, characterized in that, Before determining the line segments for pin partitioning based on the printed circuit board assembly model, and determining the target distance from each line segment to the pad boundary, the method further includes: The circuit board assembly model is constructed based on the printed circuit board production documents.
7. A device for detecting the distance between a pin and a pad boundary, applied to the method for detecting the distance between a pin and a pad boundary as described in claim 1, characterized in that, include: The distance determination module is used to determine the line segments of the pin blocks based on the printed circuit board assembly model, and to determine the target distance from the line segment to the pad boundary respectively; A direction determination module is used to determine the pin direction of the line segment based on the distance from the line segment to the center point of the pad group, wherein the pin direction includes the front pin direction, the back pin direction, and the side pin direction; The distance comparison module is used to determine whether the target distance of the line segment meets the preset standard distance based on the target distance of the line segment and the pin direction.
8. An electronic device, characterized in that, The electronic device includes: Processor; and Memory used to store processor-executable information; The processor is used to execute the method for detecting the distance between the pin and the pad boundary as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a detection program for the distance between a pin and a pad boundary, which is executed by a processor to implement the steps of the method as described in any one of claims 1-6.