PCB design drawing detection method, device, equipment and medium

文档序号:1831755 发布日期:2021-11-12 浏览:9次 中文

阅读说明:本技术 Pcb设计图的检测方法、装置、设备及介质 (PCB design drawing detection method, device, equipment and medium ) 是由 兰银华 于 2020-04-27 设计创作,主要内容包括:本发明实施例公开了一种PCB设计图的检测方法、装置、设备及介质。所述方法包括:确定PCB设计图中的目标对象区域和限制区域;构建目标对象区域的目标外接边框和限制区域的限制外接边框;对目标外接边框和限制外接边框进行边框相交检测,用以确定两个外接边框是否相交;依据边框相交检测结果,确定目标对象区域在所述PCB设计图中的设计位置是否满足设计要求。采用本申请的方案,能够借助构建的外接图形之间的相交结果,来自动识别PCB设计图中的器件封装区或丝印区是否出现位置设计错误,提高PCB设计图的检测效率;并且由于是对外接图形之间的相交性进行检测,因此能将不符合要求的目标对象区域最大程度的筛选处理,提高了PCB设计图的检测准确率。(The embodiment of the invention discloses a method, a device, equipment and a medium for detecting a PCB design drawing. The method comprises the following steps: determining a target object area and a limiting area in the PCB design drawing; constructing a target external frame of the target object area and a limit external frame of the limit area; performing border intersection detection on the target external border and the limiting external border so as to determine whether the two external borders intersect; and determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result. By adopting the scheme, whether position design errors occur in a device packaging area or a silk-screen area in the PCB design drawing can be automatically identified by means of the intersection result between the constructed external connection patterns, and the detection efficiency of the PCB design drawing is improved; and because the intersection among the external graphs is detected, the target object area which does not meet the requirement can be screened to the maximum extent, and the detection accuracy of the PCB design drawing is improved.)

1. A method for detecting a PCB design drawing is characterized by comprising the following steps:

determining a target object area and a limiting area in the PCB design drawing;

constructing a target external border of the target object area and a limit external border of the limit area;

performing border intersection detection on the target circumscribed border and the limiting circumscribed border so as to determine whether the two circumscribed borders intersect;

and determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

2. The method of claim 1, wherein the target object comprises: packaging and/or silk-screen components arranged in the PCB design drawing; the restricted area includes at least one of: the PCB design drawing comprises a layout forbidding area, a height limiting area, a tooling area, a bright copper area and a component packaging area.

3. The method of claim 1, wherein constructing a target bounding box for the target object region and a bounding box for the bounding region comprises:

determining target area position information of a target object area in the PCB design drawing; constructing an external frame surrounding the target object area according to the position information of the target area, and determining the external frame as a target external frame;

determining the position information of the limited area in the PCB design drawing; and constructing an external frame surrounding the limited area according to the position information of the limited area, and determining the external frame as the limited external frame.

4. The method of claim 1, wherein performing border crossing detection on the target bounding box and the limit bounding box comprises:

determining a target frame position point associated with the target external frame, and determining a target straight line associated with the target frame position point; the target straight line comprises a straight line passing through the preset direction of the target frame position point;

and if the target straight line associated with the target position point is determined to have intersection points with the frame line segments of the external limiting frame, determining whether the target external frame is intersected with the external limiting frame according to the number of the intersection points positioned at the two sides of the target frame position point.

5. The method of claim 4, wherein determining whether the target bounding box intersects the limit bounding box according to the number of intersection points located on both sides of the target bounding box location point comprises:

if the number of the intersection points positioned at the two sides of the position point of the target frame is odd, determining that the target circumscribed frame is intersected with the limit circumscribed frame;

and if the number of the intersection points positioned at the two sides of the position point of the target frame is even, determining that the target external frame and the limit external frame do not intersect.

6. The method of claim 4, wherein performing border crossing detection on the target bounding box and the limit bounding box further comprises:

and if it is determined that the target straight line associated with each target frame position point does not have an intersection point with the frame line segment of the external limit frame, determining that the target external limit frame does not intersect with the external limit frame.

7. The method of claim 1, wherein determining whether a design position of the target object area in the PCB design drawing meets design requirements according to a border intersection detection result comprises:

if the two circumscribed frames are determined to be intersected, determining that the target object area is overlapped with the limited area in the PCB design drawing, and judging that the design position of the target object area does not meet the setting requirement;

and if the two circumscribed frames are not intersected, determining that the target object area is not overlapped with the limited area in the PCB design drawing, and judging that the design position of the target object area meets the setting requirement.

8. The method of claim 1, further comprising, after performing bounding box intersection detection on the target bounding box and the limit bounding box:

under the condition that the frame intersection detection result is determined, detecting whether the additional attribute information of the target object area is matched with the additional attribute information of the limited area; wherein the additional attribute information includes height information.

9. An apparatus for detecting PCB design drawings, the apparatus comprising:

the layout area determining module is used for determining a target object area and a limiting area in the PCB design drawing;

the external graph building module is used for building a target external frame of the target object area and a limit external frame of the limit area;

the external image detection module is used for carrying out frame intersection detection on the target external frame and the limiting external frame so as to determine whether the two external frames intersect;

and the PCB design drawing detection module is used for determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

10. An electronic device, comprising:

one or more processing devices;

storage means for storing one or more programs;

when executed by the one or more processing devices, cause the one or more processing devices to implement the method of PCB design inspection as recited in any of claims 1-8.

11. A medium having stored thereon a computer program, characterized in that the program, when executed by a processing means, implements the PCB design drawing inspection method of any of claims 1-8.

Technical Field

The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for detecting a PCB design drawing.

Background

A Printed Circuit Board (PCB) is an important electronic component, and is a carrier for electrical connection of various electronic components, and is applied to almost all electronic devices.

At present, due to production and processing limitations, structural limitations and related design requirements of a PCB, devices are forbidden to be placed in some areas, or intersection of certain two specific areas is forbidden, for example, whether the devices enter a tooling area or not, whether silk screen printing enters a bright copper area or not and the like are judged. However, these methods all require manual visual inspection, which is inefficient and causes problems of omission.

Disclosure of Invention

The embodiment of the invention provides a method, a device, equipment and a medium for detecting a PCB design drawing, which are used for efficiently detecting whether the layout of a component packaging area and a silk-screen area in the PCB design drawing is reasonable.

In a first aspect, an embodiment of the present invention provides a method for detecting a PCB design drawing, including:

determining a target object area and a limiting area in the PCB design drawing;

constructing a target external border of the target object area and a limit external border of the limit area;

performing border intersection detection on the target circumscribed border and the limiting circumscribed border so as to determine whether the two circumscribed borders intersect;

and determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

In a second aspect, an embodiment of the present invention further provides a device for detecting a PCB design drawing, including:

a layout area determination module for determining a target object area and a constraint area in the PCB design drawing

The circumscribed graph building module is used for building a target circumscribed frame of the target object area and a limit circumscribed frame of the limit area;

the external image detection module is used for carrying out frame intersection detection on the target external frame and the limiting external frame so as to determine whether the two external frames intersect;

and the PCB design drawing detection module is used for determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

In a third aspect, an embodiment of the present invention further provides an electronic device, including:

one or more processing devices;

storage means for storing one or more programs;

when the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the PCB design drawing detection method according to any of the embodiments of the present invention.

In a fourth aspect, an embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processing device, implements the method for detecting a PCB design drawing according to any one of the embodiments of the present invention.

The embodiment of the invention provides a method for detecting a PCB design drawing, which comprises the steps of respectively constructing a target external frame and a limit external frame of a target object area and a limit area in the PCB design drawing, determining whether the target object area enters the limit area by detecting the intersection result of the target external frame and the limit external frame, and further determining whether the design position of the target object area in the PCB design drawing is illegal according to the intersection detection result. By adopting the scheme, whether the layout of a component packaging area or a silk-screen area in the PCB design drawing is wrong or not can be automatically identified by means of the intersection result between the constructed external connection figures, so that the detection efficiency of the PCB design drawing is improved; and because the intersection among the external graphs is detected, the target object area which does not meet the requirement can be screened to the maximum extent, and the detection accuracy rate of the PCB design drawing is improved.

The above summary of the present invention is merely an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description in order to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.

Drawings

Other features, objects and advantages of the invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:

FIG. 1 is a flow chart of a PCB layout inspection method provided in an embodiment of the present invention;

FIG. 2 is a schematic diagram of a partial design of a target object region and a constraint region in a PCB design diagram according to an embodiment of the present invention;

fig. 3 is a schematic diagram of an external frame of a component packaging area and a character screen printing area provided in an embodiment of the present invention;

FIG. 4 is a flow chart of another PCB layout inspection method provided in embodiments of the present invention;

fig. 5 is a schematic diagram illustrating intersection detection between external frames according to an embodiment of the present invention;

fig. 6 is a schematic diagram illustrating intersection detection between bounding boxes according to another embodiment of the present invention;

fig. 7 is a schematic diagram illustrating an intersection detection between circumscribed frames according to another embodiment of the present disclosure;

FIG. 8 is a block diagram of a PCB layout detection apparatus provided in an embodiment of the present invention;

fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations (or steps) can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.

In order to better understand the scheme of the present application and the implementation effect of the scheme of the present application, the following briefly explains the relevant contents of the PCB design drawing. The method specifically comprises the following steps: when designing a PCB design drawing, a device packaging area for indicating the placement position of each device, for example, a resistor, a capacitor, a power supply, a chip, and other devices can be designed in the PCB design drawing; a packaging silk-screen area used for representing the range of the component packaging area can be designed on the periphery of each component packaging area in the PCB design drawing to distinguish the position range of each component packaging area; and designing a character silk-screen area for representing the label of each component packaging area near each component packaging area in the PCB design drawing to distinguish the packaging areas of different components.

In consideration of the manufacturing process and structural limitation of the PCB board, in the PCB design drawing, the placement of components is prohibited in some areas or two specific areas are prohibited from overlapping. For example, if the component packaging area enters the tooling area, the later-stage component insertion can be affected; if the silk-screen area enters the bright copper area, the flatness of the PCB is affected; if the height of the component exceeds the limit of the placement area, the installation of the structural component on the PCB board at the later stage can be influenced. For this reason, the PCB design needs to be checked to avoid the above design problems.

Fig. 1 is a flowchart of a method for detecting a PCB design drawing provided in an embodiment of the present invention. The embodiment can be applied to the condition of detecting the layout positions of partial areas in the PCB design drawing, in particular to the condition of reasonably detecting the layout positions of the component packaging area and the silk screen printing area in the PCB design drawing. The method can be executed by a PCB design drawing detection device, which can be realized in a software and/or hardware mode and integrated on any electronic equipment with a network communication function. The electronic device may be a computer device or a server. As shown in fig. 1, the method for detecting a PCB design drawing provided in this embodiment may include the following steps S110 to S140:

and S110, determining a target object area and a limiting area in the PCB design drawing.

In the present embodiment, the target object includes: packaging and/or silk-screen components arranged in the PCB design drawing; the restricted area includes at least one of: the PCB design drawing comprises a layout forbidding area, a height limiting area, a tooling area, a bright copper area and a component packaging area. Optionally, the target object area included in the PCB design drawing may be determined according to the detection requirement of the PCB design drawing. For example, a target object to be detected is determined from the PCB design drawing, and an area occupied by the target object in the PCB design drawing is used as a target object area. Meanwhile, the restriction area included in the PCB design drawing may be determined by presetting the restriction area in the PCB design drawing according to the restriction requirement of the PCB design drawing. The target object is mapped onto the PCB design drawing, and the area occupied in the PCB design drawing is marked as the target object area. The target object area is determined by the area range occupied by the target object in the PCB design drawing.

For example, one or more component packages and/or silk-screen printing required to be subjected to layout position rationality detection may be selected from each component package and/or silk-screen printing included in the PCB design drawing as target objects, and the target objects in the area occupied by the PCB design drawing may be used as target object areas for further detection. Meanwhile, when the layout design of the PCB design drawing is carried out, a limiting area can be marked in the PCB design drawing in advance according to the limiting requirement; for example, the restricted areas in the PCB design may include: the regions of forbidden distribution region, height limit region, tool region and bright copper region. Optionally, if it is required to detect whether two component packages overlap, the component package region of another component may be used as a limiting region. Optionally, if the problem that the screen printing area enters the component packaging area needs to be considered, for example, after the screen printing area enters the component packaging area, the components mounted on the PCB board at the later stage may block the screen printing at the bottom, and at this time, the component packaging area may also be used as the limiting area. Which the restricted area in the PCB design is specific to may be set according to the type of the target object.

In an alternative example, when the target object is a component package on a PCB design drawing, the target object area is an area occupied by the component package in the PCB design drawing. Rather, the restricted area in the PCB design may include at least one of: the PCB design drawing comprises a layout forbidding area, a height limiting area, a tooling area and a bright copper area. In another alternative example, when the target object is a component package, the target object area is an area occupied by the target object in the PCB design drawing. The limited area in the PCB design may be the area occupied by another component package in the PCB design. Alternatively, given that the PCB design drawing is designed in practice with no component package regions normally in contact with the bright copper regions, the limited area in the PCB design drawing may not include bright copper regions, provided that "component packages" are the target object.

In yet another optional example, when the target object is a silk screen on the PCB design, the target object area is an area occupied by the silk screen in the PCB design. And, the restricted area in the PCB design drawing may include at least one of the following: the PCB design drawing comprises a layout forbidding area, a height limiting area, a bright copper area, a tooling area and a component packaging area. The silk-screen area may be an area occupied by silk-screen characters in a PCB design drawing, for example, the silk-screen characters are used for representing silk-screen of the labels of the component packaging area; the silk-screen area may also be silk-screen lines, for example, the silk-screen lines may be silk-screen for delineating a range of locations of the component packaging area. Alternatively, considering that the thickness of the silk screen in the PCB design is extremely thin, even if the height-limiting region in the PCB design is entered, the limited region in the PCB design may not include the height-limiting region, provided that "silk screen" is the target object. Optionally, after the components are attached to the circuit board of the PCB design drawing, the tooling is removed, and even if the screen printing is blocked, the tooling is displayed at the back, so that if the screen printing is used as a target object, the limited area in the PCB design drawing may not include the tooling area.

Exemplarily, fig. 2 is a schematic partial design diagram of a target object region and a limited region in a PCB design diagram provided in an embodiment of the present invention. Referring to fig. 2, wherein the target object may be: the PCB design drawing comprises resistor component packaging, packaging silk-screen printing or character silk-screen printing, and the target object area can be the area occupied by the target object in the PCB design drawing; for example, the target object region may be: a resistor component packaging area, a packaging silk-screen area or a character silk-screen area. However, the restricted area in the PCB design may be: and forbidding regions in the PCB design drawing. As can be seen from fig. 2, the "resistor" device packaging area, the packaging screen printing area, and the "P1" character screen printing area all enter the distribution prohibition area. Therefore, the PCB cannot be processed because the component packaging area enters the layout forbidding area; and because the packaging silk-screen area and the 'P1' character silk-screen area enter the layout forbidding area, the flatness of the PCB is affected, and the design of the PCB design drawing is not satisfactory.

S120, constructing a target external frame of the target object area and a limit external frame of the limit area in the PCB design drawing.

In this embodiment, in order to efficiently and quickly detect whether the layout position of the target object region in the PCB design drawing is reasonable, a concept of converting the target object region is introduced in the present application, and the target object region and the limited region in the PCB design drawing are respectively converted into some regular or irregular circumscribed graphs surrounding the target object region or the limited region, which are a target circumscribed frame constructed for the target object region and a limited circumscribed frame constructed for the limited region. Therefore, when whether the target object area enters the limited area or not is determined, the process of detecting the overlapping between the areas is converted into the process of detecting the intersection between the circumscribed graphs, and therefore whether the target object area enters the limited area or not can be determined only by determining whether the circumscribed graphs of the two areas are intersected or not.

Exemplarily, fig. 3 is a schematic diagram of an external frame of a component packaging area and a character silk-screen area provided in an embodiment of the present invention. Referring to fig. 3, components, copper foils, characters and the like on the PCB may be converted into irregular circumscribed frame patterns according to the maximum values of their respective projection ranges, and accordingly, regular or irregular circumscribed frame patterns may be constructed on the peripheries of the limited areas, such as the component packaging area, the screen printing area, and the like, included in the PCB design drawing.

In an alternative manner of this embodiment, constructing the target bounding box of the target object region and the limit bounding box of the limit region in the PCB design drawing may include steps a1-a 2:

step A1, determining the position information of the target object area in the PCB design drawing; and constructing an external frame surrounding the target object area according to the position information of the target area, and determining the external frame as the target external frame.

In this embodiment, when the PCB design drawing is manufactured, the area position information in the PCB design drawing is recorded according to the package and the screen printing of each component, the area position information in the PCB design drawing is recorded, and the area position information is stored in real time according to certain parameter information. When a target circumscribed frame of a target object area in the PCB design drawing needs to be constructed, the position information of the target object area in the target area of the PCB design drawing can be determined directly from the recorded parameter information of the target object. The target area position information may include position point information for describing a position of an outline boundary of the target object area in the PCB design drawing.

In this embodiment, after the position points and the coordinate information of the position points for characterizing the contour boundary of the target object region are determined, a circumscribed frame surrounding the target object region may be constructed outside the target object region according to the position points, and at least part of the constructed circumscribed frame may be tangent to at least part of the outside boundary line of the target object region. For example, taking the component packaging area or the character silk-screen area shown in fig. 3 as an example, the leftmost position point, the rightmost position point, the topmost position point, and the bottommost position point of the component packaging area or the character silk-screen area may be found, so that a rectangular external frame may be constructed outside the component packaging area or the character silk-screen area according to the four position points. Of course, the constructed target bounding box may be a regular polygon or an irregular polygon.

Step A2, determining the position information of the limited area in the PCB design drawing; and constructing a circumscribed frame surrounding the limited area according to the position information of the limited area, and determining the circumscribed frame as the limited circumscribed frame.

In this embodiment, when the PCB design drawing is manufactured, the area position information of each restricted area in the PCB design drawing is recorded according to the layout setting of each restricted area, and is stored in real time according to certain parameter information. Similar to the construction process of the target bounding box of the target object area, the position point information for describing the position of the outline boundary of the limited area in the PCB design drawing can be searched and recorded as the position information of the limited area. Then, constructing an external frame surrounding the limiting area according to the obtained position points of the plurality of limiting areas, and enabling at least part of the constructed external frame to be tangent to at least part of the outer side boundary line of the limiting area.

In this embodiment, the target bounding box and the limit bounding box are both closed polygons. Because the size and the shape of each target object area are different in the PCB design drawing, different polygons can be constructed among the constructed target circumscribed frames, and the same polygons can also be constructed among the constructed target circumscribed frames. Meanwhile, in the PCB design drawing, the sizes and shapes of the respective limiting areas are different, so that the respective limiting circumscribed frames constructed may be the same or different irregular polygons, which will be described in detail later.

And S130, performing border intersection detection on the target circumscribed border and the limiting circumscribed border so as to determine whether the two circumscribed borders intersect.

In this embodiment, after the target bounding box of the target object area and the limiting bounding box of the limiting area are constructed, whether the two bounding boxes intersect with each other can be detected. Optionally, whether the target bounding box and the limit bounding box intersect may be detected according to position point information included in the target bounding box and position points included in the limit bounding box.

In this embodiment, optionally, because the number of the target object areas such as the component packaging area and the silk screen area in the PCB design drawing is large, when constructing the external frame of the target object area, a rectangular external frame or an external frame similar to the outline of the target object area may be constructed on the periphery of the target object area, and the rectangular external frame or the external frame is used as the target external frame of the target object area. The method has the advantages that when the target circumscribed frame is constructed, the construction calculation amount of the circumscribed frame cannot be greatly increased due to too many target object areas, and meanwhile, the circumscribed frame can be constructed to ensure that the circumscribed frame cannot deviate from the target object area due to too large number.

In an alternative example, for a bounding box that approximates the outline of the target object region (or a rectangular bounding box), the graph of the bounding box does not need to be consistent with the outline of the target object region during construction, but only the ratio of the area between the target object region and the constructed bounding box that approximates the outline of the target object region (or the rectangular bounding box) is ensured to be within a preset threshold. The method has the advantages that the target circumscribed frame of the constructed target object region can be ensured not to be too large, because if the target circumscribed frame is too large, when the circumscribed frame is intersected with the circumscribed frame of the limited region, the target object region is not actually intersected with the limited region, so that the target object region and the limited region are judged to be overlapped by mistake to a certain extent; meanwhile, the target circumscribed frame of the constructed target object region can be ensured not to be too small, because if the constructed target circumscribed frame is too small, for example, the constructed target circumscribed frame is kept consistent with the region outline of the target object region, if the target object region is an irregular region, the construction process of the target circumscribed frame becomes very complicated, and the construction calculation amount is increased.

In this embodiment, optionally, for the component package in the PCB design drawing, an area occupied by the component package in the PCB design drawing is generally a relatively regular area, and therefore, when the component package is used as a target object, an outline and a size of a target bounding box of a constructed target object area may be consistent with an outline and a size of an area of the target object area. Optionally, for the silk-screen printing in the PCB design drawing, the area occupied by the silk-screen printing in the PCB design drawing is usually a somewhat irregular area, for example, a silk-screen printing symbol "2", and so on, and therefore, when the silk-screen printing is taken as the target object, the shape and size of the target circumscribed frame of the constructed target object area may be different from the shape and size of the area of the target object area, as long as it is ensured that a rectangular circumscribed frame or a circumscribed frame approximating the outline of the target object area is constructed on the periphery of the target object area.

In this embodiment, optionally, the device package area is not used as the limiting area, and the layout prohibition area, the height limit area, the tooling area, and the bright copper area in the PCB design drawing are used as the limiting area. In this case, since the number of the restricted areas is relatively small, when constructing the circumscribed frame of the restricted area, the circumscribed frame that matches the outline shape of the restricted area can be constructed as the circumscribed frame of the restricted area. The advantage of doing so is that, as the shape of the constructed circumscribed frame is closer to the area outline of the restricted area, the more the restricted area is equal to the restricted circumscribed frame, then when performing frame intersection detection, it can be directly considered that the target circumscribed frame and the restricted area are performing intersection detection by themselves; in addition, since the number of the limited regions is small, the number of calculation steps for constructing the limited bounding box having the same outline as the limited region is not increased significantly, unlike the target bounding box for the target object region, because the number of the target object regions is larger than the number of the limited regions.

S140, determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

In this embodiment, if it is determined that the two circumscribed frames intersect, it is determined that the target object region overlaps the limited region in the PCB design drawing, and at this time, if the PCB circuit board is produced according to the current PCB design drawing, the target object is soldered in the limited region in the actual PCB circuit board, which causes a problem, and therefore it is necessary to determine that the design position of the target object region on the PCB design drawing does not meet the setting requirement, and simultaneously, an alarm may be issued. If the two circumscribed frames are determined not to intersect, it is determined that the target object area is not overlapped with the limited area in the PCB design drawing, and then the overlapping problem does not occur in the actually generated PCB, so that the design of the target object area on the PCB design drawing is determined to meet the setting requirement.

In this embodiment, optionally, a highlight or other prompting method may be adopted on the PCB design drawing to mark the target object region that does not meet the requirement. Alternatively, the basic information of the unsatisfactory target object area may be presented in a list form at a preset position of the PCB design drawing, and the target object area may be highlighted on the PCB design drawing when the basic information of the target object area is clicked. Therefore, the target object area with problems can be positioned in time, modification is convenient, and the modification time of the PCB design drawing is saved.

The embodiment of the invention provides a method for detecting a PCB design drawing, which is characterized in that a target external frame and a limit external frame are respectively constructed aiming at a target object area and a limit area in the PCB design drawing, whether the target object area enters the limit area for layout is determined by detecting the intersection of the target external frame and the limit external frame, and whether the design position of the target object area in the PCB design drawing is reasonable is determined according to the intersection detection result. By adopting the scheme, whether position design errors occur in the layout of the device packaging area or the silk screen printing area in the PCB design drawing can be automatically identified by means of the intersection result between the constructed external frame graphs, and the detection efficiency of the PCB design drawing is improved; moreover, because the intersection among the external graphs is detected, the target object area which does not meet the requirement can be screened to the maximum extent, and the detection accuracy of the PCB design drawing is improved; in addition, omission of the target object region which does not meet the requirement in the detection process can be avoided through efficient and accurate detection, and production rework and increase of the approximate production cost caused by the omission are avoided.

Fig. 4 is a flow chart of another PCB design drawing detection method provided in an embodiment of the present invention, which is further optimized based on the above embodiment, and the embodiment of the present invention may be combined with various alternatives in one or more of the above embodiments. As shown in fig. 4, the method for detecting a PCB design drawing provided in this embodiment may include the following steps S410 to S440:

and S410, determining a target object area and a limiting area in the PCB design drawing.

And S420, constructing a target external frame of the target object area and a limit external frame of the limit area in the PCB design drawing.

S430, determining target frame position points related to the target external frame, and determining target straight lines related to the target frame position points; the target straight line comprises a straight line passing through the preset direction of the target frame position point.

In this embodiment, the target frame position point associated with the target bounding frame may be a point on a frame line segment of the target bounding frame. For example, the target bounding box may be a dashed bounding box consisting of a set of multiple target bounding box location points; or, the border line segment on the target circumscribed border is associated with a plurality of target border position points. When constructing the circumscribed frame of the target object region, the target frame position points associated with the target circumscribed frame can be recorded. Optionally, the target circumscribed frame and the limiting circumscribed frame may be embodied in the form of a set of position points having a connection sequence, and the position points are connected in sequence to obtain a closed circumscribed frame.

In this embodiment, after determining each target frame position point associated with the target bounding frame, a straight line in a preset direction may be drawn through the target frame position point, for example, a horizontal straight line or a vertical straight line passing through the target frame position point and parallel to a preset marker in a PCB design drawing, or a straight line in any direction is constructed. And then, whether a target straight line passing through the preset direction of the target frame position point has an intersection point with a frame line segment limiting the external frame is detected. If the intersection points exist, continuously judging the number of the intersection points positioned at the two sides of the position point of the target frame; if the intersection point does not exist, returning to continuously detect whether the next target straight line passing through the next target frame position point in the preset direction has the intersection point with the frame line segment limiting the external frame or not until all the target frame position points are traversed and intersection point detection is carried out.

It should be noted that, here, it is determined whether the target straight line has an intersection with a frame line segment that limits the circumscribed frame, and here, it is detected whether the target straight line has an intersection with the "frame line segment", rather than whether the target straight line has an intersection with a straight line in which the "frame line segment" is located.

S440, if the intersection point of the target straight line associated with the target frame position point and the frame line segment of the external frame is determined, determining whether the target external frame is intersected with the external frame according to the number of the intersection points positioned at the two sides of the target frame position point.

In an optional manner of this embodiment, determining whether the target circumscribed frame intersects the limit circumscribed frame according to the number of intersection points located on both sides of the target frame position point may include:

and if the number of the intersection points positioned at the two sides of the position point of the target frame is odd, determining that the target external frame is intersected with the limit external frame.

In this embodiment, when it is determined that there is an intersection between a target straight line associated with any target frame position point and a frame line segment of the circumscribed frame, if the number of intersections located on both sides of the target frame position point is odd, it indicates that the target frame position point is located within the polygon of the circumscribed frame, and at this time, it is determined that the target circumscribed frame intersects the circumscribed frame. In addition, under the condition that intersection points exist between a target straight line associated with any target frame position point and a frame line segment of the circumscribed frame, if the number of the intersection points positioned on the two sides of the target frame position point is even, the target circumscribed frame is determined not to intersect with the circumscribed frame.

Exemplarily, fig. 5 is a schematic diagram of detecting an intersection between circumscribed frames according to an embodiment of the present invention. Referring to fig. 5, the PCB layout includes: the device comprises a first component packaging area, a second component packaging area and a forbidden distribution area. The first component packaging area in the upper right corner of fig. 5 is inside the prohibited layout area, and there are 4 intersections in the horizontal line drawn through the target frame position point on the target external frame of the first component packaging area and the frame line segment on the restricted external frame of the prohibited layout area, wherein there are 3 intersections in the left side of the target frame position point, there are 1 intersection on the right side of the target frame position point, and the number of intersections located on both sides of the target frame position point is an odd number. At this time, it is known that the first component packaging region enters the keep-out region. Similarly, the target circumscribed frame of the second component packaging area in the lower left corner of fig. 5 is outside the graph of the restricted circumscribed frame of the keep-out area, and a horizontal line constructed by the target frame position point on the target circumscribed frame of the second component packaging area has 4 intersection points with the restricted circumscribed frame of the keep-out area, wherein 2 are on the left side, and 2 are even numbers on the right side, as expected.

Exemplarily, fig. 6 is a schematic diagram of detecting an intersection between circumscribed frames according to another embodiment of the present invention. Referring to fig. 6, fig. 6 shows the situation of polygon selfing, and when it is determined that there is an intersection point between the target straight line and the circumscribed frame of the restricted area, it can be seen that there are 2 intersection points on the left side of the target frame position point associated with the target circumscribed frame of the device packaging area shown in fig. 6, and there are also 2 intersection points on the right side, which are both even numbers, and at this time, the device is not in the graph. Fig. 7 is a schematic diagram of detecting an intersection between external borders according to another embodiment of the present invention. Referring to fig. 7, polygons do not overlap, but two edges intersect, in which case the solution of the present application can still be used to make the determination.

In an optional manner of this embodiment, performing border intersection detection on the target circumscribed border and the limit circumscribed border may further include:

and if the target straight line associated with each target frame position point does not have an intersection point with the frame line segment of the external frame, determining that the target external frame does not intersect with the external frame.

S450, determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result between the target external frame and the limiting external frame.

On the basis of the foregoing embodiment, optionally, after performing border intersection detection on the target circumscribed border and the limit circumscribed border, the method may further include the following steps:

detecting whether the additional attribute information of the target object area is matched with the additional attribute information of the limited area; wherein the additional attribute information includes height information.

In this embodiment, under the condition that the border intersection detection result is determined, if it is detected that the height of the additional attribute information of the target object region is greater than the height in the additional attribute information of the limited region, it indicates that the height of the target object region exceeds the height limited by the design requirement, and the height does not meet the layout design requirement of the PCB design drawing, and an alarm is added; otherwise, the height of the target object region is not higher than the height limited by the design requirement, and the height of the target object region conforms to the layout design requirement of the PCB design drawing.

The embodiment of the invention provides a method for detecting a PCB design drawing, which comprises the steps of respectively constructing a target external frame and a limit external frame aiming at a target object area and a limit area in the PCB design drawing, making a straight line in a preset direction through a position point on the target external frame, judging whether the straight line is intersected with a frame line segment on the limit external frame to determine whether the target object area enters the limit area, and further determining whether the design position of the target object area in the PCB design drawing is illegal according to an intersection detection result. By adopting the scheme, whether position design errors occur in a device packaging area or a silk-screen area in the PCB design drawing can be automatically identified by means of the intersection result between the constructed external connection patterns, and the detection efficiency of the PCB design drawing is improved; and because the intersection among the circumscribed graphs is detected, the target object area which does not meet the requirement can be screened to the maximum extent.

Fig. 8 is a block diagram of a detection apparatus for a PCB design provided in an embodiment of the present invention. The embodiment can be applied to the condition of detecting the layout positions of partial areas in the PCB design drawing, in particular to the condition of detecting the layout positions of the component packaging area and the silk screen printing area in the PCB design drawing. The device can be implemented in software and/or hardware and integrated on any electronic equipment with network communication function. As shown in fig. 8, the apparatus for detecting a PCB design provided in this embodiment may include: a layout area determination module 810, an external graphic construction module 820, an external graphic detection module 830, and a PCB design drawing detection module 840. Wherein:

a layout area determination module 810 for determining a target object area and a constraint area in the PCB design drawing;

the circumscribed graph constructing module 820 is used for constructing a target circumscribed frame of the target object area and a limit circumscribed frame of the limit area in the PCB design drawing;

the circumscribed graph detection module 830 is configured to perform border intersection detection on the target circumscribed border and the limit circumscribed border, so as to determine whether the two circumscribed borders intersect;

the PCB design drawing detection module 840 is configured to determine whether a design position of the target object area in the PCB design drawing meets a design requirement according to a border intersection detection result.

On the basis of the foregoing embodiment, optionally, the target object includes: packaging and/or silk-screen components arranged in the PCB design drawing; the restricted area includes at least one of: the PCB design drawing comprises a layout forbidding area, a height limiting area, a tooling area, a bright copper area and a component packaging area.

On the basis of the foregoing embodiment, optionally, the circumscribed graph constructing module 820 includes:

determining target area position information of a target object area in the PCB design drawing; constructing an external frame surrounding the target object area according to the position information of the target area, and determining the external frame as a target external frame;

determining the position information of the limited area in the PCB design drawing; and constructing an external frame surrounding the limited area according to the position information of the limited area, and determining the external frame as the limited external frame.

On the basis of the foregoing embodiment, optionally, the external graphics detecting module 830 includes:

determining a target frame position point associated with the target external frame, and determining a target straight line associated with the target frame position point; the target straight line comprises a straight line passing through the preset direction of the target frame position point;

and if the target straight line associated with the target position point is determined to have intersection points with the frame line segments of the external limiting frame, determining whether the target external frame is intersected with the external limiting frame according to the number of the intersection points positioned at the two sides of the target frame position point.

On the basis of the foregoing embodiment, optionally, the external graphics detection module 820 is specifically configured to:

if the number of the intersection points positioned at the two sides of the position point of the target frame is odd, determining that the target circumscribed frame is intersected with the limit circumscribed frame;

and if the number of the intersection points positioned at the two sides of the position point of the target frame is even, determining that the target external frame and the limit external frame do not intersect.

On the basis of the above embodiment, optionally, the external graphics detecting module 830 further includes:

and if it is determined that the target straight line associated with each target frame position point does not have an intersection point with the frame line segment of the external limit frame, determining that the target external limit frame does not intersect with the external limit frame.

On the basis of the above embodiment, optionally, the PCB design drawing detection module 840 includes:

if the two circumscribed frames are determined to be intersected, determining that the target object area is overlapped with the limited area in the PCB design drawing, and judging that the design position of the target object area does not meet the setting requirement;

and if the two circumscribed frames are not intersected, determining that the target object area is not overlapped with the limited area in the PCB design drawing, and judging that the design position of the target object area meets the setting requirement.

On the basis of the foregoing embodiment, optionally, the apparatus further includes:

an additional attribute detection module 850, configured to detect whether the additional attribute information of the target object region matches the additional attribute information of the limited region after performing border intersection detection on the target bounding box and the limited bounding box and in a case that a border intersection detection result is determined; wherein the additional attribute information includes height information.

The detection device for the PCB design drawing provided by the embodiment of the invention can execute the detection method for the PCB design drawing provided by any embodiment of the invention, has the corresponding functions and beneficial effects of executing the detection method for the PCB design drawing, and has the detailed process referring to the relevant operations of the detection method for the PCB design drawing in the embodiment.

Fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. As shown in fig. 9, the electronic device provided in the embodiment of the present invention includes: one or more processors 910 and storage 920; the processor 910 in the electronic device may be one or more, and one processor 910 is taken as an example in fig. 9; storage 920 is used to store one or more programs; the one or more programs are executed by the one or more processors 910, so that the one or more processors 910 implement the method for detecting the PCB design drawing according to any one of the embodiments of the present invention.

The electronic device may further include: an input device 930 and an output device 940.

The processor 910, the storage device 920, the input device 930, and the output device 940 in the electronic apparatus may be connected by a bus or other means, and fig. 9 illustrates an example of connection by a bus.

The storage 920 in the electronic device is used as a computer-readable storage medium for storing one or more programs, which may be software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the PCB design drawing detection method provided in the embodiment of the present invention. The processor 910 executes various functional applications and data processing of the electronic device by running software programs, instructions and modules stored in the storage 920, that is, implements the PCB design drawing detection method provided in the above method embodiments.

The storage 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Additionally, the storage 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 920 may further include memory located remotely from the processor 910, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus. The output device 940 may include a display device such as a display screen.

And, when the one or more programs included in the electronic device are executed by the one or more processors 910, the programs perform the following operations:

determining a target object area and a limiting area in the PCB design drawing;

constructing a target external border of the target object area and a limit external border of the limit area;

performing border intersection detection on the target circumscribed border and the limiting circumscribed border so as to determine whether the two circumscribed borders intersect;

and determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

Of course, it can be understood by those skilled in the art that when one or more programs included in the electronic device are executed by the one or more processors 910, the programs may also perform related operations in the PCB design inspection method provided in any embodiment of the present invention.

An embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, the program being executed by a processor to perform a method for detecting a PCB design drawing, the method including:

determining a target object area and a limiting area in the PCB design drawing;

constructing a target external border of the target object area and a limit external border of the limit area;

performing border intersection detection on the target circumscribed border and the limiting circumscribed border so as to determine whether the two circumscribed borders intersect;

and determining whether the design position of the target object area in the PCB design drawing meets the design requirement or not according to the frame intersection detection result.

Optionally, the program, when executed by the processor, may be further configured to perform a method for detecting a PCB design provided in any embodiment of the present invention.

Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.

Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于微型LED阵列的光神经接口优化设计方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类