A computing method for automatically distributing harness tracks
By classifying and offsetting the wire harness trajectory points, the problem of overlapping wiring trajectories in existing technologies has been solved, achieving greater accuracy and efficiency in automated wiring.
Patent Information
- Application Number
- CN202411892256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing electrical software provides wiring trajectory information with overlapping issues, resulting in low efficiency and high error rate for manual wiring, and there is a lack of effective automated processing methods.
By dividing the wiring harness trajectory points into head points, skeleton points, and tail points, the relative position of each trajectory is calculated using polar coordinates. Then, through offset and cross detection algorithms, the accurate wiring trajectory is calculated to avoid wire overlap.
The prerequisite for automated wiring is ensuring the accurate length of each wire, avoiding wire overlap, and improving wiring quality and efficiency.
Smart Images

Figure CN119808698B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic wiring, in particular to a calculation method for automatically distributing harness tracks. BACKGROUND
[0002] With the extensive use of electric energy by human beings, the integration of electrical systems is also becoming higher and higher, and harnesses are widely used in industrial electrical, power distribution cabinets, automobiles and other industries. In some complex wiring scenarios, the arrangement of wires is still relying on manual work, and manual wiring has problems such as low efficiency and high error rate, so realizing automatic arrangement of wires is a good method to improve the quality of wiring. The prerequisite for realizing automation is to provide accurate wiring track information for wiring, but at present, many electrical software can only provide the most basic wiring track, and there is a defect in the track: the part of different tracks in the same wire slot is coincident, and directly using this wiring information for wiring is not in line with the spatial distribution, and the processing of coincident tracks is still a blank at present. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a calculation method for automatically distributing harness tracks.
[0004] To achieve the above purpose, the present application adopts the following technical scheme: a calculation method for automatically distributing harness tracks, comprising the following steps:
[0005] Step 1: when exporting the wiring track information in the EPLAN model, according to whether the track point is in the slot, the track point is divided into two types of points, i.e. the point of the track point in the slot and the point of the track point not in the slot, and further the track point not in the slot is divided into head point and tail point according to the position in the wiring track, i.e. all track points are divided into three parts-head point, skeleton point, i.e. all points except head and tail, and tail point, and the serial number of each point is recorded;
[0006] Step 2: design the cross-sectional shape of the target harness to be made, and calculate the relative position of the cross section of other tracks to the center track using polar coordinates, i.e. calculate the distance p of the center point of the cross section of each track to the center point of the cross section of the center track and the angle a of the line segment connecting the two points to the horizontal right line segment;
[0007] Step 3: offset the start point and the end point of the skeleton: for the head point and the tail point, offset the head point and the tail point up and down, and do not change in the front, back and left and right four directions; according to the cross-sectional information, offset it in the up and down direction to obtain the following results;
[0008] Step 4: offsetting the head and tail points: for the head and tail points, they are connected with the start point and the end point respectively; taking one line in the bundle as the center line, if the relative position of a segment of another line to the center line is determined, then the relative position of the whole line to the center line should be the same as that of the segment to the center line;
[0009] Step 5: offsetting the middle point of the trajectory:
[0010] Step 6: for the results obtained after the offset, cross detection is performed, and the existing cross is improved.
[0011] In a preferred embodiment, in step 3, according to the cross-sectional information, the head and tail points are offset in the up-down direction according to formula (1) to obtain the following results:
[0012]
[0013] Wherein, x i , y i and z i represent the horizontal, vertical and vertical coordinates of the head and tail points after offsetting respectively;
[0014] x i0 , y i0 and z i0 represent the horizontal, vertical and vertical coordinates of the head and tail points after offsetting respectively;
[0015] ρ i represents the offset distance between the target line and the center line;
[0016] α i represents the included angle between the connecting line of 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 and rear offset directions of the point after the start point of the target line, including: a vector from the point after the start point of the center line skeleton to the start point of the center line skeleton a vector from the point after the start point of the center line skeleton to the second point after the start point a vector from the point after the start point of the center line skeleton to the start point of the skeleton of the target line According to formula (2), respectively calculate and and The included angle ∠12 and ∠23 are determined by comparing the sizes of the two included angles to determine the front and rear offset directions; the offset length is calculated by formula (3) as follows:
[0018]
[0019] θ: the included angle between the two vectors;
[0020] respectively represent two vectors;
[0021]
[0022] l: the offset length of the target point of the target line;
[0023] r1: the radius of the center line;
[0024] r2: the radius of the target line;
[0025] β: the angle between two segments at the inflection point of the target line.
[0026] In a preferred embodiment, in step 4, the three vectors are constructed to determine the front and rear offset directions of the tail point and the next point of the target line, including: —pointing from the previous point of the end point of the center line skeleton to the end point of the center line skeleton, —pointing from the previous point of the end point of the center line skeleton to the second point before the end point of the center line skeleton, —pointing from the previous point of the end point of the center line skeleton to the end point of the target line skeleton, and then calculating and and the included angle, and determining the front and rear offset directions by comparing the sizes of the two included angles.
[0027] In a preferred embodiment, in step 5, the offset of the intermediate point using the Rodrigues rotation formula involves three physical quantities: the rotation axis, the target rotation vector, and the rotation angle:
[0028] For the intermediate point of the target line, it needs to be offset in all directions of up, down, front, back, left, and right. The up and down directions should be consistent with the start point and the end point. 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, respectively pointing from the second point of the target line to the first and third points, and calculate the unit vectors and According to formula (4) and formula (5), calculate and and the unit vectors of the outer product and The plane composed of and is the target plane p, and the and calculated by the outer product of is the rotation axis.
[0029]
[0030] In a preferred embodiment, in step 5, the length of the target rotation vector is calculated: the length of the offset ρ and the thickness of the wire and the angle of the corner β i The size is related, and the length of the target rotation vector l is calculated by formula (7) And the angle β between them i The length of the target rotation vector l is calculated by formula (7) i
[0031]
[0032] In the formula: l i : offset length; ρ i : offset distance; β i : the angle of the wire at the target point;
[0033] The rotation angle is the rotation angle α corresponding to the target line when the design section information is designed, and the result after the offset of the target vector is calculated by formula (8):
[0034]
[0035] Among them
[0036] The target rotation vector;
[0037] is the result calculated in step 5
[0038]
[0039] Among them
[0040] c = cos α, s = sin α, a = 1-cos α,
[0041] The target point calculated by formula (9)
[0042]
[0043] In the formula: p i represents the result after the offset of the target point; p0 represents the target point; represents the unit vector of the offset direction; l i represents the offset length.
[0044] In a preferred embodiment, in step 6, whether the skeleton is in the same plane is judged by using the distance formula (10) from the point to the plane,
[0045]
[0046] In the formula:
[0047] P: a point on the skeleton; A: a point on the reference plane; Normal vector of the reference plane;
[0048] When in the same plane, construct two groups of vectors And
[0049] If formula (11) is satisfied simultaneously
[0050]
[0051] It is proved that the line segment AB and the line segment CD are crossed, at this time, the position of the line is exchanged in the beam to re-separate the trajectory until there is no intersection.
[0052] Compared with the prior art, the present application has the following beneficial effects: after classifying the trajectory coordinates, the accurate wiring trajectory can be automatically calculated by calculating the coordinates of different points of the skeleton, which becomes the premise of realizing the automatic wiring of the mechanical arm, and through the intersection detection, the generation of the wire overlapping phenomenon caused by the intersection is avoided. Another advantage of the algorithm is that the length of each wire can be calculated through the accurate coordinates, so that the wire with appropriate length can be prepared in advance. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 The algorithm flow chart of the preferred embodiment of the present application;
[0054] Figure 2 The separation head and tail point result schematic diagram of the preferred embodiment of the present application;
[0055] Figure 3 The separation head and tail secondary point result schematic diagram of the preferred embodiment of the present application;
[0056] Figure 4 The all point separation result schematic diagram of the preferred embodiment of the present application;
[0057] Figure 5 The separation result layer display schematic diagram of the preferred embodiment of the present application, wherein (a) represents the first layer of the separation result, (b) represents the second layer of the separation result, and (c) represents the third layer of the separation result.
[0058] Figure 6 The line segment intersection situation schematic diagram of the preferred embodiment of the present application;
[0059] Figure 7The display diagram of the adjusted post-layer of the preferred embodiment of the present application is shown in the figure, 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 application will be further described below in conjunction with the accompanying drawings and embodiments.
[0061] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0062] It should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and furthermore, it should be understood that when the terms "comprise" and / or "include" are used in the specification, there is a presence of the features, steps, operations, devices, components, and / or combinations thereof.
[0063] A computing method for automatically distributing harness tracks, with reference to Figures 1-7 , comprising the following steps: Step 1:
[0064] In the process of 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 slot, i.e. the points in the slot and the points not in the slot, and the points not in the slot are further divided into head points and tail points according to their positions in the wiring track, i.e. all points are divided into three parts-head points, skeleton points (all points except head and tail), and tail points, and the serial numbers of each point are recorded. Step 2:
[0065] The cross-sectional shape of the target harness to be made is designed, and the relative positions of other tracks to the cross-section of the center track are calculated using polar coordinates, i.e. the distance ρ of the center point of the cross-section of each track to the center point of the cross-section of the center track and the angle α formed by the line segment connecting the two points and the horizontal line to the right are calculated.
[0066] Step 3:
[0067] Offset the start point and the end point of the skeleton: for the head and tail points, since the terminals connected by them are to be inserted into the components, and the positions of the components are originally fixed, their positions do not need to be changed, but they are connected to the head and tail, so only the up and down offsets of the two points are needed, and there is no need to change in the front, back, left and right directions. According to the cross-sectional information, the up and down offsets are obtained according to formula (1) as follows.
[0068]
[0069] x i , y i , z i : respectively represent the horizontal, vertical and vertical coordinates of the head and tail points after offset;
[0070] x i0 , y i0 , z i0 : respectively represent the horizontal, vertical and vertical coordinates of the head and tail points after offset;
[0071] p i : the offset distance between the target line and the center line;
[0072] a i : the angle between the connecting line of 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 respectively connected with the starting point and the ending point, so the relative positions of the starting point and the ending point must be kept unchanged, that is, the relative positions can only change in the front and back directions. Take a line in the bundle as the center line, if the relative position of a certain segment of another line to the center line is determined, then from the center line, the relative position of the entire line should be the same as that of the segment.
[0075] In order to determine the front and back offset direction of the point after the starting point of the target line, three vectors are constructed, pointed from the point after the starting point of the center line skeleton to the starting point of the center line skeleton, pointed from the point after the starting point of the center line skeleton to the second point after the starting point, pointed from the point after the starting point of the center line skeleton to the starting point of the skeleton of the target line, according to formula (2) respectively and and The angle ∠12 and ∠23 composed of the two angles are determined by comparing the size of the two angles. In order to ensure that the two lines will not have overlapping parts and make the bundle compact, the offset length is calculated by using the following formula (3).
[0076]
[0077] θ: the angle between the two vectors;
[0078] respectively represent the two vectors;
[0079]
[0080] l: offset length of target point of target line;
[0081] r1: radius of center line;
[0082] r2: radius of target line;
[0083] β: angle between two segments at inflection point of target line;
[0084] Similarly, in order to determine the front and back offset direction of the tail point of the target line, three vectors are constructed, —pointing from the previous point of the end point of the center line skeleton to the end point of the center line skeleton, —pointing from the previous point of the end point of the center line skeleton to the second point before the end point of the center line skeleton, —pointing from the previous point of the end point of the center line skeleton to the end point of the target line skeleton, and then calculating and and the included angle composed of the two included angles, and the front and back offset directions are determined by comparing the sizes of the two included angles. The offset length is consistent with the above.
[0085] Step 5:
[0086] Offset the middle point of the trajectory: using the Rodrigues rotation formula to offset the middle point involves three physical quantities-rotation axis, target rotation vector and rotation angle.
[0087] For the middle point of the target line, it needs to be offset in all directions of up, down, front, back, left and right. The up and down offsets should be consistent with the start and end points; the front, back, left and right offsets 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, respectively pointing from the second point of the target line to the first and third points, and calculate the unit vectors and vector According to formula (4) and formula (5), calculate and and the unit vector of the outer product and the unit vector of the outer product Then the plane composed of and vector is the target plane p, and and The calculated by the outer product of formula (6) is the rotation axis.
[0088]
[0089] Next, the length of the target rotation vector is calculated: the length of the offset ρ is related to the thickness of the wire and the size of the corner angle β, which is calculated by equation (2) and the angle β between them, and the length of the target rotation vector l is calculated by equation (7) i
[0090]
[0091] where:
[0092] l i : offset length;
[0093] ρ i : offset distance;
[0094] β i : angle of the wire at the target point;
[0095] The rotation angle is the rotation angle α corresponding to the target line when designing the cross-sectional information, and the result after the offset of the target vector is calculated by equation (8)
[0096]
[0097] where
[0098]
[0099] where
[0100] c = cos α, s = sin α, a = 1 - cos α, The target point is calculated by equation (9)
[0101]
[0102] where:
[0103] p i : result after offset of the target point;
[0104] p0: target point;
[0105] unit vector of the offset direction;
[0106] l i : offset length.
[0107] After calculating all the parameters, the trajectory result after offset is calculated using the formula, as shown in Figure 4
[0108] Step6:
[0109] For the result after offset, each line can be guaranteed not to cross the center line, but the lines in the same plane can not be guaranteed not to cross, so intersection detection is needed to improve the situation of intersection, such as Figure 5
[0110] We find that the first layer of the separated line bundle does not cross, but the second and third layers of the skeleton exist, so improvement is needed.
[0111] The skeleton is composed of many straight line segments, and detecting whether the skeleton exists is actually detecting whether the line segments on the two skeletons exist. For line segment intersection, there is only Figure 6
[0112] For two intersecting line segments, we find that the two endpoints A and B of line segment AB are on the two ends of line segment CD, and the two endpoints C and D of line segment CD are on the two ends of line segment AB, and only when this condition is met can it be said that the two line segments are intersecting. Therefore, intersection detection is performed through this characteristic condition.
[0113] First, use the point-to-plane distance formula (equation 10) to determine whether the skeleton is in the same plane,
[0114]
[0115] In the formula:
[0116] P: a point on the skeleton;
[0117] A: a point on the reference plane;
[0118] The normal vector of the reference plane
[0119] When in the same plane, construct two groups of vectors and If equation (11)
[0120]
[0121] is satisfied, it is proved that line segment AB and line segment CD are intersecting, at which time the position of the line in the line bundle can be exchanged to re-separate the trajectory until there is no intersection.
Claims
1. A method for automatically distributing wire harness trajectories, characterized in that, Includes the following steps: Step 1: When exporting the wiring trace information in the EPLAN model, the trace points are divided into two categories based on whether they are in the wire slot: points in the wire slot and points not in the wire slot. Then, the trace points not in the wire slot are further divided into head points and tail points according to their position in the wiring trace. That is, all trace points are divided into three parts: head points, skeleton points (all points other than the head and tail), and tail points, and the sequence 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 positions 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 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 vertically, without changing them in the four directions of front, back, left, and right; according to the cross-sectional information, offset them vertically to obtain the following results; Step 4: Offset the head and tail points: The head and tail points are connected to the starting point and the ending point, respectively; taking one line in the bundle as the center line, if the relative position of a segment of another line with respect to the center line is determined, then from the center line, the relative position of the entire line should be the same as the relative position of that segment. Step 5: Offset the midpoint of the trajectory: Step 6: Perform cross-checking on the results obtained after offsetting, and improve the results where cross-checking occurs; In step 3, according to the cross-sectional information, the cross-section is offset in the vertical direction according to equation (1) to obtain the following result; (1) in, , These represent the horizontal, vertical, and angular coordinates after the initial and final points have been offset. , These represent the horizontal, vertical, and angular coordinates after the initial and final points have been offset. This represents the offset between the target line and the center line; The angle between the line connecting the target line and the center line and the horizontal direction; In step 4, three vectors are constructed to determine the forward and backward offset direction of the point following the starting point of the target line, including: a vector pointing from the point following the starting point of the centerline skeleton to the starting point of the centerline skeleton. The direction from the point after the starting point of the centerline skeleton to the second point after the starting point. The point following the starting point of the centerline skeleton points to the starting point of the target line skeleton. Calculate according to formula (2) and , and The angle formed The direction of the forward and backward offset is determined by comparing the size of the two included angles; the offset length is calculated using the following formula (3); (2) The angle between two vectors; , : Represent two vectors respectively; (3); l: Offset length of the target point on the target line; : The radius of the centerline; The radius of the target line; The angle between the two segments of the target line at the inflection point.
2. The method for automatically distributing wire harness trajectories according to claim 1, characterized in that, In step 4, three vectors are constructed to determine the offset direction before and after the tail point and the second point of the target line, including: —From the point preceding the end of the centerline skeleton to the end of the centerline skeleton, —From the point preceding the end of the centerline skeleton to the second point preceding the end of the centerline skeleton, —Starting from the point preceding the end of the centerline skeleton, the target line skeleton is pointed to its end, and then each is calculated using equation (2). and , and The included angle is used to determine the direction of the forward and backward offset by comparing the size of the two included angles, and then the offset length is calculated by formula (3).
3. The method for automatically distributing wire harness trajectories according to claim 1, characterized in that, In step 5, the offset of the intermediate point using the Rodriguez rotation formula involves three physical quantities: the rotation axis, the target rotation vector, and the rotation angle. For the midpoint of the target line, offsets need to be made in all directions: up, down, front, back, left, and right. The up-down offset should be consistent with the start and end points. The front-back and left-right offsets should lie on a plane p, with a certain angle and length offset on this plane. To determine the position of this plane, take three consecutive points, pointing from the second point on the target line to the first and third points respectively, and calculate the unit vector. sum vector Calculate according to equations (4) and (5) respectively. and unit vector of the sum vector unit vector of the outer product Then by sum vector The plane formed is the target plane p, and then... and Calculate the outer product It is the axis of rotation; (4) (5) (6)。 4. The method for automatically distributing wire harness trajectories according to claim 3, characterized in that, In step 5, the length of the target rotation vector is calculated: the required offset length ρ is related to the thickness of the wire and the angle of the bend. Size-dependent, calculated using equation (2) and The included angle The length of the target rotation vector is calculated using equation (7). (7) In the formula: Offset length; Offset distance; : The angle between the wires at the target point; The rotation angle is the rotation angle corresponding to the target line when designing the cross-sectional information. The result after the target vector offset is calculated using equation (8): (8) in : Target rotation vector; : Calculated in step 5 ; in The target point is calculated using equation (9); (9) In the formula: This indicates the result after the target point is offset; Indicate the target point; This represents the unit vector indicating the offset direction. Indicates the offset length.
5. The method for automatically distributing wire harness trajectories according to claim 1, characterized in that, 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. (10) In the formula: P: A point on the skeleton; A: A point on the reference plane; : The normal vector of the reference plane; When they are in the same plane, construct two sets of vectors. and : If equation (11) is satisfied simultaneously (11) This proves that line segments AB and CD intersect. At this point, the positions of the lines in the bundle are swapped to re-separate the trajectory 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