CN111368496B - Method and device for changing straight line into broken line with any angle in PCB design - Google Patents

Method and device for changing straight line into broken line with any angle in PCB design Download PDF

Info

Publication number
CN111368496B
CN111368496B CN202010159789.0A CN202010159789A CN111368496B CN 111368496 B CN111368496 B CN 111368496B CN 202010159789 A CN202010159789 A CN 202010159789A CN 111368496 B CN111368496 B CN 111368496B
Authority
CN
China
Prior art keywords
bending
point
coordinate
straight line
coordinates
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
CN202010159789.0A
Other languages
Chinese (zh)
Other versions
CN111368496A (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 CN202010159789.0A priority Critical patent/CN111368496B/en
Publication of CN111368496A publication Critical patent/CN111368496A/en
Application granted granted Critical
Publication of CN111368496B publication Critical patent/CN111368496B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a device for changing a straight line into a broken line with any angle in PCB design, wherein the method comprises the following steps: selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line; inputting and acquiring a preset bending angle and the length of a bending line segment, and solving the coordinates of the projection point of each bending point on the straight line based on a fixed ratio division point formula according to the starting point coordinate, the end point coordinate, the straight line length, the bending angle and the length of the bending line segment; obtaining the coordinate of a first bending point based on a vector method according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle; according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely obtaining the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence; and connecting the bending points in sequence according to the coordinates of the bending points to draw corresponding folding lines. The invention can automatically change the straight line segment into the broken line to ensure the design quality.

Description

Method and device for changing straight line into broken line of any angle in PCB design
Technical Field
The present invention relates to the field of PCB (Printed Circuit Board) design, and more particularly, to a method and apparatus for changing a straight line into a broken line of an arbitrary angle in PCB design.
Background
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 spider language is a high-level programming language which is built in the spider software and is based on the C language and the LISP language, the spider provides rich interactive functions for the spider language, and the work efficiency can be greatly improved by researching the spider language and then writing tools.
In the design of a large PCB main board, in order to ensure the signal transmission quality, it is sometimes necessary to change a relatively long straight line segment into a broken line segment with the same angle, as shown in fig. 1. The existing method is to set the wire pulling angle before wire pulling and then to route the wires. Because the wiring of the main board is long, the wiring space of the manually created equal-angle folding line is difficult to accurately position, and more space is occupied; the wiring is manually established, so that the efficiency is low; and the length of each section of broken line is difficult to ensure consistency, thus affecting the signal transmission quality.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for changing a straight line into a broken line of any angle in a PCB design, so as to automatically change the straight line into the broken line of any angle in the PCB design.
In view of the above, an aspect of the embodiments of the present invention provides a method for changing a straight line into a broken line with an arbitrary angle in a PCB design, including the following steps:
selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line;
inputting and acquiring a preset bending angle and the length of a bending line segment, and solving the coordinates of the projection point of each bending point on the straight line based on a fixed ratio point dividing formula according to the starting point coordinate, the end point coordinate, the straight line length, the bending angle and the length of the bending line segment;
obtaining the coordinate of the first bending point based on a vector method according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle;
according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely solving the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence;
and sequentially connecting the bending points according to the coordinates of the bending points to draw corresponding folding lines.
In some embodiments, the method further comprises:
and selecting all parallel lines to be changed into broken lines, and selecting all parts of each line, which are overlapped with the projections of other parallel lines, as the parts to be changed into the broken lines.
In some embodiments, the method further comprises:
the filter mode is set to Clineseg mode.
In some embodiments, sequentially connecting the bending points according to the coordinates of the bending points to draw the corresponding folding line comprises:
and placing the coordinates of all the bending points in a sequence, reading the coordinates in the sequence in turn and connecting all the read coordinates by using an interface function.
In some embodiments, the method is based on the Skill language.
Another aspect of the embodiments of the present invention provides a device for changing a straight line into a broken line of any angle in a PCB design, including:
at least one processor; and
a memory storing processor executable program code which when executed by the processor performs the steps of:
selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line;
inputting and acquiring a preset bending angle and the length of a bending line segment, and calculating the bending angle and the length of the bending line segment according to the starting point coordinate,
The coordinates of the projection points of all the bending points on the straight line are obtained based on a fixed ratio point dividing formula;
according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle, the coordinate of the first bending point is obtained based on a vector method;
according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely solving the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence;
and sequentially connecting the bending points according to the coordinates of the bending points to draw corresponding folding lines.
In some embodiments, the steps further comprise:
and selecting all parallel lines to be changed into broken lines, and selecting all parts of each line, which are overlapped with the projections of other parallel lines, as the parts to be changed into the broken lines.
In some embodiments, the steps further comprise:
the filter mode is set to Clineseg mode.
In some embodiments, sequentially connecting the bending points according to the coordinates of the bending points to draw the corresponding folding line comprises:
and placing the coordinates of all the bending points in a sequence, reading the coordinates in the sequence in turn and connecting all the read coordinates by using an interface function.
In some embodiments, the steps are based on a Skill language.
The invention has the following beneficial technical effects: the method and the device for changing the straight line into the broken line with any angle in the PCB design provided by the embodiment of the invention can be used for routing according to any angle according to space planning so as to automatically change the corresponding straight line segment into the broken line with the same angle and length according to the requirement, thereby improving the design efficiency and ensuring the design quality.
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 embodiments or the prior art descriptions will be briefly described below, 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 according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a PCB main board design in which a longer straight line is changed into a broken line segment with the same angle;
FIG. 2 is a flow chart of a method of changing straight lines into arbitrary angle broken lines in a PCB design according to the present invention;
FIG. 3 is a schematic illustration of the determination of a bend portion of a plurality of parallel lines according to the method of the present invention;
FIG. 4 is a schematic view of a straight line DE and a broken line with a transformed bend angle C and a bend line segment AB according to the present invention;
FIG. 5 is a schematic diagram of a method according to the present invention for transforming line segments into arbitrary angle polylines;
fig. 6 is a schematic diagram of a hardware structure of a device for changing a straight line into a broken line of any angle 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.
In view of the above object, an aspect of the embodiments of the present invention provides a method for changing a straight line into a broken line with an arbitrary angle in a PCB design, as shown in fig. 2, including the following steps:
step S201: selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line;
step S202: inputting and acquiring a preset bending angle and the length of a bending line segment, and solving the coordinates of the projection point of each bending point on the straight line based on a fixed ratio point dividing formula according to the starting point coordinate, the end point coordinate, the straight line length, the bending angle and the length of the bending line segment;
step S203: obtaining the coordinate of the first bending point based on a vector method according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle;
step S204: according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely solving the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence;
step S205: and sequentially connecting the bending points according to the coordinates of the bending points to draw corresponding folding lines.
In some embodiments, the method further comprises: and selecting all parallel lines to be changed into broken lines, and selecting all parts of each line, which are overlapped with the projections of other parallel lines, as the parts to be changed into the broken lines.
In some embodiments, the method further comprises: the filter mode is set to Clineseg mode.
In some embodiments, sequentially connecting the bending points according to the coordinates of the bending points to draw the corresponding folding line includes: and placing the coordinates of all the bending points in a sequence, reading the coordinates in the sequence in turn and connecting all the read coordinates by using an interface function.
In some embodiments, the method is based on a Skill language. The Cadence provides rich interactive functions for the Skill language, and the work efficiency can be greatly improved by researching the subsequent compiling tool of the Skill language and putting into application.
In an embodiment according to the present invention, it is first necessary to set the filter to Clineseg mode, in which traces on the PCB motherboard can be selected. The straight line to be changed into the broken line is usually a plurality of straight lines parallel to each other, as shown in fig. 3, 5 straight lines parallel to each other as shown in the figure need to be changed into the broken line parallel to each other at the same angle, which means that the start point coordinate and the end point coordinate of the portion of each straight line to be changed into the broken line need to be determined first, specifically: and determining a starting point coordinate value with the maximum X value in the starting point coordinates of the 5 mutually parallel straight lines, and further determining an end point coordinate value with the minimum X value in the end point coordinates of the 5 mutually parallel straight lines, so that a line segment part of each straight line between the starting point coordinate value with the maximum X value and the end point coordinate value with the minimum X value is a part to be changed into a broken line segment, thereby determining the starting point coordinate and the end point coordinate of the part to be changed into the broken line of each straight line. As shown in fig. 3, in this example, a portion where each straight line horizontally overlaps with the 5 th straight line is a portion to be a broken line.
In the embodiment according to the present invention, the start point coordinates, the end point coordinates, and the length of the portion of all the portions to be broken lines are acquired. As shown in FIG. 4, for example, to change the straight line DE into a broken line, a starting point D (x) of the line segment DE is obtained0,y0) And end point E Point (x)n,yn) And the total length L of the line segment DE. A bending angle C ([ u ] a) of a broken line to be changed and a length len (line segment AB) of a bent line segment are set.
In the embodiment according to the present invention, as shown in fig. 5, the point O is a starting point of the straight line and the folding line to be changed, and the projection points of the bending point A, B, C … … of the folding line on the straight line are respectively O1、O3、O5… …, the intersection points of the line segments AB and BC … … and the straight line are O2、O4… … are provided. Firstly, respectively calculating O by using a fixed ratio and a point division formula1、O2、O3… … coordinates:
a)O1coordinates (X) of points1,Y1):
Figure BDA0002405346530000061
Figure BDA0002405346530000062
X1=(x0+k1xn)/(1+k1)
Y1=(y0+k1yn)/(1+k1)
b)O2Coordinates (X) of points2,Y2):
Figure BDA0002405346530000063
X2=(x0+k2xn)/(1+k2)
Y2=(y0+k2yn)/(1+k2)
……
c)OnCoordinates (X) of pointsn,Yn):
Figure BDA0002405346530000071
Xn=(x0+knxn)/(1+kn)
Yn=(y0+knyn)/(1+kn)
In some embodiments, the length and/or OO may be dependent on bend angle C, OA1(Length D) obtaining AO1And thus further can be based on the coordinates (x) of the O point (i.e., the starting point D point)0,y0)、O1Coordinates (X) of points1,Y1) The coordinates of point a are found by the vector method. In some embodiments, the coordinates of point a may also be found by a trigonometric function formula.
In some embodiments, the coordinates of point … … are calculated B, C, D using a proportional-fractional-point formula back-solved, e.g., the coordinates of point a (X) have been found in the previous stepA、YA)、O2Coordinates (X) of points2,Y2) And O is2The point is the middle point of the AB line segment, so the coordinate of the B point can be further obtained by using a definite ratio point-dividing formula, wherein the k value is fixed to be 1, and the coordinate of the B point (X) is fixedB,YB) Comprises the following steps:
XB=2*X2-XA
YB=2*Y2-YA
the coordinates of the point C and the point D … … are obtained in the same manner.
In some embodiments, the coordinates of all the calculated bending points, i.e., A, B, C, D point … …, are placed in the series lista, and the coordinates in the series lista are sequentially read using an interface function to connect all the coordinate points in the series lista to form the corresponding polyline.
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 changing a straight line into a folding line with any angle in the PCB design provided by the embodiments of the present invention can route lines according to any angle according to space planning, so as to automatically change a corresponding straight line into a folding line with a consistent angle and length according to the requirement, improve the design efficiency, and ensure the design quality
In another aspect of the embodiments of the present invention, an apparatus for changing a straight line into a broken line with an arbitrary angle in a PCB design is provided, 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:
selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line;
inputting and acquiring a preset bending angle and the length of a bending line segment, and solving the coordinates of the projection point of each bending point on the straight line based on a fixed ratio point dividing formula according to the starting point coordinate, the end point coordinate, the straight line length, the bending angle and the length of the bending line segment;
obtaining the coordinate of the first bending point based on a vector method according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle;
according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely solving the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence;
and sequentially connecting the bending points according to the coordinates of the bending points to draw corresponding folding lines.
In some embodiments, the steps further comprise: and selecting all parallel lines to be changed into broken lines, and selecting all parts of each line, which are overlapped with the projections of other parallel lines, as the parts to be changed into the broken lines.
In some embodiments, the steps further comprise: the filter mode is set to Clineseg mode.
In some embodiments, sequentially connecting the bending points according to the coordinates of the bending points to draw the corresponding folding line includes: and placing the coordinates of all the bending points in a sequence, reading the coordinates in the sequence in turn and connecting all the read coordinates by using an interface function.
In some embodiments, the steps are based on a Skill language.
Fig. 6 is a schematic diagram of a hardware structure of an embodiment of the apparatus for changing a straight line into a broken line of any angle in the PCB design provided by the present invention.
Taking the computer apparatus shown in fig. 6 as an example, the computer apparatus includes a processor 601 and a memory 602, and may further include: an input device 603 and an output device 604.
The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The memory 602, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for changing straight lines into arbitrary angle broken lines in the PCB design in the embodiments of the present application. The processor 601 executes various functional applications and data processing of the server, namely, a method for changing straight lines into arbitrary angle broken lines in the PCB design implementing the above method embodiments, by running nonvolatile software programs, instructions and modules stored in the memory 602.
The memory 602 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 data storage area may store data created according to a method of changing a straight line into a polygonal line of an arbitrary angle in the PCB design, and the like. Further, the memory 602 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 602 optionally includes memory located remotely from processor 601, which may be connected to local modules 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 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer device of a method of changing a straight line into an arbitrary angle broken line in a PCB design. The output device 604 may include a display device such as a display screen.
Program instructions/modules corresponding to the method for changing straight lines into any angle broken lines in one or more PCB designs are stored in the memory 602, and when executed by the processor 601, perform the method for changing straight lines into any angle broken lines in a PCB design in any of the above-described method embodiments.
Any embodiment of the computer device for executing the method for changing straight lines into broken lines with any angle in the PCB design can achieve the same or similar effects as any corresponding method embodiment.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, 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 above-described functions defined in the method 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 is 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), Synchronous Link 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 disclosed embodiments of the present invention.
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 (10)

1. A method for changing straight lines into broken lines with any angle in PCB design is characterized by comprising the following steps:
selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line;
inputting and acquiring a preset bending angle and the length of a bending line segment, and solving the coordinates of the projection point of each bending point on the straight line based on a fixed ratio point dividing formula according to the starting point coordinate, the end point coordinate, the straight line length, the bending angle and the length of the bending line segment;
obtaining the coordinate of the first bending point based on a vector method according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle;
according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely obtaining the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence;
and sequentially connecting the bending points according to the coordinates of the bending points to draw corresponding folding lines.
2. The method of claim 1, further comprising:
and selecting all parallel lines to be changed into broken lines, and selecting all parts of each line, which are overlapped with the projections of other parallel lines, as the parts to be changed into the broken lines.
3. The method of claim 2, further comprising:
the filter mode is set to Clineseg mode.
4. The method of claim 1, wherein sequentially joining the bending points according to their coordinates to draw respective fold lines comprises:
and placing the coordinates of all the bending points in a sequence, reading the coordinates in the sequence in turn and connecting all the read coordinates by using an interface function.
5. The method of claim 1, wherein the method is based on a Skill language.
6. An apparatus for changing straight line into arbitrary angle broken line 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:
selecting a straight line to be changed into a broken line, and acquiring a starting point coordinate, an end point coordinate and a length of the straight line;
inputting and acquiring a preset bending angle and the length of a bending line segment, and solving the coordinates of the projection point of each bending point on the straight line based on a fixed ratio division point formula according to the starting point coordinate, the end point coordinate, the straight line length, the bending angle and the length of the bending line segment;
obtaining the coordinate of the first bending point based on a vector method according to the starting point coordinate, the coordinate of the first projection point on the straight line and the bending angle;
according to the coordinate of the first bending point and the coordinate of the projection point of each bending point on the straight line, reversely solving the coordinates of the rest bending points based on a fixed ratio point dividing formula in sequence;
and sequentially connecting the bending points according to the coordinates of the bending points to draw corresponding folding lines.
7. The apparatus of claim 6, wherein the steps further comprise:
and selecting all parallel lines to be changed into broken lines, and selecting all parts of each line, which are overlapped with the projections of other parallel lines, as parts to be changed into broken lines.
8. The apparatus of claim 7, wherein the steps further comprise:
the filter mode is set to Clineseg mode.
9. The apparatus of claim 6, wherein sequentially connecting the bending points according to their coordinates to draw a corresponding fold line comprises:
and placing the coordinates of all the bending points in a sequence, reading the coordinates in the sequence in turn and connecting all the read coordinates by using an interface function.
10. The apparatus of claim 6, wherein the steps are based on a Skill language.
CN202010159789.0A 2020-03-10 2020-03-10 Method and device for changing straight line into broken line with any angle in PCB design Active CN111368496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010159789.0A CN111368496B (en) 2020-03-10 2020-03-10 Method and device for changing straight line into broken line with any angle in PCB design

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010159789.0A CN111368496B (en) 2020-03-10 2020-03-10 Method and device for changing straight line into broken line with any angle in PCB design

Publications (2)

Publication Number Publication Date
CN111368496A CN111368496A (en) 2020-07-03
CN111368496B true CN111368496B (en) 2022-07-08

Family

ID=71210405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010159789.0A Active CN111368496B (en) 2020-03-10 2020-03-10 Method and device for changing straight line into broken line with any angle in PCB design

Country Status (1)

Country Link
CN (1) CN111368496B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113408105B (en) * 2021-05-24 2022-10-18 沃飞长空科技(成都)有限公司 Method and device for determining stress state of material on curved surface structure
CN113540839B (en) * 2021-06-22 2023-09-15 浙江创特新材科技有限公司 Bending terminal wire and manufacturing method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211202A (en) * 2019-05-31 2019-09-06 北京三快在线科技有限公司 Broken line method for drafting, device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211202A (en) * 2019-05-31 2019-09-06 北京三快在线科技有限公司 Broken line method for drafting, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111368496A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111368496B (en) Method and device for changing straight line into broken line with any angle in PCB design
CN103064920A (en) Method and device for scaling page fonts in mobile terminal
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
CN107016055B (en) Method and device for mining entity alias and electronic device
CN111339730B (en) Method and device for checking device position in PCB design
CN110781639B (en) Method and device for automatic marking in PCB design
CN105320662A (en) Method and device for webpage generation
CN111368494A (en) Method and device for rapidly drawing full-plate differential line via hole oval limited area
CN111259620B (en) Method, system, equipment and medium for checking blind buried hole in PCB
CN103092582B (en) For the treatment of the method and system of the event of issue with the event of subscription
CN109344082B (en) Method and system for automatically testing register
CN107562423B (en) UI page development method and device
US10254959B2 (en) Method of inputting a character into a text string using a sliding touch gesture, and electronic device therefor
CN107369192B (en) Connection relation processing method and device
CN113253996B (en) Card construction method, electronic device, server and storage medium
US11620722B2 (en) Method and apparatus of generating policy-based smart contract
KR20220143558A (en) Method and apparatus for providing music production service
CN114117063A (en) Entity alignment method, device, electronic equipment and computer readable storage medium
CN109344159B (en) Lookup method and device for LDAP (lightweight directory Access protocol), electronic equipment and storage medium
CN111353356A (en) Hard-tipped writing implementation method and device, electronic equipment and storage medium
CN110929471A (en) Method and terminal for displaying rich text and electronic equipment
CN111210493A (en) Method for realizing writing software flow chart
CN111274640A (en) Application method and device between sample boards and electronic equipment
CN112835494A (en) Voice recognition result error correction method and device

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