# 3D Printing of Objects with Continuous Spatial Paths by a Multi-Axis Robotic FFF Platform
## 3 Methodology
### Multi-Axis Toolpath Planning
#### 3.2.2 Global Continuous Toolpath Planning  
We can use a standard way to finish toolpath planning on the 2D sliced planes. However, considering that the robotic arm moves spatially when the planes restore it to its original shape, redundant movements must be avoided as much as possible to prevent collisions or singularities. That will also reduce post-processing workload when using continuous fiber-reinforced composites as printing material. To achieve these goals, we divide the toolpath planning into two steps: (1) spatial printing sequence generation and (2) continuous toolpath planning. After slicing, a series of plane layers \(L\)= (\(l_{1}\), \(l_{2}\), \(\cdots\), \(ln\)) is generated. Each layer \(l_{k}\) consists of one or more simply connected regions \(r_{k,i}\). Then, we get a collection \(D=\{r_{k,i}\}\) that includes all 2D simply connected regions layer by layer. Where \(i\) is the index of the simply connected region in each layer, \(k\) represents the layer index. To improve printing efficiency and simplify control, we need to ensure that the continuous fibers are not cut during printing. Therefore, unnecessary movement during printing needs to be avoided. Our strategy is to connect the adjacent simply connected region in the upper and lower layers and then connect other simply connected regions according to the geometric interference relationship between the extruder nozzle and the workpiece. The procedure is given in Algorithm 1. ```
1:\(\mathcal{A simply connected region is a toolpath-connected domain where one can continuously shrink any simple closed curve into a point while remaining in the region. This type of region can be divided by a set of convex polygons. Each convex polygon is capable of being filled with a single continuous toolpath. As mentioned above, many space-filling curves such as the Zigzag curve [26], Hilbert curve [27], and Fermat spiral [28] can be used to generate the continuous toolpath. The collection \(R\) generated by algorithm 1 consists of an ordered sequence of simply connected regions. Therefore, our continuous toolpath planning strategy can also be decomposed into two steps: (1) fill each \(rk\),\(i\) in \(R\) with a continuous toolpath and (2) connect each continuous toolpath by order of \(R\). Compared with the Zigzag and the Hilbert curve, the Fermat spiral-based 2D filling pattern presented by [PERSON] et al. [29] has the characteristics of definite starting and ending position and smooth transition. This pattern is more suitable for continuous fiber-reinforced printing without fiber cutting. We traverse the connected region queue \(R\) to close each connected region's boundaries. Then, a continuous spiral is generated to fill each region with the minimum spanning tree method. To avoid the intersection of the spirals, principal component analysis and Curvature Scale Space feature are used to extract the smooth region to connect the continuous spirals between convex polygons [28]. The corresponding spatial continuous toolpaths generated for different structures are illustrated in Figure 4.

The models in Figure 4 are sliced sparsely to show the connection between different parts of a model. The corresponding parameters of nozzle size can be regulated for different printing platforms to compute a machine-oriented printing sequence. Then, the global continuous toolpath can be generated by connecting the toolpath segments in the order of the sequence provided by Algorithm 1. Figure 4: Demonstration parts for continuous toolpath planning. (**a**) Two-branch. (**b**) Split up and down. (**c**) Multiple parts. (**d**) Structure with holes. (**e**) Curve structure. #### 3.2.3 Printing with Support

In multi-DOF printing, overhanging structures printed with curved slices need strong support. We find all the downward facets on the surface of the input model. Then, the facets are grouped and the corresponding boundary contours are extracted. The upper surface of the support and the hotbed form the initial printing surface of the printed part.