CN110781639B - Method and device for automatic marking in PCB design - Google Patents

Method and device for automatic marking in PCB design Download PDF

Info

Publication number
CN110781639B
CN110781639B CN201910969250.9A CN201910969250A CN110781639B CN 110781639 B CN110781639 B CN 110781639B CN 201910969250 A CN201910969250 A CN 201910969250A CN 110781639 B CN110781639 B CN 110781639B
Authority
CN
China
Prior art keywords
lines
point coordinates
coordinates
coordinate
maximum value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910969250.9A
Other languages
Chinese (zh)
Other versions
CN110781639A (en
Inventor
张柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910969250.9A priority Critical patent/CN110781639B/en
Publication of CN110781639A publication Critical patent/CN110781639A/en
Application granted granted Critical
Publication of CN110781639B publication Critical patent/CN110781639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides an automatic labeling method in PCB design, which comprises the following steps: acquiring all line segments of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the line segments; extracting all the starting point coordinates to obtain an X coordinate and a Y coordinate of the starting point coordinates, and determining the maximum value and the minimum value of the X coordinate and the maximum value and the minimum value of the Y coordinate; reading the starting point coordinates and the end point coordinates of all the line segments, and respectively carrying out forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate; marking the horizontal length and the vertical length of the line segment according to the projected coordinates. The invention can realize automatic marking of the PCB and greatly improve the working efficiency.

Description

Method and device for automatic marking in PCB design
Technical Field
The present invention relates to the field of PCB design, and more particularly, to a method and apparatus for automatic labeling in PCB design.
Background
When the developer utilized current PCB (Printed circuit board) design software (for example, cadence) to carry out PCB design, need label the integrated circuit board in PCB design later stage, current mode all is through artifical manual measurement mark, nevertheless because the sheet frame shape is irregular, wastes time and energy, operates more troublesome, inefficiency through artifical manual addition, manual mark appears the mistake easily moreover and is not pleasing to the eye.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus capable of automatically labeling the size of a PCB panel.
Based on the above purpose, an aspect of the embodiments of the present invention provides a method for automatic labeling in PCB design, which includes the following steps:
acquiring all line segments of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the line segments;
extracting all the starting point coordinates to obtain an X coordinate and a Y coordinate of the starting point coordinates, and determining the maximum value and the minimum value of the X coordinate and the maximum value and the minimum value of the Y coordinate;
reading the starting point coordinates and the end point coordinates of all the line segments, and respectively carrying out forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate;
marking the horizontal length and the vertical length of the line segment according to the projected coordinates.
In some embodiments, acquiring all line segments of the PCB border, and recording the start point coordinates, the end point coordinates, and the shape information of all the line segments comprises:
recording the starting point coordinates and the end point coordinates of all the line segments and whether the line segments are straight lines or arc lines, and recording the radian of the line segments when the line segments are the arc lines.
In some embodiments, reading the start and end coordinates of all the line segments and forward projecting to the horizontal line segment formed by the maximum and minimum values of the X coordinate and the vertical line segment formed by the maximum and minimum values of the Y coordinate, respectively, comprises:
and if the maximum value and the minimum value of the X coordinate are represented as Xmax and Xmin respectively, and the maximum value and the minimum value of the Y coordinate are represented as Ymax and Ymin respectively, recording that the point A is (Xmin and Ymin), the point B is (Xmax and Ymin), the point C is (Xmax and Ymax), and the point D is (Xmin and Ymax), and performing forward projection on the line segment to AB and AD respectively.
In some embodiments, reading the start point coordinates and the end point coordinates of all the line segments and forward projecting to the horizontal line segments formed by the maximum values and the minimum values of the X coordinates and the vertical line segments formed by the maximum values and the minimum values of the Y coordinates, respectively, further comprises:
and forward projecting the line segment to a coordinate axis which is a line other than the frame formed by the A, B, C, D and which is parallel to the AB and AD, respectively.
In some embodiments, labeling the horizontal and vertical lengths of the line segment according to the projected coordinates comprises:
when the arc line segment is marked, reading the recorded radian of the line segment and marking the radian.
In some embodiments, the method is implemented by performing secondary development on Cadence software based on a kill language.
Another aspect of the embodiments of the present invention provides an apparatus for automatic labeling in PCB design, including:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
acquiring all line segments of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the line segments;
extracting all the starting point coordinates to obtain an X coordinate and a Y coordinate of the starting point coordinates, and determining the maximum value and the minimum value of the X coordinate and the maximum value and the minimum value of the Y coordinate;
reading the starting point coordinates and the end point coordinates of all the line segments, and respectively carrying out forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate;
marking the horizontal length and the vertical length of the line segment according to the projected coordinates.
In some embodiments, acquiring all line segments of the PCB panel border, and recording the start point coordinates, the end point coordinates, and the shape information of all the line segments comprises:
recording the starting point coordinates and the end point coordinates of all the line segments and whether the line segments are straight lines or arc lines, and recording the radian of the line segments when the line segments are the arc lines.
In some embodiments, reading the start and end coordinates of all the line segments and forward projecting to horizontal line segments formed by the maximum and minimum values of the X coordinate and vertical line segments formed by the maximum and minimum values of the Y coordinate, respectively, comprises:
and if the maximum value and the minimum value of the X coordinate are represented as Xmax and Xmin respectively, and the maximum value and the minimum value of the Y coordinate are represented as Ymax and Ymin respectively, recording that the point A is (Xmin and Ymin), the point B is (Xmax and Ymin), the point C is (Xmax and Ymax), and the point D is (Xmin and Ymax), and performing forward projection on the line segment to AB and AD respectively.
In some embodiments, reading the start point coordinates and the end point coordinates of all the line segments and forward projecting to the horizontal line segments formed by the maximum values and the minimum values of the X coordinates and the vertical line segments formed by the maximum values and the minimum values of the Y coordinates, respectively, further comprises:
and using lines which are outside the frame formed by the A, B, C, D and are parallel to the AB and AD respectively as coordinate axes, and performing forward projection on the line segments to the coordinate axes.
The invention has the following beneficial technical effects: the method and the device for automatically marking in the PCB design provided by the embodiment of the invention can quickly create the mark, are simple to operate, improve the marking efficiency in the PCB design, reduce or even avoid the error of the mark and improve the working efficiency of workers.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flow diagram of a method for automatic labeling in a PCB design according to the present invention;
FIG. 2 is a schematic illustration of a labeling according to the method of the present invention;
fig. 3 is a schematic diagram of a hardware structure of an automatic labeling apparatus in a PCB design according to the present invention.
Detailed Description
Embodiments of the present invention are described below. However, it is to be understood that the disclosed embodiments are merely examples and that other embodiments may take various and alternative forms. The figures are not necessarily to scale; certain features may be exaggerated or minimized to show details of particular components. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a representative basis for teaching one skilled in the art to variously employ the present invention. As one of ordinary skill in the art will appreciate, various features illustrated and described with reference to any one of the figures may be combined with features illustrated in one or more other figures to produce embodiments that are not explicitly illustrated or described. The combination of features shown provides a representative embodiment for a typical application. However, various combinations and modifications of the features consistent with the teachings of the present invention may be desired for certain specific applications or implementations.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
Based on the above purpose, an embodiment of the present invention provides, in one aspect, a method for automatic labeling in a PCB design, as shown in fig. 1, including the following steps:
step S101: acquiring all line segments of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the line segments;
step S102: extracting all the starting point coordinates to obtain an X coordinate and a Y coordinate of the starting point coordinates, and determining the maximum value and the minimum value of the X coordinate and the maximum value and the minimum value of the Y coordinate;
step S103: reading the starting point coordinates and the end point coordinates of all the line segments, and performing forward projection on the horizontal line segments formed by the maximum value and the minimum value of the X coordinate and the vertical line segments formed by the maximum value and the minimum value of the Y coordinate respectively;
step S104: marking the horizontal length and the vertical length of the line segment according to the projected coordinates.
In some embodiments, acquiring all line segments of the PCB panel border, and recording the start point coordinates, the end point coordinates, and the shape information of all the line segments comprises: recording the starting point coordinates and the end point coordinates of all the line segments and whether the line segments are straight lines or arc lines, and recording the radian of the line segments when the line segments are the arc lines. For example, the board frame outline is obtained, all line segments of the board frame outline are obtained, and the starting point, the end point, the,The shape (straight line or circular arc) is placed in listA, such as listA = list (' ((X) 1A ,Y 1A )(X 2B ,Y 2B ) line)’,‘((X 2A ,Y 2A )(X 3B ,Y 3B ) line)’,‘((X 3A ,Y 3A ),(X 4B ,Y 4B ) arc)' … …) wherein (X) 2B ,Y 2B )=(X 2A ,Y 2A ) … … arc contains the arc information of the arc.
In some embodiments, reading the start and end coordinates of all the line segments and forward projecting to horizontal line segments formed by the maximum and minimum values of the X coordinate and vertical line segments formed by the maximum and minimum values of the Y coordinate, respectively, comprises: and if the maximum value and the minimum value of the X coordinate are represented as Xmax and Xmin respectively, and the maximum value and the minimum value of the Y coordinate are represented as Ymax and Ymin respectively, recording that the point A is (Xmin and Ymin), the point B is (Xmax and Ymin), the point C is (Xmax and Ymax), and the point D is (Xmin and Ymax), and performing forward projection on the line segment to AB and AD respectively.
In an embodiment according to the invention, the first element of each element in the series listA is extracted and placed in the series listB, then listB = list ((X) 1A ,Y 1A ),(X 2A ,Y 2A )(X 3A ,Y 3A ) … …); extracting X coordinate and Y coordinate from listB, and placing in listX and listY respectively, with listX = list (X) 1A ,X 2A ,X 3A ……),ListY=list(Y 1A ,Y 2A ,Y 3A … …); the number series listX and listY are sorted from large to small, and the maximum value, the minimum value Xmax/Xmin and Ymax/Ymin in the number series listX and listY are calculated, so that the point a is (Xmin, ymin), the point B is (Xmax, ymin), the point C is (Xmax, ymax) and the point D is (Xmin, ymax), as shown in fig. 2. And reading coordinates in the array listA, and performing forward projection on the AB and the AD respectively, wherein a horizontal line corresponding to an X coordinate on the AB and a vertical line corresponding to a Y coordinate on the AD are marking points.
In some embodiments, reading the start point coordinates and the end point coordinates of all the line segments and forward projecting to the horizontal line segments formed by the maximum values and the minimum values of the X coordinates and the vertical line segments formed by the maximum values and the minimum values of the Y coordinates, respectively, further comprises: and using lines which are outside the frame formed by the A, B, C, D and are parallel to the AB and AD respectively as coordinate axes, and performing forward projection on the line segments to the coordinate axes. For better aesthetics, the coordinate axes for projection may be chosen to be parallel to AB and AD but outside the panel borders to avoid overlap of the mark points with the panel borders.
In some embodiments, labeling the horizontal and vertical lengths of the line segment according to the projected coordinates comprises: when the arc line segment is marked, the method further comprises the steps of reading the recorded radian of the line segment and marking the radian.
In some embodiments, the method is implemented by developing Cadence software a second time based on the kill language. At present, a plurality of PCB design software exist in the market, cadence is the most widely applied software in the industry, not only is the Cadence provided with strong functions and a plurality of related software to support, but also because the Cadence provides an open secondary development interface and a more perfect development language library, users can carry out secondary development according to self needs. The sketch language is a high-level programming language which is built in Cadence software and is based on a C language and an LISP language, the Cadence provides rich interactive functions for the sketch language, and the work efficiency can be greatly improved by researching the sketch language and then writing tools.
Where technically feasible, the technical features listed above for the different embodiments may be combined with each other or changed, added, omitted, etc. to form further embodiments within the scope of the invention.
It can be seen from the above embodiments that the method for automatically marking in a PCB design provided by the embodiments of the present invention can quickly create a mark, is simple in operation, improves marking efficiency in a PCB design, can reduce or even avoid a mark error, and improves work efficiency of a worker.
In another aspect of the embodiments of the present invention, an apparatus for automatically labeling in a PCB design is provided, which includes:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
acquiring all line segments of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the line segments;
extracting all the starting point coordinates to obtain an X coordinate and a Y coordinate of the starting point coordinates, and determining the maximum value and the minimum value of the X coordinate and the maximum value and the minimum value of the Y coordinate;
reading the starting point coordinates and the end point coordinates of all the line segments, and performing forward projection on the horizontal line segments formed by the maximum value and the minimum value of the X coordinate and the vertical line segments formed by the maximum value and the minimum value of the Y coordinate respectively;
marking the horizontal length and the vertical length of the line segment according to the projected coordinates.
In some embodiments, acquiring all line segments of the PCB panel border, and recording the start point coordinates, the end point coordinates, and the shape information of all the line segments comprises: recording the starting point coordinates and the end point coordinates of all the line segments and whether the line segments are straight lines or arc lines, and recording the radian of the line segments when the line segments are the arc lines.
In some embodiments, reading the start and end coordinates of all the line segments and forward projecting to horizontal line segments formed by the maximum and minimum values of the X coordinate and vertical line segments formed by the maximum and minimum values of the Y coordinate, respectively, comprises: when the maximum value and the minimum value of the X coordinate are represented by Xmax and Xmin, respectively, and the maximum value and the minimum value of the Y coordinate are represented by Ymax and Ymin, respectively, the point A is (Xmin, ymin), the point B is (Xmax, ymin), the point C is (Xmax, ymax), and the point D is (Xmin, ymax), and the line segments are projected to AB and AD in a forward direction.
In some embodiments, reading the start point coordinates and the end point coordinates of all the line segments and forward projecting to the horizontal line segments formed by the maximum values and the minimum values of the X coordinates and the vertical line segments formed by the maximum values and the minimum values of the Y coordinates, respectively, further comprises: and using lines which are outside the frame formed by the A, B, C, D and are parallel to the AB and AD respectively as coordinate axes, and performing forward projection on the line segments to the coordinate axes.
Fig. 3 is a schematic hardware structure diagram of an embodiment of the apparatus for automatic labeling in PCB design according to the present invention.
Taking the computer device shown in fig. 3 as an example, the computer device includes a processor 301 and a memory 302, and may further include: an input device 303 and an output device 304.
The processor 301, the memory 302, the input device 303 and the output device 304 may be connected by a bus or other means, and fig. 3 illustrates the connection by a bus as an example.
The memory 302 is a non-volatile computer-readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for automatically labeling PCB designs in the embodiments of the present application. The processor 301 executes various functional applications of the server and data processing, i.e. implementing the method of automatic labeling in PCB design of the above-described method embodiments, by running non-volatile software programs, instructions and modules stored in the memory 302.
The memory 302 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 an automatic labeling method in a PCB design, and the like. Further, the memory 302 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 embodiments, memory 302 optionally includes memory located remotely from processor 301, which may be connected to a local module via 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 means 303 may receive input numeric or character information and generate key signal input related to user setting and function control of the computer device of the method of automatically labeling in the PCB design. The output means 304 may comprise a display device such as a display screen.
Program instructions/modules corresponding to the methods for automatic labeling in the one or more PCB designs are stored in the memory 302, and when executed by the processor 301, perform the methods for automatic labeling in PCB designs in any of the above-described method embodiments.
Any embodiment of the computer apparatus for performing the method for automatically labeling in the PCB design may achieve the same or similar effects as any of the corresponding method embodiments described above.
Finally, it should be noted that, as understood by those skilled in the art, all or part of the processes in the methods of the embodiments described above may be implemented by instructing relevant hardware by a computer program, where the computer program may be stored in a computer-readable storage medium, and when executed, the computer program may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In addition, the apparatuses, devices and the like disclosed in the embodiments of the present invention may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television and the like, or may be a large terminal device, such as a server and the like, and therefore the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of apparatus, device. The client disclosed in the embodiment of the present invention may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions described herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The above-described embodiments are possible examples of implementations and are presented merely for a clear understanding of the principles of the invention. Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (6)

1. A method for automatically marking in PCB design is characterized by comprising the following steps:
acquiring all lines of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the lines;
extracting all the starting point coordinates and the end point coordinates to obtain X coordinates and Y coordinates of the starting point coordinates and the end point coordinates, and determining the maximum value and the minimum value of the X coordinates and the maximum value and the minimum value of the Y coordinates;
reading the starting point coordinates and the end point coordinates of all the lines, and respectively carrying out forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate;
marking the horizontal length and the vertical length of the line according to the projected coordinates;
reading the starting point coordinates and the end point coordinates of all the lines, and performing forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate respectively comprises the following steps:
if the maximum value and the minimum value of the X coordinate are represented by Xmax and Xmin respectively, the maximum value and the minimum value of the Y coordinate are represented by Ymax and Ymin respectively, recording the point A as (Xmin, ymin), the point B as (Xmax, ymin), the point C as (Xmax, ymax) and the point D as (Xmin, ymax), and projecting the line to AB and AD in a forward direction respectively;
and taking lines which are outside a frame formed by the points A, B, C and D and are respectively parallel to the points AB and AD as coordinate axes, and then projecting the lines to the coordinate axes in a forward direction.
2. The method of claim 1, wherein the step of obtaining all lines of the PCB border and recording the start point coordinates, the end point coordinates and the shape information of all the lines comprises:
recording the starting point coordinates and the end point coordinates of all the lines, whether the lines are straight lines or arc lines, and recording the radian of the lines when the lines are arc lines.
3. The method of claim 2, wherein labeling the horizontal length and the vertical length of the line according to the projected coordinates comprises:
when marking the arc line, the method also comprises the steps of reading the radian of the line and marking the radian.
4. The method of claim 1, wherein the method is implemented by secondary development of Cadence software based on the kill language.
5. An apparatus for automatic labeling in PCB design, comprising:
at least one processor; and
a memory storing program code executable by the processor, the program code implementing the following steps when executed by the processor:
acquiring all lines of a PCB frame, and recording start point coordinates, end point coordinates and shape information of all the lines;
extracting all the starting point coordinates and the end point coordinates to obtain X coordinates and Y coordinates of the starting point coordinates and the end point coordinates, and determining the maximum value and the minimum value of the X coordinates and the maximum value and the minimum value of the Y coordinates;
reading the starting point coordinates and the end point coordinates of all the lines, and respectively carrying out forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate;
marking the horizontal length and the vertical length of the line according to the projected coordinates;
reading the starting point coordinates and the end point coordinates of all the lines, and performing forward projection on a horizontal line segment formed by the maximum value and the minimum value of the X coordinate and a vertical line segment formed by the maximum value and the minimum value of the Y coordinate respectively comprises the following steps:
if the maximum value and the minimum value of the X coordinate are represented as Xmax and Xmin respectively, the maximum value and the minimum value of the Y coordinate are represented as Ymax and Ymin respectively, recording the point A as (Xmin and Ymin), the point B as (Xmax and Ymin), the point C as (Xmax and Ymax) and the point D as (Xmin and Ymax), and performing forward projection on the line to AB and AD respectively;
and taking lines which are outside a frame formed by the points A, B, C and D and are respectively parallel to the points AB and AD as coordinate axes, and then projecting the lines to the coordinate axes in a forward direction.
6. The apparatus of claim 5, wherein the step of acquiring all lines of the PCB border and recording the start point coordinates, the end point coordinates and the shape information of all the lines comprises:
recording the starting point coordinates and the end point coordinates of all the lines, whether the lines are straight lines or arc lines, and recording the radian of the lines when the lines are arc lines.
CN201910969250.9A 2019-10-12 2019-10-12 Method and device for automatic marking in PCB design Active CN110781639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910969250.9A CN110781639B (en) 2019-10-12 2019-10-12 Method and device for automatic marking in PCB design

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910969250.9A CN110781639B (en) 2019-10-12 2019-10-12 Method and device for automatic marking in PCB design

Publications (2)

Publication Number Publication Date
CN110781639A CN110781639A (en) 2020-02-11
CN110781639B true CN110781639B (en) 2023-01-06

Family

ID=69385239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910969250.9A Active CN110781639B (en) 2019-10-12 2019-10-12 Method and device for automatic marking in PCB design

Country Status (1)

Country Link
CN (1) CN110781639B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508136B (en) * 2021-02-04 2021-05-11 常州微亿智造科技有限公司 Label conversion method and device
CN117235831B (en) * 2023-11-13 2024-02-23 北京天圣华信息技术有限责任公司 Automatic part labeling method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1457018A (en) * 2002-05-10 2003-11-19 天瀚科技股份有限公司 Antenna arrangement of electromagnetic inducing system and coordinate positioning method thereof
CN103902771A (en) * 2014-03-28 2014-07-02 无锡市同步电子科技有限公司 Method of dynamically converting right-angled and obtuse-angled PCB circuits into arc circuits
CN104408722A (en) * 2014-11-26 2015-03-11 南京工业大学 Detection method for PCB (printed circuit board) visual positioning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1457018A (en) * 2002-05-10 2003-11-19 天瀚科技股份有限公司 Antenna arrangement of electromagnetic inducing system and coordinate positioning method thereof
CN103902771A (en) * 2014-03-28 2014-07-02 无锡市同步电子科技有限公司 Method of dynamically converting right-angled and obtuse-angled PCB circuits into arc circuits
CN104408722A (en) * 2014-11-26 2015-03-11 南京工业大学 Detection method for PCB (printed circuit board) visual positioning

Also Published As

Publication number Publication date
CN110781639A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN110781639B (en) Method and device for automatic marking in PCB design
CN111045603B (en) Bad block replacement method and device for solid state disk
CN110096306B (en) Application version switching method and device, electronic equipment and storage medium
CN108932141B (en) Method and device for realizing copy drawing, electronic equipment and storage medium
CN110929883A (en) Method and device for supporting FPGA (field programmable gate array) training in TensorFlow
CN108108342A (en) Generation method, search method and the device of structured text
CN105760066A (en) Method and device for updating page
CN107330028A (en) Expansion application methods and system of a kind of Apache NiFi in terms of source data input database
CN111831815B (en) Control method and device for questionnaire display, storage medium and electronic equipment
CN110659165A (en) Multi-node server automatic testing method and device
CN111368496B (en) Method and device for changing straight line into broken line with any angle in PCB design
CN110879773B (en) CGroup-based memory monitoring method and device
US20140053051A1 (en) Application server and method for editing drawings of webpage
CN109344082B (en) Method and system for automatically testing register
CN109492292A (en) A kind of method and system automatically generating PCB Component library
CN111339730B (en) Method and device for checking device position in PCB design
CN111144395B (en) Method and device for quickly inversely labeling characters and graphs based on Cadence Skill
CN111176666B (en) BIOS + ME mirror image refreshing method, system, equipment and readable medium
CN110674505A (en) Vulnerability scanning remaining time estimation method and device
CN110780855A (en) Method, device and system for uniformly managing and controlling interface
CN111274140A (en) Device, method and server for automatic case execution site recovery
EP3340042A1 (en) Page construction method, apparatus and device, and nonvolatile computer storage medium
CN110929471A (en) Method and terminal for displaying rich text and electronic equipment
CN108897702A (en) A kind of method and system for verifying memory availability
CN117371448A (en) Entity identification and model training method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant