A Robot-Centered Path-Planning Algorithm for Multidirectional Additive Manufacturing for WAAM Processes and Pure Object Manipulation

Previous algorithms for slicing, path planning or trajectory planning of additive manufacturing cannot be used consistently for multidirectional additive manufacturing with pure object manipulation in wire-arc additive manufacturing. This work presents a novel path planning approach that directly takes robot kinematics into account and thus ensures the reachability of all critical path poses. In an additional step, the planned path segments are smoothed so that joint velocity limits are respected. It is shown that the implemented path planner generates executable robot paths and at the same time maintains the process quality (in this case, sufficient coverage of the slice area). While the introduced method enables the generation of reachable printing paths, the smoothing algorithm allows for the execution of the path with respect to the robot’s velocity limits and at the same time improves the slice coverage. Future experiments will show the realization of the real robot setup presented.


Introduction
Multidirectional additive manufacturing provides promising opportunities ranging from the freedom of design of components to the targeted influencing of component properties compared to traditional 2.5D additive manufacturing methods. For wire-arc additive manufacturing, especially with eccentric wire feeding or parallel sensor technology, there is great potential for process realization. The permanent fixation of the welding head in the workspace of the robot and the pure manipulation of the component by the robot in relation to the welding head is characteristic. The six-dimensional requirements for preprocessing (slicer, path planner and trajectory planner) cannot be ensured by algorithms and methods used for additive manufacturing or robotic coverage path planning so far. Traditionally, the kinematics and limits of the machine or robot executing the print are only considered during the last pre-processing step of trajectory generation before execution. In multidirectinal additive manufacturing, this procedure usually results in paths that are not executable due to unreachable path poses or high joint velocities. A major deficit comes from the lack of consideration of the robot's kinematics as well as its limits already during path planning. This deficit is counteracted in this work by introducing a novel robot-centered path planning method. The method is based on the decomposition of each slice into multiple convex polygons, subsequent evaluation of possible infill strategies for each polygon and selection of the most suitable infill combination by a modified Hamilton Graph search. It is shown that the methodology is capable of generating complex sixdimensional paths, which are executable for a specified robot. This includes both the pure reachability of path poses as well as the adherence of joint velocity limits through the smoothing of directional changes in the path. Effects on the process can be taken into account in each process step.

General Concept
Multidirectionality in the context of additive manufacturing (AM) refers to the degrees of freedom of the process. However, the decisive factor is the possibility to build up layers in all directions or even to detach from the flat layered structure (Figure 1). In contrast to traditional AM processes, where a limited adjustment of the orientation between print bed and print head is possible, multidirectionality explicitly requires a significant variation of the build-up direction compared to the initial direction. It is generally not relevant whether the print head or print bed is moved. The term object manipulation is used to create a clear distinction from related manufacturing processes of multidirectional additive manufacturing. Object manipulation thus describes the additive construction of a component by exclusively manipulating the object relative to a fixed print head. This work focuses on multidirectional additive manufacturing by means of object manipulation. Figure 2a illustrates the advantages of pure object manipulation, which leads to the exclusive production in a downhand welding position due to the fixed print head. For Wire-Arc Additive Manufacturing (WAAM), multi-wire applications have the special potential to further increase productivity or enable multi-material applications for tailor-made material properties that are difficult to realize with common powder bed fusion processes [1].
For the process with eccentric wire feeding (or alternatively stationary sensor technology or other weld head periphery), Figure 2b illustrates that manipulating a weld head along a path, the entire weld head periphery must always be rotated together with the weld head. As a result, complex paths can often not be executed. For this application, pure object manipulation is therefore advantageous. If multidirectional additive manufacturing by means of object manipulation (MDAM) is to be extended to the application of WAAM with eccentric wire feeding, this is accompanied by the loss of the degree of freedom around the printing axis of the print or weld head in 5D printing [2]. This has the following reasons: • A wire feed must mainly be fed from the front, or at least from a defined direction in relation to the direction of movement, because the geometry of the deposited material is highly dependent on the relative alignment of the wire. • Sensors used for monitoring and controlling the process should continuously analyze the weld seam and must therefore always be aligned with the welding process.

Process Chain
The process chain of MDAM is closely modeled on known AM process chains. In contrast to the processes of conventional 3D printing, the manipulator used for MDAM plays a central role ( Figure 3). On the one hand, the early definition of a robot (before starting the pre-processing) ensures the feasibility of the process for a specific robot and, on the other hand, opens up scope for optimization along the process chain. Starting from the workpiece data in STL format, the workpiece is divided into subvolumes and then slices. Ding et al. introduced the dividing algorithms used in this work [3]. The slicing algorithm directly takes multidirectionality into account. Printing paths can then be planned in each of the generated slices, which in turn are transferred into an executable robot trajectory. After physical production, components of the WAAM process often have to undergo post-processing. The availability of path and trajectory planning can in turn be used for process control interventions. On the one hand, essential information about the target geometry can be derived from path planning. On the other hand, information about expected deviations can be passed on from path and trajectory planning to the process control system to ultimately correct the workpiece quality via the welding process parameterization.

Major Challenges
The mentioned high demands on the manufacturing process caused by the use of industrial robots motivate the parallel consideration of the applied robot (and periphery) already from the beginning of the planning process [4]. Existing algorithms of slicing and path planning from conventional AM are not executable for the robot [5]. The executability can essentially be attributed to the pure reachability of the robot's poses and the manipulability of the robot at the required high printing velocities. Once the path has been planned, it can only be influenced by deviations from the predefined path within the scope of trajectory planning. This contribution shows that poses which can be reached in this way can be brought below the speed limits by slight deviations from the path to be printed. The remaining unreachable path segments can only be adjusted by modifying the path planning. This motivates the development of a path planner that takes into account both the reachability and the manipulability of the manipulator and at the same time has a minimal negative impact on other process parameters and printing result quality [6].

Path Planning in Additive Manufacturing
In the field of path planning, it is necessary to distinguish between the different possibilities of degrees of freedom of movement. Paths can be planned either freely in three-dimensional space or two-dimensionally within a plane. In AM, the printing process must ensure the positioning and orientation of the print head in relation to the print bed. In a conventional fused deposition modeling (FDM) process, it is sufficient to position the print nozzle at the designated position and always keep it perpendicular to the print bed. In contrast, the orientation of the print head in all three rotational degrees of freedom is of great importance for the present work. Changing the direction of the external wire feed to the path tangent would have a decisive influence on the quality of the welded path.
Despite the common designation of AM as '3D printing', an actual execution of paths in space is rarely found, as most processes can be strictly classified as 2.5D. The path planning of AM processes has already been researched and developed in many ways. The focus of path planning is on generating a component with the highest possible accuracy, high surface quality and good mechanical properties. Various infill strategies have been developed for this purpose. Typical strategies are raster, zigzag, contour, spiral, spacefilling, grid, honeycomb, hexagonal or Voronoi diagram-based infills (cf. Figure 4). The different strategies are not always suitable for use in WAAM-based processes. In addition, certain space-filling infills are not executable by a robot due to movement limits or require many changes of direction. Therefore, in the context of this work, the simplest infills (namely raster and zigzag) are considered first. Table 1 gives an overview of different path planning algorithms. The summary describes the advantages and disadvantages in the context of robotic MDAM using WAAM.
It can be summarized that none of the presented approaches, methods or algorithms can be directly applied to MDAM, especially for pure object manipulation in WAAM. The reason for this is the lack of integration of robotic parameters in the path planning of AM.

Relevant Developments Advantages Disadvantages
Zhang et al. [7] change of building direction and curves surfaces/slices (cf. Figure 5a) necessary subvolumization approach restricted range for building direction Fang et al. [8] segmented consideration of paths (cf. Figure 5b) include process parameter into optimization, optimize robot motion use of rotational degree of freedom around the welding head Simplify3D [9] (cf. Figure 5c) subdivision of objects to be printed into an outer shell and an infill structure -2.5D Slicer without any optimization Dunlavey et al. [10] raster infill strategy easy process handling 2.5D Slicer Park et al. [11] zigzag infill strategy continuous path, reduced number of sub-paths, fewer transition movements many changes in printing direction Huang [12] dividing slices into many convex polygons, optimization algorithm generates optimal zigzag infill orientation minimal number of changes in direction -Farouki et al. [13] contour infill strategy ( Figure 4) reduce mistakes near the contour orientation changes more then 180 deg Lin et al. [22] maze-like structure, decompose slice and map volumes in weighted graph, find optimal path by backtracking algorithm increase the isotropy of the mechanical properties in the component many orientation changes, not suitable for WAAM processes [18] Schmitz et al. [6] Hamilton graph search, decompose slice and map pixels in weighted graph, find optimal path using a backtracking algorithm evaluate robot motion along printing path many orientation changes, calculation effort not suitable, hard to find a single Hamilton path (b) path optimization with regard to heat input during welding [8]; and (c) slicing software Sim-plify3D with visible outer contour and filling structure [23].

Path Planning in Robotics
In general, trajectory planning can be understood as the determination of motion profiles for the drive system of an automated machine and thus represents the link between space and time. Knowledge of the specific kinematics (forward and inverse kinematics) is indispensable for this purpose. In order to be able to describe a movement in threedimensional space unambiguously, seven parameters are necessary: three for the position, three for the orientation and a seventh as a path parameter, which establishes the connection between the pure geometric path and its temporal execution [24]. However, ignoring the parameter 'time' and purely planning the path to be followed geometrically, one speaks of path planning. In order to keep the definition of a path as general as possible and initially independent of the robot and tool used, it is generally planned as a movement of the so-called tool center point (TCP), i.e., the coordinate system relevant for the execution of the specific task, in relation to the robot base [25]. According to Craig, the planning of movements in joint space is not critical, since singularities are simply avoided [25]. In contrast, Cartesian planning often has to deal with challenges such as the unreachability of intermediate points, high joint velocities at singularities or the reachability of consecutive poses in different configurations [25]. However, many robotic tasks are bound to fixed Cartesian paths. These tasks include painting, cleaning, inspecting, welding or gluing. The corresponding path planning tasks are closely linked to the challenges of AM. For example, during painting or inspection, a path must be planned that covers the surface of an object without gaps [26]. Consequently, requirements for a path planner can be derived from robotics that complement the process requirements of AM. Specifically, it must be ensured that a planned path can be continuously executed by the robot in velocity limits and without configuration changes. Conventional geometric path planners of AM do not take this into account. Especially for paths that have to be executed in MDAM using WAAM and eccentric wire feeding generated by standard AM path planners, there are high speeds in the joints of the robot to be expected. The planned path has a direct influence on the velocity profile of the joints. Consequently, it should be taken into account already in the path planning step.

Requirements on New Path Planning Algorithm
The path planning for AM processes and the algorithms used are characterized by the material build-up process. This proves to be sensible, as optimal component quality is the goal of AM. The extrusion process in the FDM process and the optimal setting of the welding parameters in WAAM, in conjunction with suitable path planning, have the greatest influence on component quality. Ding et al. [27] highlighted key challenges for path planning when performing additive welding processes. The robustness of the planning algorithm must be ensured in order to be able to automatically plan paths in complex geometries. WAAM processes pose a particular challenge in this respect, since the width of the material fed and thus the width of the path is large in comparison to the slice area to be filled, unlike in comparable AM processes. Conventional path planners are therefore found to be unsuitable as they do not meet the subsequent requirements. A complete coverage of the slice through path planning must be guaranteed. Non-uniform weld bed profiles can occur over the entire path and lead to accumulated defects in the course of the process. The greatest non-uniformities occur at the beginning and end of a weld path [28]. It can therefore be deduced that a path planning algorithm should produce a continuous path whenever possible. Ding et al. further highlighted path crossing as a challenge [27]. Since crossovers in the manufacturing process lead to undesired material accumulation and stress induction [29], a path planner should avoid them if possible. The analysis of whether a crossover is preferable to setting down and restarting the weld path remains open. These challenges do not lose their importance in the specific case of MDAM. However, the implementation brings the kinematic and dynamic properties of the robot movement and their effects on the welding result to the fore. MDAM opens up a multitude of freedoms and possibilities that enable complex path planning for AM. However, the robot is subject to natural limitations. For example, it must be taken into account that paths planned on a geometric basis in the component coordinate system usually lead to robot movements with high velocities and accelerations, or the robot must adopt configurations that are not achievable from a design point of view or lead to collisions with itself and the environment. Manipulator-and process-specific path planning should consider requirements from both robotics and AM together in one path planning algorithm. The following requirements are to be defined for the path planner: • Process slices in any spatial orientation. It can be stated that path planning algorithms essentially perform the optimization within a single slice in order to improve, for example, mechanical properties. Position and orientation of the slice or kinematic movements are not taken into account. The integration of the kinematic system into the path planning as well as a targeted path smoothing are only introduced in the preliminary work of this contribution. The planning of a completely six-dimensional manufacturing process does not exist.
It must be noted that the purely geometric path planning algorithms of the currently pure 2.5D processes are not excluded from an extension to 5D or 6D. The identified deficits in the state of the art are therefore only the lack of consideration of the specific robot used in the manufacturing process as well as the targeted path smoothing and thus are the motivation for the presented development.

Concept of Manipulator-Specific Path Planning
The 'divide and conquer' approach was chosen for the concept of a manipulatorspecific path planner. The trade-offs of guaranteeing executability, optimality of robot execution, print result and computational effort can be addressed in this way.
The newly developed path planner first fragments a slice into exclusively convex polygons whose neighborhood relations are recorded in a graph. For each of the convex polygons, multiple infill patterns with varying orientations can be feasible for covering the respective polygon completely. This results in several possible infill options for each convex area, extending the graph. Infills of a polygon are therefore clustered, which means that graph edges can only be generated between infills of distinct clusters. An adapted Hamiltonian search finds the most cost-effective path through all infill options while making sure that every convex polygon is only visited once. In order to avoid calculating a multitude of exact paths that are not relevant to the final path as well as the corresponding robot movement to generate the costs for all possible infill options, simplified evaluation strategies were developed that allow an efficient and fast cost estimation to complete the graph with edge weights. The resulting meta path can then be planned in detail by the infill algorithms used. Furthermore, continuous connections between neighboring infill options are added whenever possible so that the whole slice area is covered by a precisely defined geometric path. The print path is then prepared for trajectory planning by means of smoothing strategies as well as the completion of the path by the print head orientation ( Figure 6).

Methods and Algorithms
Before a path can be planned for any component, it must first be sliced, i.e., divided into slices of defined thickness (Figure 7b). The possibility of MDAM and thus the change of building direction can lead to the definition of different subvolumes, where each of them is assigned a distinct building direction based on its shape and relation to the rest of the object (Figure 8). The intersection points of the object's STL representation with a plane result in the polygonal cross-section of the component along this plane. These intersection points (describing the slice polygons) and the corresponding normal vectors of all slices are transferred to the path planner. Each slice is then represented by a collection of line definitions, each connecting two of the intersection points. A slice can contain a single or several closed line loops (polygons), depending on whether the slice consists of a simple surface or contains holes. However, several independently existing islands are not allowed and must be defined in distinct slices. Before dividing a slice into purely convex partial polygons, the outer contours are first simplified. This reduces the calculation complexity in the case of curved outlines and is permissible with regard to the WAAM printing process [30]. Since subsequent postprocessing is common with metal parts, the approximated contours are then expanded to ensure that the simplified contour includes the original one completely (Figure 7a).

Slice Decomposition
After ensuring that the simplified representation contains the original slice completely, it is divided into convex sub-polygons. Convex polygons offer the advantage of allowing the continuous coverage of the polygon area with all infill strategies, especially rasterand zigzag-type infills, independently of their orientation. There are various approaches available for dividing a planar polygon into segments, where each leads to different results [31]. For this work, the approach presented by Ding et al. [21] was chosen to achieve an optimal decomposition of the slice into a minimum number of convex partial polygons. The method can basically be divided into five steps which are executed in a loop until a final set of convex polygons covering the approximated slice has been generated:

2.
Sort the vertices of external polygons clockwise and the vertices of internal polygons counter-clockwise.

3.
Calculate the angles between the incoming and outgoing edges of each polygon vertex P i . 4.
Identify notches. A notch is defined as a vertex whose associated angle from the previous step is greater than 0 • . A polygon with at least one notch is not convex. 5.
While the solution of Steps 1-4 is trivial, the main part of the work takes place in Step 5 of the loop. First, the identified notches are sorted by their calculated angles. The vertices P 2 , P 10 , P 6 and P 5 represent the identified and ordered notches for the first decomposition loop of the polygon shown in Figure 9. The notch with the largest angle is then selected as the so-called reference notch (here, P 2 ). Next, the two polygon edges bordering the reference notch are extended until they create the intersection points A i and B i (A 2 and B 2 ) with another edge. Lastly, a distinction must be made among three different cases for creating a dividing line: • Notch-line (NL) decomposition, see P 10 C 10 ; • Notch-vertex (NV) decomposition, see P 6 P 12 ; and • Notch-notch (NN) decomposition, see P 2 P 5 .
The decomposition algorithm results in connected convex sub-polygons dividing the approximated slice (cf. Figure 9). These convex polygons are then to be filled with standard infill strategies, whereby the infill strategy orientations are free to choose. The strategy itself and its orientation have an influence on the executability of the printing path by the robot. This should be exploited accordingly [6,32].

Infill Strategies
Within the scope of this contribution, four different infill patterns are analyzed (see Figure 10): standard-zigzag, raster, enclosed-zigzag and defined-end-zigzag. The raster is composed of parallel lines with identical printing direction where the path is interrupted between each straight segment. The standard-zigzag connects the parallel lines of the raster, creating a zigzag pattern with alternating printing direction. The enclosed-zigzag initially covers the contour of the polygon and subsequently fills the inside of the polygon with the standard-zigzag pattern. The defined-end-zigzag pattern is based on the standard-zigzag pattern including the possibility to select a defined start and end point in the polygon.  From the point of view of the object to be printed, the impact of geometric deviations to be expected varies and is to be weighted according to the application. Cavities can cause internal weaknesses in the workpiece that can hardly be corrected afterwards. Volume build up, on the other hand, can be corrected, within limits, by subtractive machining. In any case, knowledge of the location of the expected deviation enables potential correction via welding process parameters (see Figure 13).
For each pattern, a main orientation can be identified. It is defined through the start point of the pattern as well as its parallel main lines. The main orientation is then defined by the plane of the infill through being perpendicular to the main infill lines as well as pointing away from the start vertex (cf. Figure 11). To analyze the quality of each infill pattern within a given area, a coverage analysis is conducted. This analyses the actual coverage of the desired polygon shape through the material output along the calculated geometric path. A geometric approximation is made, expanding each path line segment to a rectangular area of defined width d path and length l segment . Points along the path where the welding process starts or ends are additionally marked with an octagonal shape of radius d path (see Figure 12). By mapping these shapes onto a matrix grid with a defined resolution, it can be counted how many times a grid part has been covered by the calculated path.
This approach was already used by Reisgen et al. [33] for measuring the workpiece height with subsequent height control. The actual measured robot path was superimposed on a grid to store the measured part heights. In the case of a 2.5D setup, the workpiece height can be directly correlated with the path coverage. By comparing the coverage analysis presented here with the measured coverage or part height of a real object, weld seam modeling can be improved. Furthermore, a predictive control is conceivable, which does not react to a varying workpiece geometry in the next layer, as described by Reisgen et al. [33]. With this predictive control, the workpiece height could ultimately be ensured in the first layer through dynamic process parameter adaption.
Comparing this matrix M path with the grid matrix M slice of equal resolution and size, which contains the mapped area that the original slice covers, areas with too much material (coverage > 1), covered with material (coverage = 1) or not covered with material (coverage = 0) can be identified. The analysis provides information about material placed both inside and outside the slice contour. Coverage is captured using three different indices. k tot is defined as the percentage of the intended slice area covered by the path. k area is defined as the ratio of total covered area to total intended slice area. k vol is defined as the added material volume divided by the designed material volume. All four infill strategies shown in Figure 10 were tested on three test slices: a rectangle, a triangle and a U-shaped slice. The results are shown in Table 2. Exemplary results of the analysis of the rectangle are presented in Figure 13.   The standard-zigzag pattern provides good coverage abilities as long as the width of the polygon is significantly larger than the path width. For such polygons, the enclosedzigzag is better suited, although it causes a significant increase in volume surplus. The defined-end-zigzag covers slices worse than the standard-zigzag does. However, the raster shows the worst coverage abilities of all analyzed infill strategies.

Infill Strategy Weighting
The infill strategies presented can be used in convex polygons (see Figure 14a) in a simple and standardized way. Moreover, in addition to their effect on coverage, they also have an impact on the robot's motion. The graph-based approach analyzes and plans the sub-polygons separately and then, if possible, links them into a continuous path. Each of the polygons can therefore be defined with different infill strategies, different infill orientations and different start and end points. Each individual variation for a single polygon is called an infill object. For each of the identified convex polygons of a decomposed slice, a defined number of infill objects can be created, depending on the infill strategy used. Using a defined-end-zigzag pattern as an example, the number of infill options depends on the number of directly adjacent sub-polygons λ and can be calculated according to Formula (1): The first section 4 · λ refers to the four possible start-and end-infills. Two adjacent polygons have exactly two common vertices, so each of them can be used as the start (end) of an arbitrary path of which the end (start) point is not important at all. The second section 8 · λ·(λ−1) 2 represents the amount of all possible connection-infills which connect any two common vertices of the given polygon with a different neighbor polygon. The weight that is individually assigned to each infill object is theoretically composed of any number of independent components. At first, the reachability by the robot is evaluated as well as geometric properties of the polygon. In addition to these two aspects, other properties such as the amount of process heat generated along the path and the orientation of the ground cable fixed to the workpiece can be included for each infill object. However, the presented work initially concentrates on the first two components mentioned, since the main objective is to generate a reachable and thus executable path for the robot. All weight components are combined in g f inal (Formula (2)). g f inal = g reachability + g geometry (+g heat + g cable + ...) (2) Reachability is ensured by checking the reachability of a set of characteristic poses for each sub-polygon and infill object, respectively. First, a reference pose is determined. The position of this pose corresponds to the centroid of the polygon analyzed. The orientation of the corresponding pose is determined by a transformation of the printing plate reference frame according to the following rules: • The x-axis corresponds to the main infill direction to be analyzed. • The z-axis corresponds to the layer normal vector. • The y-axis completes the right-handed coordinate system.
With the help of an already existing package for solving inverse kinematics in the software framework ROS (Robot Operating System [34]), a solution close to a predefined robot configuration is searched for the reference pose. Only if a valid set of joint angles ϕ i exists, the full set of characteristic poses is checked. It consists of poses that are composed of all polygon vertices as well as the centroid of the surface. However, three different poses are generated from each polygon vertex by varying the reference frame orientation. In addition to the orientation described for the reference pose (x-axis in infill main direction), two more poses are generated for each vertex, in which the x-axis is rotated around the z-axis by +90 • and −90 • , respectively, to check both extreme orientations for a standard zigzag type infill (see Figure 15). From the up to eight unique solutions of a standard industrial robot possible for each pose, the one with the smallest Euclidean distance to the reference pose within the joint space is selected. This is done under the assumption that two TCP poses adjacent in Cartesian space belong to the same robot configuration exactly when a direct move from one TCP pose to another causes a minimal movement in joint space. This procedure covers the maximum movement of the robot required for a zigzag infill pattern and ensures that the individual poses are as close to each other as possible and result in as minimal movement of the robot as possible. The set of different robot poses is next analyzed to calculate the reachability component g reachability (see Formula (2)), if all tested characteristic poses have at least one valid solution. For each robot joint i, the maximum motion range ∆ϕ i in order to reach all characteristic poses is determined first. A linear function is then used to interpolate proportionally between the minimum (∆ϕ i = 0) and maximum (∆ϕ i = ∆ϕ lim ) motion (see Figure 16a). To get the complete reachability weight of a polygon, all joint specific weights g reach,i are summed up. For the second part of the infill weight the geometric properties g geometry of the polygon relative to the infill main orientation are analyzed. The maximum length of the polygon along the main direction δ length , as well as the maximum width perpendicular to the infill main direction δ width can be calculated. The ratio r geometry = δ width /δ length determines whether many small zigzag movements are necessary to fill the area (r geometry < 1), or the path consists of fewer long segments (r geometry > 1). A quadratic function depending on a specified critical ratio r crit is used to determine a scalar geometry weight between the minimum and maximum weight limits (see Figure 16b). In addition, it is also checked at this point whether the analyzed slice allows the planning of a valid path at all. If, for example, the calculated width δ width of the polygon perpendicular to the main infill direction is smaller than twice the expected path width of the welding process, no zigzag-shaped path can be generated at all. By adjusting the limit intervals of the reachability or geometry weight and modifying the interpolation functions, it is possible-after extensive software tests and welding process analysis which are still to be done-to adjust the individual magnitude of the components.

Meta Path Search
The different weights for each infill option are combined in the infill graph and a least-cost Hamiltonian path is searched for in the graph using a clustered Hamiltonian path search. The starting point of the search is a virtual node that is linked to all infills. This ensures that all infills are represented as start nodes in the edge-weighted graph. Figure 14b shows the infill graph of an example slice. In this three-dimensional way, the different infills per polygon can be visualized. Only those infills that are executable by the robot (g total > 0) are shown.
The clustered Hamiltonian path search is tailored to a graph whose nodes can be assigned to smaller clusters. In the context of the path planner, each node maps to individual infill options. These infills can be directly assigned to a geometric sub-polygon of the slice. Connections exist only between infills that do not belong to the same sub-polygon (cluster) and are assigned with weights. The Hamiltonian search is basically NP-hard [35]. In the graphs presented, the computation of a Hamiltonian path would take a significant amount of time. For the special case that each of the polygons can only be represented by a single infill in the final path, the length of the final path and thus the computational effort is reduced considerably. In the algorithm presented, a modified backtracking algorithm and a modified genetic algorithm are used, depending on the number of polygons present within the infill graph. The result of the calculations represents the meta path, which is a sequence of polygons to be traversed with explicitly defined infills (type and orientation).

Path Planning and Trajectory-Pre-Processing
Having ensured that the necessary joint angles of the path are reachable by the robot, the question appears if a sequence of joint angles can be executed at a given printing speed. This question is referred to manipulability and is treated within this section. The corners in a perfect zigzag pattern require the robot's joint angles to change in an infinitesimally short period of time. Since that is physically impossible, the quasi unsmoothed zigzag path is defined as a zigzag path with a 0.1 mm corner radius and is hereinafter used for benchmarking. Furthermore, the index k ω,i is defined as the maximum occurring angular velocity of a joint divided by the critical angular velocity limit of said joint. A reasonable printing speed for WAAM processes is 14 mm s −1 . Using this speed, the k ω,i values for the quasi unsmoothed path are indicated in Table 3 when filling a 120 mm by 80 mm rectangle with a 10 mm path width. This path is not manipulable because several k ω,i > 1. To ensure manipulability, the corners need to be smoothed although the slice coverage should not suffer as a result. Therefore, a smoothing algorithm (cf. Figure 17) is introduced which is based on Bézier curves [36] and includes two parameters: a bump factor Φ and a smoothing factor Ψ.  Before creating the actual curve, the Bézier supporting points (green in Figure 17) need to be determined. For each set of three consecutive path points (blue in Figure 17), three supporting points are calculated: do this, an isosceles triangle is created first. The first Bézier supporting point is determined by extending the center line of this triangle by Φ · d path . The second and third supporting points lie on the path lines, Ψ · d path from the second path point, although they can never be further away than half of the path segment length. With these supporting points, a Bézier curve is created. Using this algorithm, the limit cases shown in Figure 18 appear.

Results
In order to analyze the impact on path planning and to evaluate the target executability, this section first analyzes the functionality of the decomposition path planner in terms of reachability, before analyzing the smoothing algorithm and its impact on manipulability and slice coverage. Figure 19 shows an example of the validation of the weight calculation in the path planner. For this purpose, the weights g reachability and g geometry were analyzed for infill orientations in polygons with different edge length ratios and orientations on the print platform. The calculated weights were compared with the exact sum of discrete robot movements. It is evident that the simplified weighting tends to be a correct representation of the expected robot movement. Even though the real minimum of the robot movement is not always correctly represented, the proposed weight calculation functions still leads to the selection of an infill with a significantly reduced robot movement compared to the average robot movement of all twelve infill options calculated. reachability geometry minimal weight minimal robot motion Figure 19. Exemplary infill weights compared with the real robot motion after trajectory planning (cf. Formula (2)).

Analysis of Manipulability Weighted Graph Search
If all weights are added up, they can be used as edge weights in the graph. The 82 infill weights for the decomposed slice shown in Figure 14 are presented in Figure 20. Using the tailored clustered Hamiltonian search algorithm, a meta path can be planned. As dead ends in the coverage graph are also connected to all other polygons in the infill graph, there are possible meta path solutions leading to multiple sub-paths in one slice. A fixed weight for those node (infill) connections is used to control the possibility of multiple sub-paths (see Figure 21). The influence of the individual weights can be varied. For the example in Figure 20, the influence of the reachability weight in particular was chosen to be higher. The average of the g reachability is 24.71. As can be seen in Figure 20, infill objects with rather low weights in the range of 15-20 or high weights of approximately 60 can be found. Consequently, many infill objects are easily reachable. However, no significant differences can be discerned among them. For this purpose, the polygon-shape weight is added. The weights lie within a range of 1-20. In this way, infill objects of similar reachability can be distinguished once again. All other weights used were initially given less influence. It can be stated that the weighting generates executable paths. The exact tuning of the weight influences is still pending to be systematically carried out and validated with real experiments.

Analysis of Path Smoothing
The influence of the smoothing parameters on the slice coverage is analyzed in this section. The indices introduced in Section 5.2 are used. As Figure 22 shows, k tot rises asymptotically with rising Φ and falls with rising Ψ. k Vol rises approximately linearly with rising Φ and falls with rising Ψ, especially for Ψ ∈ [0.6, 1]. In addition, the coverage influence of Φ and Ψ is greater with rising path width. Subsequently, the influence of Φ and Ψ on the joint angular velocity is analyzed. Table 3 shows the k ω,i values for the limit cases (k tot ≈ 1) in comparison with the quasi unsmoothed path (QU). It is evident that smoothing offers a promising option to reduce the maximum angular joint velocities of the robot. However, the table also shows that only the case (Φ = 0, Ψ = 1) is manipulable (all k ω,i < 1). Thus, it can be deduced that the manipulability of the path depends on Φ and Ψ. To further analyze the influence of Φ and Ψ on the manipulability, k ω,i is plotted for all joints of a Kuka KR 6 as a function of Φ and Ψ (cf. Figure 23).  Figure 23 shows that k ω,i rises asymptotically with rising Φ and falls asymptotically with rising Ψ, for all joints. Furthermore, it is evident that the relationship between Φ and Ψ decides if the path is manipulable. When viewing the graphs in Figure 23, the manipulable combinations can be separated from the non-manipulable ones by approximately linear inequalities between Φ and Ψ (cf. Figure 24a for k ω,1 ). These inequalities define the solution set of smoothing parameters which allow a manipulable path. They can be shown as planes in the k tot 3D plot (cf. Figure 24b), defining what combinations are manipulable and allowing for the choice of the combination which generates the greatest slice coverage.
(a) (b) Figure 24. (a) k ω,1 graph shown from above with a green separation line between manipulable (blue points) and non-manipulable (red crosses) combinations of Φ and Ψ. (b) Separation lines for each joint as a plane for determining the manipulable combinations of Φ and Ψ.
Based on this analysis, the optimal smoothing combination for the Kuka KR 6 and the welding path velocity of 14 mm s −1 is selected as (Φ, Ψ) T ≈ (0.6, 1) T . Figure 21 shows the example slice after planning including a path smoothing with Φ = 0.6 and Ψ = 1. It can further be seen that the path is divided into two sub-paths. While the red path only covers one of the four convex partial polygons, the blue one allows for the continuous covering of the remaining three polygons.

Discussion
The inclusion of robot kinematics in the path planning algorithm ensures the reachability of the necessary robot poses for the complex 6D printing in the case of MDAM. The selected influences (see Table 4) of the different weightings already provide executable results. The reachability is supplemented by smoothing the generated path, which thus improves the manipulability. It was shown that the smoothing can reduce the peak velocities of the joints to levels below the respective velocity limits (see Table 3). In order to reduce the negative effects of this smoothing algorithm on the material-coverage of the slice, parameters were identified that combine manipulability with good coverage. Those results need to be further investigated during real welding tests. Overall, it can be stated that the ensured reachability in combination with the optimized manipulability can ensure the desired executability. The results published in this work will be combined with a tailored trajectory planner in future research and in addition tested on a real robotic system. In particular, the trajectory planner can have a great influence on the actual robot movements. Consequently, an evaluation of the robot's trajectory is not meaningful within the scope of this contribution. The test setup available at the IGMR (cf. Figure 25) is to be used for this purpose.  Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to complex integration of the algorithms into an overall process that is not part of this publication. The pure algorithms are not executable without connection to other algorithms. However, the entire software project can be shared on request.