A PCB automatic marking method, device, equipment and storage medium

Through the automatic labeling method, the problem of difficult to accurately label Gerber file gap data is solved, efficient and accurate PCB labeling is achieved, and the labeling accuracy and efficiency are improved.

CN114912403BActive Publication Date: 2025-08-08SHENZHEN PARTNER INFORMATION TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210649140.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-08-08
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

In the prior art, the gap data of Gerber files during PCB processing is difficult to accurately mark, and the manual labeling process is cumbersome, resulting in low labeling accuracy.

Method used

Provides a PCB automatic labeling method. By selecting the label type, confirming the elements to be marked and calculating the labeling data, generating an annotation figure and displaying it, including the single size, the imposition size, the number of impositions, the process edge width, the plate edge spacing, the imposition spacing, the tool hole coordinates, the photoelectric coordinates, the cutting line and the direction of the PCB board.

Benefits of technology

It realizes automatic labeling of Gerber files, improves labeling accuracy and efficiency, and solves the cumbersome problems of manual labeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114912403B_ABST
    Figure CN114912403B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a method, apparatus, device, and storage medium for automatic PCB labeling. The method includes selecting a labeling type for a labeling object; identifying elements to be labeled based on the labeling type and calculating labeling data; and generating and displaying a labeling graphic based on the labeling data. The method of this embodiment automatically labels Gerber files for PCBs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of PCB production, and in particular to a PCB automatic marking method, device, computer equipment and storage medium. Background Art

[0002] Gerber files are required during PCB manufacturing. To increase production efficiency and save costs, customers often merge multiple processing graphics from different layers into the Gerber file. However, gaps exist between each processing graphic. Currently, before or during processing, Gerber files need to be converted to DXF format and then imported into CAD software. These gaps must then be manually marked. However, these gaps are difficult to measure accurately due to their small size, and the accuracy is also compromised during the file format conversion process, resulting in low marking accuracy. Furthermore, the large number of parameters that need to be marked makes the marking process cumbersome. Summary of the Invention

[0003] The embodiments of the present invention provide a PCB automatic marking method, apparatus, device and storage medium, which realize automatic marking of gap data of merged graphics.

[0004] According to one aspect of the present invention, a PCB automatic marking method is provided, comprising:

[0005] Select the annotation type of the annotation object;

[0006] Confirm the elements to be annotated according to the annotation type and calculate the annotation data;

[0007] Generate and display a marked graphic based on the marked data.

[0008] Optionally, the annotation type includes:

[0009] One or more of single size, panel size, panel quantity, process edge width, board edge spacing, panel spacing, tool hole coordinates, photoelectric coordinates, cutting line and PCB board direction.

[0010] Optionally, if the annotation type is layout spacing, then the elements to be annotated of the annotation object are determined according to the annotation type and the annotation data are calculated, including:

[0011] Confirm the first outer contour of a single piece in the layout;

[0012] Confirming the second outer contour of another single piece that is closest to the single piece, and determining the height of the panel spacing according to the coordinates of the first outer contour and the second outer contour;

[0013] Determine the third outer contour of another single piece closest to the right of the single piece, and determine the imposition spacing width based on the coordinates of the first outer contour and the third outer contour;

[0014] Generate a vertical marking auxiliary line at a preset layout spacing height marking position, and use two points of the vertical intercepts of the adjacent horizontal lines of the first outer contour and the second outer contour on the marking auxiliary line as two anchor points of the layout spacing height;

[0015] A horizontal annotation auxiliary line is generated at a preset imposition spacing width annotation position, and two points of the horizontal intercepts of the adjacent vertical lines of the first outer contour and the third outer contour on the annotation auxiliary line are used as two anchor points of the imposition spacing width.

[0016] Optionally, if the annotation type is plate edge spacing or process edge width, then the elements to be annotated of the annotation object are determined according to the annotation type and the annotation data is calculated, including:

[0017] Obtain the outer contour of the upper left single piece or the outer contour of the single piece of the panel as the first contour, and obtain the contour of the gong belt as the second contour;

[0018] According to the coordinates of the first upper left point of the first contour and the second upper left point of the second contour, the width of the board edge spacing and the height of the board edge spacing are obtained as annotation data;

[0019] Generate a vertical marking auxiliary line at a preset plate edge spacing height marking position, and use two points of the longitudinal intercepts of adjacent horizontal lines of the first contour and the second contour on the marking auxiliary line as two anchor points for the plate edge spacing height;

[0020] A horizontal annotation auxiliary line is generated at a preset plate edge spacing width annotation position, and two points of the horizontal intercepts of the adjacent vertical lines of the first contour and the second contour on the annotation auxiliary line are used as two anchor points of the plate edge spacing width.

[0021] Optionally, if the annotation type is a single size or a panel size, then determining the elements to be annotated of the annotation object according to the annotation type and calculating the annotation data based on the elements to be annotated includes:

[0022] Get the vertex coordinates of the element to be marked;

[0023] Calculating the distance between at least two adjacent vertex coordinates as annotation data, wherein the annotation data includes an element outline height and an element outline width;

[0024] Generate a vertical annotation auxiliary line at a preset element height annotation position, and use two points of the vertical intercepts of the two horizontal lines of the element outline on the annotation auxiliary line as two anchor points of the element outline height;

[0025] A horizontal annotation auxiliary line is generated at a preset element width annotation position, and two points of the horizontal intercepts of two vertical lines of the element outline on the annotation auxiliary line are used as two anchor points of the element outline width.

[0026] Optionally, generating and displaying a marked graphic according to the marked data includes:

[0027] Determine whether the distance between two anchor points is greater than the annotation threshold;

[0028] If it is greater than the annotation threshold, directly connect the two anchor points and draw a line segment for linear annotation;

[0029] If it is less than or equal to the annotation threshold, the two anchor points are rotated and offset and then connected to draw a line segment for alignment annotation;

[0030] A corresponding arrow graphic is generated according to the coordinates of the anchor point.

[0031] Optionally, generating a corresponding arrow graphic according to the coordinates of the anchor point includes:

[0032] Connect two anchor points to form a guide line;

[0033] An auxiliary point is obtained by offsetting the anchor point along the auxiliary paving line by a first preset distance;

[0034] The auxiliary point is rotated with the anchor point as the base point, and the auxiliary point is symmetrically deviated from the two sides of the auxiliary line by a second preset distance to obtain a first angle point and a second angle point;

[0035] Connect the anchor point, the first angle point, the second angle point, and the anchor point in sequence to draw a line segment to form an arrow icon.

[0036] According to another aspect of the present invention, there is provided a PCB automatic marking device, comprising:

[0037] Type selection module, used to select the annotation type of the annotation object;

[0038] Annotation calculation module, used to confirm the elements to be annotated of the annotation object according to the annotation type and calculate the annotation data;

[0039] The graphics drawing module is used to generate and display the annotation graphics according to the annotation data.

[0040] According to another aspect of the present invention, a computer device is provided, comprising:

[0041] at least one processor; and

[0042] a memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the PCB automatic marking method described in any embodiment of the present invention.

[0044] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the PCB automatic labeling method according to any embodiment of the present invention when executed.

[0045] The embodiment of the present invention selects a labeling type for a labeling object; identifies the elements to be labeled of the labeling object according to the labeling type and calculates the labeling data; generates and displays a labeling graphic according to the labeling data, thereby solving the problem of manual labeling of PCB Gerber files in the prior art and realizing automatic labeling of PCB Gerber files. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 This is a flow chart of a PCB automatic marking method provided by the first embodiment of the present invention;

[0048] Figure 2 This is a schematic diagram of a single board provided by an embodiment of the present invention;

[0049] Figure 3 This is a schematic diagram of a panel provided by an embodiment of the present invention;

[0050] Figure 4 This is a schematic diagram of anchor point confirmation for a single size or a panel size provided by an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of confirming anchor points for board edge spacing provided by an embodiment of the present invention;

[0052] Figure 6 This is a schematic diagram of anchor point confirmation of a layout spacing provided by an embodiment of the present invention;

[0053] Figure 7 This is a flow chart of a PCB automatic marking device provided by the second embodiment of the present invention;

[0054] Figure 8A schematic diagram of the structure of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0055] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0056] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0057] Explanation of terms:

[0058] Circuit layer: A single layer of metal patterned on a PCB that is used to connect conductive circuits to electronic components.

[0059] Board layer: The outline of a processing graphic, which contains the outlines of all conductive circuit elements of the circuit layer. Usually the outline of the board layer is a rectangular box.

[0060] Line segment bar: A line segment has a wide band attribute, which represents the area extending outward from each point on the line segment.

[0061] Arc segment strip: An arc segment strip has a wide band attribute, which represents the area extending outward from each point on the arc segment.

[0062] Annotation: Identify an element or multiple elements and display them on the screen.

[0063] Imposition: Generate an N*N outer contour graphic for each layer according to the input relative distance.

[0064] Example 1

[0065] Figure 1This is a flow chart of a PCB automatic marking method provided by the first embodiment of the present invention. This embodiment can be applied to a PCB automatic marking device. The method can be executed by the PCB automatic marking device. The device can be implemented by software and / or hardware and can generally be integrated into a computer device. The computer device can include a terminal device, a server device, or a single-chip device. The embodiment of the present invention does not limit the specific device type of the computer device. Accordingly, Figure 1 As shown, the method includes the following operations:

[0066] S110. Select the annotation type of the annotation object.

[0067] In one embodiment, before automatic annotation is performed, it is necessary to generate an annotation algorithm for the corresponding annotation type in advance. The specific process is as follows: import the Gerber project file corresponding to the annotation object; receive the user's selection of the annotation type based on the Gerber project file in the menu interface of the corresponding program; obtain all the annotation elements of the annotation object; confirm the target annotation type that can be annotated based on the annotation elements; and generate the corresponding annotation algorithm based on the target annotation type. In this embodiment, the annotation object refers to one or more board layers corresponding to the Gerber file. Generally, the annotation objects can be divided into single boards and panels, such as Figure 2 The single board shown includes only one board layer 201, such as Figure 3 The illustrated panel comprises at least two or more board layers 301. Each board layer 301 in the panel is also called a single piece. Figure 3 Includes 9 singles.

[0068] In one embodiment, the annotation types include one or more of individual dimensions, panel dimensions, panel quantity, process edge width, board edge spacing, panel spacing, tool hole coordinates, photoelectric coordinates, cutting lines, and PCB board orientation. In this embodiment, individual dimensions refer to the outline annotation data of a board layer, i.e., the dimensions of a panelized layer; panel dimensions refer to the overall dimensions of the multiple individual components after panelization; process edge width refers to the distance from the panel to the gong tape outline; and panel spacing refers to the distance between individual dimensions.

[0069] S120 , confirming the elements to be annotated of the annotation object according to the annotation type and calculating the annotation data.

[0070] In one embodiment, if the annotation type is a single size or a panel size, the following steps are included in determining the elements to be annotated of the annotation object according to the annotation type and calculating the annotation data based on the elements to be annotated.

[0071] S1211. Get the vertex coordinates of the element to be marked, for example Figure 4 The coordinates of the four corners A, B, C, and D in the middle;

[0072] S1212. Calculate the distance between at least two adjacent vertex coordinates as annotation data, where the annotation data includes an element outline height and an element outline width;

[0073] S1213. Generate a vertical annotation auxiliary line at the preset element height annotation position, for example Figure 4 The auxiliary line L1 in the figure is used as the two anchor points of the element contour height according to the two vertical intercepts of the two horizontal lines AB and DC on the annotation auxiliary line L1;

[0074] S1214. Generate a horizontal annotation auxiliary line at the preset element width annotation position, for example Figure 4 The auxiliary line L2 in the annotation is used as the two anchor points of the element outline width according to the two points A' and B' of the horizontal intercepts of the two vertical lines AD and BC of the element outline on the annotation auxiliary line.

[0075] In another embodiment, if the annotation type is board edge spacing, then the following steps are included in determining the elements to be annotated of the annotation object according to the annotation type and calculating the annotation data.

[0076] S1221. Obtain the upper left single outer contour of the panel as the first contour, for example Figure 5 The upper left single outer contour LK1 of the illustrated panel is obtained by taking the gong belt contour as the second contour, for example Figure 5 The gong belt outline in LKL;

[0077] S1222, obtaining the panel edge spacing width and the panel edge spacing height as annotation data according to the first upper left point coordinate A1 of the first contour LK1 and the second upper left point coordinate A2 of the second contour LKL;

[0078] S1223: Generate a vertical marking auxiliary line L1 at a preset panel edge spacing height marking position, and use two points A1' and A2' of the longitudinal intercepts of adjacent horizontal lines of the first and second contours on the marking auxiliary line as two anchor points for the panel edge spacing height;

[0079] S1224. Generate a horizontal marking auxiliary line L2 at the preset plate edge spacing width marking position, and use the two points A1” and A2” of the horizontal intercepts of the adjacent vertical lines of the first contour and the second contour on the marking auxiliary line as the two anchor points of the plate edge spacing width.

[0080] In an alternative embodiment, the above method is also applicable to determining the anchor point for automatic marking of the process edge width, and it is only necessary to use a single outer contour of the single board as the first contour.

[0081] In one embodiment, if the annotation type is layout spacing, then the following steps are included in determining the elements to be annotated of the annotation object according to the annotation type and calculating the annotation data.

[0082] S1231, confirm the first outer contour of a single piece in the imposition, for example Figure 6 A single profile LK1;

[0083] S1232, confirm the second outer contour of another single piece that is closest to the single piece, for example Figure 6 Another single outline LK2 in the embodiment, determining the layout pitch height according to the coordinates of the first outer outline LK1 and the second outer outline LK2;

[0084] S1233, confirm the third outer contour of another single bird closest to the right of the single bird, for example Figure 6 a single outline LK3 in the image, and determining the imposition pitch width according to the coordinates of the first outer outline LK1 and the third outer outline LK3;

[0085] S1234: Generate a vertical marking auxiliary line L1 at a preset layout height marking position, and use two points H1' and H2' of the longitudinal intercepts of the adjacent horizontal lines H1 and H2 of the first and second outer contours on the marking auxiliary line L1 as two anchor points for the layout height;

[0086] S1235. Generate a horizontal marking auxiliary line L2 at the preset imposition spacing width marking position, and use the two points S1' and S2' of the transverse intercepts of the adjacent vertical lines S1 and S2 of the first outer contour LK1 and the third outer contour LK3 on the marking auxiliary line L2 as two anchor points of the imposition spacing width.

[0087] S130: Generate and display a marked graphic based on the marked data.

[0088] In one embodiment, generating and displaying the annotation graphics according to the annotation data includes the following steps.

[0089] S131, determining whether the distance between the two anchor points is greater than a marking threshold;

[0090] S132: If the value is greater than the annotation threshold, directly connect the two anchor points and draw a line segment for linear annotation;

[0091] S133. If the value is less than or equal to the annotation threshold, the two anchor points are rotated and offset, and then connected by drawing a line segment for alignment annotation. In one embodiment, the annotation threshold may be the minimum spacing occupied by the annotation data.

[0092] S134. Generate a corresponding arrow graphic according to the coordinates of the anchor point.

[0093] Specifically, generating a corresponding arrow graphic according to the coordinates of the anchor point includes the following steps.

[0094] S1341. Connect two anchor points to form an auxiliary line;

[0095] S1342, offsetting the anchor point along the auxiliary paving line by a first preset distance to obtain an auxiliary point;

[0096] S1343: Rotate the auxiliary point with the anchor point as the base point, and symmetrically deviate the auxiliary point by a second preset distance on both sides of the auxiliary line to obtain a first angle point and a second angle point;

[0097] S1344. Connect the anchor point, the first angle point, the second angle point, and the anchor point in sequence to draw a line segment to form an arrow icon.

[0098] The embodiment of the present invention solves the problem of the prior art that manual marking of various marking types is required according to the automatic marking of different marking types, thereby improving the efficiency of automatic marking of Gerber files of PCBs.

[0099] Example 2

[0100] Figure 7 Schematic diagram of a PCB automatic marking device provided by the second embodiment of the present invention, such as Figure 2 As shown, the apparatus 700 includes: a type selection module 710 , a label calculation module 720 and a graphics drawing module 730 .

[0101] The type selection module 710 is used to select the annotation type of the annotation object;

[0102] The annotation calculation module 720 is used to confirm the elements to be annotated in the annotation object according to the annotation type and calculate the annotation data;

[0103] The graphics drawing module 730 is used to generate and display a labeled graphic according to the labeled data.

[0104] In one embodiment, the annotation types include one or more of individual dimensions, panel dimensions, panel quantity, process edge width, board edge spacing, panel spacing, tool hole coordinates, photoelectric coordinates, cutting lines, and PCB board orientation. In this embodiment, individual dimensions refer to the outline annotation data of a board layer, i.e., the dimensions of a panelized layer; panel dimensions refer to the overall dimensions of the multiple individual components after panelization; process edge width refers to the distance from the panel to the gong tape outline; and panel spacing refers to the distance between individual dimensions.

[0105] Optionally, in one embodiment, the annotation calculation module 720 may further include an outline size module for calculating the annotation data of the single size and the imitation size when the annotation type is the single size and the imitation size.

[0106] Optionally, the outline dimension module may include:

[0107] The vertex coordinate acquisition module is used to obtain the vertex coordinates of the element to be marked;

[0108] A height and width calculation module, configured to calculate the distance between at least two adjacent vertex coordinates as annotation data, wherein the annotation data includes an element outline height and an element outline width;

[0109] A height anchor point confirmation module generates a vertical annotation auxiliary line at a preset element height annotation position, and uses two points of the vertical intercepts of the two horizontal lines of the element outline on the annotation auxiliary line as two anchor points of the element outline height;

[0110] The width anchor point confirmation module generates a horizontal annotation auxiliary line at a preset element width annotation position, and uses two points of the horizontal intercepts of the two vertical lines of the element outline on the annotation auxiliary line as two anchor points of the element outline width.

[0111] Optionally, in one embodiment, the annotation calculation module 720 may further include an edge size module for calculating the annotation data of the board edge spacing or the process edge width when the annotation type is the board edge spacing or the process edge width.

[0112] Optionally, the edge size module may include:

[0113] A contour acquisition module is used to obtain the outer contour of the upper left single piece of the panel or the outer contour of a single board as a first contour, and obtain the contour of the gong belt as a second contour;

[0114] A height and width acquisition module is used to obtain the board edge spacing width and the board edge spacing height as annotation data according to the coordinates of the first upper left point of the first contour and the coordinates of the second upper left point of the second contour;

[0115] A height anchor point confirmation module is used to generate a vertical annotation auxiliary line at a preset plate edge spacing height annotation position, and use two points of the longitudinal intercepts of adjacent horizontal lines of the first contour and the second contour on the annotation auxiliary line as two anchor points for the plate edge spacing height;

[0116] The width anchor point confirmation module is used to generate a horizontal annotation auxiliary line at the preset board edge spacing width annotation position, and the two points of the horizontal intercepts of the adjacent vertical lines of the first contour and the second contour on the annotation auxiliary line are used as the two anchor points of the board edge spacing width.

[0117] Optionally, in one embodiment, the annotation calculation module 720 may further include a pagination spacing module, configured to calculate annotation data of the pagination spacing when the annotation type is the pagination spacing.

[0118] Optionally, the imposition spacing module may include:

[0119] The contour confirmation module is used to confirm the first outer contour of a single piece in the imposition;

[0120] A spacing height confirmation module is used to confirm the second outer contour of another single piece that is closest to the single piece and to confirm the panel spacing height according to the coordinates of the first outer contour and the second outer contour;

[0121] a spacing width confirmation module, configured to confirm a third outer contour of another single piece closest to the right of the single piece, and to confirm a layout spacing width based on the coordinates of the first and third outer contours;

[0122] A height anchor point confirmation module is used to generate a vertical annotation auxiliary line at a preset layout height annotation position, and use two points of the vertical intercepts of the adjacent horizontal lines of the first outer contour and the second outer contour on the annotation auxiliary line as two anchor points of the layout height;

[0123] The width anchor point confirmation module is used to generate a horizontal annotation auxiliary line at a preset layout spacing width annotation position, and use two points of the horizontal intercepts of the adjacent vertical lines of the first outer contour and the third outer contour on the annotation auxiliary line as two anchor points of the layout spacing width.

[0124] Optionally, the graphics drawing module 730 further includes an anchor point determination module, a linear annotation module, an alignment annotation module and an arrow generation module.

[0125] Anchor point judgment module, used to judge whether the distance between two anchor points is greater than the annotation threshold;

[0126] The linear annotation module is used to directly connect two anchor points and draw a line segment for linear annotation if the value is greater than the annotation threshold;

[0127] The alignment annotation module is used to rotate and offset the two anchor points and then connect the drawn line segments for alignment annotation if the value is less than or equal to the annotation threshold;

[0128] The arrow generation module is used to generate a corresponding arrow graphic according to the coordinates of the anchor point.

[0129] Optionally, the arrow generation module includes an auxiliary line module, an auxiliary point module, an angle point module and a graphics module.

[0130] Auxiliary line module, used to connect two anchor points to form an auxiliary line;

[0131] An auxiliary point module, used to obtain an auxiliary point by offsetting the anchor point along the auxiliary line by a first preset distance;

[0132] An angle point module, used to rotate the auxiliary point with the anchor point as the base point, and symmetrically deviate the auxiliary point by a second preset distance on both sides of the auxiliary line to obtain a first angle point and a second angle point;

[0133] The graphical module is used to sequentially connect the anchor point, the first angle point, the second angle point and the anchor point to draw a line segment to form an arrow icon.

[0134] The above-mentioned PCB automatic labeling device can execute the PCB automatic labeling method provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the PCB automatic labeling method provided by any embodiment of the present invention. Since the above-mentioned PCB automatic labeling device is a device that can execute the PCB automatic labeling method in the embodiment of the present invention, based on the PCB automatic labeling method introduced in the embodiment of the present invention, technical personnel in this field can understand the specific implementation method of the PCB automatic labeling device of this embodiment and its various variations, so how the PCB automatic labeling device implements the PCB automatic labeling method in the embodiment of the present invention will not be introduced in detail here. As long as technical personnel in this field implement the device adopted by the PCB automatic labeling method in the embodiment of the present invention, it falls within the scope of protection to be protected by this application.

[0135] Example 3

[0136] Figure 8 A schematic diagram of the structure of a computer device 10 that can be used to implement the first embodiment of the present invention is shown. The computer device may include various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, single-chip microcomputers, and other suitable computers. The computer device may also include various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0137] like Figure 8As shown, computer device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to at least one processor 11. The memory stores a computer program executable by the at least one processor, and processor 11 can perform various appropriate actions and processes based on the computer program stored in ROM 12 or loaded from storage unit 18 into RAM 13. RAM 13 can also store various programs and data required for the operation of computer device 10. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. An input / output (I / O) interface 15 is also connected to bus 14.

[0138] Various components in the computer device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the computer device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0139] The processor 11 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the PCB automatic labeling method.

[0140] In some embodiments, the PCB automatic labeling method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on computer device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the PCB automatic labeling method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the PCB automatic labeling method in any other suitable manner (e.g., via firmware).

[0141] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0142] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0143] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer device having: a display device (e.g., a cathode ray tube display or a liquid crystal display) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0145] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0146] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0147] Example 4

[0148] The fourth embodiment of the present invention further provides a computer storage medium storing a computer program, wherein the computer program is used to execute the PCB automatic marking method described in any of the above embodiments of the present invention when executed by a computer processor.

[0149] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by an instruction execution system, device or device or used in combination with it.

[0150] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0151] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0152] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0153] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0154] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A PCB automatic marking method, characterized by: Select the annotation type of the annotation object; Confirm the elements to be annotated according to the annotation type and calculate the annotation data; Generate and display a marked graphic according to the marked data; The annotation type includes the imposition spacing, and the steps of determining the elements to be annotated in the annotation object according to the annotation type and calculating the annotation data include: Confirm the first outer contour of a single piece in the layout; Confirming the second outer contour of another single piece that is closest to the single piece, and determining the height of the panel spacing according to the coordinates of the first outer contour and the second outer contour; Determine the third outer contour of another single piece closest to the right of the single piece, and determine the imposition spacing width based on the coordinates of the first outer contour and the third outer contour; Generate a vertical marking auxiliary line at a preset layout spacing height marking position, and use two points of the vertical intercepts of the adjacent horizontal lines of the first outer contour and the second outer contour on the marking auxiliary line as two anchor points of the layout spacing height; Generate a horizontal annotation auxiliary line at a preset layout spacing width annotation position, and use two points of the horizontal intercepts of the adjacent vertical lines of the first outer contour and the third outer contour on the annotation auxiliary line as two anchor points of the layout spacing width; or, If the annotation type includes the board edge spacing, then the steps of determining the elements to be annotated in the annotation object according to the annotation type and calculating the annotation data include: Get the outer contour of the upper left single piece of the panel as the first contour, and get the contour of the gong belt as the second contour; According to the coordinates of the first upper left point of the first contour and the second upper left point of the second contour, the width of the board edge spacing and the height of the board edge spacing are obtained as annotation data; Generate a vertical marking auxiliary line at a preset plate edge spacing height marking position, and use two points of the longitudinal intercepts of adjacent horizontal lines of the first contour and the second contour on the marking auxiliary line as two anchor points for the plate edge spacing height; Generate a horizontal annotation auxiliary line at a preset plate edge spacing width annotation position, and use two points of the horizontal intercepts of the adjacent vertical lines of the first contour and the second contour on the annotation auxiliary line as two anchor points of the plate edge spacing width; or, The annotation types include single size and imposition size, and the steps of determining the elements to be annotated in the annotation object and calculating the annotation data according to the annotation type include: Get the vertex coordinates of the element to be marked; Calculating the distance between at least two adjacent vertex coordinates as annotation data, wherein the annotation data includes an element outline height and an element outline width; Generate a vertical annotation auxiliary line at a preset element height annotation position, and use two points of the vertical intercepts of the two horizontal lines of the element outline on the annotation auxiliary line as two anchor points of the element outline height; A horizontal annotation auxiliary line is generated at a preset element width annotation position, and two points of the horizontal intercepts of two vertical lines of the element outline on the annotation auxiliary line are used as two anchor points of the element outline width.

2. The method according to claim 1, characterized in that Generating and displaying the annotation graphics according to the annotation data includes: Determine whether the distance between two anchor points is greater than the annotation threshold; If it is greater than the annotation threshold, directly connect the two anchor points and draw a line segment for linear annotation; If it is less than or equal to the annotation threshold, the two anchor points are rotated and offset and then connected to draw a line segment for alignment annotation; A corresponding arrow graphic is generated according to the coordinates of the anchor point.

3. The method according to claim 2, characterized in that Generating a corresponding arrow graphic according to the coordinates of the anchor point includes: Connect two anchor points to form a guide line; An auxiliary point is obtained by offsetting the anchor point along the auxiliary paving line by a first preset distance; The auxiliary point is rotated with the anchor point as the base point, and the auxiliary point is symmetrically deviated from the two sides of the auxiliary line by a second preset distance to obtain a first angle point and a second angle point; Connect the anchor point, the first angle point, the second angle point, and the anchor point in sequence to draw a line segment to form an arrow icon.

4. A PCB automatic marking device, comprising Type selection module, used to select the annotation type of the annotation object; Annotation calculation module, used to confirm the elements to be annotated of the annotation object according to the annotation type and calculate the annotation data; A graphics drawing module, used for generating and displaying a labeled graphic based on the labeled data; The marking calculation module includes an imposition spacing module, and the imposition spacing module includes: The contour confirmation module is used to confirm the first outer contour of a single piece in the imposition; A spacing height confirmation module is used to confirm the second outer contour of another single piece that is closest to the single piece and to confirm the panel spacing height according to the coordinates of the first outer contour and the second outer contour; a spacing width confirmation module, configured to confirm a third outer contour of another single piece closest to the right of the single piece, and to confirm a layout spacing width based on the coordinates of the first and third outer contours; A height anchor point confirmation module is used to generate a vertical annotation auxiliary line at a preset layout height annotation position, and use two points of the vertical intercepts of the adjacent horizontal lines of the first outer contour and the second outer contour on the annotation auxiliary line as two anchor points of the layout height; A width anchor point confirmation module is used to generate a horizontal annotation auxiliary line at a preset layout spacing width annotation position, and use two points of the horizontal intercepts of the adjacent vertical lines of the first outer contour and the third outer contour on the annotation auxiliary line as two anchor points of the layout spacing width; or, The annotation calculation module includes an edge size module, and the edge size module includes: The contour acquisition module is used to obtain the outer contour of the upper left single piece of the imposition as the first contour, and obtain the contour of the gong belt as the second contour; A height and width acquisition module is used to obtain the board edge spacing width and the board edge spacing height as annotation data according to the coordinates of the first upper left point of the first contour and the coordinates of the second upper left point of the second contour; A height anchor point confirmation module is used to generate a vertical annotation auxiliary line at a preset plate edge spacing height annotation position, and use two points of the longitudinal intercepts of adjacent horizontal lines of the first contour and the second contour on the annotation auxiliary line as two anchor points for the plate edge spacing height; A width anchor point confirmation module is used to generate a horizontal annotation auxiliary line at a preset plate edge spacing width annotation position, and use two points of the horizontal intercepts of the adjacent vertical lines of the first contour and the second contour on the annotation auxiliary line as two anchor points of the plate edge spacing width; or, The annotation calculation module includes a contour size module, and the contour size module includes: A vertex coordinate acquisition module is used to obtain the vertex coordinates of the element to be marked; A height and width calculation module, configured to calculate the distance between at least two adjacent vertex coordinates as annotation data, wherein the annotation data includes an element outline height and an element outline width; A height anchor point confirmation module is used to generate a vertical annotation auxiliary line at a preset element height annotation position, and use two points of the vertical intercepts of two horizontal lines of the element outline on the annotation auxiliary line as two anchor points of the element outline height; The width anchor point confirmation module is used to generate a horizontal annotation auxiliary line at a preset element width annotation position, and use two points of the horizontal intercepts of the two vertical lines of the element outline on the annotation auxiliary line as two anchor points of the element outline width.

5. A computer device, characterized in that: The computer device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the PCB automatic marking method according to any one of claims 1 to 3.

6. A computer storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the PCB automatic marking method according to any one of claims 1 to 3 when executed.

Citation Information

Patent Citations

  • Dimension marking method, device, terminal device and readable storage medium

    CN109241569A