Regeneration method and system after wiring dragging and storage medium
By obtaining component position movement information in real time, regenerating and adjusting the connection lines, the problem of overlapping connection lines when dragging the components is solved, and the clarity of electrical connections and layouts is achieved.
Patent Information
- Application Number
- CN202411976775.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
In the circuit schematic design, the connection lines may overlap when the component is dragged, resulting in the problem of unnecessary segments in subsequent exports and layouts.
By obtaining the real-time movement information of the object position, a new connection line is regenerated and a new connection line is determined whether there is an overlap between the new connection line and other connection lines. If there is overlap, delete the overlapping part and regenerate the connection line at its location to establish an electrical connection relationship.
This prevents overlapping of connecting lines during component dragging, ensures electrical connection of connecting lines, and avoids the problems of redundant line segments in subsequent exports and layouts.
Smart Images

Figure CN119940281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of design software, and in particular to a wiring dragging and regeneration method, system and storage medium. Background Art
[0002] Before designing a circuit board, you need to design a circuit schematic, that is, design the connection relationship of the circuit, including the components required for the design and the connection relationship between the connecting lines of each component. These designs are currently designed using computer design software, that is, CAD software (Computer Aided Design). After the design is completed, the schematic diagram contains the connection lines of each component. At this time, if you want to drag the component, since the connecting line and the component have formed a connection relationship, the connecting line will be dragged together when the component is dragged. When dragging, in order to keep the line horizontal and vertical, the connecting line will be extended horizontally and vertically. After the component is dragged, the connecting line with the connection relationship needs to re-establish the connection relationship. There may be overlapping of the connecting lines, which will cause redundant line segments for the subsequent schematic export and PCB layout. Summary of the invention
[0003] To this end, it is necessary to provide a wiring drag regeneration method, system and storage medium to solve the problem of overlapping connection lines when dragging components in existing schematic design.
[0004] To achieve the above object, the present invention provides a wiring dragging and regeneration method, comprising the following steps:
[0005] Get real-time movement information of the object's location;
[0006] Determine the nearest node position information in the object's connection line according to the object's real-time movement information;
[0007] Regenerate a new connection line of the object between the two node positions according to the nearest node position information and the adjacent node position information of the connection line;
[0008] Get the position of the object after it moves.
[0009] After the determination operation, it is determined whether the new connection line has an overlapping portion with other connection lines connected to the nearest node;
[0010] If there is an overlapping part, the overlapping part of the new connecting line and the other connecting lines is deleted, a new connecting line is generated at the location of the overlapping part, and the connecting line is connected to the two ends of the new connecting line and the other connecting lines that have been deleted, and an electrical connection relationship is established.
[0011] Furthermore, before obtaining the real-time movement information of the object position, the following steps are also included:
[0012] Get the trigger operation of the object position movement;
[0013] Determine whether the nearest node position information of the object is connected with more than two connection lines. If so, regenerate an adjacent node at the nearest node position, connect the adjacent node to the two or more connection lines and fix them on the connection lines, and generate a new connection line between the nearest node position and the adjacent node, and then enter the step of obtaining real-time movement information of the object position;
[0014] If only one connection line is connected, the process directly proceeds to the step of obtaining the real-time movement information of the object position.
[0015] Furthermore, the obtaining of the real-time movement information of the object position includes obtaining the real-time movement information of the object following the movement of a mouse or the pressing of up, down, left, or right keys on a keyboard.
[0016] Furthermore, the new connection lines include transverse connection lines and longitudinal connection lines, and the transverse connection lines and longitudinal connection lines are connected to form an L shape.
[0017] Furthermore, if the object has multiple nodes with connection lines, determining the nearest node position information in the connection line of the object according to the real-time movement information of the object position includes:
[0018] The nearest node position information of each of the multiple nodes of the object is determined according to the real-time movement information of the object position.
[0019] Furthermore, the obtaining of real-time movement information of the object position includes:
[0020] Get the operation information of multiple object selection to get the real-time movement information of multiple object positions.
[0021] Furthermore, the method further comprises the steps of:
[0022] The new connection line is highlighted.
[0023] Furthermore, the object includes a component or a connecting line.
[0024] The present invention provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the embodiments of the present invention are implemented.
[0025] The wiring dragging and regeneration system of the present invention comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method described in any one of the embodiments of the present invention are implemented.
[0026] Different from the prior art, the above technical solution obtains the real-time movement information of the object position; regenerates a new connection line, and then determines whether there is an overlap between the new connection line and other connection lines connected to the nearest node; if there is an overlap, the overlapping part of the new connection line and other connection lines is deleted, and a section of connection line is regenerated at the location of the overlapping part, and the section of connection line is connected to the two ends of the new connection line and other connection lines that have been deleted, and an electrical connection relationship is established. In this way, the dragging of the wiring is realized, the overlapping of the connection lines is avoided, and the electrical connection of the connection lines is realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A method flow chart of a specific embodiment of the present invention;
[0028] Figure 2 A schematic diagram of the wiring design of the present invention;
[0029] Figure 3 A schematic diagram of wiring dragging of the present invention;
[0030] Figure 4 It is a schematic diagram regenerated after dragging the wiring of the present invention;
[0031] Figure 5 A schematic diagram of an embodiment of wiring and dragging two connecting lines of the present invention;
[0032] Figure 6 It is a schematic diagram of an embodiment of the present invention after two connecting lines are wired and dragged.
[0033] Description of reference numerals:
[0034] 1. Editing area,
[0035] 2. Components,
[0036] 3. Connecting wire;
[0037] 40. The nearest node;
[0038] 41. Adjacent nodes;
[0039] 42. New node;
[0040] 5. Overlapping connecting lines;
[0041] 6. New connecting line. DETAILED DESCRIPTION
[0042] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.
[0043] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.
[0044] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.
[0045] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.
[0046] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0047] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.
[0048] Similar to the understanding in the Patent Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.
[0049] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0050] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0051] See also Figures 1 to 5 The present invention provides a wiring regeneration method after dragging, and the method is used in CAD design software. The design software includes an editing area 1, in which components 2 can be placed and connecting lines 3 can be edited. Component 2 is the object of operation in this embodiment, and the mouse can drag the component 2. Then enter step S101 to obtain the real-time movement information of the object position; the real-time movement information here is the position information of the component following the movement of the mouse. Figure 2 to Figure 3As shown, the component is moved downward, and this movement information is the real-time change value of the Y-axis coordinate of the component. Then, step S102 is entered to determine the nearest node position information in the connecting line of the object according to the real-time movement information of the object position. The nearest node of the object is node 40, which is generally a point on the component used to connect with the connecting line. A component can contain one node or multiple nodes. Since the component is moving in real time, the node position is also changing in real time. When changing in real time, the connecting line between the nearest node 40 and the adjacent node 41 must change with the movement of the component, and the adjacent node 41 is another node closest to the nearest node 40 on the connecting line where the nearest node 40 is located. The real-time connecting line generation process of the two nodes is step S103, according to the nearest node position information and the adjacent node position information of the connecting line, a new connecting line of the object is regenerated between the two node positions. That is, as the component moves, the original connecting line between the two nodes will be replaced by the newly generated connecting line, and the newly generated connecting line moves following the movement of the component. The adjacent node 41 is stationary.
[0052] After the movement is completed, the mouse can be operated, such as releasing the left mouse button to determine the position of the component. At this time, step S104 is entered to obtain the determination operation of the position of the object after the movement; and then step S105 is performed after the determination operation to determine whether there is an overlap between the new connection line and other connection lines connected to the nearest node. Figure 3 As shown, due to the downward movement, an overlapping connection line 5 is generated. Then, step S106 is entered. If there is an overlapping part, the overlapping part of the new connection line and other connection lines is deleted, that is, the original connection line and the position where the line segment 5 in the real-time generated new connection line are located are deleted. And a new connection line is generated at the location of the overlapping part, and the connection line segment is connected to the two ends of the new connection line and other connection lines that have been deleted, and an electrical connection relationship is established. In this way, Figure 4As shown, a new connecting line is generated. Since the new connecting line is a connecting line with the original connecting line, the original adjacent nodes 41 will be removed. Then the lateral part of the new connecting line is T-shaped with the regenerated connecting line, and a new node 42 will be regenerated at the T-shaped intersection. That is, if there is an intersection after the generation, a new node will be generated. If it is a single straight line, the original node will be removed. Of course, if there is no overlapping part, an electrical connection relationship is directly established. The establishment of an electrical connection relationship here refers to recording the node information of each component at both ends of the connecting line, and recording these node information with connections as a separate set with an electrical connection relationship (distinguished from other sets), so that when the PCB is generated later or when an electrical inspection is performed, these nodes can maintain a separate electrical connection relationship. Even if two connecting lines without an electrical connection relationship are crossed or overlapped, they will not be electrically connected.
[0053] In this way, the present invention obtains the real-time moving information of the object position; regenerates a new connection line, and then determines whether there is an overlapping part between the new connection line and other connection lines connected to the nearest node; if there is an overlapping part, the overlapping part of the new connection line and other connection lines is deleted, and a section of connection line is regenerated at the location of the overlapping part, and the section of connection line is connected to the two ends of the new connection line and other connection lines that have been deleted, and an electrical connection relationship is established. In this way, the dragging of the wiring is realized, and the overlapping of the connection lines is avoided, and the electrical connection of the connection lines is realized.
[0054] In some embodiments, there may be more than two connecting lines to a nearest node. In order to avoid moving the two connecting lines, before obtaining the real-time moving information of the object position, the step of obtaining a trigger operation of the object position movement is further included, that is, determining whether the object starts to move from a stationary state. Determine whether the nearest node position information of the object is connected with more than two connecting lines, such as Figure 5 to Figure 6 As shown, the nearest node 40 has two connection lines. If there are more than two connection lines, an adjacent node 41 is regenerated at the nearest node position, the adjacent node is connected to the two or more connection lines and fixed on the connection line, and a new connection line 6 is generated between the nearest node position and the adjacent node, and then the step of obtaining the real-time movement information of the object position is entered; if there is only one connection line connected, the step of obtaining the real-time movement information of the object position is directly entered. In this way, it is possible to avoid dragging the two connection lines, realize the dragging of the connection lines separately, and avoid the situation of chaotic wiring.
[0055] Furthermore, the acquisition of the real-time movement information of the object position includes acquiring the real-time movement information of the object following the movement of the mouse or the pressing of the up, down, left, and right keys on the keyboard. That is, the present invention can move the object to be moved by mouse operation or keyboard operation.
[0056] Furthermore, the new connection line includes a transverse connection line and a longitudinal connection line, and the transverse connection line and the longitudinal connection line are connected to form an L shape. Figure 6 As shown, the new connection line 6 is L-shaped, so that horizontal and vertical connection lines can be formed, and the wiring is more reasonable and regular.
[0057] Each object can contain multiple nodes, and only nodes with connecting lines need to be regenerated. If the object has multiple nodes with connecting lines, the position information of the nearest node in the connecting line of the object is determined according to the real-time movement information of the object position, including: determining the position information of each of the multiple nodes of the object according to the real-time movement information of the object position. That is, each node with connecting lines needs to be regenerated after dragging, and it is determined whether there is overlap and the overlapping operation is deleted, so as to realize the movement of the connecting line of each node of the object.
[0058] The above embodiment is explained by moving one component, but in fact, multiple objects can be moved at the same time. The acquisition of real-time movement information of object positions includes: acquiring operation information of selecting multiple objects to acquire real-time movement information of multiple object positions. The selection of multiple objects here can be performed by selecting or framing them one by one with a mouse, thereby realizing the movement of multiple objects.
[0059] In some embodiments, in order to provide a real-time prompt for the new connection line, the method further includes the step of highlighting the new connection line, or distinguishing and displaying the new connection line by other colors, so that the newly generated connection line can be seen to be moving when the object moves.
[0060] In all embodiments of the present invention, the objects include components or connecting lines, that is, components and connecting lines can be moved, and all objects related to schematic editing can also be moved. Objects should have nodes, that is, they can be connected to connecting lines (conductors) to achieve electrical connection.
[0061] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented. The storage medium of this embodiment can be a storage medium set in an electronic device, and the electronic device can read the content of the storage medium and implement the effects of the present invention. The storage medium can also be a separate storage medium, and the storage medium is connected to the electronic device, so that the electronic device can read the content in the storage medium and implement the method steps of the present invention.
[0062] The wiring dragging and regeneration system of the present invention comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method described in any one of the embodiments of the present invention are implemented.
[0063] When the storage medium or system of the above embodiment is operated, it can obtain the real-time movement information of the object position; regenerate a new connection line, and then determine whether there is an overlapping part between the new connection line and other connection lines connected to the nearest node; if there is an overlapping part, delete the overlapping part of the new connection line and other connection lines, regenerate a section of connection line at the location of the overlapping part, connect the section of connection line with the two ends of the new connection line and other connection lines that have been deleted, and establish an electrical connection relationship. In this way, the dragging of the wiring is realized, the overlapping of the connection lines is avoided, and the electrical connection of the connection lines is realized.
[0064] It should be noted that, although the above embodiments have been described in this article, the patent protection scope of the present invention is not limited thereby. Therefore, based on the innovative concept of the present invention, changes and modifications made to the embodiments described herein, or equivalent structures or equivalent process changes made using the contents of the present invention specification and drawings, directly or indirectly applying the above technical solutions to other related technical fields, are all included in the patent protection scope of the present invention.
Claims
1. A method for regenerating wiring after dragging, characterized in that: The steps include: Get real-time movement information of the object's location; Determine the nearest node position information in the object's connection line according to the object's real-time movement information; Regenerate a new connection line of the object between the two node positions according to the nearest node position information and the adjacent node position information of the connection line; Get the position of the object after it moves. After the determination operation, it is determined whether the new connection line has an overlapping portion with other connection lines connected to the nearest node; If there is an overlapping part, the overlapping part of the new connecting line and the other connecting lines is deleted, a new connecting line is generated at the location of the overlapping part, and the connecting line is connected to the two ends of the new connecting line and the other connecting lines that have been deleted, and an electrical connection relationship is established.
2. The wiring dragging and regeneration method according to claim 1, characterized in that: Before obtaining the real-time moving information of the object position, the following steps are also included: Get the trigger operation of the object position movement; Determine whether the nearest node position information of the object is connected with more than two connection lines. If so, regenerate an adjacent node at the nearest node position, connect the adjacent node to the two or more connection lines and fix them on the connection lines, and generate a new connection line between the nearest node position and the adjacent node, and then enter the step of obtaining real-time movement information of the object position; If only one connection line is connected, the process directly proceeds to the step of obtaining the real-time movement information of the object position.
3. The wiring dragging and regeneration method according to claim 1, characterized in that: The obtaining of the real-time movement information of the object position includes obtaining the real-time movement information of the object following the movement of the mouse or the pressing of up, down, left, and right keys on the keyboard.
4. The wiring dragging and regeneration method according to claim 1, characterized in that: The new connection lines include a transverse connection line and a longitudinal connection line, and the transverse connection line and the longitudinal connection line are connected to form an L shape.
5. The wiring dragging and regeneration method according to claim 1, characterized in that: If the object has multiple nodes with connection lines, determining the nearest node position information in the object's connection line according to the object's real-time position movement information includes: The nearest node position information of each of the multiple nodes of the object is determined according to the real-time movement information of the object position.
6. The wiring dragging and regeneration method according to claim 1, characterized in that: The obtaining of the real-time movement information of the object position comprises: Get the operation information of multiple object selection to get the real-time movement information of multiple object positions.
7. The wiring dragging and regeneration method according to claim 1, characterized in that: Also includes the steps: The new connection line is highlighted.
8. The wiring dragging and regeneration method according to claim 1, characterized in that: The object includes a component or a connection line.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
10. Regenerate the system after wiring dragging, which is characterized by: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.