Calculation method for automatically distributing wire harness tracks
By decomposing and polar coordinate calculation of wiring trajectories in EPLAN model, the problem of overlapping trajectories in complex wiring scenarios is solved, and the precise automatic distribution of wiring harness trajectories and the efficiency of automatic wiring of robotic arm are achieved.
Patent Information
- Application Number
- CN202411892256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The prior art is difficult to effectively deal with the overlapping trajectory problem in complex wiring scenarios in electrical systems, resulting in low efficiency and high error rate of automation wiring.
By dividing the wiring trajectory information in the EPLAN model into head point, skeleton point and tail point, and using polar coordinates to calculate the cross-section center point position of each trajectory, perform offset calculation, and finally improving trajectory separation through cross detection to ensure the accuracy of trajectory distribution.
It realizes accurate automatic distribution of the wiring harness trajectory, improves the efficiency of automatic wiring of the robot arm, avoids the occurrence of wire overlap, and accurately calculates the length of each wire.
Smart Images

Figure CN119808698A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automated wiring, in particular to a calculation method for automatically distributing harness tracks. Background Art
[0002] With the widespread use of electricity by humans, the integration of electrical systems is becoming higher and higher, and wiring harnesses are widely used in industrial electrical, distribution cabinets, automobiles and other industries. In some complex wiring scenarios, the layout of wires still relies on manual work, and manual wiring has problems such as low efficiency and high error rate. Therefore, realizing the automatic layout of wires is a good way to improve the quality of wiring. The premise of achieving automation is to provide accurate wiring trajectory information for wiring, but at present, many electrical software can only provide the most basic wiring trajectory, and there is a defect in its trajectory: different trajectories in the same wire trough overlap, and directly using this wiring information for wiring is not in line with the spatial distribution, and the processing of overlapping trajectories is still blank at present. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a calculation method for automatically distributing wire harness trajectories.
[0004] To achieve the above object, the present invention adopts the following technical solution: a method for calculating the automatic distribution of wire harness trajectories, comprising the following steps:
[0005] Step 1: When exporting the wiring track information in the EPLAN model, the track points are divided into two types of points according to whether they are in the wire slot, that is, the points in the wire slot and the points not in the wire slot. The track points not in the wire slot are further divided into head points and tail points according to their positions in the wiring track, that is, all track points are divided into three parts: head points, skeleton points (i.e. all points other than the head and tail), and tail points, and the serial number of each point is recorded;
[0006] Step 2: Design the cross-sectional shape of the target wire harness to be produced, and calculate the relative position of the cross-sections of other trajectories and the center trajectory using polar coordinates, that is, calculate the distance ρ from the center point of the cross-section of each trajectory to the center point of the cross-section of the center trajectory and the angle α formed by the line segment connecting these two points and the horizontal line segment to the right;
[0007] Step 3: Offset the start and end points of the skeleton: For the head and tail points, offset them up and down without changing them in the four directions of front, back, left, and right. According to the cross-section information, offset them in the up and down directions to obtain the following results;
[0008] Step 4: Offset the head point and tail point: For the head point and tail point, they are connected to the starting point and the end point respectively; take a line in the harness as the center line, if the relative position of a certain section of another line to the center line is determined, then the relative position of the entire line from the center line should be the same as that of that section;
[0009] Step 5: Offset the middle point of the track:
[0010] Step 6: Perform cross detection on the results obtained after the migration and make improvements if there is any crossover.
[0011] In a preferred embodiment, in step 3, according to the cross-sectional information, the cross-sectional information is shifted in the up and down directions according to formula (1) to obtain the following result:
[0012]
[0013] Among them, x i ,y i and z i Respectively represent the horizontal, vertical and vertical coordinates after the first and last points are offset;
[0014] x i0 ,y i0 and z i0 Respectively represent the horizontal, vertical and vertical coordinates after the first and last points are offset;
[0015] ρ i Represents the offset between the target line and the center line;
[0016] α i Represents the angle between the target line and the center line and the horizontal direction.
[0017] In a preferred embodiment, in step 4, three vectors are constructed to determine the front-back offset direction of the point after the starting point of the target line, including: from the point after the starting point of the center line skeleton to the starting point of the center line skeleton From the point after the starting point of the centerline skeleton to the second point after the starting point Point from the point after the starting point of the center line skeleton to the starting point of the target line skeleton According to formula (2), we calculate and and The angles ∠12 and ∠23 are formed, and the direction of the front and rear offset is determined by comparing the sizes of the two angles; the offset length is calculated using the following formula (3):
[0018]
[0019] θ: the angle between two vectors;
[0020] Represent two vectors respectively;
[0021]
[0022] l: the offset length of the target point of the target line;
[0023] r1: radius of the center line;
[0024] r2: radius of the target line;
[0025] β: The angle between the two segments at the turning point of the target line.
[0026] In a preferred embodiment, in step 4, three vectors are constructed to determine the front and rear offset directions of the tail point and the secondary point of the target line, including: ——From the previous point of the end point of the centerline skeleton to the end point of the centerline skeleton, ——From the point before the end point of the centerline skeleton to the second point before the end point of the centerline skeleton, ——From the previous point of the end point of the center line skeleton to the end point of the target line skeleton, then calculate and and The direction of the front and rear offset is determined by comparing the sizes of the two angles.
[0027] In a preferred embodiment, in step 5, using the Rodriguez rotation formula to shift the midpoint involves three physical quantities: the rotation axis, the target rotation vector, and the rotation angle:
[0028] For the middle point of the target line, it is necessary to offset in all directions, up, down, front, back, left, and right. The offset in the up and down direction should be consistent with the starting point and the end point; the offset in the front, back, left, and right directions should be on a plane p and offset by a certain angle and length on this plane. In order to determine the position of this plane, take three consecutive points, pointing from the second point of the target line to the first and third points, and calculate the unit vector and vector According to formula (4) and formula (5), we can calculate and The unit vector of the sum vector and the unit vector of the outer product By and vector The plane formed is the target plane p, and then and Calculate the outer product It is the axis of rotation;
[0029]
[0030] In a preferred embodiment, in step 5, the length of the target rotation vector is calculated: the length ρ required to be offset and the thickness of the wire and the angle β of the corner i The size is related, and it can be calculated by formula (2) and The angle β i , calculate the length l of the target rotation vector through formula (7) i
[0031]
[0032] Where: l i : offset length; ρ i : offset distance; β i : The angle of the wires at the target point;
[0033] The rotation angle is the rotation angle α corresponding to the target line when designing the cross-section information. The result after the target vector is offset is calculated by formula (8):
[0034]
[0035] in
[0036] Target rotation vector;
[0037] is the value calculated in step 5
[0038]
[0039] in
[0040] c=cosα, s=sinα, a=1-cosα,
[0041] The target point calculated by formula (9);
[0042]
[0043] Where: p i Indicates the result after the target point is offset; p0 indicates the target point; represents the unit vector of the offset direction; l i Indicates the offset length.
[0044] In a preferred embodiment, in step 6, the distance formula (10) from a point to a plane is used to determine whether the skeletons are on the same plane.
[0045]
[0046] Where:
[0047] P: a point on the skeleton; A: a point on the reference plane; Normal vector of the reference plane;
[0048] When they are in the same plane, construct two sets of vectors and
[0049] If equation (11) is satisfied at the same time
[0050]
[0051] This proves that line segment AB and line segment CD are intersecting. At this time, swap the positions of the lines in the harness and re-separate the tracks until there is no intersection.
[0052] Compared with the prior art, the present invention has the following beneficial effects: after classifying the trajectory coordinates, the coordinates of different points of the skeleton are calculated to automatically calculate the accurate wiring trajectory, which becomes the premise for realizing automatic wiring of the robot arm, and the intersection detection avoids the overlap of wires caused by the intersection. Another advantage of this algorithm is that the length of each wire can be calculated by accurate coordinates, so that wires of appropriate length can be made in advance. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The algorithm flow chart of the preferred embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram of the separation result of the head and tail points according to a preferred embodiment of the present invention;
[0055] Figure 3 This is a schematic diagram of the separation result of the head and tail points in a preferred embodiment of the present invention;
[0056] Figure 4 This is a schematic diagram of the results after all points are separated in a preferred embodiment of the present invention;
[0057] Figure 5 Schematic diagram of separation result layer display according to a preferred embodiment of the present invention, wherein (a) represents the first layer of separation results, (b) represents the second layer of separation results, and (c) represents the third layer of separation results.
[0058] Figure 6 A schematic diagram of the intersection of line segments in a preferred embodiment of the present invention;
[0059] Figure 7Schematic diagram of display of adjusted layers of a preferred embodiment of the present invention, wherein (a) represents the first layer after adjustment, (b) represents the second layer after adjustment, and (c) represents the third layer after adjustment. DETAILED DESCRIPTION
[0060] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0061] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0062] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.
[0063] A calculation method for automatically distributing wire harness trajectories, reference Figure 1-7 , including the following steps: Step 1:
[0064] When exporting the wiring track information in the EPLAN model, the track points are divided into two types of points according to whether they are in the wire slot, that is, points in the wire slot and points not in the wire slot. The points not in the wire slot are further divided into head points and tail points according to their positions in the wiring track, that is, all points are divided into three parts: head points, skeleton points (all points except the head and tail), and tail points, and the serial number of each point is recorded. Step 2:
[0065] Design the cross-sectional shape of the target wire harness to be produced, and calculate the relative position of the cross sections of other trajectories and the central trajectory using polar coordinates, that is, calculate the distance ρ from the center point of the cross section of each trajectory to the center point of the cross section of the central trajectory and the angle α formed by the line segment connecting the two points and the horizontal line segment to the right.
[0066] Step 3:
[0067] Offset the start and end points of the skeleton: For the head and tail points, since the terminals they are connected to are to be inserted into components, and the positions of the components are originally fixed, their positions do not need to be changed, but to be connected to the head and tail. Therefore, only the two points need to be offset up and down, and no changes are required in the four directions of front, back, left, and right. According to the cross-sectional information, the following results are obtained by offsetting them in the up and down directions according to formula (1).
[0068]
[0069] x i ,y i 、z i : Respectively represent the horizontal, vertical and vertical coordinates after the first and last points are offset;
[0070] x i0 ,y i0 、z i0 : Respectively represent the horizontal, vertical and vertical coordinates after the first and last points are offset;
[0071] ρ i : The offset between the target line and the center line;
[0072] α i : The angle between the target line and the center line and the horizontal direction.
[0073] Step 4:
[0074] Offset the head and tail points: For these two points, they are connected to the starting point and the end point respectively, so the relative positions of the starting point and the end point must remain unchanged, that is, their relative positions can only change in the front and back directions. Take a line in the harness as the center line, if the relative position of a certain section of another line to the center line is determined, then the relative position of the entire line from the center line should be the same as that of that section.
[0075] In order to determine the forward and backward offset direction of the point after the starting point of the target line, three vectors are constructed. ——From the point after the starting point of the centerline skeleton to the starting point of the centerline skeleton, ——From the point after the starting point of the centerline skeleton to the second point after the starting point, ——From the point after the starting point of the center line skeleton to the starting point of the target line skeleton, calculate according to formula (2) and and The angles ∠12 and ∠23 are formed, and the direction of the front and rear offset is determined by comparing the sizes of the two angles. In order to ensure that there is no overlap between the two wires and to make the wire bundle compact, the offset length is calculated using the following formula (3).
[0076]
[0077] θ: the angle between two vectors;
[0078] Represent two vectors respectively;
[0079]
[0080] l: the offset length of the target point of the target line;
[0081] r1: radius of the center line;
[0082] r2: radius of the target line;
[0083] β: The angle between the two segments at the turning point of the target line;
[0084] Similarly, in order to determine the forward and backward offset direction of the tail point of the target line, three vectors are constructed. ——From the previous point of the end point of the centerline skeleton to the end point of the centerline skeleton, ——From the point before the end point of the centerline skeleton to the second point before the end point of the centerline skeleton, ——From the previous point of the end point of the center line skeleton to the end point of the target line skeleton, then calculate and and The direction of the front and rear offset is determined by comparing the sizes of the two angles. The offset length is the same as above.
[0085] Step5:
[0086] Offsetting the middle point of the trajectory: Using the Rodriguez rotation formula to offset the middle point involves three physical quantities - the rotation axis, the target rotation vector, and the rotation angle.
[0087] For the middle point of the target line, it is necessary to offset in all directions, up, down, front, back, left, and right. The offset in the up and down direction should be consistent with the starting point and the end point; the offset in the front, back, left, and right directions should be on a plane p and offset by a certain angle and length on this plane. In order to determine the position of this plane, take three consecutive points, pointing from the second point of the target line to the first and third points, and calculate the unit vector and vector According to formula (4) and formula (5), we can calculate and The unit vector of the sum vector and the unit vector of the outer product By and vector The plane formed is the target plane p, and then and The outer product calculated by formula (6) is It is the axis of rotation.
[0088]
[0089] Next, find the length of the target rotation vector: The length ρ that needs to be offset is related to the thickness of the wire and the angle β of the corner, and is calculated using formula (2): and The angle β of the target rotation vector is calculated by formula (7): i
[0090]
[0091] Where:
[0092] l i : offset length;
[0093] ρ i : offset distance;
[0094] β i : The angle of the wires at the target point;
[0095] The rotation angle is the rotation angle α corresponding to the target line when designing the cross-section information. The result after the target vector is offset is calculated by formula (8):
[0096]
[0097] in
[0098]
[0099] in
[0100] c=cosα, s=sinα, a=1-cosα, The target point is calculated by formula (9).
[0101]
[0102] Where:
[0103] p i : The result after the target point is offset;
[0104] p0: target point;
[0105] Offset direction unit vector;
[0106] l i : Offset length.
[0107] After calculating all the parameters, the trajectory result after the offset is calculated using the formula, such as Figure 4 As shown:
[0108] Step 6:
[0109] For the result obtained after the offset, it can be guaranteed that each line has no intersection with the center line, but it cannot be guaranteed that the lines on the same plane have no intersection. Therefore, it is necessary to perform intersection detection and improve the situation where there is intersection, such as Figure 5 As shown:
[0110] We found that in the separated wire harness, the first layer of the skeleton did not cross, but the second and third layers of the skeleton did cross, so this needs to be improved.
[0111] The skeleton is composed of many straight line segments. Detecting whether there is an intersection between skeletons is actually detecting whether the line segments on two skeletons are intersecting. Figure 6 A situation shown:
[0112] For two intersecting line segments, we found that the two endpoints A and B of line segment AB are at the two ends of line segment CD, and the two endpoints C and D of line segment CD are at the two ends of line segment AB. Only when this condition is met can it be said that the two line segments are intersecting. Therefore, we use this characteristic condition to perform intersection detection.
[0113] First, the distance formula from point to plane (Formula 10) is used to determine whether the skeleton is on the same plane.
[0114]
[0115] Where:
[0116] P: point on the skeleton;
[0117] A: a point on the reference plane;
[0118] Normal vector to the base plane
[0119] When they are in the same plane, construct two sets of vectors and If equation (11) is satisfied at the same time
[0120]
[0121] This proves that line segment AB and line segment CD are intersecting. At this time, the positions of the lines in the harness can be swapped and the tracks can be separated again until there is no intersection.
Claims
1. A method for calculating the automatic distribution of wire harness trajectories, characterized in that: The following steps are involved: Step 1: When exporting the wiring track information in the EPLAN model, the track points are divided into two types of points according to whether they are in the wire slot, that is, the points in the wire slot and the points not in the wire slot. The track points not in the wire slot are further divided into head points and tail points according to their positions in the wiring track, that is, all track points are divided into three parts: head points, skeleton points (i.e. all points other than the head and tail), and tail points, and the serial number of each point is recorded; Step 2: Design the cross-sectional shape of the target wire harness to be produced, and calculate the relative position of the cross-sections of other trajectories and the center trajectory using polar coordinates, that is, calculate the distance ρ from the center point of the cross-section of each trajectory to the center point of the cross-section of the center trajectory and the angle α formed by the line segment connecting these two points and the horizontal line segment to the right; Step 3: Offset the start and end points of the skeleton: For the head and tail points, offset them up and down without changing them in the four directions of front, back, left, and right. According to the cross-section information, offset them in the up and down directions to obtain the following results; Step 4: Offset the head point and tail point: For the head point and tail point, they are connected to the starting point and the end point respectively; take a line in the harness as the center line, if the relative position of a certain section of another line to the center line is determined, then the relative position of the entire line from the center line should be the same as that of that section; Step 5: Offset the middle point of the track: Step 6: Perform cross detection on the results obtained after the migration and make improvements if there is any crossover.
2. A method for calculating the automatic distribution of wire harness trajectories according to claim 1, characterized in that: In step 3, according to the cross-sectional information, the cross-sectional information is shifted in the up and down directions according to formula (1) to obtain the following results: Among them, x i ,y i and z i Respectively represent the horizontal, vertical and vertical coordinates after the first and last points are offset; x i0 ,y i0 and z i0 Respectively represent the horizontal, vertical and vertical coordinates after the first and last points are offset; ρ i Represents the offset between the target line and the center line; α i Represents the angle between the target line and the center line and the horizontal direction.
3. A method for calculating the automatic distribution of wiring harness trajectories according to claim 1, characterized in that: In step 4, three vectors are constructed to determine the front-back offset direction of the point after the starting point of the target line, including: from the point after the starting point of the centerline skeleton to the starting point of the centerline skeleton From the point after the starting point of the centerline skeleton to the second point after the starting point The point after the starting point of the center line skeleton points to the starting point of the target line skeleton According to formula (2), we calculate and and The angles ∠12 and ∠23 are formed, and the direction of the front and rear offset is determined by comparing the sizes of the two angles; the offset length is calculated using the following formula (3): θ: the angle between two vectors; Represent two vectors respectively; l: the offset length of the target point of the target line; r1: radius of the center line; r2: radius of the target line; β: The angle between the two segments at the turning point of the target line.
4. The method for calculating the automatic distribution of wiring harness trajectories according to claim 1, characterized in that: In step 4, three vectors are constructed to determine the front and rear offset directions of the tail point and the secondary point of the target line, including: ——From the previous point of the end point of the centerline skeleton to the end point of the centerline skeleton, ——From the point before the end point of the centerline skeleton to the second point before the end point of the centerline skeleton, ——From the previous point of the end point of the center line skeleton to the end point of the target line skeleton, then calculate each by formula (2) and and The direction of the front and rear offset is determined by comparing the sizes of the two angles, and then the offset length is calculated by formula (3).
5. The method for calculating the automatic distribution of wiring harness trajectories according to claim 1, characterized in that: In step 5, using the Rodriguez rotation formula to offset the midpoint involves three physical quantities: rotation axis, target rotation vector, and rotation angle: For the middle point of the target line, it is necessary to offset in all directions, up, down, front, back, left, and right. The offset in the up and down direction should be consistent with the starting point and the end point; the offset in the front, back, left, and right directions should be on a plane p and offset by a certain angle and length on this plane. In order to determine the position of this plane, take three consecutive points, pointing from the second point of the target line to the first and third points, and calculate the unit vector and vector According to formula (4) and formula (5), we can calculate and The unit vector of the sum vector and the unit vector of the outer product By and vector The plane formed is the target plane p, and then and Calculate the outer product It is the axis of rotation; 6. A method for calculating the automatic distribution of wire harness trajectories according to claim 5, characterized in that: In step 5, find the length of the target rotation vector: the length ρ required to be offset and the thickness of the wire and the angle β of the corner i The size is related, and it can be calculated by formula (2) and The angle β i , calculate the length l of the target rotation vector through formula (7) i Where: l i : offset length; ρ i : offset distance; β i : The angle of the wires at the target point; The rotation angle is the rotation angle α corresponding to the target line when designing the cross-section information. The result after the target vector is offset is calculated by formula (8): in Target rotation vector; is the value calculated in step 5 in c=cosα,s=sinα,a=1-cosα, The target point calculated by formula (9); Where: p i Indicates the result after the target point is offset; p0 indicates the target point; represents the unit vector of the offset direction; l i Indicates the offset length.
7. The method for calculating the automatic distribution of wire harness trajectories according to claim 1, characterized in that: In step 6, the distance formula (10) from point to plane is used to determine whether the skeleton is on the same plane. Where: P: a point on the skeleton; A: a point on the reference plane; Normal vector of the reference plane; When they are in the same plane, construct two sets of vectors and If equation (11) is satisfied at the same time This proves that line segment AB and line segment CD are intersecting. At this time, swap the positions of the lines in the harness and re-separate the tracks until there is no intersection.
Citation Information
Patent Citations
Floating car track point space relationship and distribution-based road network extraction method
CN108510008A
Track-based interactive wiring method
CN111737946A
Complex wiring harness tool plate design system
CN112115675A
Power transmission line trajectory and sag monitoring method
CN114034251A
Power transmission line fault positioning method and device and power transmission line monitoring system
CN118731582A
Cited By
Data interaction method and system, storage medium and equipment
CN120745128A