A method and system for drawing the shortest line segment between phases of overhead lines based on CAD software

By applying the golden section method and detection method in CAD software, the shortest phase-to-phase segment of overhead lines is automatically calculated, solving the problem of low efficiency in manual measurement and achieving efficient and accurate phase-to-phase distance verification and space gap verification.

CN115329517BActive Publication Date: 2025-09-16POWERCHINA FUJIAN ELECTRIC POWER SURVEY & DESIGN INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, the calculation of the shortest phase-to-phase segment in overhead line design requires manual measurement, which is inefficient and has large errors and cannot meet the requirements of the specifications.

Method used

CAD software is used in combination with the golden section method and detection method to automatically calculate the minimum distance from any point to the curve and the coordinates of the corresponding point. Functional components and VLA objects are extracted through polyline coordinates to draw the shortest line segments between them.

Benefits of technology

It improves the efficiency of overhead line design, reduces the errors caused by manual measurement, and can meet the regulatory requirements of phase distance and space clearance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115329517B_ABST
    Figure CN115329517B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for drawing the shortest line segment between phases of an overhead line based on CAD software. The method comprises the following steps: calling a polyline coordinate extraction function component in the CAD; selecting two curves representing any two phase conductors in the CAD, namely a first curve and a second curve, and converting the first curve and the second curve into VLA objects respectively; establishing a method for calculating the minimum distance from any point to the curve and the coordinates of the corresponding points in the CAD based on a detection method; calculating the minimum distance between the two curves and the coordinates of the corresponding points based on the polyline coordinate extraction function component and the VLA object and a golden section extreme value method; and calling a CAD instruction according to the calculated minimum distance and the coordinates of the corresponding points to draw the corresponding line segment as the shortest line segment between phases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method and a system for drawing the shortest line segment between phases of an overhead line based on CAD software, belonging to the technical field of overhead line design and CAD software application. Background Art

[0002] In overhead line design, the phase-to-phase distances of the substation's incoming and outgoing lines are generally compact. Sometimes, when the terminal tower has a large angle or is high, the minimum spatial distance between different phases may not meet the regulatory requirements. In this case, it is necessary to determine the minimum phase-to-phase distance and the position of the nearest point in order to improve the design. In addition, when the line branches from a double-circuit tower to a single-circuit tower, the arrangement of the phase conductors will change, and it is usually necessary to verify whether the minimum phase-to-phase distance meets the requirements. Secondly, the line crosses the three-dimensional space gap verification, and it is also necessary to solve the minimum phase-to-phase distance or the minimum distance between the conductor and the ground wire.

[0003] In the prior art, the calculation of the shortest line segment between phases requires manual measurement, which is a complex and inefficient measurement process with large errors. Summary of the Invention

[0004] In order to solve the above problems in the prior art, the present invention proposes a method and system for drawing the shortest line segment between phases of overhead lines based on CAD software.

[0005] The technical solutions of the present invention are as follows:

[0006] In one aspect, the present invention provides a method for drawing the shortest line segment between phases of an overhead line based on CAD software, comprising the following steps:

[0007] Complete the drawing of the arc and vertical lines of the three-phase conductors of the overhead line in CAD software;

[0008] Call the polyline coordinate extraction function component in CAD;

[0009] In CAD, two curves representing any two-phase conductors are selected, namely, a first curve and a second curve, and entity tables of the first curve and the second curve are respectively obtained. Entity names of the first curve and the second curve are respectively obtained based on the entity tables, and the first curve and the second curve are converted into VLA objects based on the entity names.

[0010] Establish a method for calculating the minimum distance from any point to a curve and the coordinates of the corresponding point in CAD based on the detection method;

[0011] Based on the polyline coordinate extraction function component and the VLA object, the coordinate parameters of the first curve and the second curve are obtained. Based on the coordinate parameters of the second curve and the golden section method, the coordinate parameters of the golden section point on the second curve are obtained. According to the coordinate parameters of the golden section point on the second curve and the minimum distance from any point to the curve and the calculation method of the corresponding point coordinates, the minimum distance from the golden section point to the first curve and the corresponding point coordinates are calculated. It is determined whether the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. If not, the current golden section point is used as the endpoint of the line segment, and the golden section is re-performed to determine a new golden section point. The above steps are continued until the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy.

[0012] According to the minimum distance from the current golden section point to the first curve and the coordinates of the corresponding point, the CAD command is called to draw the corresponding line segment as the shortest line segment between the two segments.

[0013] As a preferred embodiment, the steps of establishing a method for calculating the minimum distance from any point to a curve and the coordinates of the corresponding point in CAD based on a detection method are specifically as follows:

[0014] Let any point P have coordinates P_coord;

[0015] Divide the target curve into n segments of 0.1m each. Calculate the distance between these segment points and the starting point of the polyline: s(i) = (i-1) * 0.1, where i = 1, 2, 3, ... n. These segment points include the starting point and the end point, which form an array denoted as Sec_list.

[0016] Call the CAD command to convert the distance s(i) into point coordinates. The distances in Sec_list need to be replaced with corresponding distance values. All distance values ​​in Sec_list are converted and recorded as Coord_list.

[0017] Calculate the distance between any point in Coord_list and point P one by one, and form a distance array recorded as Dist_list;

[0018] Obtain the minimum value dist_min in the distance array Dist_list by comparison method. Let its index number be j. Then, according to the j value and the Coord_list array, obtain the coordinates of the nearest point P_min_coord.

[0019] Remember the minimum distance dist_min, the coordinates of the nearest point P_min_coord and the coordinates of point P P_coord, and form an array Slist = [dist_min, P_min_coord, P_coord].

[0020] As a preferred embodiment, based on the coordinate parameters of the second curve and the golden section method, the coordinate parameters of the golden section point on the second curve are obtained. According to the coordinate parameters of the golden section point on the second curve and the calculation method of the minimum distance from any point to the curve and the coordinates of the corresponding point, the method for calculating the minimum distance from the golden section point to the first curve and the coordinates of the corresponding point is specifically as follows:

[0021] Get the start point coordinate parameter start3dpoly and the end point coordinate parameter end3dpoly of the second curve;

[0022] Set the golden ratio coefficient ω;

[0023] Obtain the initial line length Lx0 of the second curve, and set the temporary line length Lx = Lx0;

[0024] Calculate the lengths of the two segmentation points LenX_1 and LenX_2 according to the golden ratio coefficient ω:

[0025] LenX_1=start3dpoly+Lx×(1-ω)

[0026] LenX_2=end3dpoly+Lx×ω

[0027] According to the lengths of the two split points LenX_1 and LenX_2 and the start point coordinate parameters start3dpoly and the end point coordinate parameters end3dpoly of the second curve, the coordinates coord1 and coord2 of the two split points are obtained;

[0028] According to the calculation method of the minimum distance from any point to the curve and the coordinates of the corresponding point, the minimum distances dist_1 and dist_2 from the two segmentation point coordinates coord1 and coord2 to the second curve and the coordinates of the nearest point are calculated respectively.

[0029] As a preferred embodiment, the method for determining whether the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy is as follows: if not, the current golden section point is used as the endpoint of the line segment, and the golden section is re-performed to determine a new golden section point. The above steps are continued until the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy.

[0030] The preset accuracy is Precision = Lx0 / 1000;

[0031] When Lx>=Precision, start the following calculation

[0032] If dist_1 < dist_2, let the end coordinate parameter of the new line segment end3dpoly = LenX_2, and let Lx = end3dpoly - start3dpoly;

[0033] If dist_1 > dist_2, let the start coordinate parameter of the new line segment start3dpoly = LenX_1, and let Lx = end3dpoly - start3dpoly;

[0034] If |dist_1 - dist_2| < Precision:

[0035] Use the print command in CAD to display the dist_1 and Slist_1 variables in the CAD display area, and use the line segment command in CAD to draw the line segment corresponding to the two coordinate points in the Slist_1 array, and exit the program;

[0036] If |dist_1 - dist_2| < Precision, recalculate the lengths, coordinates, and minimum distance values of the two segmentation points of the new line segment;

[0037] Repeat the above steps until Lx < Precision or |dist_1 - dist_2| < Precision, and end the loop.

[0038] On the other hand, the present invention also provides a system for drawing the shortest line segment between phases of an overhead line based on CAD software, including:

[0039] An overhead line drawing module for completing the drawing of the sag lines of the three-phase conductors of the overhead line in CAD software;

[0040] A function call module for calling the polyline coordinate extraction function component in CAD;

[0041] An object conversion module for selecting two curves representing any two-phase conductors in CAD, namely the first curve and the second curve, respectively obtaining the graphic primitive tables of the first curve and the second curve, respectively obtaining the graphic primitive names of the first curve and the second curve based on the graphic primitive tables, and converting the first curve and the second curve into VLA objects based on the graphic primitive names;

[0042] A minimum distance calculation module for establishing a calculation method for the minimum distance from an arbitrary point to a curve and the corresponding point coordinates in CAD based on the probing method;

[0043] The golden section extreme value finding module is used to obtain the coordinate parameters of the first curve and the second curve based on the multi-segment line coordinate extraction function component and the VLA object, obtain the coordinate parameters of the golden section point on the second curve based on the coordinate parameters of the second curve and the golden section method, calculate the minimum distance from the golden section point to the first curve and the corresponding point coordinates according to the coordinate parameters of the golden section point on the second curve and the minimum distance from any point to the curve and the calculation method of the corresponding point coordinates, and determine whether the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. If not, use the current golden section point as the endpoint of the line segment, re-perform the golden section to determine a new golden section point, and continue to execute the above steps until the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy;

[0044] The line segment drawing module is used to call CAD instructions to draw corresponding line segments as the shortest line segments between the current golden section point and the first curve according to the minimum distance and the corresponding point coordinates.

[0045] As a preferred implementation, the minimum distance calculation module specifically includes:

[0046] The point unit is used to set an arbitrary point P, whose coordinates are P_coord;

[0047] The segmentation unit is used to divide the target curve into n segments of 0.1m each. The distance between these segment points and the starting point of the polyline is calculated as s(i) = (i-1) * 0.1, where i = 1, 2, 3...n. These segment points include the starting point and the end point, which form an array denoted as Sec_list;

[0048] The coordinate conversion unit is used to call the CAD command to convert the distance s(i) into point coordinates. The distances need to be replaced with corresponding distance values. All distance values ​​in Sec_list are recorded as Coord_list after conversion.

[0049] The distance calculation unit is used to calculate the distance between any point in Coord_list and point P one by one, forming a distance array recorded as Dist_list;

[0050] The minimum value calculation unit is used to obtain the minimum value dist_min in the distance array Dist_list by comparison method. If its index number is j, then the coordinates of the nearest point P_min_coord are obtained according to the j value and the Coord_list array;

[0051] The minimum value array storage unit is used to remember the minimum distance dist_min, the coordinates of the nearest point P_min_coord, and the coordinates of point P P_coord, and form an array Slist = [dist_min, P_min_coord, P_coord].

[0052] As a preferred embodiment, the golden section extreme value module specifically includes:

[0053] The curve parameter acquisition unit is used to acquire the starting coordinate parameter start3dpoly and the ending coordinate parameter end3dpoly of the second curve;

[0054] The coefficient setting unit is used to set the golden section ratio coefficient ω;

[0055] The initial unit is used to calculate the initial line length Lx0 of the second curve and set the temporary line length Lx = Lx0;

[0056] The dividing point length calculation unit is used to calculate the lengths of the two dividing points LenX_1 and LenX_2 according to the golden section ratio coefficient ω:

[0057] LenX_1 = start3dpoly + Lx × (1 - ω)

[0058] LenX_2 = end3dpoly + Lx × ω

[0059] The dividing point coordinate acquisition unit is used to acquire the coordinates coord1 and coord2 of the two dividing points according to the lengths of the two dividing points LenX_1 and LenX_2, and the starting coordinate parameter start3dpoly and the ending coordinate parameter end3dpoly of the second curve;

[0060] The dividing point and curve distance calculation unit is used to calculate the minimum distances dist_1 and dist_2 from the coordinates of the two dividing points coord1 and coord2 to the second curve and the coordinates of the nearest points through the minimum distance calculation module.

[0061] As a preferred embodiment, the golden section extreme value module further includes:

[0062] The precision setting unit is used to preset the precision as Precision = Lx0 / 1000;

[0063] The loop extreme value unit is used to start the following calculation when Lx >= Precision

[0064] If dist_1 < dist_2, set the ending coordinate parameter end3dpoly of the new line segment to LenX_2, and set Lx = end3dpoly - start3dpoly;

[0065] If dist_1 > dist_2, let the starting coordinate parameter start3dpoly of the new line segment be LenX_1, and let Lx = end3dpoly - start3dpoly;

[0066] If |dist_1 - dist_2| < Precision:

[0067] Use the print command in CAD to display the dist_1 and Slist_1 variables in the CAD display area, and use the line segment command in CAD to draw the line segment corresponding to the two coordinate points in the Slist_1 array, and exit the program;

[0068] If |dist_1 - dist_2| < Precision, recalculate the lengths, coordinates of the two split points of the new line segment, and the minimum distance value;

[0069] Repeat the above steps until Lx < Precision or |dist_1 - dist_2| < Precision, and end the loop.

[0070] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method for drawing the shortest line segment between phases of an overhead line based on CAD software as described in any embodiment of the present invention.

[0071] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored. The program is characterized in that when it is executed by a processor, it implements the method for drawing the shortest line segment between phases of an overhead line based on CAD software as described in any embodiment of the present invention.

[0072] The present invention has the following beneficial effects:

[0073] 1. The method for drawing the shortest line segment between phases of an overhead line based on CAD software in the present invention constructs a calculation method for solving the minimum distance from an arbitrary point to a target curve and the corresponding point coordinates in CAD, and further uses the golden section method for extreme value seeking to solve the minimum distance between curves, so as to draw the shortest line segment between phases, avoiding the errors and difficulties brought by manual measurement, and greatly improving the design efficiency of overhead lines.

[0074] 2. The method for drawing the shortest line segment between phases of an overhead line based on CAD software in the present invention can be widely applied to the verification of the minimum distance between phases of overhead line incoming and outgoing line spans, the verification of the minimum distance between phases of phase sequence transformation spans, and the verification of the three-dimensional space clearance of line crossings. The application effect is very remarkable. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 This is a schematic diagram of the method flow of embodiment 1 of the present invention;

[0076] Figure 2 This is a flow chart of a method for calculating the minimum distance between curves based on the golden section extreme value method in an embodiment of the present invention;

[0077] Figure 3 Flowchart of a method for iteratively calculating so that the calculated minimum distance meets the accuracy in an embodiment of the present invention;

[0078] Figure 4 An example diagram of the shortest line segments between alternating lines is drawn for applying the method of an embodiment of the present invention. DETAILED DESCRIPTION

[0079] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0080] It should be understood that the step numbers used herein are only for convenience of description and are not intended to limit the order in which the steps are to be executed.

[0081] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0082] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0083] The term "and / or" refers to and includes any and all possible combinations of one or more of the associated listed items.

[0084] Example 1:

[0085] See also Figure 1 This embodiment proposes a method for drawing the shortest line segment between phases of an overhead line based on CAD software. After the arc-sag lines of the three-phase conductors of the overhead line are drawn in the CAD software, the golden section extreme value method is applied in combination with CAD commands to draw the shortest straight line segment between phases. The method specifically includes the following steps:

[0086] S1. Enter the "vl-load-com" command in the CAD command input area to call the polyline coordinate extraction function component in CAD;

[0087] S2. Select two curves (polylines) representing any two-phase conductors in CAD, namely the first curve and the second curve, and obtain the entity table of the first curve and the second curve respectively through a CAD command or function. Based on the entity table, obtain the entity names of the first curve and the second curve respectively. Then, enter the command "(vlax-ename->vla-object entity name)" in the CAD command input area to convert them into the "VLA object" form of CAD, which are recorded as: VLA_curve_1, VLA_curve_2;

[0088] S3. Establish a method for calculating the minimum distance from any point to a curve and the coordinates of the corresponding point in CAD based on a detection method;

[0089] S4. Based on the polyline coordinate extraction function component and the VLA object, the coordinate parameters of the first curve and the second curve are obtained. Based on the coordinate parameters of the second curve and the golden section method, the coordinate parameters of the golden section point on the second curve are obtained. According to the coordinate parameters of the golden section point on the second curve, the minimum distance from any point to the curve, and the calculation method of the corresponding point coordinates, the minimum distance from the golden section point to the first curve and the corresponding point coordinates are calculated. It is determined whether the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. If not, the current golden section point is used as the endpoint of the line segment, and the golden section is re-performed to determine a new golden section point. The above steps are continued until the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy.

[0090] S5. According to the minimum distance from the current golden section point to the first curve and the coordinates of the corresponding point, call the CAD command to draw the corresponding line segment as the shortest line segment between the two segments.

[0091] This embodiment constructs a calculation method for solving the minimum distance from any point to the target curve and the coordinates of the corresponding point in CAD. It further uses the golden section method to find extreme values ​​to solve the minimum distance between curves to draw the shortest line segments between phases. This avoids the errors and difficulties caused by manual measurement and greatly improves the design efficiency of overhead lines.

[0092] As a preferred implementation of this embodiment, step S3 establishes a method for calculating the minimum distance from any point to a curve in CAD and the coordinates of the corresponding point based on the detection method as follows:

[0093] S301, let any point P have coordinates P_coord;

[0094] S302. Divide the target curve (assuming the line length is Len0_1, which can be obtained using the "list" command in CAD) into segments of 0.1 m each, with a total of n segments. Calculate the distances s(i) = (i-1) * 0.1 between these segment points and the starting point of the polyline, where i = 1, 2, 3, ... n. These segment points include the starting point and the end point, and form an array denoted as Sec_list.

[0095] S303. Enter the command "(vlax-curve-getPointAtParam VLA_curve_1 distance)" in the CAD command input area to convert the distance s(i) into point coordinates. The distances in the s(i) need to be replaced with the corresponding distance values. All distance values ​​in Sec_list are recorded as Coord_list after conversion.

[0096] S304, calculate the distance between any point in Coord_list and point P one by one, and form a distance array recorded as Dist_list;

[0097] S305, obtain the minimum value dist_min in the distance array Dist_list by comparison method, set its index number to j, and then obtain the coordinates of the nearest point P_min_coord based on the j value and the Coord_list array;

[0098] S306. Remember the minimum distance dist_min, the coordinates of the nearest point P_min_coord and the coordinates of point P P_coord, and form an array Slist = [dist_min, P_min_coord, P_coord].

[0099] See Figure 2 As a preferred implementation of this embodiment, the method of obtaining the coordinate parameters of the golden section point on the second curve based on the coordinate parameters of the second curve and the golden section method, and calculating the minimum distance from any point to the curve and the coordinates of the corresponding point based on the coordinate parameters of the golden section point on the second curve and the method of calculating the minimum distance from any point to the curve and the coordinates of the corresponding point, is specifically as follows:

[0100] S401. Enter the command "(vlax-curve-getStartParam VLA_curve_2)" in the CAD command input area to obtain the coordinate parameters of the starting point of the second curve, which is recorded as start3dpoly. Enter the command "(vlax-curve-getEndParam VLA_curve_2)" to obtain the coordinate parameters of the end point of the second curve, which is recorded as end3dpoly.

[0101] S402, setting the golden ratio coefficient ω = 0.618;

[0102] S403. Obtain the initial line length Lx0 of the second curve, and set the temporary line length Lx = Lx0;

[0103] S404. Calculate the lengths of the two division points LenX_1 and LenX_2 according to the golden ratio coefficient ω:

[0104] LenX_1 = start3dpoly + Lx × (1 - ω)

[0105] LenX_2 = end3dpoly + Lx × ω

[0106] SIO5. According to the lengths of the two division points LenX_1 and LenX_2, and the start coordinate parameter start3dpoly and end coordinate parameter end3dpoly of the second curve, obtain the coordinates coord1 and coord2 of the two division points;

[0107] S406. According to the calculation method of the minimum distance from any point to the curve in step S3 and the corresponding point coordinates, calculate the minimum distances from the coordinates coord1 and coord2 of the two division points to the second curve and the arrays Slist_1 and Slist_2 of the nearest points respectively; and take the first values in the arrays Slist_1 and Slist_2 as the minimum distance values dist_1 and dist_2.

[0108] Specifically refer to Figure 3 , as a preferred implementation manner of this embodiment, the specific method for determining whether the minimum distance from the calculated current golden section point to the first curve meets the preset precision, and if not, using the current golden section point as the line segment endpoint, re - performing the golden section to determine a new golden section point, and continuing to execute the above steps until the minimum distance from the calculated current golden section point to the first curve meets the preset precision is as follows:

[0109] S407. The preset precision is Precision = Lx0 / 1000;

[0110] S408. When Lx >= Precision, start the following calculations:

[0111] S481. If dist_1 < dist_2, set the end coordinate parameter end3dpoly of the new line segment = LenX_2, and set Lx = end3dpoly - start3dpoly;

[0112] S482. If dist_1 > dist_2, set the start coordinate parameter start3dpoly of the new line segment = LenX_1, and set Lx = end3dpoly - start3dpoly;

[0113] S483. If |dist_1 - dist_2| < Precision:

[0114] Use the CAD printing command "princ" to display the dist_1 and Slist_1 variables in the CAD display area, and use the CAD "line" command to draw the line segment corresponding to the two coordinate points in the Slist_1 array, and then exit the program;

[0115] S484. If |dist_1 - dist_2| < Precision, return to execute steps S404, S405, and S406 to recalculate the lengths, coordinates, and minimum distance values of the two segmentation points of the new line segment;

[0116] Repeat the above steps S481 - S484 until Lx < Precision or |dist_1 - dist_2| < Precision, end the loop, and print the dist_1 and Slist_1 variables and draw the line segment according to step S483;

[0117] S409. Use the CAD printing command "princ" to display the relative precision Lx / Lx0 in the CAD display area.

[0118] To further illustrate the superiority and effectiveness of the method of this embodiment, the following gives an example of its application in a specific line project:

[0119] For a certain line project, the basic parameters of the incoming line section are as shown in Table 1 in the appendix:

[0120] Table of basic parameters of the incoming line section in the example of Appendix 1:

[0121]

[0122]

[0123] Execute each step of the present invention for the A and B phase conductors, and the shortest line segment between the phases drawn is shown in the appendix Figure 4 the line segment between the two curves;

[0124] The program returns the following results:

[0125] The final search relative precision preci = 0.000732533;

[0126] The number of iterations N = 15; <00,00267>

[0127] The minimum distance S between the two curves = 6.70429 m;

[0128] The returned Slist_1 list is: (6.70429(2279.3 1444.75 27.3697)(2280.27 1439.16 23.7987)); in the list, 6.70429 corresponds to dist_min, (2279.3 1444.75 27.3697) is (x1 y1 z1) corresponding to P_min_coord, (2280.27 1439.16 23.7987) is (x2 y2 z2) corresponding to P_coord, and the space intervals in the list are the unique expression of the linked list (list) in CAD lisp language;

[0129] The distance between the points represented by (2279.3 1444.75 27.3697) and (2280.27 1439.16 23.7987) is the minimum distance S = 6.704. When verifying, the split circle diameter of about 0.64m needs to be deducted, that is, S' = S - 0.64m = 6.064m. Verifying according to D = U / 110 + 0.65*f^0.5 = (500 / 110 + 0.65*1.73)m = 5.67m, S' > D, which can meet the specification requirements, and the clearance margin is about 0.394m.

[0130] According to the latest general design scheme of 500kV substations, the distance between frames has been reduced to 7m. The results returned by applying the above method are as follows:

[0131] The minimum distance S between the two curves is 6.10386m;

[0132] The returned list is: (6.10386(2274.32 1444.09 25.9428)(2275.11 1438.78 23.035));

[0133] Recalculating gives S' = S - 0.64m = 5.373m. Since S' < D = 5.67m, the minimum distance between phases A and B cannot meet the specification requirements, and certain improvement measures need to be taken.

[0134] The present invention uses some commands or instructions of CAD, and uses the method of the golden section to find the extreme value to solve the minimum distance between overhead lines and draw the shortest straight line segment, which can be widely applied to the verification of the minimum distance between overhead line incoming and outgoing spans, the verification of the minimum distance between phases in phase sequence transformation spans, and the verification of three-dimensional space clearances for line crossings. Therefore, the application effect of this technology is very remarkable.

[0135] Example 2:

[0136] This embodiment provides a system for drawing the shortest line segment between overhead lines based on CAD software, including:

[0137] Overhead line drawing module, used to complete the arc and vertical line drawing of the three-phase conductor of the overhead line in CAD software;

[0138] A function calling module, used to call the polyline coordinate extraction function component in CAD; this module is used to implement the function implemented in step S1 of the first embodiment, and will not be repeated here;

[0139] An object conversion module is used to select two curves representing any two-phase conductors in CAD, namely a first curve and a second curve, obtain a graphic primitive table of the first curve and the second curve respectively, obtain graphic primitive names of the first curve and the second curve respectively based on the graphic primitive table, and convert the first curve and the second curve into VLA objects based on the graphic primitive names; this module is used to implement the function implemented in step S2 of the first embodiment, and will not be repeated here;

[0140] A minimum distance calculation module is used to establish a method for calculating the minimum distance from any point to a curve in CAD and the coordinates of the corresponding point based on a detection method; this module is used to implement the function implemented in step S3 of the first embodiment, and will not be repeated here;

[0141] The golden section extreme value finding module is used to obtain the coordinate parameters of the first curve and the second curve based on the multi-segment line coordinate extraction function component and the VLA object, obtain the coordinate parameters of the golden section point on the second curve based on the coordinate parameters of the second curve and the golden section method, calculate the minimum distance from the golden section point to the first curve and the corresponding point coordinates based on the golden section point coordinate parameters on the second curve and the minimum distance from any point to the curve and the calculation method of the corresponding point coordinates, and determine whether the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. If not, the current golden section point is used as the endpoint of the line segment, and the golden section is re-performed to determine a new golden section point. The above steps are continued until the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. This module is used to implement the function implemented in step S4 of the first embodiment, and will not be repeated here.

[0142] The line segment drawing module is used to call CAD instructions to draw the corresponding line segments as the shortest alternating line segments based on the minimum distance from the current golden section point to the first curve and the corresponding point coordinates; this module is used to implement the function implemented in step S5 in Example 1, and will not be repeated here.

[0143] As a preferred implementation of this embodiment, the minimum distance calculation module specifically includes:

[0144] A point taking unit is used to set an arbitrary point P, whose coordinates are P_coord; this unit is used to implement the function implemented in step S301 of the first embodiment, and will not be repeated here;

[0145] The segmentation unit is used to divide the target curve into segments of 0.1 m each, with a total of n segments, and calculate the distance s(i) = (i-1) * 0.1 between these segment points and the starting point of the polyline, where i = 1, 2, 3, ... n. These segment points include the starting point and the end point, which form an array denoted as Sec_list. This unit is used to implement the function implemented in step S302 of the first embodiment, and will not be repeated here.

[0146] A coordinate conversion unit is used to call a CAD command to convert the distance s(i) into point coordinates, where the distances in Sec_list need to be replaced with corresponding distance values. All distance values ​​in Sec_list are recorded as Coord_list after conversion. This unit is used to implement the function implemented in step S303 of the first embodiment, and will not be repeated here.

[0147] A distance calculation unit is used to calculate the distance between any point in Coord_list and point P one by one, forming a distance array recorded as Dist_list; this unit is used to implement the function implemented in step S304 of the first embodiment, and will not be repeated here;

[0148] A minimum value calculation unit is used to obtain the minimum value dist_min in the distance array Dist_list by comparison. Assuming its index number is j, the coordinates of the closest point P_min_coord are obtained based on the value j and the Coord_list array. This unit is used to implement the functions implemented in step S305 of the first embodiment and will not be repeated here.

[0149] The minimum value array storage unit is used to remember the minimum distance dist_min, the nearest point coordinates P_min_coord and the P point coordinates P_coord, forming an array Slist = [dist_min, P_min_coord, P_coord]; this unit is used to implement the function implemented in step S306 of Example 1, and will not be repeated here.

[0150] As a preferred implementation of this embodiment, the golden section extreme value finding module specifically includes:

[0151] A curve parameter acquisition unit, used to acquire the start point coordinate parameter start3dpoly and the end point coordinate parameter end3dpoly of the second curve; this unit is used to implement the function implemented in step S401 of the first embodiment, and will not be repeated here;

[0152] A coefficient setting unit, used to set the golden ratio coefficient ω; this unit is used to implement the function implemented in step S402 of the first embodiment, and will not be repeated here;

[0153] An initial unit for obtaining the initial line length Lx0 of the second curve and setting the temporary line length Lx = Lx0; this unit is used to implement the function realized in step S403 of Embodiment 1 and will not be elaborated here;

[0154] A split point length calculation unit for calculating the lengths of two split points LenX_1 and LenX_2 according to the golden section ratio coefficient ω: This unit is used to implement the function realized in step S404 of Embodiment 1 and will not be elaborated here;

[0155] LenX_1 = start3dpoly + Lx × (1 - ω)

[0156] LenX_2 = end3dpoly + Lx × ω

[0157] A split point coordinate acquisition unit for obtaining the coordinates coord1 and coord2 of two split points according to the lengths of two split points LenX_1 and LenX_2 and the start coordinate parameter start3dpoly and end coordinate parameter end3dpoly of the second curve: This unit is used to implement the function realized in step S405 of Embodiment 1 and will not be elaborated here;

[0158] A split point - to - curve distance calculation unit for calculating the minimum distances dist_1 and dist_2 from the coordinates of two split points coord1 and coord2 to the second curve and the nearest point coordinates respectively through a minimum distance calculation module: This unit is used to implement the function realized in step S406 of Embodiment 1 and will not be elaborated here;

[0159] As a preferred implementation of this embodiment, the golden section extreme value calculation module further includes:

[0160] A precision setting unit for presetting the precision as Precision = Lx0 / 1000; this unit is used to implement the function realized in step S407 of Embodiment 1 and will not be elaborated here;

[0161] A loop extreme value calculation unit for starting the following calculations when Lx >= Precision: This unit is used to implement the function realized in step S408 of Embodiment 1 and will not be elaborated here;

[0162] If dist_1 < dist_2, set the end coordinate parameter of the new line segment end3dpoly = LenX_2, and set Lx = end3dpoly - start3dpoly;

[0163] If dist_1 > dist_2, set the start coordinate parameter of the new line segment start3dpoly = LenX_1, and set Lx = end3dpoly - start3dpoly;

[0164] When |dist_1 - dist_2| < Precision:

[0165] Use the print command in CAD to display the dist_1 and Slist_1 variables in the CAD display area, and use the line segment command in CAD to draw the line segment corresponding to the two coordinate points in the Slist_1 array, and exit the program;

[0166] If |dist_1 - dist_2| < Precision, recalculate the lengths, coordinates, and minimum distance values of the two segmentation points of the new line segment;

[0167] Repeat the above steps until Lx < Precision or |dist_1 - dist_2| < Precision, and end the loop.

[0168] Embodiment 3:

[0169] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method for drawing the shortest line segment between phases of an overhead line based on CAD software as described in any embodiment of the present invention.

[0170] Embodiment 4:

[0171] This embodiment provides a computer-readable storage medium, on which a computer program is stored. The program is characterized in that when it is executed by a processor, it implements the method for drawing the shortest line segment between phases of an overhead line based on CAD software as described in any embodiment of the present invention.

[0172] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent the situation where A exists alone, A and B exist simultaneously, or B exists alone. Where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0173] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0174] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk, and other media that can store program code.

[0176] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention's description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for drawing the shortest line segment between phases of overhead lines based on CAD software, characterized in that: The following steps are involved: Complete the drawing of the arc and vertical lines of the three-phase conductors of the overhead line in CAD software; Call the polyline coordinate extraction function component in CAD; In CAD, two curves representing any two-phase conductors are selected, namely, a first curve and a second curve, and entity tables of the first curve and the second curve are respectively obtained. Entity names of the first curve and the second curve are respectively obtained based on the entity tables, and the first curve and the second curve are converted into VLA objects based on the entity names. A method for calculating the minimum distance from any point to a curve and the coordinates of the corresponding point in CAD based on the detection method is established. Specifically: Let any point P have coordinates P_coord; Divide the target curve into n segments of 0.1m each. Calculate the distance between these segment points and the starting point of the polyline: s(i) = (i-1) * 0.1, where i = 1, 2, 3, ... n. These segment points include the starting point and the end point, which form an array denoted as Sec_list. Call the CAD command to convert the distance s(i) into point coordinates. The distances in Sec_list need to be replaced with corresponding distance values. All distance values ​​in Sec_list are converted and recorded as Coord_list. Calculate the distance between any point in Coord_list and point P one by one, and form a distance array recorded as Dist_list; Obtain the minimum value dist_min in the distance array Dist_list by comparison method. Let its index number be j. Then, according to the j value and the Coord_list array, obtain the coordinates of the nearest point P_min_coord. Remember the minimum distance dist_min, the nearest point coordinates P_min_coord and the coordinates of point P P_coord, forming an array Slist = [dist_min, P_min_coord, P_coord]; Based on the polyline coordinate extraction function component and the VLA object, the coordinate parameters of the first curve and the second curve are obtained. Based on the coordinate parameters of the second curve and the golden section method, the coordinate parameters of the golden section point on the second curve are obtained. According to the coordinate parameters of the golden section point on the second curve and the calculation method of the minimum distance from any point to the curve and the coordinates of the corresponding point, the minimum distance from the golden section point to the first curve and the coordinates of the corresponding point are calculated. Specifically: Get the start point coordinate parameter start3dpoly and the end point coordinate parameter end3dpoly of the second curve; Set the golden ratio coefficient ω; Obtain the initial line length Lx0 of the second curve, and set the temporary line length Lx = Lx0; Calculate the lengths of the two segmentation points LenX_1 and LenX_2 according to the golden ratio coefficient ω: LenX_1=start3dpoly+Lx×(1-ω) LenX_2=end3dpoly+Lx×ω According to the lengths of the two split points LenX_1 and LenX_2 and the start point coordinate parameters start3dpoly and the end point coordinate parameters end3dpoly of the second curve, the coordinates coord1 and coord2 of the two split points are obtained; According to the calculation method of the minimum distance from any point to the curve and the corresponding point coordinates, calculate the minimum distances dist_1 and dist_2 from the two segmentation point coordinates coord1 and coord2 to the second curve respectively, as well as the coordinates of the nearest points. Judge whether the minimum distance from the currently calculated golden section point to the first curve meets the preset precision. If not, use the currently calculated golden section point as the line segment endpoint, re - perform the golden section to determine a new golden section point, and continue to execute the above steps until the minimum distance from the currently calculated golden section point to the first curve meets the preset precision. According to the minimum distance from the current golden section point to the first curve and the corresponding point coordinates, call the CAD instruction to draw the corresponding line segment as the shortest intermediate line segment.

2. The method for drawing the shortest line segment between phases of an overhead line based on CAD software according to claim 1, characterized in that: The specific method for judging whether the minimum distance from the currently calculated golden section point to the first curve meets the preset precision, and if not, using the currently calculated golden section point as the line segment endpoint, re - performing the golden section to determine a new golden section point, and continuing to execute the above steps until the minimum distance from the currently calculated golden section point to the first curve meets the preset precision is as follows: The preset precision is Precision = Lx0 / 1000; When Lx >= Precision, start the following calculations If dist_1 < dist_2, set the end coordinate parameter of the new line segment end3dpoly = LenX_2, and set Lx = end3dpoly - start3dpoly; If dist_1 > dist_2, set the start coordinate parameter of the new line segment start3dpoly = LenX_1, and set Lx = end3dpoly - start3dpoly; If |dist_1 - dist_2| < Precision: Use the print command in CAD to display the dist_1 and Slist_1 variables in the CAD display area, and use the line segment command in CAD to draw the straight - line segment corresponding to the two coordinate points in the Slist_1 array, and exit the program; If |dist_1 - dist_2| < Precision, recalculate the lengths, coordinates, and minimum distance values of the two segmentation points of the new line segment; Repeat the above steps until Lx < Precision or |dist_1 - dist_ 3. A system for drawing the shortest segment between phases of overhead lines based on CAD software, characterized in that: ​ ​ ​ ​ ​ The point unit is used to set an arbitrary point P, whose coordinates are P_coord; The segmentation unit is used to divide the target curve into n segments of 0.1m each. The distance between these segment points and the starting point of the polyline is calculated as s(i) = (i-1) * 0.1, where i = 1, 2, 3...n. These segment points include the starting point and the end point, which form an array denoted as Sec_list; The coordinate conversion unit is used to call the CAD command to convert the distance s(i) into point coordinates. The distances need to be replaced with corresponding distance values. All distance values ​​in Sec_list are recorded as Coord_list after conversion. The distance calculation unit is used to calculate the distance between any point in Coord_list and point P one by one, forming a distance array recorded as Dist_list; The minimum value calculation unit is used to obtain the minimum value dist_min in the distance array Dist_list by comparison method. If its index number is j, then the coordinates of the nearest point P_min_coord are obtained according to the j value and the Coord_list array; The minimum value array storage unit is used to remember the minimum distance dist_min, the nearest point coordinates P_min_coord and the P point coordinates P_coord, forming an array Slist = [dist_min, P_min_coord, P_coord]; The golden section extreme value finding module is used to obtain the coordinate parameters of the first curve and the second curve based on the multi-segment line coordinate extraction function component and the VLA object, obtain the coordinate parameters of the golden section point on the second curve based on the coordinate parameters of the second curve and the golden section method, calculate the minimum distance from the golden section point to the first curve and the corresponding point coordinates according to the coordinate parameters of the golden section point on the second curve and the minimum distance from any point to the curve and the calculation method of the corresponding point coordinates, and determine whether the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. If not, the current golden section point is used as the endpoint of the line segment, and the golden section is re-performed to determine a new golden section point. The above steps are continued until the calculated minimum distance from the current golden section point to the first curve meets the preset accuracy. The golden section extreme value finding module specifically includes: A curve parameter acquisition unit, configured to acquire a start point coordinate parameter start3dpoly and an end point coordinate parameter end3dpoly of the second curve; The coefficient setting unit is used to set the golden ratio coefficient ω; An initial unit, used to obtain the initial line length Lx0 of the second curve and set the temporary line length Lx=Lx0; The division point length calculation unit is used to calculate the lengths of the two division points LenX_1 and LenX_2 according to the golden ratio coefficient ω: LenX_1=start3dpoly+Lx×(1-ω) LenX_2=end3dpoly+Lx×ω A split point coordinate acquisition unit, configured to obtain the coordinates coord1 and coord2 of two split points according to the lengths LenX_1 and LenX_2 of the two split points and the start coordinate parameter start3dpoly and end coordinate parameter end3dpoly of the second curve; A split point - to - curve distance calculation unit, configured to calculate the minimum distances dist_1 and dist_2 from the two split point coordinates coord1 and coord2 to the second curve and the nearest point coordinates respectively through a minimum distance calculation module; A line segment drawing module, configured to draw a corresponding line segment as the shortest alternating line segment according to the minimum distance from the current golden section point to the first curve and the corresponding point coordinates by invoking CAD instructions.

4. The system for drawing the shortest segment between phases of overhead lines based on CAD software according to claim 3, characterized in that: The golden section extreme value seeking module further includes: A precision setting unit, configured to preset the precision as Precision = Lx0 / 1000; A loop extreme value seeking unit, configured to start the following calculations when Lx >= Precision If dist_1 < dist_2, set the end coordinate parameter end3dpoly of the new line segment to LenX_2, and set Lx = end3dpoly - start3dpoly; If dist_1 > dist_2, set the start coordinate parameter start3dpoly of the new line segment to LenX_1, and set Lx = end3dpoly - start3dpoly; If |dist_! - dist_2| < Precision: Use the print command in CAD to display the dist_1 and Slist_1 variables in the CAD display area, and use the line segment command of CAD to draw the straight line segment corresponding to the two coordinate points in the Slist_1 array, and exit the program; If |dist_1 - dist_2| < Precision, recalculate the lengths, coordinates and minimum distance values of the two split points of the new line segment; Repeat the above steps until Lx < Precision or |dist_1 - dist_2| < Precision, and end the loop.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the method for drawing the shortest alternating line segment between overhead lines based on CAD software as described in any one of claims 1 to 2.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it implements the method for drawing the shortest alternating line segment between overhead lines based on CAD software as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Method and system for drawing vector diagram of overhead line

    CN102737393A

  • Inter-phase shortest distance algorithm for asynchronous wind swings of power transmission line

    CN106202752A