A three-dimensional automatic routing method and system for section posture constrained objects

CN121919995BActive Publication Date: 2026-08-07ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-03-25
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0026]本发明的目的在于针对现有技术的不足,提供一种面向截面姿态约束物件的三维自动布线方法及系统,该方法通过将物件路径分解成型单元并由成型单元首尾相接组合,可构造满足端点约束、姿态连续、制造可行的复杂三维路径,并将无限维的连续优化问题转化为有限离散状态的图搜索问题,可实现快速自动布线

Benefits of technology

[0081]本发明的有益效果至少为:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121919995B_ABST
    Figure CN121919995B_ABST
Patent Text Reader

Abstract

The application discloses a kind of three-dimensional automatic wiring method and system for section posture constraint object, method includes: the environment three-dimensional space to be carried out automatic wiring is discretized, constructs three-dimensional voxel map, and configures the geometric parameter and endpoint constraint of section posture constraint object;Construct pre-defined forming unit library, and form unit is used as the basic component unit for realizing the wiring of object;Generate all subsequent candidate forming units of allowable type, and carry out voxel collision detection;Optimal path is solved using heuristic search, and multi-layer pruning strategy is used, and the forming unit sequence representing object wiring path is obtained;Post-processing and output final forming unit sequence, thereby complete the three-dimensional automatic wiring of section posture constraint object.The method of the application can construct complex three-dimensional path meeting endpoint constraint, posture continuity and manufacturing feasibility by the end-to-end combination of forming unit, and has strong universality and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of three-dimensional spatial path planning technology, and relates to a three-dimensional automatic wiring method and system for cross-sectional attitude-constrained objects. It can be applied to fields such as automotive electrical systems, power distribution cabinet busbar layout, aerospace pipeline design, and wiring harness engineering. Background Technology

[0002] In modern engineering design, many strip-shaped objects with non-negligible cross-sectional dimensions and subject to attitude constraints and manufacturing limitations are involved. These include, but are not limited to, flat cables, flat copper strips and other rectangular cross-section conductors, profiles, and pipes, and are collectively referred to as "cross-sectional attitude-constrained objects." These objects cannot be directly simplified to mass points or centerlines for path planning because:

[0003] 1. The cross-sectional dimensions cannot be ignored.

[0004] When the ratio of the cross-sectional characteristic dimension (width W or thickness H) of an object to its movement space or bending radius exceeds a certain threshold, the cross-sectional occupancy must be explicitly considered. This can usually be determined by the relative bending radius criterion and the relative obstacle clearance criterion, i.e.:

[0005] Relative bending radius criterion:

[0006] When the ratio of the minimum bending radius r to the cross-sectional width W (or thickness H) satisfies

[0007] or hour,

[0008] At this point, the radial offset of the outer edge of the curved section relative to the centerline reaches... or Simplifying it to a centerline will lead to significant collision judgment errors. For example, in the design of automotive electrical system wiring, for a copper busbar with a width of 20mm and a thickness of 5mm in the automotive power distribution box, the minimum bending radius is 100mm, then r / W=5. When bending, the outer edge will deviate by 10mm. If this deviation is ignored in a narrow space, it will cause actual assembly interference.

[0009] Criterion for relative obstacle clearance:

[0010] When the ratio of the characteristic dimension of the cross section to the minimum obstacle clearance d in the environment satisfies:

[0011] ,

[0012] Therefore, it is assumed that the space occupied by the cross-section is on the same order of magnitude as the available space, and the occupied volume must be calculated accurately.

[0013] 2. The necessity of attitude constraints

[0014] The orientation of a cross-sectional orientation-constrained object at each spatial location is determined by the following three orthogonal unit vectors:

[0015] Tangent (t): The direction in which the central axis of the object extends;

[0016] Normal (Normal n): The orientation direction of the cross section (for rectangular sections, it is usually defined as the positive direction of the thickness, specified by the user at the start and end points according to installation requirements);

[0017] Binormal (b): Determined by the right-hand rule, b = t × n, forming a complete local coordinate system.

[0018] These three elements constitute the posture of the object, which must satisfy the following constraints:

[0019] Endpoint orientation constraints: The normal direction at the start and end points is fixed by installation requirements. For example, the connection holes of copper busbars in a distribution cabinet require that the normal direction be perpendicular to the mounting panel;

[0020] Path continuity constraint: The tangential and normal directions between adjacent segments must transition continuously without abrupt changes (at least the C0 position must be continuous and the C1 direction must be continuous), otherwise the segments cannot be formed through continuous process operations.

[0021] Torsional constraint: When an object rotates about its own axis (tangential), the rotation angle of the normal relative to the tangential is limited by: the torsional stiffness and allowable stress of the material; and the functional requirements after assembly (such as electrical insulation direction, heat dissipation surface orientation, etc.).

[0022] Existing 3D path planning algorithms (such as A*, RRT, PRM, etc.) are mainly geared towards mass point planning and have the following fundamental drawbacks:

[0023] If a point mass model is used, only the position coordinates (x, y, z) are considered, completely ignoring the space occupied by the object's cross-section. When the ratio of the cross-sectional size to the environmental scale is large, the path planned by the point mass model cannot guarantee that the object will not collide with the actual space it occupies.

[0024] If a centerline model is used, the object is simplified to a curve along the centerline. Although the geometric continuity of the path is considered, the swept volume and attitude change of the cross-section are still ignored. For example, B-spline curves or Bézier curves can generate smooth paths, but they cannot directly constrain the normal direction along the curve (the curve itself only defines the tangential direction); collision detection along the curve requires the cross-section to be swept according to a certain assumed orientation (such as always being vertical), but this assumption often contradicts the actual attitude constraints.

[0025] Based on this, the present invention proposes a fast and feasible path generation method that can explicitly guarantee process constraints and meet actual processing and manufacturing requirements, thereby realizing three-dimensional automatic wiring of objects with cross-sectional posture constraints. Summary of the Invention

[0026] The purpose of this invention is to address the shortcomings of existing technologies by providing a three-dimensional automatic routing method and system for objects with cross-sectional attitude constraints. This method decomposes the object path into forming units and combines the forming units end to end to construct complex three-dimensional paths that satisfy endpoint constraints, attitude continuity, and are feasible to manufacture. It also transforms the infinite-dimensional continuous optimization problem into a graph search problem with finite discrete states, enabling rapid automatic routing.

[0027] The technical solution adopted in this invention is as follows:

[0028] A method for automatic 3D wiring of objects with cross-sectional attitude constraints includes:

[0029] (1) Discretize the three-dimensional space of the environment to be automatically wired into a uniform three-dimensional voxel grid to construct a three-dimensional voxel map and configure the geometric parameters and endpoint constraints of the cross-sectional attitude constraint object.

[0030] (2) Construct a predefined molding unit library, which includes at least straight segments, thickness-bending segments, width-bending segments, and torsion segments, and control the currently available molding unit types through a mask; use the molding unit as the basic building block for implementing object wiring;

[0031] (3) Define the state as the final pose of the forming unit in the object. For the current state, generate all subsequent candidate forming units of all allowed types according to the forming unit type mask and geometric parameters, and perform voxel collision detection on each candidate forming unit.

[0032] (4) Use heuristic search to find the optimal path from the wiring start point to the state that meets the termination condition, and use a multi-layer pruning strategy to obtain the forming unit sequence representing the wiring path of the object.

[0033] (5) Post-process the obtained forming unit sequence to merge collinear straight segments and digest errors, and output the final forming unit sequence, thereby completing the three-dimensional automatic wiring of the cross-sectional attitude constrained object.

[0034] In the above technical solution, step (1) further includes the following:

[0035] S1.1: Discretize the three-dimensional physical space into a uniform voxel grid, set the voxel side length Δ, and label each voxel as an obstacle voxel or a free voxel. The obstacle voxel is the space occupied by solid obstacles, and the free voxel is the free space that can be used for wiring.

[0036] S1.2: Configure the geometric parameters of the object, including: cross-sectional shape and size, protective clearance (i.e., the minimum distance that the object must maintain from the obstacle), and material bending coefficient;

[0037] S1.3: Specifies the start and end points of the wiring, including the start point position and initial normal, the end point position and target normal, where the positive direction of the object's cross-sectional thickness is defined as the normal.

[0038] Furthermore, in step (2), the forming unit is defined as the basic component of the object path. Each forming unit has: starting posture, ending posture, geometric parameters, and a set of voxels occupied. The starting posture and ending posture both include position, tangent, normal, and subnormal. The ending posture is obtained by transforming the starting posture based on the posture transformation formula corresponding to the forming unit type and geometric parameters. The geometric parameters are a set of parameters determined by the forming unit type. The set of voxels occupied is a list of voxel coordinates actually occupied by the forming unit in space. The tangent is the unit vector of the extension direction of the object's central axis. The normal is the unit vector of the positive direction of the object's cross-sectional thickness. The subnormal is determined by the right-hand rule.

[0039] Furthermore, the straight segment is a forming unit that extends in a straight line along the current tangential direction and whose tangential and normal directions remain unchanged, and its geometric parameters include the length in the tangential direction;

[0040] The thickness bending section is an extension of the center line of the forming unit along a spatial arc path. This arc is located in the plane formed by the initial tangent and the initial normal, and moves around the arc axis with the secondary normal as the rotation axis, causing the normal and tangent to rotate synchronously. Its geometric parameters include: bending radius, bending angle, center position, and arc length.

[0041] The wide bending segment is an extension of the center line of the forming unit along a spatial arc path. This arc is located in a plane perpendicular to the initial normal and moves around the arc with the normal as the axis of rotation, causing the tangential and sub-normal directions to rotate synchronously, while the normal direction remains constant. Its geometric parameters include: bending radius, bending angle, center position, and arc length.

[0042] The torsion segment is a straight line extending from the center line of the forming unit along the tangential direction, while the cross-section rotates continuously around the central axis, i.e., the tangential direction, causing the normal and sub-normal directions to undergo angular displacement while maintaining orthogonality to the tangential direction. Its geometric parameters include: torsion length and torsion angle.

[0043] Furthermore, the currently available molding unit types are controlled by a mask. The mask data structure uses binary bits, Boolean arrays, or enumeration sets to represent the activation status of each molding unit type. The mask is determined based on material properties, object size characteristics, or the application requirements to be wired in order to flexibly adapt to different materials and processes.

[0044] Furthermore, step (3) specifically includes:

[0045] 1) Generate candidate molding units

[0046] S4.1: For the current state, generate all allowed candidate forming units based on the forming unit type mask and geometric parameters:

[0047] S4.2: For each candidate forming unit, calculate the final attitude according to the attitude transformation formula corresponding to its type. Since the starting attitude of each candidate forming unit is equal to the attitude of the current state, the final attitude is calculated, thus automatically ensuring attitude continuity and unit manufacturability.

[0048] 2) Voxel collision detection

[0049] S5.1: For each candidate forming unit, sample uniformly along the center line of the forming unit to obtain a sampling point sequence;

[0050] S5.2: Attitude transformation, calculate the specific coordinates of the sampling points according to the attitude transformation formula corresponding to the forming unit type;

[0051] S5.3: Considering the protective gap, generate a set of cross-section points for the rectangular cross-section where the sampling point is located;

[0052] S5.4 Voxel Occupation Determination: For each sampling point, convert its corresponding cross-sectional point set to world coordinates and then to voxel coordinates. Query the constructed 3D voxel map. If it is an obstacle voxel, determine the collision and cancel the candidate of the forming unit.

[0053] Furthermore, different discretization strategies are adopted for different types of forming units in the predefined forming unit library: straight segments need to be tried at different lengths to accommodate connections at different distances. To reduce redundant searches, the Fibonacci sequence or an exponentially growing sequence is used as the candidate length set, and collision detection is performed in ascending order of length when generating candidate straight segments. If a straight section collides, all [activities] will terminate. Candidate generation; both the thickness bending segment and the width bending segment are bending segments, and the angle is discretized, with the bending angle selected from a preset set of discrete angles; the torsion angle in the torsion segment is selected from a preset set of torsion angles.

[0054] Furthermore, step (4) applies a multi-level pruning strategy to accelerate the search and reduce invalid expansions, including:

[0055] 1) Deduplication of exact closed sets: Maintain the set of visited states, discretize the states and store them as closed sets. If a newly generated state has the same discretized representation as a state in the closed set, skip that state; otherwise, add the state to the closed set.

[0056] 2) Position-level optimal cost table pruning: Maintain a position-level cost table, whose data structure is a hash table. The key is the voxel coordinate (i,j,k), and the value is the minimum cumulative cost to reach that position. When the extended state S reaches position (i,j,k), if the cumulative actual cost from the starting point to state S is greater than (1+α) times the minimum cumulative cost to reach position (i,j,k), then the state is pruned, where α is the relative tolerance multiple.

[0057] 3) Access count limit pruning: Maintain a position access counter Count, with a hash table as the data structure. The key is the position (i,j,k), and the value is the number of times the position has been expanded. When Count[i,j,k]>N, where N is the maximum number of times the position has been expanded, the position is refused to be expanded again.

[0058] 4) Direct to destination attempt: When in extended state S, check if the direct access condition is met. If it is met, try to generate a straight segment to the destination and perform collision detection. If there is no collision and the destination is reached within the tolerance range, return the path as the solution; otherwise, continue the normal search.

[0059] Furthermore, the direct access conditions in the direct access attempt are specifically as follows:

[0060] 1) Moderate distance: The Euclidean distance from the current state to the destination is between the minimum and maximum straight-line distance;

[0061] 2) Tangential alignment: The angle between the current tangential direction t and the direction of the line connecting the endpoint satisfies ;

[0062] 3) Normal alignment: Current normal n and target normal n g The included angle satisfies ;

[0063] If satisfied, a straight segment forming unit is generated from the current state to the endpoint, with a length equal to the Euclidean distance between the two.

[0064] Perform collision detection on the straight segment. If no collision is found, terminate the search and return the path as the optimal solution.

[0065] If a collision occurs, discard that straight segment and continue the search.

[0066] Furthermore, step (5) specifically includes the following:

[0067] S7.1 Collinear straight segments merged

[0068] Traverse the forming unit sequence. For two adjacent forming units, if they are both straight segments and have the same tangent, normal, and position, then perform a merging operation: take the starting point of the first straight segment as the starting point of the new straight segment, take the ending point of the second straight segment as the ending point of the new straight segment, and take the sum of the lengths of the two straight segments as the length of the new straight segment. Replace the first and second straight segments with the new straight segment in the forming unit sequence.

[0069] S7.2 Error Digestion Mechanism

[0070] In actual searches, due to voxel discretization and the precision of floating-point operations, minute position or orientation errors may occur. The following mechanism is used to mitigate these errors:

[0071] 1) Generate orthogonal basis for molding unit

[0072] After each forming unit is generated, its tangential t, normal n, and subnormal b are normalized to ensure that (t,n,b) always constitutes an orthonormal basis.

[0073] 2) Linear expression of position error

[0074] During path backtracking, if there is an error Δp ​​between the starting and ending positions, the error is linearly distributed to each forming unit of the path:

[0075] Suppose the path contains N forming units, and the total length is... L total Then the length of the i-th unit L i The correction amount is: ,in t i Let be the tangential unit vector of the i-th forming unit, and sign represent the projection sign of the error onto the tangential direction of that unit. The target position is accurately reached by adjusting the length of each unit.

[0076] The present invention also provides an electronic device, comprising:

[0077] One or more processors;

[0078] Memory, used to store one or more programs;

[0079] When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in any of the preceding methods.

[0080] A computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the method described in any of the preceding claims.

[0081] The beneficial effects of the present invention are at least as follows:

[0082] The method of the present invention represents the wiring path of a strip-shaped object with a non-negligible cross-sectional size and subject to attitude constraints by using a sequence of forming units. This ensures that the generated path meets the requirements of endpoint position and attitude constraints, path continuity, manufacturing process limitations, and protective gap requirements, and can accurately meet manufacturing needs. In particular, by explicitly modeling the forming units, the geometric parameters of which are preset to meet material and process constraints, the combined path is naturally manufacturable without the need for post-verification or manual adjustment. This ensures that the installation orientation of the object at each position meets functional requirements such as electrical insulation direction and heat dissipation surface orientation, and avoids interference or failure after assembly.

[0083] The sequence combination of forming units can approximate any continuous space curve. For a given start and end point attitude constraint, there may be multiple sequences of forming units that can be connected. The search algorithm can select the optimal combination according to the optimization objective, and has flexible local adjustment capabilities. Furthermore, through efficient search algorithms and pruning strategies, the infinite-dimensional continuous optimization problem is transformed into a finite graph search, which can achieve second-level or minute-level solutions in a large-scale voxel space (hundreds of millions of voxels). In addition, the error digestion strategy can be used to solve the subtle errors caused by voxelization and improve the computational stability.

[0084] The method of this invention has strong versatility, providing a configurable molding unit library and process parameter interface, which can adapt to the needs of different materials, cross-sectional shapes, and manufacturing equipment; and has excellent scalability, supporting custom molding unit types, cost functions, and heuristic strategies, extending the solution to complex scenarios such as multi-resolution planning, dynamic obstacle environments, and multi-object collaborative wiring. Attached Figure Description

[0085] Figure 1 This is a schematic diagram of the thickness-bending section;

[0086] Figure 2 This is a schematic diagram of the wide-angle curved section;

[0087] Figure 3 This is a schematic diagram of the torsion section;

[0088] Figure 4 This is a schematic diagram of the combination of a straight section and a width-curved section;

[0089] Figure 5 A schematic diagram showing the combination of a straight section, a width-curved section, and a thickness-curved section;

[0090] Figure 6 A schematic diagram showing the combination of a straight section, a width-direction curved section, and a torsion section;

[0091] Figure 7 For custom molding units;

[0092] Figure 8 This is a schematic diagram illustrating an example of automatic wiring according to the present invention. Detailed Implementation

[0093] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0094] To address the problem of automatic routing for strip-shaped objects with non-negligible cross-sectional dimensions and attitude constraints in a 3D obstacle environment, this invention proposes a novel solution: decomposing the object path into a sequence of a finite number of predefined geometric units. Each geometric unit is called a basic forming unit. The forming unit in this invention has the following characteristics:

[0095] The geometric parameters can be fixed or discrete: the shape of each forming unit is completely determined by a small number of parameters (such as length, bending radius, bending angle, and torsion angle), and the parameter values ​​are discrete sets (such as length taking integer voxel units; angle taking special angles such as 45° and 90°).

[0096] Embedded manufacturing constraints: The geometric parameters of the forming unit are pre-set to meet manufacturing process constraints (such as turning radius), and the combined path is naturally manufacturable;

[0097] Attitude transformation can be calculated analytically: Once the starting attitude (position, tangential, and normal) of each forming unit is determined, the ending attitude can be accurately calculated through analytical geometric transformations (rotation matrix and translation vector) without numerical integration.

[0098] Precise generation of occupied space: The set of occupied voxels of the forming unit can be generated by sampling along its centerline at fixed steps and discretizing the cross-section after rotation at each sampling point, which is computationally stable.

[0099] By connecting the beginning and end of forming units, complex 3D paths that satisfy endpoint constraints, pose continuity, and are feasible to manufacture can be constructed. This transforms the infinite-dimensional continuous optimization problem into a graph search problem with finite discrete states, making it suitable for efficient heuristic search algorithms (such as A*). This method can achieve:

[0100] Explicit guarantee of constraints: The parameters of each molding unit are preset to meet the process constraints, without the need for point-by-point verification during the search process;

[0101] Controllability of the search space: The number of successor states for each state is limited (usually dozens), and the search space has a controllable graph structure.

[0102] Accuracy and stability of calculations: The geometric transformation and occupancy calculation of the forming unit are based on analytical formulas to avoid the accumulation of numerical errors; minor errors caused by voxelization can be resolved through error digestion strategies.

[0103] Flexible process adaptability: Specific types of forming units can be enabled or disabled based on material properties and equipment capabilities (e.g., some materials do not allow twisting, so twist forming units can be disabled via a mask).

[0104] According to a specific embodiment of the present invention, a three-dimensional automatic wiring method for cross-sectional attitude-constrained objects includes the following steps:

[0105] 1. Digital representation of environment and objects

[0106] 1.1 Construction of 3D Voxel Map

[0107] 1.1.1 Discretize the actual three-dimensional space (such as the interior of a power distribution cabinet or the interior of a car dashboard) into a uniform three-dimensional voxel grid. A voxel is the smallest discrete unit in three-dimensional space, similar to a pixel in a two-dimensional image. A voxel grid is a data structure that divides a continuous three-dimensional space into a regular array of cubes. This includes:

[0108] Determine the voxel resolution: Set the voxel side length Δ (e.g., 1mm, 0.5mm, etc.). The smaller the voxel, the higher the accuracy, but the greater the computational load.

[0109] Occupancy markers: For each voxel (i,j,k) in the space, it is marked as: obstacle voxel (value 1), indicating that it is occupied by solid obstacles such as housing, electrical components, other objects already placed, etc.; free voxel (value 0), indicating free space that can be used for wiring;

[0110] Perform the conversion between voxel coordinates and world coordinates: ,in For the transformed world coordinates, The world coordinates of the origin of the voxel map.

[0111] 1.1.2 Methods for converting from the real world to voxel maps include the following:

[0112] 3D scanning / CAD model: Obtaining a three-dimensional geometric model of the environment (such as a triangular mesh in STL or OBJ format) through laser scanning, structured light scanning, or CAD software.

[0113] Voxelization algorithm: Voxelize the triangular mesh; for each voxel center, detect whether it is located inside the mesh using ray casting or symbolic distance field SDF; if the voxel center is inside, mark it as an obstacle voxel;

[0114] 1.2 Geometric parameters of the object

[0115] Input the following parameters for the cross-sectional attitude constraint object:

[0116] Cross-sectional shape: preferably rectangular (width W × thickness H), but can also be extended to circular (diameter D), elliptical, or custom polygon;

[0117] Cross-sectional dimensions: Width W (mm) Thickness H (mm)

[0118] Material properties: The bending coefficient k is determined by the material type, controlling the turning radius and torsion.

[0119] Protective clearance C: The minimum distance (unit: mm) that must be maintained between the cross-section of an object and the surface of an obstacle, taken into account manufacturing tolerances, assembly errors, insulation requirements, etc.

[0120] 1.3 Endpoint Constraints

[0121] Specify the start and end point constraints for the wiring:

[0122] The starting point constraints include:

[0123] Location: p start =(x0,y0,z0);

[0124] Initial normal: n0 is a unit vector representing the positive direction of the cross-sectional thickness, which can be specified by the user according to the mounting hole position or functional requirements;

[0125] Endpoint constraints include:

[0126] Location: p end =(x1,y1,z1);

[0127] Target normal: n1 represents the required normal direction when reaching the destination.

[0128] In this invention, the tangential direction t is defined as the unit vector extending from the central axis of the object; the normal direction n is the unit vector of the cross-section orientation, which is usually defined as the positive thickness direction for a rectangular cross-section; the binormal direction b = t × n is determined by the right-hand rule.

[0129] 2. Construction of the predefined molding unit library

[0130] 2.1 Definition of Molding Unit

[0131] Define a segment as the basic building block of an object path. Each segment has the following characteristics:

[0132] Starting posture: position Tangential , legal direction Deputy Legal Direction ;

[0133] Final posture: position Tangential , legal direction Deputy Legal Direction ;

[0134] Geometric parameters: A set of parameters determined by the type of forming unit, such as length L, radius r, angle θ, etc.

[0135] Occupied voxel set: A list of voxel coordinates actually occupied by the forming unit in space.

[0136] The forming unit is the core concept of this invention. Through the forming unit, this invention can discretize a continuous three-dimensional path into a sequence of a finite number of predefined geometric shapes. The geometry of each forming unit is completely determined by a small number of parameters, which are discrete sets. For example, the length can be taken from the Fibonacci sequence, and the angle can be taken from discrete values ​​such as 45° and 90°, thus avoiding the problem of infinite search in continuous parameter space.

[0137] 2.2 Types of Molding Units

[0138] Based on material properties and cross-sectional dimensions, the following types of molding units are constructed:

[0139] 2.2.1 Straight segment: Extends in a straight line along the current tangential direction, with the tangential and normal directions remaining unchanged.

[0140] Its geometric parameters include: length L, which can be selected from a set of discrete lengths.

[0141] The attitude transformation formula it follows is as follows:

[0142] ;

[0143] ;

[0144] .

[0145] 2.2.2 Thick-section bending segment (e.g.) Figure 1 )

[0146] Definition: The centerline of an object extends along a spatial arc path, and this arc lies within the initial tangential direction. With the initial normal Within Zhang Cheng's plane, around the secondary normal direction The arc motion of the rotation axis causes synchronous rotation in both the normal and tangential directions.

[0147] Its geometric features are:

[0148] The axis of rotation is , is the secondary normal axis, i.e., the width direction;

[0149] Invariant: The secondary normal b remains constant during bending;

[0150] Change: Tangential With the direction of the law Around Axis rotation.

[0151] This bending causes the object to turn in the thickness direction, changing the spatial orientation of the normal vector and enabling a transition from one spatial posture to another. The bending radius is constrained by the material thickness to prevent crushing on the inside of the bend or tearing on the outside.

[0152] Its geometric parameters include:

[0153] Bending radius: r = k * H, where k is the bending coefficient of the material and H is the cross-sectional thickness;

[0154] Bending angle: θ∈(-π,π], which is selected from a discrete set of angles in practical applications, such as {±30°,±45°,±60°,±90°,±135°,±180°};

[0155] Center position: The center of the circle is located at a distance r from the starting point along the normal direction. When θ > 0, the object bends towards the positive normal direction; when θ < 0, it bends towards the negative normal direction.

[0156] Arc length: ;

[0157] Its attitude transformation formula adopts the Rodriguez rotation formula:

[0158] For any unit vector v, rotate it about the unit axis a by an angle θ. The rotated vector is:

[0159] ;

[0160] When applied to the calculation of the endpoint attitude of the thick bending segment, we have:

[0161] ;

[0162] ;

[0163] ;

[0164] Thick-axis bending sections can be used to change the spatial orientation of the normal of an object. Typical applications include: busbars in distribution cabinets changing from horizontal to vertical (their normal changes from vertical to horizontal); transition areas where sheet metal changes from planar to vertical mounting; and Z-axis transition connections between different layers in multi-layer wiring.

[0165] 2.2.3 Wide-direction bending section (e.g.) Figure 2 )

[0166] Definition: The centerline of an object extends along a spatial arc path, and this arc lies perpendicular to the initial normal. In the plane, around the normal The circular motion of the rotation axis causes the tangential and subnormal directions to rotate synchronously, while the normal direction remains constant.

[0167] Its geometric features are:

[0168] Rotation axis a=n in , is the normal axis, i.e., the thickness direction;

[0169] Invariant: Normal n in Maintain constancy during bending;

[0170] Changes: Tangential t and subnormal b around n in Axis rotation;

[0171] This bend alters the direction of the object's centerline, but the spatial orientation of the cross-section, i.e., the normal, remains unchanged. The bending radius is constrained by the material width to meet the minimum bending radius requirements of the forming process.

[0172] Its geometric parameters include:

[0173] Bending radius: r = k * W, where k is the bending coefficient of the material and W is the cross-sectional width;

[0174] Bending angle: θ∈(-π,π], which is selected from a discrete set of angles in practical applications, such as {±45°,±90°,±135°,±180°};

[0175] Central parameterization description: The center of the circle is located at a distance r along the secondary normal direction from the starting point. The sign of θ determines the direction of the bend (left or right turn).

[0176] Arc length: ;

[0177] Its attitude transformation formula adopts the Rodriguez rotation formula:

[0178] ;

[0179] ;

[0180] ;

[0181] Wide-direction bending sections can be used to change the direction of extension while keeping the object's installation posture (normal) unchanged. Typical applications include: path turning of busbars in the horizontal plane within a distribution cabinet (normal remains vertical); and two-dimensional path planning in a single plane.

[0182] 2.2.4 Torsional section (e.g.) Figure 3 )

[0183] Definition: When the center line of an object extends in a straight line along the tangential direction, and the cross-section rotates continuously around the central axis (tangential direction), the normal and subnormal directions will undergo angular displacement while remaining orthogonal to the tangential direction.

[0184] Its geometric features are:

[0185] The central axis is along A straight line in direction;

[0186] Invariant: Tangential t remains constant during torsion;

[0187] Changes: The normal direction n and the subnormal direction b rotate about the tangential axis;

[0188] The twisting section allows an object to extend and twist simultaneously, thereby changing the spatial orientation of its cross-section.

[0189] Its geometric parameters include:

[0190] Torsional length: L = kt * W, where kt is the torsional coefficient of the material;

[0191] Torsion angle: θ∈(-π,π], which is selected from a discrete set of angles in practical applications, such as {±90°,±180°};

[0192] Its attitude transformation formula satisfies:

[0193] The location extends linearly along the tangential direction;

[0194] For rotation of the normal axis about the tangential axis, apply the Rodriguez formula;

[0195] The secondary normal is orthogonal to the normal and tangential directions;

[0196] Therefore:

[0197] ;

[0198] ;

[0199] ;

[0200] ;

[0201] Torsion sections can be used to adjust the cross-sectional orientation while maintaining the direction of extension. Typical applications include: changing busbars from a "wide-side horizontal" orientation to a "narrow-side horizontal" orientation; transitioning pipelines from one installation angle to another; and avoiding interference with obstacles in space-constrained areas through torsion.

[0202] All material correlation coefficients can be obtained by experimental determination or table lookup of the mechanical properties of the material (yield strength, elastic modulus, elongation, etc.), with a typical range of 1.5 to 6.0.

[0203] In this invention, the forming unit is parameterized, specifically using the parameterization methods based on center position, radius, and central angle (for thickness-bending and width-bending sections) and the parameterization methods based on length and rotation angle (for straight and torsional sections). This approach offers the following advantages:

[0204] (1) Diversity of combination methods (e.g.) Figures 4-6 ):

[0205] Based on the mathematical property that a continuous curve can be approximated with arbitrary precision by combining piecewise circular arcs and straight lines, the forming element library provides complete discrete basic elements. Any continuous spatial curve can be approximated by a sequence of finite forming elements.

[0206] Given the starting and ending attitude constraints, there may be multiple combinations of forming unit sequences to achieve the connection. Different combinations correspond to different path lengths, number of bends, and space occupancy. Subsequent search algorithms can select the optimal combination based on the optimization objective (such as shortest path, fewest bends, minimum cost, etc.).

[0207] (2) Independence of local adjustments:

[0208] When a part of the path needs to be modified (e.g., to avoid new obstacles), only the shaping unit subsequence in that part needs to be replaced, while other parts can remain unchanged. Compared to the global optimization of continuous curves, the shaping unit combination has stronger locality and lower modification cost.

[0209] (3) Attitude analysis computability:

[0210] Given the starting posture of the forming unit ( , , ) and geometric parameters (such as r, θ), endpoint pose ( , , Rotation and translation can be accurately calculated using analytical geometric formulas (i.e., attitude transformation formulas), without the need for numerical integration or iterative solutions.

[0211] (4) Geometric continuity guarantee:

[0212] C0 continuity, or positional continuity, refers to the end position of the previous forming unit. equal to the starting position of the next forming unit C1 continuity, or tangential continuity: the tangential direction of the endpoint of the previous forming unit. equal to the starting tangential direction of the next forming unit The continuity constraint mentioned above is naturally satisfied by the end-to-end design of the molding unit.

[0213] (5) Controllability of computational complexity:

[0214] The number of voxels occupied by each forming unit is linearly related to its length; the total computational cost is linearly related to the path length and does not increase exponentially with path complexity (such as the number of turns).

[0215] (6) Scalability:

[0216] Supports custom new forming unit types (such as helical segments, variable cross-section segments, combined deformation segments, etc., for example) Figure 7 Only the corresponding geometric parameters and attitude transformation formulas need to be defined. The forming unit library can be dynamically configured according to materials, processes, and equipment capabilities to adapt to different application scenarios.

[0217] 2.3 Mask control for molding unit availability

[0218] Different materials, cross-sectional dimensions, and processing equipment have varying capabilities in supporting molding operations. This invention uses a molding unit type masking mechanism to control which types are available during the planning process.

[0219] The mask data structure uses binary bits, Boolean arrays, or enumeration sets to represent the enabled status of each molding unit type.

[0220] The mask is determined by material properties. For example, torsion sections can be disabled for hard and brittle materials (such as high-strength aluminum alloys and carbon fiber composites) because torsion easily leads to brittle fracture; while soft materials (such as annealed copper and soft aluminum) can allow all types. It can also be determined by equipment capabilities. For example, a production line equipped only with a unidirectional bending machine may only use either the width bending section or the thickness bending section. For extremely thin objects (such as those whose thickness is much smaller than their width), the width bending section may not be suitable; the specific settings can be configured according to needs.

[0221] Through the masking mechanism, the system can flexibly adapt to different objects and processes without modifying the core planning algorithm.

[0222] 3. Representation of search status

[0223] 3.1 State Definition

[0224] Define state S (representing State) as the final pose of a certain forming unit of an object, which includes: position p (3D coordinates), tangential direction t (unit vector), normal direction n (unit vector), and the type of the previous forming unit T;

[0225] A state is a node in the search algorithm, representing the complete geometric configuration of an object at a given location. The previous cell type is used to avoid consecutive curved segments and to record the trajectory.

[0226] 3.2 Initial State

[0227] The starting state is determined by user input: S = {p, t0, n0, T} prev =NULL};

[0228] 3.3 Termination Conditions

[0229] A state S is considered to have reached its destination when it satisfies all of the following conditions:

[0230] Location is close:

[0231] Normal alignment:

[0232] in The coordinates of the endpoint The endpoint normal vector; , All are preset thresholds, which can be set according to experience or accuracy requirements;

[0233] If the endpoint requires a specific access direction, a tangential constraint can also be added.

[0234] 4. Generation of candidate forming units: For the current state, generate candidate forming units of all allowed types based on the forming unit type mask and geometric parameters, specifically including:

[0235] 4.1 Straight Segment Candidate Based on Length Discretization Strategy

[0236] Straight segments need to be tested at different lengths to accommodate connections at varying distances. To reduce redundant searches, a Fibonacci sequence or an exponentially growing sequence (in units of voxel side length) is used as the candidate length set.

[0237] Fibonacci sequence: {1,2,3,5,8,13,21,...}

[0238] In the Fibonacci sequence, any positive integer n can be represented as the sum of no more than log n non-adjacent Fibonacci numbers. Therefore, any length can be achieved through a small number of straight segments without missing any reachable regions.

[0239] Exponential sequence: {1,2,4,8,16,...}

[0240] Any positive integer can be represented as a sum of powers of 2, i.e., binary representation, which also guarantees completeness.

[0241] Traditional methods, if tried for every length (1, 2, 3, 4, ...), result in 100 candidates for lengths in the range [1, 100]. Using the Fibonacci sequence, only about 10 candidates are needed, reducing the number of search branches by 90%. Furthermore, this method does not affect the reachability of the path: if the optimal path requires a length of 17, it can be achieved through a combination of 13+3+1, requiring only 3 straight segments, each a Fibonacci number.

[0242] Traverse the discrete set of lengths (i.e., the Fibonacci or exponential sequence) and use a collision early termination strategy, checking in ascending order of length; if the length If a straight segment collides, then all All candidates are skipped because longer straight segments will inevitably collide, further reducing the number of exploration branches. This strategy can significantly reduce the number of collision detections.

[0243] 4.2 Angle Discretization Strategy for Bend Segment Candidates

[0244] For the thickness-oriented bending segment and the width-oriented bending segment, the bending angle is selected from the corresponding discrete angle set, such as ±45°, ±90°, etc.; and all the above-mentioned unmasked bending segments are generated respectively.

[0245] In addition, directional constraints can be used, such as: if a certain angle causes the tangential deviation from the endpoint line to be too large (such as the included angle > 90°), then the candidate will be pruned.

[0246] 4.3 Parameter Discretization of Candidate Torsional Segments

[0247] The torsion angle is fixed at 90° or 180°.

[0248] 4.4 State Continuity in Candidate Generation

[0249] The starting posture of each candidate forming unit is equal to the posture of the current state, and the ending posture is calculated by the posture transformation formula of the forming unit. The positions of adjacent forming units are seamlessly connected (C0 continuous) and the tangential direction is smoothly transitioned (C1 continuous). This end-to-end design can automatically ensure posture continuity and unit manufacturability.

[0250] 5. Voxel Collision Detection: Perform voxel collision detection on each candidate molding unit; specifically as follows:

[0251] The specific steps are as follows:

[0252] S5.1: Centerline sampling: Sampling is performed uniformly along the centerline of the forming unit (straight segments are straight lines, curved segments are arcs, and twisted segments are straight lines) at a step size δ (e.g., δ=0.5Δ) to obtain the sampling point sequence {p(s1),p(s2),...,p(sN)}.

[0253] Number of samples , It refers to the length or the arc length of the curved segment.

[0254] S5.2:

[0255] For each sampling point p(si), calculate the tangential t(si) and normal n(si) of that point according to the molding unit type:

[0256] Straight segment: , (The orientation of all sampling points on the straight section remains unchanged);

[0257] Bending segment: Let the axis of rotation be a (the thickness bending segment is...) The wide-angle curved section is ),

[0258] Cumulative rotation angle , in The turning angle of the curved section.

[0259] Application formula:

[0260]

[0261]

[0262] in For the Rodriguez rotation formula:

[0263]

[0264] Twist segment:

[0265] The direction of travel remains unchanged: ,

[0266] Since the normal direction rotates uniformly around the tangent direction, then:

[0267] ,

[0268] in Sampling points The angle of torsion at that point, This is the total torsion angle of the torsion segment.

[0269] Applying the same Rodriguez rotation formula, we have:

[0270]

[0271] Step S5.3: Cross-sectional discretization

[0272] At each sampling point p(si), a local orthogonal coordinate system (t(si), n(si), b(si)) is constructed, where b(si) = t(si) × n(si);

[0273] Discretize the cross-sectional shape (including the protective gap C):

[0274] For a rectangular section: Discretize in the binormal-normal plane at voxel resolution Δ:

[0275] u∈{-(W / 2+C),-(W / 2+C)+Δ,...,(W / 2+C)}

[0276] v∈{-(H / 2+C),-(H / 2+C)+Δ,...,(H / 2+C)}

[0277] Generate cross-section points:

[0278]

[0279] This method supports arbitrary cross-sectional shapes; all that is required is a function to generate the cross-sectional point set.

[0280] For example, for a circular cross section: discretized in polar coordinates:

[0281] r∈{0,Δ,2Δ,...,D / 2+C}

[0282]

[0283] Generate cross-section points:

[0284]

[0285] in The sampling angle is in polar coordinates.

[0286] For the elliptical section, the major axis a and the minor axis b are discretized into parametric equations. , ;

[0287] Polygonal cross-section: defined by vertex coordinates, discretized into a set of points using scan lines or rasterization algorithms;

[0288] During collision detection, an appropriate discretization method is selected based on the cross-sectional shape to generate a cross-sectional point set {q}. k The remaining steps are the same as for the rectangular section.

[0289] Step S5.4: Voxel Occupancy Determination

[0290] For each combination of sampling point and cross-sectional point, calculate the world coordinates:

[0291]

[0292] Convert to voxel coordinates:

[0293]

[0294] in, The world coordinates of the origin of the voxel map;

[0295] Query the voxel map: If Map[i,j,k]=1 (obstacle), then a collision is determined, and the collision result is returned immediately (to avoid continuing to detect the remaining sampling points);

[0296] If no combination of sampling points and cross-section points collides, then return "no collision".

[0297] 6. Heuristic Search Algorithms and Multi-Level Pruning Strategies

[0298] 6.1 A* Algorithm Framework

[0299] The A* algorithm (A-star) is a heuristic graph search algorithm that strikes a balance between finding an optimal path and search efficiency by prioritizing the expansion of states with the smallest f-values. This invention employs the classic A* algorithm to search for the optimal path from the starting point to a state satisfying the termination condition on the state-space graph:

[0300] The cost function is ;

[0301] Where g(S) is the cumulative actual cost from the starting point to state S.

[0302] h(S) is the heuristically estimated cost from state S to the endpoint.

[0303] α is the heuristic weighting coefficient. Taking α=1 is the standard A*, but in practice, α>1 is often taken as the weighted A*, which is faster but may not guarantee the optimal result.

[0304] The cost model is as follows: ;

[0305] The costs associated with adding a molding unit include:

[0306] Length cost , where is the physical length of the unit;

[0307] Type of punishment For straight sections, the value is 0; for curved sections, the value is λ*r*θ; and for torsional sections, the value is λ*L. Where λ is a weighting coefficient that can be adjusted according to application requirements, such as prioritizing path length or minimizing the number of bends.

[0308] Manufacturing risk penalties Additional penalty is added when the bending radius or torsion angle approaches the limit;

[0309] The heuristic function uses Euclidean distance: ;

[0310] Cost models and heuristic functions guide algorithms to search for shorter, less winding, and less risky paths.

[0311] The data structures used include, but are not limited to:

[0312] Open List: A priority queue, sorted by the f value, storing states to be expanded;

[0313] Closed Set: A hash table that stores an expanded state to avoid duplicate access;

[0314] Parent pointer: Each state records its predecessor state and the connected shaping unit, used for path backtracking.

[0315] 6.2 Multi-layer pruning strategy

[0316] To solve problems quickly in large-scale voxel spaces (e.g., exceeding 100 million voxels), a multi-level pruning strategy is employed to accelerate the search and reduce invalid expansion:

[0317] 6.2.1 Precise State Closure Set Pruning: When a state is accessed, if the corresponding hash key already exists, the state is skipped; otherwise, the state is added to the closure set to avoid repeatedly expanding states with the same configuration and reduce invalid searches.

[0318] Maintain the accessed state set (Closed Set):

[0319] State hashing: Discretize the state (position, tangent, normal) and then store it using hashing.

[0320] Position discrete: voxel coordinates (i,j,k);

[0321] Directional discretization: Vectorizes the tangent and normal directions into a discrete set of directions;

[0322] Deduplication rule: If a newly generated state is identical to the discretized representation of a state in a closed set, then skip that state.

[0323] 6.2.2 Position-Level Optimal Cost Table Pruning: If a significantly better path already exists to the same position, the current path is unlikely to be globally optimal and can be abandoned early. This strategy sacrifices a small amount of optimality guarantee in exchange for substantial pruning. Specifically:

[0324] Maintain hash table g min :(i,j,k)→R+,

[0325] Store the historical minimum cumulative cost g for reaching voxel position (i,j,k). min [i,j,k];

[0326] When the extended state S reaches position (i,j,k) and the cumulative cost is g(S):

[0327] If position (i,j,k) is visited for the first time, then g min [i,j,k]=g(S), state S is not pruned;

[0328] If the location has been visited, compare g(S) with g min [i,j,k]:

[0329] If g(S)≤g min If [i,j,k], then update g. min [i,j,k]=g(S), state S is not pruned;

[0330] If g(S) > g min [i,j,k]*(1+α) (relative multiplier condition) or g(S)>g min If [i,j,k]+Δg (absolute difference condition), then state S is pruned (not added to the Open List); otherwise, state S is not pruned (allowing a certain degree of suboptimal exploration).

[0331] Where α is the configured relative tolerance multiplier, typically 0.2, meaning it tolerates a cost not exceeding 20% ​​of the minimum cost; Δg is the configurable threshold for the absolute difference, typically 10 times the voxel side length, meaning it tolerates a search state where the cost does not exceed the minimum cost plus the cost of a straight segment 10 times the voxel length.

[0332] In large-scale spaces (such as 100 million voxels), this strategy can reduce the number of search states by 50% to 80% while preserving potential feasible paths and avoiding premature pruning that leads to no solution.

[0333] This strategy balances search efficiency and path quality, and is one of the key technologies for rapid solution in large-scale environments in this invention.

[0334] 6.2.3 Access Limit Pruning: Prevents local oscillations in the search and forces exploration of new areas.

[0335] Maintain a location access counter: The data structure uses a hash table, where the key is the location (i,j,k) and the value is the number of times that location has been expanded.

[0336] Pruning condition: If Count[i,j,k]>N, where N is the maximum number of times the node can be expanded (N=5), then the state at that position will not be expanded again.

[0337] 6.2.4 Direct approach to the destination: When conditions permit, converge quickly to avoid taking detours.

[0338] In extended state S, check whether the direct access condition is met, including:

[0339] 1. Moderate distance: ,in This is the minimum value for a straight segment; a typical value can be taken as the length of 3 voxels. The maximum direct distance is typically 128 voxels in length;

[0340] 2. Tangential Alignment: The angle between the current tangential direction t and the direction of the line connecting the endpoint. satisfy , A value of 5° is usually acceptable.

[0341] 3. Normal alignment: Current normal n and target normal n g The included angle satisfies ;

[0342] If satisfied, then generate a string of length. The straight section forming unit, with the starting posture as the current state and the ending position as... Collision detection is performed on this straight section:

[0343] If there is no collision, the search is terminated and the path is returned as the optimal solution.

[0344] If a collision occurs, discard the straight segment and continue with the regular search.

[0345] Direct approaches can find a solution tens to hundreds of times earlier when conditions permit, which can significantly accelerate convergence.

[0346] 6.3 Search Main Loop:

[0347] Initialization: Add the initial state to the Open List, and set the closed set and cost table to empty;

[0348] cycle:

[0349] Pop the state S with the smallest value of f from the Open List;

[0350] Check the termination condition: if it is met, jump to step 6.4 path backtracking;

[0351] Try to reach (pruning 4): If successful, skip to step 6.4;

[0352] Generate candidate forming units for the current state (step 4);

[0353] For each collision-free candidate:

[0354] Calculate the g and f values ​​of the new state S';

[0355] Apply multi-level pruning: If not pruned, add S' to the Open List;

[0356] Add S to the closed set;

[0357] If the Open List is empty and no path is found, return "No solution".

[0358] 6.4 Path backtracking:

[0359] Traverse backwards from the terminated state along the parent pointer, collecting the formed units of each step, until backtracking to the starting point;

[0360] Reverse the sequence to obtain the forming unit sequence {Seg 1, Seg 2, ..., Seg M} from the start point to the end point.

[0361] 7. Path Post-processing

[0362] S7.1: Merging of collinear straight segments:

[0363] Traverse the sequence of forming units, for any two adjacent forming units:

[0364] Merging conditions: All segments are straight; tangent direction is consistent; normal direction is consistent; position is continuous;

[0365] Merge operation:

[0366] 1. The starting point of the new straight section is the first starting point of the straight section, and the ending point of the new straight section is the second ending point of the straight section;

[0367] 2. The length of the new straight segment is the sum of the lengths of the two merged straight segments;

[0368] 3. Remove old straight segments from the unit sequence and insert new straight segments;

[0369] Merging collinear straight segments can reduce the total number of path segments, simplify manufacturing instructions, and maintain geometric equivalence.

[0370] S7.2 Error Digestion Mechanism

[0371] In practical searches, due to voxel discretization and the precision of floating-point operations, minute position or orientation errors may occur. This invention employs the following mechanism to mitigate these errors:

[0372] 1) Generate orthogonal basis for molding unit

[0373] After each forming unit is generated, the output tangential t, normal n, and subnormal b are normalized to ensure that (t,n,b) always constitutes an orthonormal basis.

[0374] 2) Linear expression of position error

[0375] During path backtracking, if there is an error Δp ​​between the starting and ending positions, the error is linearly distributed to each forming unit of the path:

[0376] Suppose the path contains N forming units, and the total length is... Then the length of the i-th unit The correction amount is:

[0377]

[0378] Where sign represents the projection sign of the error onto the tangential direction of the element, and the target position is accurately reached by adjusting the length of each element.

[0379] 8. Output

[0380] S8.1: Output the sequence of forming units, each unit containing: type, geometric parameters (length / radius / angle), and the position and orientation of the start and end points;

[0381] S8.2: Generate manufacturing instructions:

[0382] Cutting length: The sum of the centerline lengths of all units;

[0383] Bending list: List the start and end points of each bend, bend type, bending direction (normal / subnormal), bending angle, and bending radius;

[0384] Torsion List: List the location, torsion angle, and torsion length of each torsion segment;

[0385] S8.3: Export the 3D model (STEP / STL format) for visualization verification.

[0386] Figure 8 This is a diagram showing the result of automatic wiring using the method of the present invention in a specific embodiment. The example involves wiring flat copper strips within an electric vehicle battery pack. The battery pack requires wiring to connect different modules in a confined space filled with obstacles. The steps of this example include:

[0387] Step 1: Environmental Digitization

[0388] CAD Model Import: Import the internal 3D model of the power distribution cabinet (STEP format);

[0389] Triangular mesh extraction: Convert the model into an STL triangular mesh;

[0390] Voxelization: The voxel resolution is set to Δ=1mm, and the internal space of the cabinet is 500mm×400mm×600mm, totaling 120 million voxels;

[0391] Obstacle voxel labeling: For each voxel center, check whether it is inside the triangular mesh or intersects with the mesh, and label it as an obstacle voxel;

[0392] Step 2: Object parameter configuration

[0393] Cross-section: Rectangular, width W=40mm, thickness H=6mm;

[0394] Material bending factor: 2.0;

[0395] Molding unit type mask:

[0396] Straight sections are enabled.

[0397] Thick-section bending section activated (±90°, radius 10mm).

[0398] Wide-angle curved sections are now in use (±45°, ±90°, turning radius 20mm).

[0399] Torsion section disabled;

[0400] Step 3: Endpoint Constraint Setting

[0401] Set the starting position and normal, and the ending position and normal;

[0402] Step 4:

[0403] A* search process: Starting from the initial state, candidate forming units are generated;

[0404] Iterative expansion:

[0405] 1) Pop the state S with the minimum cost;

[0406] 2) Check if the destination has been reached → No;

[0407] 3) Generate candidate molding units;

[0408] For each candidate: calculate the endpoint pose and g-value; collision detection;

[0409] 4) Apply pruning strategies;

[0410] 5) Repeat the above steps until the endpoint is reached or the running time is exceeded;

[0411] Step 5: Post-processing

[0412] Collinear straight segments are merged;

[0413] Error digestion: Distribute the error to each unit: Make fine adjustments to the length of all straight segments;

[0414] Step 6: Output the result, such as Figure 8 .

[0415] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0416] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0417] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0418] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0419] The embodiments described above are merely some preferred embodiments of the present invention, and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.

Claims

1. A three-dimensional automatic wiring method for objects with cross-sectional attitude constraints, characterized in that, include: (1) Discretize the three-dimensional space of the environment to be automatically wired into a uniform three-dimensional voxel grid to construct a three-dimensional voxel map and configure the geometric parameters and endpoint constraints of the cross-sectional attitude constraint object. (2) Construct a predefined molding unit library, which includes at least straight segments, thickness-bending segments, width-bending segments, and torsion segments, and control the currently available molding unit types through a mask; use the molding unit as the basic building block for implementing object wiring; (3) Define the state as the final pose of the forming unit in the object. For the current state, generate all subsequent candidate forming units of all allowed types according to the forming unit type mask and geometric parameters, and perform voxel collision detection on each candidate forming unit. (4) Use heuristic search to find the optimal path from the wiring start point to the state that meets the termination condition, and use a multi-layer pruning strategy to obtain the forming unit sequence representing the wiring path of the object. (5) Post-process the obtained forming unit sequence to merge collinear straight segments and digest errors, and output the final forming unit sequence, thereby completing the three-dimensional automatic wiring of the cross-sectional attitude constrained object.

2. The method according to claim 1, characterized in that, Step (1) specifically includes the following: S1.1: Discretize the three-dimensional physical space into a uniform voxel grid, set the voxel side length Δ, and label each voxel as an obstacle voxel or a free voxel. The obstacle voxel is the space occupied by solid obstacles, and the free voxel is the free space that can be used for wiring. S1.2: Configure the geometric parameters of the object, including: cross-sectional shape and size, protective clearance (i.e., the minimum distance that the object must maintain from the obstacle), and material bending coefficient; S1.3: Specifies the start and end points of the wiring, including the start point position and initial normal, the end point position and target normal, where the positive direction of the object's cross-sectional thickness is defined as the normal.

3. The method according to claim 1, characterized in that, In step (2), the forming unit is defined as the basic component of the object path. Each forming unit has: starting posture, ending posture, geometric parameters, and a set of voxels occupied. The starting posture and ending posture both include position, tangent, normal, and subnormal. The ending posture is obtained by transforming the starting posture based on the posture transformation formula corresponding to the forming unit type and geometric parameters. The geometric parameters are a set of parameters determined by the forming unit type. The set of voxels occupied is a list of voxel coordinates actually occupied by the forming unit in space. The tangent is the unit vector extending from the central axis of the object. The normal is the unit vector in the positive direction of the cross-sectional thickness of the object. The subnormal is determined by the right-hand rule.

4. The method according to claim 3, characterized in that, The straight segment is a forming unit that extends in a straight line along the current tangential direction and whose tangential and normal directions remain unchanged. Its geometric parameters include the length in the tangential direction. The thickness bending section is an extension of the center line of the forming unit along a spatial arc path. This arc is located in the plane formed by the initial tangent and the initial normal, and moves around the arc axis with the secondary normal as the rotation axis, causing the normal and tangent to rotate synchronously. Its geometric parameters include: bending radius, bending angle, center position, and arc length. The wide bending segment is an extension of the center line of the forming unit along a spatial arc path. This arc is located in a plane perpendicular to the initial normal and moves around the arc with the normal as the axis of rotation, causing the tangential and sub-normal directions to rotate synchronously, while the normal direction remains constant. Its geometric parameters include: bending radius, bending angle, center position, and arc length. The torsion segment is a straight line extending from the center line of the forming unit along the tangential direction, while the cross-section rotates continuously around the central axis, i.e., the tangential direction, causing the normal and sub-normal directions to undergo angular displacement while maintaining orthogonality to the tangential direction. Its geometric parameters include: torsion length and torsion angle.

5. The method according to claim 1, characterized in that, The mask controls the currently available molding unit types. The mask data structure uses binary bits, Boolean arrays, or enumeration sets to represent the activation status of each molding unit type. The mask is determined based on material properties, object size characteristics, or the application requirements to be wired, so as to flexibly adapt to different materials and processes.

6. The method according to claim 1, characterized in that, Step (3) specifically includes: 1) Generate candidate molding units S4.1: For the current state, generate all allowed candidate forming units based on the forming unit type mask and geometric parameters: S4.2: For each candidate forming unit, calculate the final attitude according to the attitude transformation formula corresponding to its type. Since the starting attitude of each candidate forming unit is equal to the attitude of the current state, the final attitude is calculated, thus automatically ensuring attitude continuity and unit manufacturability. 2) Voxel collision detection S5.1: For each candidate forming unit, sample uniformly along the center line of the forming unit to obtain a sampling point sequence; S5.2: Attitude transformation, calculate the specific coordinates of the sampling points according to the attitude transformation formula corresponding to the forming unit type; S5.3: Considering the protective gap, generate a set of cross-section points for the rectangular cross-section where the sampling point is located; S5.4 Voxel Occupation Determination: For each sampling point, convert its corresponding cross-sectional point set to world coordinates and then to voxel coordinates. Query the constructed 3D voxel map. If it is an obstacle voxel, determine the collision and cancel the candidate of the forming unit.

7. The method according to claim 6, characterized in that, Different types of forming units in the predefined forming unit library employ different discretization strategies: straight segments need to be tried at different lengths to accommodate connections at different distances. To reduce redundant searches, the Fibonacci sequence or an exponentially growing sequence is used as the candidate length set, and collision detection is performed in ascending order of length when generating candidate straight segments. If the length is... If a straight section collides, all [activities] will terminate. Candidate generation; both the thickness bending segment and the width bending segment are bending segments, and the angle is discretized, with the bending angle selected from a preset set of discrete angles; the torsion angle in the torsion segment is selected from a preset set of torsion angles.

8. The method according to claim 1, characterized in that, Step (4) applies a multi-level pruning strategy to accelerate the search and reduce invalid expansions, including: 1) Deduplication of exact closed sets: Maintain the set of visited states, discretize the states and store them as closed sets. If a newly generated state has the same discretized representation as a state in the closed set, skip that state; otherwise, add the state to the closed set. 2) Position-level optimal cost table pruning: Maintain a position-level cost table, whose data structure is a hash table. The key is the voxel coordinate (i,j,k), and the value is the minimum cumulative cost to reach that position. When the extended state S reaches position (i,j,k), if the cumulative actual cost from the starting point to state S is greater than 1+α times the minimum cumulative cost to reach position (i,j,k), then the state is pruned, where α is the relative tolerance multiple. 3) Access count limit pruning: Maintain a position access counter Count, with a hash table as the data structure. The key is the position (i,j,k), and the value is the number of times the position has been expanded. When Count[i,j,k]>N, where N is the maximum number of times the position has been expanded, the position is refused to be expanded again. 4) Direct to destination attempt: When in extended state S, check if the direct access condition is met. If it is met, try to generate a straight segment to the destination and perform collision detection. If there is no collision and the destination is reached within the tolerance range, return the path as the solution; otherwise, continue the normal search.

9. The method according to claim 1, characterized in that, Step (5) specifically includes the following: S7.1 Collinear straight segments merged Traverse the forming unit sequence. For two adjacent forming units, if they are both straight segments and have the same tangent, normal, and position, then perform a merging operation: take the starting point of the first straight segment as the starting point of the new straight segment, take the ending point of the second straight segment as the ending point of the new straight segment, and take the sum of the lengths of the two straight segments as the length of the new straight segment. Replace the first and second straight segments with the new straight segment in the forming unit sequence. S7.2 Error Digestion Mechanism In actual searches, due to voxel discretization and the precision of floating-point operations, minute position or orientation errors may occur. The following mechanism is used to mitigate these errors: 1) Generate orthogonal basis for molding unit After each forming unit is generated, its tangential t, normal n, and subnormal b are normalized to ensure that (t,n,b) always constitutes an orthonormal basis. 2) Linear expression of position error During path backtracking, if there is an error Δp ​​between the starting and ending positions, the error is linearly distributed to each forming unit of the path: Suppose the path contains N forming units, and the total length is... L total Then the length of the i-th unit L i The correction amount is: ,in t i Let be the tangential unit vector of the i-th forming unit, and sign represent the projection sign of the error onto the tangential direction of that unit. The target position is accurately reached by adjusting the length of each unit.

Citation Information

Patent Citations

  • Mechanical arm tail end posture constraint path optimization method based on constraint manifold

    CN121572319A

  • Automatic wiring method and system of secondary screen cabinet, medium and product

    CN121642801A