Stretching method and device for wiring break point in circuit layout, medium and equipment
By constructing boundary lines and selecting perpendicular line intersections in the circuit layout, the problems of local routing adjustment and slope control are solved, improving routing efficiency and accuracy.
Patent Information
- Application Number
- CN202411279599.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies cannot make local adjustments to traces in circuit layouts and have difficulty controlling the slope of traces, resulting in low routing efficiency and poor accuracy.
By acquiring the target inflection point and its stretching point after movement in the circuit layout, a boundary line perpendicular to the angle bisector of the two line segments is constructed. The position of the stretching point is detected, and the perpendicular line closest to the target inflection point is selected. The intersection point is then connected with a straight line to delete the original line segment, thus achieving local adjustment while maintaining the slope.
It improves the efficiency and accuracy of wiring, ensures that the routing slope meets the requirements, and reduces the error of manual adjustment.
Smart Images

Figure CN121706713A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of circuit layout design, and in particular to a method, apparatus, medium, and device for stretching trace inflection points in circuit layouts. Background Technology
[0002] In circuit layout design, after drawing the layout graphics of components, pads, and other circuit entities, it is necessary to arrange traces using polygonal routing between the connection points of each layout graphic to represent the circuit connection relationships. Existing routing methods include manual routing and automatic routing. Manual routing is done by designers manually, while automatic routing is performed automatically by software according to pre-set routing rules.
[0003] However, regardless of the routing method used, the resulting traces are rarely able to fully meet requirements for signal integrity, power distribution, timing, and area constraints. Designers often need to make localized adjustments, or even manually adjust individual traces, such as stretching or deforming them. When adjusting a trace, most of it may meet the requirements, with only a small portion needing adjustment. However, current layout design software does not support adjusting only a portion of the trace; it only allows moving or stretching the entire trace. Furthermore, since the slope of the trace also has certain requirements, it is difficult to precisely control the slope when manually adjusting the trace. Therefore, manual adjustments suffer from low accuracy and a high error rate. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, medium, and device for stretching the inflection points of traces in a circuit layout, so as to solve the problems of existing technologies that cannot adjust the local area of the trace and cannot control the trace slope, thereby enabling the local adjustment of the trace and maintaining the trace at a specified slope.
[0005] To solve the above technical problems, the present invention provides a method for stretching trace inflection points in a circuit layout, comprising:
[0006] Obtain the target inflection point and the stretching point after the target inflection point is moved on the trace using a polyline routing method in the circuit layout. The included angle between the two line segments to which the target inflection point belongs is a non-obtuse angle.
[0007] Construct a boundary line that passes through the target inflection point and is perpendicular to the angle bisector of the two line segments;
[0008] Detect the position of the stretching point relative to the boundary line;
[0009] When the stretching point and the two line segments are located on the same side of the dividing line, select the target perpendicular line whose foot is closest to the target inflection point from three perpendicular lines that pass through the stretching point, the first adjacent endpoint and the second adjacent endpoint on the two line segments that are far from the target inflection point and are perpendicular to the angle bisector.
[0010] Find the two intersection points between the target perpendicular line and the two line segments;
[0011] Connect the two intersection points with a straight line, and delete the portion of the two line segments from the two intersection points to the target inflection point.
[0012] Preferably, the stretching method further includes:
[0013] If the stretching point is not located on the same side of the dividing line as the two line segments, delete the stretching point and keep the two line segments unchanged.
[0014] Preferably, the step of detecting the position of the stretching point relative to the boundary line includes:
[0015] Find the target foot of the perpendicular line that passes through the stretching point and is perpendicular to the angle bisector;
[0016] Construct the identification area defined by the extension lines of the first line segment and the second line segment, with the target inflection point as the starting point;
[0017] Detect the position of the target's vertical foot relative to the recognition area;
[0018] If the target foot is outside the identification area, confirm that the stretching point and the two line segments are on the same side of the dividing line.
[0019] Preferably, the step of detecting the position of the stretching point relative to the boundary line further includes:
[0020] If the target foot is located within the identification area, it is confirmed that the stretching point is not on the same side of the dividing line as the two line segments.
[0021] Preferably, the step of detecting the position of the target foot relative to the recognition area includes:
[0022] Calculate the first vector product of the vector from the first adjacent endpoint to the target perpendicular foot and the vector from the first adjacent endpoint to the target inflection point, and the second vector product of the vector from the first adjacent endpoint to the target inflection point and the vector from the target inflection point to the second adjacent endpoint;
[0023] Determine whether the directions of the first vector product and the second vector product are the same;
[0024] If the directions are different, confirm that the target's vertical foot is outside the recognition area.
[0025] Preferably, the step of detecting the position of the target foot relative to the recognition area further includes:
[0026] If the directions are different, confirm that the target's perpendicular foot is within the recognition area.
[0027] Preferably, obtaining the target inflection point on the circuit layout using a polyline routing method includes:
[0028] An extended region is constructed centered on each bend point of the trace using polyline routing in the circuit layout;
[0029] Get the position of the mouse cursor in the circuit layout;
[0030] When the mouse cursor is located within the currently expanded area, the vertex corresponding to the currently expanded area is used as a temporary vertex.
[0031] Upon receiving a confirmation instruction, the temporary inflection point is used as the target inflection point.
[0032] Preferably, the extended region is a circular region with a preset radius.
[0033] To solve the above-mentioned technical problems, the present invention also provides a stretching device for trace inflection points in circuit layout, comprising:
[0034] The acquisition module is used to acquire the target inflection point and the stretching point after the target inflection point is moved on the trace using polyline routing in the circuit layout. The included angle between the two line segments to which the target inflection point belongs is a non-obtuse angle.
[0035] The construction module is used to construct the boundary line that passes through the target inflection point and is perpendicular to the angle bisector of the two line segments;
[0036] The detection module is used to detect the position of the stretching point relative to the boundary line;
[0037] The selection module is used to select, when the stretching point and the two line segments are located on the same side of the dividing line, the target perpendicular line whose foot is closest to the target inflection point from three perpendicular lines that pass through the stretching point, the first adjacent endpoint and the second adjacent endpoint on the two line segments that are far away from the target inflection point and are perpendicular to the angle bisector.
[0038] The search module is used to find the two intersection points of the target perpendicular line and the two line segments;
[0039] The wiring module is used to connect two intersection points with a straight line and delete the portion of the two line segments from the two intersection points to the target inflection point.
[0040] To address the aforementioned technical problems, the present invention also provides a storage medium storing a computer program configured to execute the stretching method for trace inflection points in the circuit layout as described in any of the preceding claims during runtime.
[0041] To address the aforementioned technical problems, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the stretching method for trace inflection points in the circuit layout described in any of the preceding claims.
[0042] Unlike existing technologies, the method for stretching trace inflection points in circuit layouts provided by this invention obtains a target inflection point where the included angle between two line segments is not obtuse, and its stretched point after movement. A boundary line is constructed passing through the target inflection point and perpendicular to the angle bisector of the two line segments. The position of the stretched point relative to the boundary line is detected. When the stretched point is located on one side of the two line segments, a target perpendicular line is selected from three perpendicular lines passing through the stretched point, the first adjacent endpoint and the second adjacent endpoint of the two line segments far from the target inflection point, and perpendicular to the angle bisector. The perpendicular line with the closest foot to the target inflection point is then connected to the two intersection points of the target perpendicular line and the two line segments. Simultaneously, the portion from the two intersection points of the two line segments to the target inflection point is deleted. Since only the two line segments at the target inflection point are adjusted, and the newly generated line segments are always parallel to the boundary line, local adjustments to the traces can be achieved, maintaining a specified slope. This improves routing efficiency, accuracy, and precision.
[0043] The device for stretching trace inflection points, the storage medium, and the electronic device provided by this invention belong to the same inventive concept as the method for stretching trace inflection points in circuit layouts, and therefore have the same beneficial effects, which will not be described in detail here. Attached Figure Description
[0044] Figure 1 This is a schematic flowchart illustrating the method for stretching trace inflection points in a circuit layout according to an embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of the target inflection point and the two line segments to which it belongs.
[0046] Figure 3 This is a schematic diagram of the dividing line.
[0047] Figure 4 This is a schematic diagram of three perpendicular lines passing through the stretching point, the first adjacent endpoint and the second adjacent endpoint of the two line segments that are far from the target inflection point, and the perpendicular angle bisector.
[0048] Figure 5 This is a schematic diagram showing the intersection of the target perpendicular line and two line segments.
[0049] Figure 6 This is a diagram showing the result of connecting two intersection points with straight lines and deleting the portion of the two line segments from the intersection points to the target inflection point.
[0050] Figure 7 for Figure 1The flowchart shown illustrates the specific process of step S3 in the process diagram.
[0051] Figure 8 This is a schematic diagram of a perpendicular line passing through the stretching point and perpendicular to the angle bisector.
[0052] Figure 9 This is a schematic diagram of the identified area.
[0053] Figure 10 This is a schematic diagram showing the target's perpendicular foot located outside the recognition area.
[0054] Figure 11 This is a schematic diagram showing the target's perpendicular foot located within the recognition area.
[0055] Figure 12 for Figure 7 The flowchart shown illustrates the specific process of step S33 in the process diagram.
[0056] Figure 13 This is a schematic diagram when the target's perpendicular foot is outside the recognition area.
[0057] Figure 14 This is a schematic diagram showing the target's perpendicular foot within the recognition area.
[0058] Figure 15 for Figure 1 The flowchart shown is a partial schematic diagram of step S1 in the process.
[0059] Figure 16 This is a schematic diagram of the stretching device for trace inflection points in a circuit layout provided in an embodiment of the present invention. Detailed Implementation
[0060] The specific embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. The advantages and features of the present invention will become clearer from the following description and claims. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0061] In the description of this invention, it should be understood that the terms "center", "upper", "lower", "left", "right", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0062] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0063] Please see Figure 1 This invention provides a method for stretching trace inflection points in a circuit layout. The stretching method includes the following steps:
[0064] S1: Obtain the target inflection point and the stretching point after the target inflection point is moved on the circuit layout using polyline routing. The included angle between the two line segments to which the target inflection point belongs is a non-obtuse angle.
[0065] In circuit routing design, using zigzag routing offers numerous advantages, such as reducing signal interference during transmission, improving circuit reliability, and saving routing space. Therefore, zigzag routing has become a common layout routing standard.
[0066] Every trace in a circuit board diagram includes at least one inflection point. The start and end points of a trace are its two endpoints, not inflection points. Target inflection points can be identified, for example, by filtering specific identifiers. Alternatively, they can be determined based on external input, such as when a user selects an inflection point with the mouse.
[0067] Regardless of which inflection point the target inflection point is, the target inflection point must be the common endpoint of two line segments. Therefore, the two line segments to which the target inflection point belongs have an included angle. In this embodiment, the included angle is a non-obtuse angle, that is, the included angle can be a right angle or an acute angle.
[0068] The stretch point is the point after the target inflection point has moved; that is, the new position of the target inflection point after the trace has been stretched.
[0069] like Figure 2 The diagram shows the target inflection point and the two line segments to which it belongs. The target inflection point P is the common endpoint of the two line segments s1 and s2, and the angle between line segments s1 and s2 is an acute angle, for example, 45 degrees.
[0070] S2: Construct the boundary line that passes through the target inflection point and is perpendicular to the angle bisectors of the two line segments.
[0071] The dividing line is the perpendicular line to the angle bisector of the two line segments, and the foot of this perpendicular line is the target inflection point. For example... Figure 3The diagram shown is a schematic of the dividing line. The dividing line L1 passes through the target inflection point P and is perpendicular to the angle bisector s3 of the two line segments s1 and s2 to which the target inflection point P belongs.
[0072] S3: Detect the position of the stretching point relative to the boundary line.
[0073] The stretching point and the boundary line are both located on the circuit layout. The position of the stretching point relative to the boundary line can be detected by using the coordinate information of the circuit layout or by using geometric relationships.
[0074] S4: When the stretching point and the two line segments are on the same side of the dividing line, select the target perpendicular line whose foot is closest to the target inflection point from the three perpendicular lines that pass through the stretching point, the first adjacent endpoint and the second adjacent endpoint of the two line segments that are far from the target inflection point and the perpendicular bisector of the angle.
[0075] In this context, the target inflection point is one of the two line segments, and the other endpoints of the two line segments furthest from the target inflection point are the first and second adjacent endpoints, respectively. Since all three perpendicular lines are perpendicular to the angle bisectors, and the feet of all three perpendicular lines lie on the angle bisectors, we can determine the perpendicular foot closest to the target inflection point among the three feet, and thus identify the perpendicular line containing that foot as the target perpendicular line.
[0076] like Figure 4 The diagram shows three perpendicular lines passing through the stretching point, the first adjacent endpoint and the second adjacent endpoint of the two line segments far from the target inflection point, and the perpendicular bisector of the angle. The stretching point Q is located on the same side of the dividing line L1 as the two line segments s1 and s2. The perpendicular line passing through the stretching point Q and the perpendicular bisector of the angle s3 is L2; the perpendicular line passing through the first adjacent endpoint A and the perpendicular bisector of the angle s3 is L3; and the perpendicular line passing through the first adjacent endpoint B and the perpendicular bisector of the angle s3 is L4. The foot of the perpendicular line L2 is closest to the target inflection point P; therefore, the perpendicular line L2 is the target perpendicular line.
[0077] S5: Find the two intersection points of the target perpendicular line with the two line segments.
[0078] The foot of the target perpendicular line is closest to the target inflection point. Therefore, the target perpendicular line must intersect with the two line segments to which the target inflection point belongs.
[0079] like Figure 5 The diagram shows the intersection points of the target perpendicular line with two line segments. The intersection point of the target perpendicular line L2 with line segment s1 is J1, and the intersection point with line segment s2 is J2.
[0080] It should be noted that since the target vertical line L2 passes through the stretching point Q, the intersection point J1 is located between the first adjacent endpoint A and the target inflection point P, and the intersection point J2 is located between the second adjacent endpoint B and the target inflection point P. If the target vertical line L2 passes through the first adjacent endpoint A or the second adjacent endpoint B, then the intersection point J1 is the first adjacent endpoint A or the intersection point J2 is the second adjacent endpoint B.
[0081] S6: Connect the two intersection points with a straight line and delete the portion of the two line segments from the two intersection points to the target inflection point.
[0082] In this process, a straight line connects two intersection points to generate a new line segment. After the portion between the intersection point and the target inflection point on the two line segments is deleted, the new line segment and the remaining portion of the two line segments form a new polyline. Since the line connecting the two intersection points is always perpendicular to the angle bisector of the two line segments, and the remaining portion of the two line segments to which the target inflection point belongs, as well as the portion of the routing line to which the target inflection point belongs other than the two line segments, no change is made, thus local adjustments to the routing line can be achieved, and the adjusted routing line maintains the specified slope.
[0083] like Figure 6 The diagram shows the result after connecting two intersection points with a straight line and deleting the portions of the two line segments from the two intersection points to the target inflection point. Connecting the two intersection points J1 and J2 with a straight line and deleting the portions of line segment s1 from intersection point J1 to the target inflection point P, as well as the portions of line segment s2 from intersection point J2 to the target inflection point P, forms a new polyline z1. The two line segments s1 and s2 belonging to the target inflection point P then become polyline z1, achieving a local adjustment of the routing. Furthermore, the slopes of polyline z1 are the slopes of line segments s1, s2, and the target perpendicular line L2, meaning that the adjusted routing slope maintains the specified slope.
[0084] In the above manner, the method for stretching trace inflection points in the circuit layout of this invention only obtains the target inflection point where the included angle between the two line segments is not obtuse and the stretched point after its movement. A boundary line is constructed that passes through the target inflection point and is perpendicular to the angle bisector of the two line segments. The position of the stretched point relative to the boundary line is detected. When the stretched point is located on one side of the two line segments, the target perpendicular line with the foot closest to the target inflection point is selected from three perpendicular lines that pass through the stretched point, the first adjacent endpoint and the second adjacent endpoint of the two line segments that are far from the target inflection point and are perpendicular to the angle bisector. A straight line is connected between the target perpendicular line and the two intersection points of the two line segments. At the same time, the portion from the two intersection points of the two line segments to the target inflection point is deleted. Since only the two line segments mentioned above are adjusted, and the newly generated line segments are always parallel to the boundary line, it is possible to adjust the trace locally and maintain the trace at a specified slope, thereby improving routing efficiency, routing accuracy and precision.
[0085] Please refer again to some embodiments of this application. Figure 1The stretching method also includes:
[0086] S7: If the stretching point is not located on the same side of the dividing line as the two line segments, delete the stretching point and keep the two line segments unchanged.
[0087] Since the location of the stretching point is set according to actual needs and is therefore uncertain, the stretching point may not be on the same side of the dividing line as the two line segments. In this case, no adjustments are made to the routing; instead, the stretching point is deleted, and the two line segments to which the target inflection point belongs remain unchanged. There are two scenarios where the stretching point is not on the same side of the dividing line as the two line segments: either the stretching point is on the dividing line itself, or the stretching point is on a different side of the dividing line. In either case, the stretching point is deleted, and the two line segments remain unchanged.
[0088] In some embodiments of this application, please refer to Figure 7 The step of detecting the position of the stretching point relative to the boundary line, i.e., step S3, includes:
[0089] S31: Find the foot of the perpendicular line that passes through the stretching point and is perpendicular to the angle bisector.
[0090] The foot of the perpendicular to the target lies on the angle bisector. For example... Figure 8 The diagram shows a perpendicular line passing through the stretching point and perpendicular to the angle bisector s3. The target foot of the perpendicular line L2, passing through the stretching point Q and perpendicular to the angle bisector s3, is Z1.
[0091] S32: Construct the recognition area defined by the extensions of the first and second line segments, starting from the target inflection point.
[0092] The identification area is defined by the extensions of the first and second line segments. Both the extensions of the first and second line segments are rays, and the starting points of both rays are the target inflection points.
[0093] like Figure 9 The diagram shown is a schematic of the recognition area. The extension of the first line segment s1 and the extension of the second line segment s2 define the recognition area W.
[0094] S33: Detect the position of the target's vertical foot relative to the recognition area.
[0095] Since the target's perpendicular foot is located on the angle bisector, and the extension of the angle bisector must pass through the recognition area, the position of the target's perpendicular foot relative to the recognition area can be detected using coordinate information or geometric relationships.
[0096] S34: If the target foot is outside the identification area, confirm that the stretching point and the two line segments are on the same side of the dividing line.
[0097] If the target perpendicular foot is outside the recognition area, the corresponding perpendicular line will not pass through the recognition area, confirming that the stretching point and the two line segments are on the same side of the dividing line.
[0098] like Figure 10 The diagram shows the target perpendicular foot located outside the recognition area. Since the target perpendicular foot Z1 is located outside the recognition area W, the perpendicular line L2 passing through the stretching point Q will not pass through the recognition area W. The stretching point Q and the two line segments s1 and s2 are located on the same side of the dividing line L1.
[0099] Furthermore, the step of detecting the position of the stretching point relative to the boundary line also includes:
[0100] S35: If the target foot is within the identification area, confirm that the stretching point is not on the same side of the dividing line as the two line segments.
[0101] If the foot of the target perpendicular is located within the recognition area, the corresponding perpendicular line will pass through the recognition area or the target inflection point, confirming that the stretching point is not on the same side of the dividing line as the two line segments. It should be noted that the extensions of the first and second line segments are also within the recognition area.
[0102] like Figure 11 The diagram shows the target perpendicular foot located within the recognition area. If the target perpendicular foot Z1 is located within the recognition area W, then the perpendicular line L2 passing through the stretching point Q will either pass through the recognition area W or the target inflection point P. The stretching point Q is not located on the same side of the dividing line L1 as the two line segments s1 and s2.
[0103] When detecting the position of the target's perpendicular foot relative to the recognition area, in addition to using the coordinate information of the circuit layout, vectors can also be used to detect the position of the target's perpendicular foot. Please refer to [link / reference]. Figure 12 ,yes Figure 7 The flowchart shown illustrates the specific process of step S33. In the embodiments of this application, the step of detecting the position of the target's perpendicular foot relative to the recognition area, i.e., step S33, includes:
[0104] S331: Calculate the first vector product of the vector from the first adjacent endpoint pointing to the target perpendicular foot and the vector from the first adjacent endpoint pointing to the target inflection point, and the second vector product of the vector from the first adjacent endpoint pointing to the target inflection point and the vector from the target inflection point pointing to the second adjacent endpoint.
[0105] Since the foot of the target perpendicular lies on the angle bisector of the two line segments to which the target inflection point belongs, the angle between the vector from the first adjacent endpoint to the foot of the target perpendicular and the vector from the first adjacent endpoint to the target inflection point can only be acute. Since the angle between the two line segments to which the target inflection point belongs is non-obtuse, the angle between the vector from the first adjacent endpoint to the target inflection point and the vector from the target inflection point to the second adjacent endpoint will not exceed 90 degrees.
[0106] S332: Determine whether the directions of the first vector product and the second vector product are the same.
[0107] In this system, the direction of the first vector product changes depending on the position of the target's perpendicular foot, while the direction of the second vector product remains constant regardless of the target's perpendicular foot position. Therefore, the directions of the first and second vector products may be the same or different. Specifically, when the target's perpendicular foot is outside the recognition area, assuming the direction of the second vector product is positive, then the direction of the first vector product is negative; their directions are different. Only when the target's perpendicular foot is within the recognition area does the direction of the first vector product become positive, and it becomes the same as the direction of the second vector product.
[0108] S333: If the directions are different, confirm that the target's vertical foot is outside the recognition area.
[0109] The first and second vector products have different directions, and this condition is only satisfied when the target's perpendicular foot is outside the recognition area. Therefore, it can be confirmed that the target's perpendicular foot is outside the recognition area. Figure 13 The diagram shows a scenario where the target's perpendicular foot is outside the recognition area. The first vector product is the vector AZ1 pointing from the first adjacent endpoint A to the target's perpendicular foot Z1, and the vector AP pointing from the first adjacent endpoint A to the target's inflection point P. The direction of the first vector product is negative. The second vector product is the vector AP pointing from the first adjacent endpoint A to the target's inflection point P, and the vector PB pointing from the target's inflection point P to the second adjacent endpoint B. The direction of the second vector product is positive. Since the directions of the first and second vector products are different, it is confirmed that the target's perpendicular foot Z1 is outside the recognition area W.
[0110] Furthermore, step S33 also includes:
[0111] S334: If the directions are the same, confirm that the target's vertical foot is within the recognition area.
[0112] In this case, the first and second vector products have the same direction, and this condition is only satisfied when the target's perpendicular foot is within the recognition area. Therefore, it can be confirmed that the target's perpendicular foot is within the recognition area. Figure 14 The diagram shows the target's perpendicular foot within the recognition area. The direction of the first vector product is positive, and the direction of the second vector product is also positive. Since the directions of the first and second vector products are the same, it is confirmed that the target's perpendicular foot Z1 is within the recognition area W.
[0113] Please see Figure 15 ,yes Figure 1 The diagram shows a partial flowchart of step S1 in the illustrated process. In some embodiments of this application, the step of obtaining the target inflection point on a trace using a polyline routing method in the circuit layout includes:
[0114] S11: Construct an extended region centered on each bend point of the trace using polyline routing in the circuit layout.
[0115] In cases where the circuit layout is large and complex, it is difficult to accurately select the inflection point using a mouse. Therefore, an extended region centered on the inflection point can be used instead. In this embodiment, the extended region is a circular area with a preset radius. The preset value can be set according to actual needs.
[0116] S12: Get the position of the mouse cursor in the circuit layout;
[0117] S13: When the mouse cursor is within the current extended area, the vertex corresponding to the current extended area is used as a temporary vertex.
[0118] If the mouse cursor is located within the current expanded area, it indicates that the corresponding vertex of the current expanded area is temporarily selected and thus serves as a temporary vertex.
[0119] S14: Upon receiving a confirmation instruction, the temporary inflection point will be used as the target inflection point.
[0120] The confirmation command can be triggered by certain operations, such as the user clicking a preset key on the mouse or keyboard, or selecting a preset option on the user interface.
[0121] Please refer to Figure 16 This invention also provides a stretching device for trace inflection points in a circuit layout. The stretching device in this embodiment includes:
[0122] The acquisition module 11 is used to acquire the target inflection point and the stretching point after the target inflection point is moved on the trace using polyline routing in the circuit layout. The included angle between the two line segments to which the target inflection point belongs is a non-obtuse angle. In circuit routing design, designing traces as polylines has many advantages, such as reducing signal interference during transmission, improving circuit reliability, and saving routing space. Therefore, polyline routing has become a common layout routing standard. Every trace in the circuit board diagram includes at least one inflection point. The start and end points of the trace are two endpoints, not inflection points. Target inflection points can be acquired through identification, for example, by filtering specific identification information. Alternatively, they can be determined based on external input, such as by the user selecting a specific inflection point with the mouse. Regardless of which inflection point is the target inflection point, it must be a common endpoint of two line segments. Therefore, the two line segments to which the target inflection point belongs have an included angle. In this embodiment, this included angle is a non-obtuse angle, meaning it can be a right angle or an acute angle. The stretch point is the point after the target inflection point has moved; that is, the new position of the target inflection point after the trace has been stretched.
[0123] Module 12 is used to construct a boundary line that passes through the target inflection point and is perpendicular to the angle bisectors of the two line segments. The boundary line is the perpendicular line to the angle bisectors of the two line segments, and the foot of the perpendicular line is the target inflection point.
[0124] The detection module 13 is used to detect the position of the stretching point relative to the boundary line. Both the stretching point and the boundary line are located on the circuit layout, and the position of the stretching point relative to the boundary line can be detected using the coordinate information of the circuit layout or geometric relationships.
[0125] Selection module 14 is used to select the target perpendicular line whose foot is closest to the target inflection point from three perpendicular lines passing through the stretching point, the first adjacent endpoint and the second adjacent endpoint of the two line segments that are far from the target inflection point, and the perpendicular to the angle bisector, when the stretching point and the two line segments are on the same side of the dividing line. Specifically, in the two line segments to which the target inflection point belongs, the target inflection point is one of the endpoints of the two line segments, and the other endpoints of the two line segments that are far from the target inflection point are the first adjacent endpoint and the second adjacent endpoint, respectively. Since all three perpendicular lines are perpendicular to the angle bisector, and the feet of all three perpendicular lines lie on the angle bisector, the perpendicular foot closest to the target inflection point among the three can be determined, and thus the perpendicular line containing that foot is identified as the target perpendicular line.
[0126] The search module 15 is used to find the two intersection points of the target perpendicular line and the two line segments. Among them, the foot of the target perpendicular line is closest to the target inflection point. Therefore, the target perpendicular line must intersect the two line segments to which the target inflection point belongs.
[0127] The routing module 16 is used to connect two intersection points with a straight line and delete the portion of the two line segments from the two intersection points to the target inflection point. Connecting the two intersection points with a straight line generates a new line segment. After the portion between the intersection points and the target inflection point is deleted, the new line segment and the remaining portions of the two line segments form a new polygonal line. Since the line connecting the two intersection points is always perpendicular to the angle bisector of the two line segments, and the remaining portions of the two line segments to which the target inflection point belongs, as well as the portion of the routing line to which the target inflection point belongs other than the two line segments, remain unchanged, local adjustments to the routing can be achieved, and the adjusted routing maintains a specified slope.
[0128] The stretching device for trace inflection points in the circuit layout of this embodiment may also include other technical features of the stretching method for trace inflection points in the circuit layout of the foregoing embodiment, implement all the steps of the stretching method of the foregoing embodiment, and have the same technical effect as the stretching method of the foregoing embodiment, which will not be repeated here.
[0129] The present invention also provides a storage medium storing a computer program configured to execute the stretching method for trace inflection points in the circuit layout of the foregoing embodiments when running.
[0130] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.
[0131] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the stretching method of trace inflection points in the circuit layout of the foregoing embodiments.
[0132] Specifically, the memory and processor can be connected via a data bus. Furthermore, the aforementioned electronic device may also include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0133] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," or "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0134] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the protection scope of the present invention.
Claims
1. A method for stretching trace inflection points in a circuit layout, characterized in that, include: Obtain the target inflection point and the stretching point after the target inflection point is moved on the trace using a polyline routing method in the circuit layout. The included angle between the two line segments to which the target inflection point belongs is a non-obtuse angle. Construct a boundary line that passes through the target inflection point and is perpendicular to the angle bisector of the two line segments; Detect the position of the stretching point relative to the boundary line; When the stretching point and the two line segments are located on the same side of the dividing line, select the target perpendicular line whose foot is closest to the target inflection point from three perpendicular lines that pass through the stretching point, the first adjacent endpoint and the second adjacent endpoint on the two line segments that are far from the target inflection point and are perpendicular to the angle bisector. Find the two intersection points between the target perpendicular line and the two line segments; Connect the two intersection points with a straight line, and delete the portion of the two line segments from the two intersection points to the target inflection point.
2. The stretching method according to claim 1, characterized in that, The stretching method further includes: If the stretching point is not located on the same side of the dividing line as the two line segments, delete the stretching point and keep the two line segments unchanged.
3. The stretching method according to claim 2, characterized in that, The step of detecting the position of the stretching point relative to the boundary line includes: Find the target foot of the perpendicular line that passes through the stretching point and is perpendicular to the angle bisector; Construct the identification area defined by the extension lines of the first line segment and the second line segment, with the target inflection point as the starting point; Detect the position of the target's vertical foot relative to the recognition area; If the target foot is outside the identification area, confirm that the stretching point and the two line segments are on the same side of the dividing line.
4. The stretching method according to claim 3, characterized in that, The step of detecting the position of the stretching point relative to the boundary line further includes: If the target foot is located within the identification area, it is confirmed that the stretching point is not on the same side of the dividing line as the two line segments.
5. The stretching method according to claim 3, characterized in that, The step of detecting the position of the target's perpendicular foot relative to the recognition area includes: Calculate the first vector product of the vector from the first adjacent endpoint to the target perpendicular foot and the vector from the first adjacent endpoint to the target inflection point, and the second vector product of the vector from the first adjacent endpoint to the target inflection point and the vector from the target inflection point to the second adjacent endpoint; Determine whether the directions of the first vector product and the second vector product are the same; If the directions are different, confirm that the target's vertical foot is outside the recognition area.
6. The stretching method according to claim 5, characterized in that, The step of detecting the position of the target foot relative to the recognition area further includes: If the directions are the same, confirm that the target's perpendicular foot is located within the identification area.
7. The stretching method according to claim 1, characterized in that, The acquisition of target inflection points on traces using polyline routing in the circuit layout includes: An extended region is constructed centered on each bend point of the trace using polyline routing in the circuit layout; Get the position of the mouse cursor in the circuit layout; When the mouse cursor is located within the currently expanded area, the vertex corresponding to the currently expanded area is used as a temporary vertex. Upon receiving a confirmation instruction, the temporary inflection point is used as the target inflection point.
8. The stretching method according to claim 7, characterized in that, The extended region is a circular region with a preset radius.
9. A stretching device for trace inflection points in a circuit layout, characterized in that, include: The acquisition module is used to acquire the target inflection point and the stretching point after the target inflection point is moved on the trace using polyline routing in the circuit layout. The included angle between the two line segments to which the target inflection point belongs is a non-obtuse angle. The construction module is used to construct the boundary line that passes through the target inflection point and is perpendicular to the angle bisector of the two line segments; The detection module is used to detect the position of the stretching point relative to the boundary line; The selection module is used to select, when the stretching point and the two line segments are located on the same side of the dividing line, the target perpendicular line whose foot is closest to the target inflection point from three perpendicular lines that pass through the stretching point, the first adjacent endpoint and the second adjacent endpoint on the two line segments that are far away from the target inflection point and are perpendicular to the angle bisector. The search module is used to find the two intersection points of the target perpendicular line and the two line segments; The wiring module is used to connect two intersection points with a straight line and delete the portion of the two line segments from the two intersection points to the target inflection point.
10. A storage medium, characterized in that, The storage medium stores a computer program, which is configured to execute the stretching method for trace inflection points in the circuit layout according to any one of claims 1 to 8 when it is run.
11. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the stretching method for trace inflection points in a circuit layout as described in any one of claims 1 to 8.