Method and system for non-cross arrangement of cables in railway cabinet
By dividing and representing the cable paths in the railway cabinet in the three-dimensional drawing software of railway communication information, and sorting and cross-judging, the problem of cross-distribution in the existing software is solved, and the cross-distribution of cables is achieved without cross-distribution and cable arrangement and Automatic path calculation improves the convenience of cable layout.
Patent Information
- Application Number
- CN202411439070.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-14
AI Technical Summary
The existing three-dimensional railway communication information drawing software cannot effectively deploy without crossover cables, resulting in partial overlap of cable models or intersecting paths, affecting the aesthetics and making it difficult to identify the direction of the cables.
By dividing the cables in the railway cabinet as cables in the cabinet and cables between the cabinets, the path of each cable is H={Psta, Pt1, Pt2, Pport}, and a path set M is constructed, from large to large according to the starting point height Small sorting, traversal determines whether the path crosses. If it crosses, the inflection point coordinates will be increased to generate the final non-crossing cable path.
The non-crossing arrangement of cables in railway cabinets is achieved, and the problem of cross-distribution in existing software is solved. The cable layout path is automatically calculated, which improves the convenience of cable layout.
Smart Images

Figure CN119442543A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of railway communication technology, and in particular to a method and system for arranging cables in a railway cabinet without cross-connection. Background Art
[0002] In the creation of cable models in railway communication room cabinets, non-staggered placement of cables has always been one of the problems that has troubled technicians in establishing cable models.
[0003] At present, the existing cable placement in the railway industry is divided into two categories:
[0004] 1. Manual placement: manually placing cables one by one can usually ensure that most cables have no crossover problems, but it consumes a lot of manpower and material resources.
[0005] 2. Software placement. In the process of cable placement, existing software generally places cables according to preset paths after determining the starting and ending points, which cannot ensure that the cables do not intersect with other cables in space. When the existing 3D BIM software generates cable paths in the cabinet, it does not take into account the phenomenon that a large number of cable paths partially overlap on devices with relatively concentrated ports, which ultimately leads to partial overlap or path intersection of the generated cable models, affecting the overall appearance and making it difficult to identify the direction of the cables. Summary of the invention
[0006] The present application provides a method and system for arranging cables in a railway cabinet without crossover, so as to solve the problem that the existing railway communication information three-dimensional drawing software cannot perform crossover-free cable arrangement.
[0007] According to the first aspect, an embodiment provides a method for arranging cables in a railway cabinet without cross-connection, the method comprising:
[0008] Based on the cable layout design information in the railway cabinet, the cables are divided into in-cabinet cables and inter-cabinet cables. In-cabinet cables are cables whose starting and ending points are connected to the ports in the cabinet, and inter-cabinet cables are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet.
[0009] The path of each cable in the railway cabinet is represented as H = {Psta, Pt1, Pt2, Pport}, where Psta represents the starting point of the cable, Pt1 represents the turning point after the starting point of the cable, Pt2 represents the turning point before the end point of the cable, and Pport represents the end point of the cable, wherein the starting point and end point coordinates of the cable in the cabinet are the center coordinates of the connected starting port and the end port respectively; the starting point coordinates of the inter-cabinet cable are determined according to the center coordinates of the outlet, and the end point coordinates are the center coordinates of the connected port;
[0010] Construct a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet, and sort all elements in the path set M in descending order according to the height of the starting point Psta. After the sorting is completed, traverse the path set M and determine whether the current cable path has an intersection with other cable paths. If so, increase the coordinates of the two turning points of the current cable path by a preset distance. After the traversal is completed, create and draw the cables in the railway cabinet according to the final path set M.
[0011] Furthermore, based on the cable layout design information in the railway cabinet, the cables in the cabinet are divided into cables inside the cabinet and cables between cabinets, specifically including:
[0012] The cable layout design information in the railway cabinet is compiled by designers based on professional knowledge related to railway communication information. The cable layout design information in the railway cabinet includes a starting port ID, an ending port ID, and outlet information. The outlet information includes an upper outlet, a lower outlet, and cables in the cabinet. The upper outlet is the outlet located at the top of the cabinet, and the lower outlet is the outlet located at the bottom of the cabinet.
[0013] Furthermore, the method for obtaining the center coordinates of the port is:
[0014] Based on the pre-established three-dimensional model of the railway cabinet, the attribute information of the target port model is read to obtain the port center coordinates.
[0015] Furthermore, the attribute information includes port name, port ID, cabinet, port center coordinate X / Y / Z value, port orientation and usage status information, wherein the port orientation includes six directions of "front", "back", "left", "right", "up" and "down", which correspond to six commonly used viewing directions of the modeling software respectively, and the usage status information includes "1" representing in use and "0" representing not in use.
[0016] Furthermore, the starting point coordinates are determined according to the outlet coordinates, specifically including:
[0017] Based on the pre-established three-dimensional model of the railway cabinet, all components in the upper cover and lower base of the cabinet model are traversed. Since the outlet is the groove contour obtained by cutting at the top or bottom of the cabinet model, the coordinates and radius of the center point of the traversed groove contour are recorded, and the radius is set as La;
[0018] The center coordinates of the groove contour obtained by the cutting position are the center coordinates of the outlet, which are set as point Pc (PcX, PcY, PcZ); the number of cables to be generated is recorded as Nx, and the starting coordinates of the cables between cabinets Pstaj (PstaXj, PstaYj, PstaZj) are calculated by the center coordinates of the outlet and the following formula:
[0019] PstaZj=PcZ
[0020] PstaXj=La×cos(θ)+PcX
[0021] PstaYj=La×sin(θ)+PcY
[0022] Where PstaXj is the x-axis coordinate of the starting point of the inter-cabinet cable, θ=2π×(i-1) / N X , PstaYj is the y-axis coordinate of the starting point of the cable between cabinets, PstaZj is the z-axis coordinate of the starting point of the cable between cabinets, PcX is the x-axis coordinate of the center position of the outlet, PcY is the y-axis coordinate of the center position of the outlet, PcZ is the z-axis coordinate of the center position of the outlet, Nx is the number of cables, i is an integer from 1 to Nx, and Floor means taking a smaller integer.
[0023] Furthermore, the method for obtaining the cable inflection point coordinates is:
[0024] Get the outer bounding box of the cabinet model;
[0025] Obtain the port orientation information of the port to which the cable is connected, and construct a vector with the port center coordinates as the origin and the port orientation as the direction, which is set as vector A1 (A1x, A1y, A1z);
[0026] Construct vectors in four directions, namely, X-axis direction, -X-axis direction, Y-axis direction, and -Y-axis direction, on the top upper surface of the outer bounding box of the cabinet model, which are vectors W1, W2, W3, and W4 respectively;
[0027] Select a vector parallel to vector A1 and in the same direction from W1 to W4, and obtain the surface of the cabinet outer frame opposite to the port direction according to the selected vector, set it as surface A, and set the four corner points of plane A as X1 (X1x, X1y, X1z), X2 (X2x, X2y, X2z), X3 (X3x, X3y, X3z), and X4 (X4x, X4y, X4z);
[0028] The Pport coordinates of the end points of cables between cabinets and inside cabinets are (PportX, PportY, PportZ), and the data is obtained directly by reading the port model attributes; the starting coordinates of cables inside cabinets are Psta (PstaX, PstaY, PstaZ); the starting coordinates of cables between cabinets are Pstaj (PstaXj, PstaYj, PstaZj);
[0029] The two cable inflection points are set as Pt1 (Pt1x, Pt1y, Pt1z) and Pt2 (Pt2x, Pt2y, Pt2z), Pt1 is the inflection point before the cable start point, and Pt2 is the inflection point before the cable end point;
[0030] Calculated using the following formula:
[0031] If the cable is an inter-cabinet cable, substitute the formula:
[0032] Pt1y=PportY,Pt1z=PstaZ-0.1×H
[0033] Pt2y=PportY,Pt2z=PportZ
[0034] Among them, the horizontal distance between the port and the surface A is L = PportX-X1x; H is the height of the cabinet, which can be obtained by measuring the cabinet or consulting the cabinet manual;
[0035] If the cables are in the cabinet, substitute the formula:
[0036] Pt1y=PstaY,Pt1z=PstaZ
[0037] Pt2y=PportY,Pt2z=PportZ
[0038] Among them, the horizontal distance between the port and the surface A is L=PstaX-X1x.
[0039] Furthermore, the outer bounding box of the cabinet model is obtained, which specifically includes:
[0040] Get all the vertex coordinates of the cabinet model and label them as set P1;
[0041] Traverse all points in set P1, obtain the three points with the largest x-axis, y-axis and z-axis directions, set the x-axis maximum point as Xmax, the y-axis maximum point as Ymax, and the z-axis maximum point as Zmax;
[0042] Traverse all points in set P1, obtain the three points with the smallest x-axis, y-axis and z-axis directions, set the x-axis minimum point as Xmin, the y-axis minimum point as Ymin, and the z-axis minimum point as Zmin;
[0043] Set the x-axis coordinate of Xmax to x1, the y-axis coordinate of Ymax to y1, and the z-axis coordinate of Zmax to z1. Similarly, set the x-, y-, and z-axis coordinates of Xmin, Ymin, and Zmin to x2, y2, and z2, and combine them into points Pmin (x2, y2, z2) and Pmax (x1, y1, z1).
[0044] Take Pmin and Pmax as the two endpoints of the cube to construct an outer bounding box. The outer bounding box is a cube, and the 8 endpoints of the outer bounding box are set to P1(x2,y2,z2), P2(x1,y2,z2), P3(x1,y1,z2), P4(x2,y1,z2), P5(x2,y2,z1), P6(x1,y2,z1), P7(x1,y1,z1), and P8(x2,y1,z1).
[0045] Further, after the sorting is completed, the path set M is traversed, and it is determined whether the current cable path has an intersection with other cable paths. If so, the coordinates of the two turning points of the current cable path are increased by a preset distance, specifically including:
[0046] Determine whether there is a path Hn = {PstaN, Pt1N, Pt2N, PportN} in the path Hw = {PstaW, Pt1W, Pt2W, PportW} that satisfies Pt1N = PstaW and Pt2W = Pt2N. If so, increment points Pt1W and Pt2W by 10 mm.
[0047] According to the second aspect, an embodiment provides a system for arranging cables in a railway cabinet without cross-connection, the system comprising:
[0048] The cable division module is used to divide the cables in the cabinet and the cables between cabinets based on the cable layout design information in the railway cabinet. The cables in the cabinet are cables whose starting and ending points are connected to the ports in the cabinet, and the cables between cabinets are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet.
[0049] The cable path generation module is used to represent the path of each cable in the railway cabinet as H = {Psta, Pt1, Pt2, Pport}, where Psta represents the starting point of the cable, Pt1 represents the turning point after the starting point of the cable, Pt2 represents the turning point before the end point of the cable, and Pport represents the end point of the cable, wherein the starting point and end point coordinates of the cable in the cabinet are the center coordinates of the connected starting port and the end port respectively; the starting point coordinates of the inter-cabinet cable are determined according to the center coordinates of the outlet, and the end point coordinates are the center coordinates of the connected port;
[0050] The path set generation module is used to construct a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet, and sort all elements in the path set M in descending order according to the height of the starting point Psta. After the sorting is completed, the path set M is traversed to determine whether the current cable path has an intersection with other cable paths. If so, the coordinates of the two turning points of the current cable path are increased by a preset distance. After the traversal is completed, the cables in the railway cabinet are created and drawn according to the final path set M.
[0051] According to the third aspect, an embodiment provides an electronic device, the device comprising: a processor and a memory;
[0052] The memory is used to store one or more program instructions;
[0053] The processor is used to run one or more program instructions to execute the steps of a method for arranging cables in a railway cabinet without cross-connection as described in any of the above items.
[0054] According to the fourth aspect, an embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a method for arranging cables in a railway cabinet without cross-connection as described in any one of the above items are implemented.
[0055] The present application provides a method and system for arranging cables in a railway cabinet without crossover. Based on the cable layout design information in the railway cabinet, the cables in the cabinet and the cables between cabinets are divided, wherein the cables in the cabinet are cables whose starting and ending points are both connected to the ports in the cabinet, and the cables between cabinets are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet; the path of each cable in the railway cabinet is represented as H={Psta, Pt1, Pt2, Pport}, where Psta represents the starting point of the cable, Pt1 represents the inflection point after the starting point of the cable, Pt2 represents the inflection point before the end point of the cable, and Pport represents the end point of the cable, wherein the starting point and end point coordinates of the cables in the cabinet are the connected The center coordinates of the starting port and the ending port; the starting coordinates of the inter-cabinet cables are determined according to the center coordinates of the outlet, and the ending coordinates are the center coordinates of the connected ports; construct a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet, and sort all elements in the path set M in descending order according to the height of the starting point Psta, and after sorting, traverse the path set M, and determine whether the current cable path has an intersection with other cable paths. If so, increase the two inflection point coordinates of the current cable path by a preset distance, and after traversing, create and draw the cables in the railway cabinet according to the final path set M. The present invention solves the problem of cross-disordered cable laying in the existing BIM software, and can automatically calculate the cable laying path, making the cable laying work more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A flow chart of a method for arranging cables in a railway cabinet without cross-connection provided by one embodiment of the present invention;
[0057] Figure 2 A schematic diagram of cable path inflection points in a method for arranging cables in a railway cabinet without crossover provided by one embodiment of the present invention;
[0058] Figure 3A schematic diagram of an outer enclosing frame of a cabinet model in a method for arranging cables in a railway cabinet without cross-connection provided by an embodiment of the present invention;
[0059] Figure 4 A schematic diagram of different axial vectors on the top of a cabinet model in a method for arranging cables in a railway cabinet without cross-connection provided by an embodiment of the present invention;
[0060] Figure 5 A schematic diagram of a method for arranging cables in a railway cabinet without cross-connection provided by one embodiment of the present invention;
[0061] Figure 6 A schematic diagram of cable generation in a method for arranging cables in a railway cabinet without cross-connection provided by an embodiment of the present invention;
[0062] Figure 7 A schematic diagram of the logical structure of a non-crossing arrangement system of cables in a railway cabinet is provided as an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0064] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0065] The first embodiment of the present invention provides a method for arranging cables in a railway cabinet without cross-connection. Figure 1 Provide detailed explanation.
[0066] like Figure 1As shown, in step S100, based on the cable layout design information in the railway cabinet, the cables in the cabinet and the cables between cabinets are divided, wherein the cables in the cabinet are cables whose starting and ending points are both connected to the ports in the cabinet, and the cables between cabinets are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet.
[0067] Cabinet cable layout design information: The design information is written by designers based on railway communication information related professional knowledge, and the main content is the connection relationship between the ports of the equipment. The content is shown in the figure below:
[0068] Starting port ID End port ID Outlet 0012 0234 Upper outlet 0012 0235 Upper outlet 0013 0236 Upper outlet 0013 0237 Upper outlet 0014 0238 Cabinet cables 0014 0239 Cabinet cables
[0069] The in-cabinet wiring design information includes: the ID of the starting port and the ID of the ending port; the cables between cabinets can select "upper outlet", "lower outlet", and "cable inside the cabinet" to distinguish different cable starting points.
[0070] Top outlet: The starting point of the cable is located at the connection of the top outlet of the cabinet.
[0071] Lower outlet: The starting point of the cable is located at the connection of the outlet at the bottom of the cabinet.
[0072] Cables inside the cabinet: The starting point and the end point of the cable are connected to the ports inside the cabinet.
[0073] like Figure 1 As shown, in step S200, the path of each cable in the railway cabinet is represented as H = {Psta, Pt1, Pt2, Pport}, Psta represents the starting point of the cable, Pt1 represents the turning point after the starting point of the cable, Pt2 represents the turning point before the end point of the cable, and Pport represents the end point of the cable, wherein the starting point and end point coordinates of the cable in the cabinet are the center coordinates of the connected starting port and the ending port respectively; the starting point coordinates of the inter-cabinet cable are determined according to the center coordinates of the outlet, and the end point coordinates are the center coordinates of the connected port.
[0074] Two cable turning points: The cable path in the cabinet only needs to clearly show the connection relationship, so this method sets each cable path to consist of 4 points: the starting point, the end point, the turning point before the starting point (turning point 1), and the turning point before the end point (turning point 2). Figure 2 shown.
[0075] The above steps specifically include:
[0076] S210, a method for acquiring the center coordinates of a port is as follows: based on a pre-established three-dimensional model of a railway cabinet, attribute information of a target port model is read to acquire the center coordinates of the port.
[0077] In this embodiment, the attribute information of the port model includes the port name, port ID, the cabinet to which it belongs, the port center coordinate X / Y / Z value, the port orientation and the usage status information, wherein the port orientation includes six directions of "front", "back", "left", "right", "up" and "down", which correspond to the six commonly used viewing directions of the modeling software respectively, and the usage status information includes "1" representing being in use and "0" representing not being used.
[0078] The port center coordinates are obtained by reading the port model attributes. The coordinates are the port coordinates. The name of the cabinet where the port is located is the cabinet to which the port belongs.
[0079] Port Name Cabinet X coordinate Y coordinate Z coordinate T1 ODF cabinet 1 420.35 114.3 56 T2 ODF cabinet 1 420.35 114.3 68 T3 ODF cabinet 1 420.35 114.3 78 T4 ODF cabinet 1 420.35 114.3 88 T5 ODF cabinet 1 420.35 114.3 98 T6 ODF cabinet 1 420.35 114.3 108
[0080] Add attributes to each port model in the cabinet to locate the port. The attribute table is as follows:
[0081]
[0082]
[0083] In this embodiment, S220, the starting point coordinates of the inter-cabinet cables are determined according to the center coordinates of the outlets, specifically including:
[0084] S221, based on the pre-established three-dimensional model of the railway cabinet, traverse all the components in the upper cover and lower base of the cabinet model. Since the outlet is a groove contour obtained by cutting at the top or bottom of the cabinet model, record the coordinates and radius of the center point of the traversed groove contour, and set the radius to La;
[0085] S222, the center point coordinates of the groove contour obtained by the sectioning position are the center coordinates of the outlet, which are set as point Pc (PcX, PcY, PcZ);
[0086] The data contained in the outlet is as follows:
[0087] Outlet direction PcX coordinates PcY coordinates PcZ coordinates Use Status superior 450.35 235.4 2300 1 Down 450.35 235.4 2300 1
[0088] S223. The number of cables to be generated is recorded as Nx. The starting point coordinates Pstaj (PstaXj, PstaYj, PstaZj) of the inter-cabinet cables are calculated by the center coordinates of the outlet and the following formula:
[0089] PstaZj=PcZ
[0090] PstaXj=La×cos(θ)+PcX
[0091] PstaYj=La×sin(θ)+PcY
[0092] Where PstaXj is the x-axis coordinate of the starting point of the inter-cabinet cable, θ=2π×(i-1) / N X , PstaYj is the y-axis coordinate of the starting point of the cable between cabinets, PstaZj is the z-axis coordinate of the starting point of the cable between cabinets, PcX is the x-axis coordinate of the center position of the outlet, PcY is the y-axis coordinate of the center position of the outlet, PcZ is the z-axis coordinate of the center position of the outlet, Nx is the number of cables, i is an integer from 1 to Nx, and Floor means taking a smaller integer.
[0093] In this embodiment, S230, the method for obtaining the cable inflection point coordinates is:
[0094] S231, obtain the outer bounding box of the cabinet model, such as Figure 3 As shown;
[0095] S232, obtaining the port orientation information of the port to which the cable is connected, taking the port center coordinates as the origin and the port orientation as the direction to construct a vector, which is set as vector A1 (A1x, A1y, A1z);
[0096] S233, construct vectors in four directions, namely, X-axis direction, -X-axis direction, Y-axis direction, and -Y-axis direction, on the top upper surface of the outer bounding box of the cabinet model, which are vectors W1, W2, W3, and W4 respectively, such as Figure 4 As shown;
[0097] S234. Select a vector from W1 to W4 that is parallel to vector A1 and has the same direction, and obtain the surface of the cabinet outer frame opposite to the port direction according to the selected vector, set it as surface A, and set the four corner points of plane A to X1 (X1x, X1y, X1z), X2 (X2x, X2y, X2z), X3 (X3x, X3y, X3z), and X4 (X4x, X4y, X4z). Figure 5 As shown;
[0098] S235, the coordinates of the end points Pport of the cables between cabinets and inside cabinets are (PportX, PportY, PportZ), and the data is obtained directly by reading the port model attributes; the coordinates of the starting point of the cable inside the cabinet are Psta (PstaX, PstaY, PstaZ); the coordinates of the starting point of the cable between cabinets are Pstaj (PstaXj, PstaYj, PstaZj);
[0099] The two cable inflection points are set as Pt1 (Pt1x, Pt1y, Pt1z) and Pt2 (Pt2x, Pt2y, Pt2z), Pt1 is the inflection point before the cable start point, and Pt2 is the inflection point before the cable end point;
[0100] Calculated using the following formula:
[0101] If the cable is an inter-cabinet cable, substitute the formula:
[0102] Pt1y=PportY,Pt1z=PstaZ-0.1×H
[0103] Pt2y=PportY,Pt2z=PportZ
[0104] Among them, the horizontal distance between the port and the surface A is L = PportX-X1x; H is the height of the cabinet, which can be obtained by measuring the cabinet or consulting the cabinet manual;
[0105] If the cables are in the cabinet, substitute the formula:
[0106] Pt1y=PstaY,Pt1z=PstaZ
[0107] Pt2y=PportY,Pt2z=PportZ
[0108] Among them, the horizontal distance between the port and the surface A is L=PstaX-X1x.
[0109] In this embodiment, S231, obtaining an outer bounding box of the cabinet model, specifically includes:
[0110] S2311, obtaining all vertex coordinates of the cabinet model as set P1;
[0111] S2312, traverse all points in the set P1, obtain the three points with the largest x-axis, y-axis and z-axis directions, set the x-axis maximum point as Xmax, the y-axis maximum point as Ymax, and the z-axis maximum point as Zmax;
[0112] S2313, traverse all points in the set P1, obtain the three points with the smallest values in the x-axis direction, the y-axis direction, and the z-axis direction, set the x-axis minimum value point as Xmin, the y-axis minimum value point as Ymin, and the z-axis minimum value point as Zmin;
[0113] S2314, set the x-axis coordinate of Xmax to x1, the y-axis coordinate of Ymax to y1, and the z-axis coordinate of Zmax to z1. Similarly, set the x-, y-, and z-axis coordinates of Xmin, Ymin, and Zmin to x2, y2, and z2, and combine them into points Pmin (x2, y2, z2) and Pmax (x1, y1, z1);
[0114] S2315. Use Pmin and Pmax as the two endpoints of the cube to construct an outer bounding box. The outer bounding box is a cube. Set the 8 endpoints of the outer bounding box to be P1(x2,y2,z2), P2(x1,y2,z2), P3(x1,y1,z2), P4(x2,y1,z2), P5(x2,y2,z1), P6(x1,y2,z1), P7(x1,y1,z1), and P8(x2,y1,z1).
[0115] like Figure 1 As shown, in step S300, a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet is constructed, and all elements in the path set M are sorted in descending order according to the height of the starting point Psta. After the sorting is completed, the path set M is traversed, and it is determined whether the current cable path has an intersection with other cable paths. If so, the coordinates of the two turning points of the current cable path are increased by a preset distance. After the traversal is completed, the cables in the railway cabinet are created and drawn according to the final path set M. The cable generation result is shown as follows. Figure 6 shown.
[0116] The above steps specifically include:
[0117] Create a set of all indoor cable paths, set it as set M = {H1, H2, H3, H4.......}, sort the elements in M from large to small according to the height of Psta, and traverse the set M after the sorting is completed, and find out whether there is a path set Hn = {PstaN, Pt1N, Pt2N, PportN} for its elements Hw = {PstaW, Pt1W, Pt2W, PportW}, where Pt1N = PstaW and Pt2W = Pt2N. If so, increase the point Pt1W and Pt2W by 10mm. After all elements are traversed, generate the cable path according to the path set M, and you can complete the cable creation work and draw the cables in the cabinet.
[0118] Corresponding to the above-disclosed method for arranging cables in a railway cabinet without cross-connection, the embodiment of the present invention further discloses a system for arranging cables in a railway cabinet without cross-connection, such as Figure 7 As shown, it specifically includes:
[0119] The cable division module is used to divide the cables in the cabinet and the cables between cabinets based on the cable layout design information in the railway cabinet. The cables in the cabinet are cables whose starting and ending points are connected to the ports in the cabinet, and the cables between cabinets are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet.
[0120] The cable path generation module is used to represent the path of each cable in the railway cabinet as H = {Psta, Pt1, Pt2, Pport}, where Psta represents the starting point of the cable, Pt1 represents the turning point after the starting point of the cable, Pt2 represents the turning point before the end point of the cable, and Pport represents the end point of the cable; wherein the starting point and end point coordinates of the cable in the cabinet are the center coordinates of the connected starting port and the end port respectively; the starting point coordinates of the inter-cabinet cable are determined according to the center coordinates of the outlet, and the end point coordinates are the center coordinates of the connected port;
[0121] The path set generation module is used to construct a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet, and sort all elements in the path set M in descending order according to the height of the starting point Psta. After the sorting is completed, the path set M is traversed to determine whether the current cable path has an intersection with other cable paths. If so, the coordinates of the two turning points of the current cable path are increased by a preset distance. After the traversal is completed, the cables in the railway cabinet are created and drawn according to the final path set M.
[0122] It should be noted that for the detailed description of a non-crossing arrangement system for cables in a railway cabinet provided in an embodiment of the present invention, reference can be made to the relevant description of a non-crossing arrangement method for cables in a railway cabinet provided in an embodiment of the present application, which will not be repeated here.
[0123] In addition, an embodiment of the present invention further provides an electronic device, comprising: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a method for non-crossing arrangement of cables in a railway cabinet as described in any of the above items.
[0124] It should be noted that for the detailed description of an electronic device provided in an embodiment of the present invention, reference can be made to the relevant description of a method for non-cross-arranging cables in a railway cabinet provided in an embodiment of the present application, which will not be repeated here.
[0125] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for non-cross-arranging cables in a railway cabinet as described in any of the above items are implemented.
[0126] It should be noted that, for a detailed description of a computer-readable storage medium provided in an embodiment of the present invention, reference can be made to the relevant description of a method for non-cross-arranging cables in a railway cabinet provided in an embodiment of the present application, which will not be repeated here.
[0127] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0128] The above specific examples are used to illustrate the present invention, which are only used to help understand the present invention and are not intended to limit the present invention. For those skilled in the art to which the present invention belongs, some simple deductions and variations can be made based on the idea of the present invention.
Claims
1. A method for arranging cables in a railway cabinet without cross-connection, characterized in that: The method comprises: Based on the cable layout design information in the railway cabinet, the cables are divided into in-cabinet cables and inter-cabinet cables. In-cabinet cables are cables whose starting and ending points are connected to the ports in the cabinet, and inter-cabinet cables are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet. The path of each cable in the railway cabinet is represented as H = {Psta, Pt1, Pt2, Pport}, where Psta represents the starting point of the cable, Pt1 represents the turning point after the starting point of the cable, Pt2 represents the turning point before the end point of the cable, and Pport represents the end point of the cable, wherein the starting point and end point coordinates of the cable in the cabinet are the center coordinates of the connected starting port and the end port respectively; the starting point coordinates of the inter-cabinet cable are determined according to the center coordinates of the outlet, and the end point coordinates are the center coordinates of the connected port; Construct a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet, and sort all elements in the path set M in descending order according to the height of the starting point Psta. After the sorting is completed, traverse the path set M and determine whether the current cable path has an intersection with other cable paths. If so, increase the coordinates of the two turning points of the current cable path by a preset distance. After the traversal is completed, create and draw the cables in the railway cabinet according to the final path set M.
2. A method for arranging cables in a railway cabinet without cross-connection as claimed in claim 1, characterized in that: Based on the cable layout design information in railway cabinets, the cables in the cabinet are divided into cables inside the cabinet and cables between cabinets, including: The cable layout design information in the railway cabinet is compiled by designers based on professional knowledge related to railway communication information. The cable layout design information in the railway cabinet includes a starting port ID, an ending port ID, and outlet information. The outlet information includes an upper outlet, a lower outlet, and cables in the cabinet. The upper outlet is the outlet located at the top of the cabinet, and the lower outlet is the outlet located at the bottom of the cabinet.
3. A method for arranging cables in a railway cabinet without cross-connection as claimed in claim 1, characterized in that: The method for obtaining the center coordinates of the port is: Based on the pre-established three-dimensional model of the railway cabinet, the attribute information of the target port model is read to obtain the port center coordinates.
4. A method for arranging cables in a railway cabinet without cross-connection as claimed in claim 3, characterized in that: The attribute information includes port name, port ID, cabinet, port center coordinate X / Y / Z value, port orientation and usage status information, wherein the port orientation includes six directions of "front", "back", "left", "right", "top" and "bottom", which correspond to the six commonly used viewing directions of the modeling software respectively; the usage status information includes "1" for being in use and "0" for not being in use.
5. The method for arranging cables in a railway cabinet without cross-connection according to claim 1, characterized in that: The starting point coordinates are determined according to the outlet coordinates, including: Based on the pre-established three-dimensional model of the railway cabinet, all components in the upper cover and lower base of the cabinet model are traversed. Since the outlet is the groove contour obtained by cutting at the top or bottom of the cabinet model, the coordinates and radius of the center point of the traversed groove contour are recorded, and the radius is set as La; The center coordinates of the groove contour obtained by the cutting position are the center coordinates of the outlet, which are set as point Pc (PcX, PcY, PcZ); the number of cables to be generated is recorded as Nx, and the starting coordinates of the cables between cabinets Pstaj (PstaXj, PstaYj, PstaZj) are calculated by the center coordinates of the outlet and the following formula: PstaZj=PcZ PstaXj=La×cos(θ)+PcX PstaYj=La×sin(θ)+PcY Where PstaXj is the x-axis coordinate of the starting point of the inter-cabinet cable, θ=2π×(i-1) / N X , PstaYj is the y-axis coordinate of the starting point of the cable between cabinets, PstaZj is the z-axis coordinate of the starting point of the cable between cabinets, PcX is the x-axis coordinate of the center position of the outlet, PcY is the y-axis coordinate of the center position of the outlet, PcZ is the z-axis coordinate of the center position of the outlet, Nx is the number of cables, i is an integer from 1 to Nx, and Floor means taking a smaller integer.
6. A method for arranging cables in a railway cabinet without crossover according to claim 1, characterized in that: The method for obtaining the cable inflection point coordinates is: Get the outer bounding box of the cabinet model; Obtain the port orientation information of the port to which the cable is connected, and construct a vector with the port center coordinates as the origin and the port orientation as the direction, which is set as vector A1 (A1x, A1y, A1z); Construct vectors in four directions, namely, X-axis direction, -X-axis direction, Y-axis direction, and -Y-axis direction, on the top upper surface of the outer bounding box of the cabinet model, which are vectors W1, W2, W3, and W4 respectively; Select a vector parallel to vector A1 and in the same direction from W1 to W4, and obtain the surface of the cabinet outer frame opposite to the port direction according to the selected vector, set it as surface A, and set the four corner points of plane A as X1 (X1x, X1y, X1z), X2 (X2x, X2y, X2z), X3 (X3x, X3y, X3z), and X4 (X4x, X4y, X4z); The coordinates of the end points of cables between cabinets and inside cabinets are Pport (PportX, PportY, PportZ), and the coordinate data is obtained directly by reading the port model attributes; the coordinates of the starting point of the cable inside the cabinet are Psta (PstaX, PstaY, PstaZ); the coordinates of the starting point of the cable between cabinets are Pstaj (PstaXj, PstaYj, PstaZj); The two cable inflection points are set as Pt1 (Pt1x, Pt1y, Pt1z) and Pt2 (Pt2x, Pt2y, Pt2z), Pt1 is the inflection point before the cable start point, and Pt2 is the inflection point before the cable end point; Calculated using the following formula: If the cable is an inter-cabinet cable, substitute the formula: Pt1y=PportY,Pt1z=PstaZ-0.1×H Pt2y=PportY,Pt2z=PportZ Among them, the horizontal distance between the port and the surface A is L = PportX-X1x; H is the height of the cabinet, which can be obtained by measuring the cabinet or consulting the cabinet manual; If the cables are in the cabinet, substitute the formula: Pt1y=PstaY,Pt1z=PstaZ Pt2y=PportY,Pt2z=PportZ Among them, the horizontal distance between the port and the surface A is L=PstaX-X1x.
7. A method for arranging cables in a railway cabinet without cross-connection as claimed in claim 6, characterized in that: Get the outer bounding box of the cabinet model, including: Get all the vertex coordinates of the cabinet model and label them as set P1; Traverse all points in set P1, obtain the three points with the largest x-axis, y-axis and z-axis directions, set the x-axis maximum point as Xmax, the y-axis maximum point as Ymax, and the z-axis maximum point as Zmax; Traverse all points in set P1, obtain the three points with the smallest x-axis, y-axis and z-axis directions, set the x-axis minimum point as Xmin, the y-axis minimum point as Ymin, and the z-axis minimum point as Zmin; Set the x-axis coordinate of Xmax to x1, the y-axis coordinate of Ymax to y1, and the z-axis coordinate of Zmax to z1. Similarly, set the x-, y-, and z-axis coordinates of Xmin, Ymin, and Zmin to x2, y2, and z2, and combine them into points Pmin (x2, y2, z2) and Pmax (x1, y1, z1). Take Pmin and Pmax as the two endpoints of the cube to construct an outer bounding box. The outer bounding box is a cube, and the 8 endpoints of the outer bounding box are set to P1(x2,y2,z2), P2(x1,y2,z2), P3(x1,y1,z2), P4(x2,y1,z2), P5(x2,y2,z1), P6(x1,y2,z1), P7(x1,y1,z1), and P8(x2,y1,z1).
8. The method for arranging cables in a railway cabinet without cross-connection as claimed in claim 1, characterized in that: After the sorting is completed, the path set M is traversed to determine whether the current cable path has an intersection with other cable paths. If so, the coordinates of the two turning points of the current cable path are increased by a preset distance, specifically including: Determine whether there is a path Hn = {PstaN, Pt1N, Pt2N, PportN} in the path Hw = {PstaW, Pt1W, Pt2W, PportW} that satisfies Pt1N = PstaW and Pt2W = Pt2N. If so, increment points Pt1W and Pt2W by 10 mm.
9. A cable non-crossing arrangement system in a railway cabinet, characterized in that: The system comprises: The cable division module is used to divide the cables in the cabinet and the cables between cabinets based on the cable layout design information in the railway cabinet. The cables in the cabinet are cables whose starting and ending points are connected to the ports in the cabinet, and the cables between cabinets are cables that enter and exit the cabinet through the outlet and are connected to the ports in the cabinet. The cable path generation module is used to represent the path of each cable in the railway cabinet as H = {Psta, Pt1, Pt2, Pport}, where Psta represents the starting point of the cable, Pt1 represents the turning point after the starting point of the cable, Pt2 represents the turning point before the end point of the cable, and Pport represents the end point of the cable, wherein the starting point and end point coordinates of the cable in the cabinet are the center coordinates of the connected starting port and the end port respectively; the starting point coordinates of the inter-cabinet cable are determined according to the center coordinates of the outlet, and the end point coordinates are the center coordinates of the connected port; The path set generation module is used to construct a path set M = {H1, H2, H3, ...} of all cables in the railway cabinet, and sort all elements in the path set M in descending order according to the height of the starting point Psta. After the sorting is completed, the path set M is traversed to determine whether the current cable path has an intersection with other cable paths. If so, the coordinates of the two turning points of the current cable path are increased by a preset distance. After the traversal is completed, the cables in the railway cabinet are created and drawn according to the final path set M.
10. An electronic device, characterized in that: The device comprises: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of a method for arranging cables in a railway cabinet without cross-connection as described in any one of claims 1 to 8.