1 Introduction

Additive manufacturing (AM), popularly called 3D printing, is defined by ISO/ASTM 52,900:2018 [1] as “a process of joining materials to make parts from 3D model data, usually layer by layer, as opposed to subtractive manufacturing and formative manufacturing methodologies.” This approach of manufacturing, according to Aljarrah et al. [2], is presented under several technologies, depending on the type of material to be used (plastic, metal, or concrete). Examples of such technologies are fused deposition modelling (FDM), stereolithography (SL), selective laser sintering (SLS), selective laser melting (SLM), multi-jet modelling (MJM), among others. Compared with subtractive methodologies, besides the flexibility given the different technologies, Yuan et al. [3] (2020) highlighted advantages such as low cost, reduction in material usage, and productivity improvement. Due to these advantages, Matos et al. [4] pointed out that AM has been used in various areas, such as medical sciences (medical and dental implants), jewellery, tennis, automotive, and aerospace industries. Ding et al. [5] stated that the competitiveness of AM increases for expensive materials, such as titanium and nickel alloys, used in the aerospace industry; AM can reduce the so-called buy-to-fly ratio (ratio also generically named buy to apply when applied outside the aerospace field).

Several techniques are also available for additive manufacturing of metal parts, each one based on dedicated layer building methods, heat sources, and feeding forms. In an attempt to rationalise the technique description, Paolini et al. [6] cited that metal additive manufacturing (MAM) has been ordered as by powder bed (PB-MAM) and by direct energy deposition (DED-MAM). Also, according to the authors, in these technologies, a heat source (laser, arc, or electron beam) fuses a feedstock in the form of powder or wire. Colomo et al. [7] stated that PB-MAM is required when targeting complex shapes printed parts, with dimensional accuracy and good surface quality. PB-MAM technologies achieve the complement of this. Cooke et al. [8] highlighted that DED-MAM has gained the attention of industries and universities worldwide for manufacturing medium to large parts and with good structural integrity, achieving high printing speeds and still being suitable for repairs.

Further detailing the DED-MAM techniques, the parts are printed employing an energy source that melts the raw material (wire or powder) while it is being deposited. The most common energy sources used for that are laser (L-DED-MAM), electron beam (EB-DED-MAM), welding arc (usually the same used in plasma welding, gas tungsten arc welding and gas metal arc welding). Chen et al. [9] reported that the EB-DED-MAM technique, carried out in a vacuum camera, is ideal for printing reactive alloys; this process can become expensive for other applications. However, current literature and industrial applications suggest EB-DED-MAM beyond reactive alloys. According to the comparison presented by Negi et al. [10], L-DED-MAM is an alternative recommended for printing parts accurately with high dimensional tolerances. They also pointed out L-DED-MAM disadvantages such as high investment and operational costs and low deposition rates. According to Ding et al. [5], both processes cited do not have remarkable energy efficiency; EB-DED-MAM processes with values of 15 to 20% and L-DED-MAM with values of 2 to 5%, which are low compared to arc welding, which can be more efficient than 90%.

Using arc welding as the energy source, the DED-MAM techniques are referred to as WAAM. GMAW, GTAW, and PAW are the most common welding processes from which the energy source is used in DED-MAM. In short, WAAM consists of an electric arc as a heat source for melting a wire, enabling continuous deposition of material, layer by layer, until the end of the printed part. Jafari et al. [11] highlighted the possibility of efficiently printing large parts/components (1000–3000 mm) with reasonable geometry complexity and high dimensional accuracy as an advantage of WAAM. In complement to the benefits, Cunningham et al. [12] mentioned that WAAM has high deposition rates and allows working with various metals. The major point is that WAAM is based on well-established welding technology, enabling the application of several already known techniques. However, despite the relative maturity of WAAM, process planning is crucial for the technique's success, and there are still many windows to be explored.

For additive manufacturing process planning, computational tools, such as MX3D’s MetalXL, Lincoln Electric’s SculptPrint, and Gefertec’s 3DMP-CAM are examples of applications dedicated to WAAM. However, regardless of the remarkable performance, these commercial packages have a cost of investment (OPEX) and limited flexibility for the user to make adaptations. Therefore, universities around the world are developing their own software or adapting existing software dedicated to polymers. The significant advantages of this attitude would be the flexibility to implement differentiated deposition strategies, in addition to machine learning and parameter optimisation. In short, in-house software enables research, development and innovation.

In the context of adaptations, Nilsiam et al. [13] presented the MOSTMetalCura, which is a modification of the Software CuraEngine, a slicer dedicated to polymers. Among the changes implemented by the authors in the software is the obstruction of path crossing or overlapping in the same layer, the addition of variable idle time between layers, insertion of on/off commands for the welding source and definition of optimised wire feed speed and voltage based on printing speed, layer height, wire diameter, and bead width. Likewise, Kozamernik et al. [14] proposed a WAAM system with interpass temperature control. The authors also used the Cura software to generate trajectories and generate a modified G code with subroutines, inputs, and outputs for temperature control, cooling, and deposition. In addition, the authors inserted a resource for each layer to start and finish in random positions in this work. Although this approach is interesting, a good prior knowledge of the software to be adapted is necessary, which may require time before performing such adaptations.

In the context of the cross-platform concept, Lam et al. [15] used a commercial program dedicated to additive manufacturing, named Autodesk’s Netfabb. As a result, the authors obtained a file in common layer interface (CLI) format, consisting of the coordinates of each layer’s contours (internal and external) and its respective heights. With the help of in-house software, the authors performed the other printing process planning steps of their approach, namely, generation of the trajectory, identification of overhangs and deposition speed estimation. In this approach, working on different platforms can hinder a future dynamic implementation, for example, a closed-loop system with re-slicing. Also, the cost can be high if any platform is paid for.

The implementation of algorithms for WAAM process planning has been carried out using commercial computational tools, such as MATLAB or Grasshopper (a plugin of the Rhinoceros 3D software). The implementation in MATLAB is chosen by the ease of manipulations with arrays, from importing the file in STL format to generating machine code. Intermediate steps such as layer-by-layer slicing and torch path planning can also be implemented in this platform. Amongst the main piece of work that uses MATLAB as software for trajectory planning for WAAM, Ding et al. [16], from the University of Wollongong in Australia, Xiong et al. [17] of the University of Technology of Singapore, and Liu et al. [18] of Tianjin Polytechnic University in China stand out. Concerning Grasshopper, according to Venturini et al. [19], this tool introduces the concept of G-language programming (graphical/visual programming language). One of the most significant advantages of this platform is intuitive programming, the various geometric functions already existing and the possibility of parametric control by scripts written in Python. The main work for trajectory planning using this platform was developed by Venturini et al. [19], from the University of Firenze in Italy, Michel et al. [20], from Cranfield University in the United Kingdom, and Nguyen et al. [21] of the Brandenburg University of Technology in Germany. It is noted, however, that the MATLAB or Grasshopper platforms also require budgetary investment on the part of the users. As a financially efficient alternative to MATLAB, Ferreira and Scotti [22] applied Scilab in their own development (both numerical computation tools). When graphical/visual programming language is the choice, a free alternative to Rhinoceros + Grasshopper platform would be Blender with the Sverchok added on.

Given the above, the importance of WAAM is apparent. However, the above text also emphasises that this technique must be assisted by a “trajectory planning and machine code generation” module in a preprocessing stage. It is also perceived that computational tools developed and/or adapted by users or R&D institutions open a series of possibilities for WAAM process planning, besides requiring low investment. In this context, the present work proposes developing and validating an in-house computational programme in an open-source environment for WAAM preprocessing planning and subsequent machine code generation. Scientific methodologies were used to treat the problem, propose novel solutions, and validate de performance. The expectance is that this computational tool comes to present similar efficacy to the already commercially disclosed tools or to be competitive with some differential features to other similar published attempts.

2 Preprocessing in wire arc additive manufacturing

According to the proposal of this work, a comprehensive preprocessing schedule for WAAM would be effectively performed through two distinct modules, namely, the “trajectory planning and machine code generation” and the “Parametric design and parameter definition,” as schematised in Fig. 1. However, the second module will deliberately not be discussed in the current study. This study focuses only on developing the first module, “trajectory planning and machine code generation.”

Fig. 1
figure 1

Workflow of a computational tool for wire arc additive manufacturing (WAAM) preprocessing, with emphasis on two modules identified by dashed rectangles

In the current development, this “trajectory planning and machine code generation” module, as conceived, has as input the information from a three-dimensional model (with topological optimisation or not). This model can be designed in any computer-assisted design (CAD) software. It can be digitised by a 3D scanner also. Some commercial computational packages can also reach topological optimisation. Most of the CAD programs already have a 3D printing environment, where one can preprocess data files. At this stage, the model can be rotated, translated, and exported in the most used AM files, such as STL or additive manufacturing file (AMF). Other widely used file formats are standard for the exchange of product data (STEP) and initial graphics exchange specification (IGES). Additional information on files for slicing can be found in ASTM F-3413–2019 [23].

For this development study, the STL file format was chosen for being widely used in additive manufacturing. This type of file stores information in two different ways: binary encoding and American Standard Code for Information Interchange (ASCII) encoding. In an ASCII STL file format, the three-dimensional model is represented by triangular facets, in which information from the x, y, and z coordinates of the vertices is made available. In addition, an unital normal vector indicates which facet side is the external one in the three-dimensional model. This information was necessarily used in the design of this WAAM planning software to reproduce the three-dimensional model faithfully. Despite being easier to understand, ASCII STL file format is heavier than binary STL file format, which makes the latter preferred by users. Figure 2 shows this workflow from a 3D CAD model to the “trajectory planning and machine code generation” module.

Fig. 2
figure 2

Model transformation steps from a 3D CAD drawing to the input format of the module “trajectory planning and machine code generation”

After reading the three-dimensional model, the next step in the proposed computational workflow was the step relating to orientation for slicing. Orientation usually occurs, not as a rule, as illustrated in Fig. 3. The intention is that the software user is free to take the decision, but he/she should orient the part so that the previous layer supports the next layer. For example, the upper orientation in Fig. 3 is not easily implemented due to the overhang. As a result, the depositions will have to overcome unsupported layers (highlighted by a red rectangle); the molten pool will tend to fall down. In mathematical terms, this step was achieved in the development using the concept of rotating matrices to the desired angle relative to the desired axis. Then, with proper positioning of the part, slicing can be performed. Slicing consists of cutting planes parallel to each other (equidistant or not) and perpendicular to the slicing axes intersecting the 3D model.

Fig. 3
figure 3

Potential orientations for a same three-dimensional model (Fig. 2) and the consequences on the slices of the model: upper view = troublesome; lower view = viable

This work used slicing with equidistant slice planes because this approach is handy for a single building direction. In this approach, the slicing (cutting) planes intercept the 3D model triangular mesh. However, it is essential to know the intersection coordinates to define the shape of the layer. Figure 4 can be used to demonstrate how the geometrical coordinates are found when using this approach. From the highlighted triangle, let us take the hypotenuse represented by the vertices V1 and V2 (red dots), which coordinates (x1, y1, and z1 and x2, y2, and z2) are known from the STL file. On the other hand, the coordinates xp and yp at the interception (I) (red square marker) between the hypotenuse and the slicing plane (P) are unidentified. However, zp is definable, since it represents the height of the slicing plane. Therefore, by applying the known coordinates into Eq. 1, xp and yp are determined. If the same reasoning is applied to all interceptions, the shape of the layer can be defined. In other words, the two-dimensional contours of each layer are reached by connecting the endpoints to starting points of a line between two interceptions (due to adjacent triangles to sharing the same side, the endpoint of an interception line is always coincident with the starting point of subsequent interception line). As standardised, the outer contours were generated with the vertex disposition counterclockwise, while the internal contours are arranged clockwise.

Fig. 4
figure 4

Schematic representation of the slicing process

It is noteworthy that, according to the flowchart presented in Fig. 1, the slicing step requires inputs from the module “parametric design and parameter definition,” yet not implemented (out of this work focus). The distance between the cutting planes will depend, for example, on the estimated height of the deposition bead (unless the use of adaptive control of the incremental layer height by the printing machine is provided). It is also important to mention that other slicing approaches could have been used to replace the equidistant slice planes approach used in this work. He et al. [24], for instance, proposed cutting planes consisting of cylindrical surfaces to improve the WAAM printing quality of propeller blades (multiple building directions).

$$\frac{{x}_{p}-{x}_{1}}{{x}_{2}-{x}_{p}}=\frac{{y}_{p}-{y}_{1}}{{y}_{2}-{y}_{p}}=\frac{{z}_{p}-{z}_{1}}{{z}_{2}-{z}_{p}}$$
(1)

With the sliced part, the trajectory can be planned for each slice. According to ASTM F3413-2019 [23], the torch trajectory consists of a set of vectors (x, y, and z) related to the torch travelling when printing the part. In WAAM, several strategies generate the trajectories, as presented by Jafari et al. [11] and Ferreira and Scotti [22]. In summary, the trajectories are sequential information of coordinates x, y, and z (as in the case of a coordinate table with 3 axes). Internally in the software, this sequence was organised in a 3-column matrix containing all trajectory coordinates. The G-code generation (the machine code used in this study for a 3-axis CNC machine) was carried out with this information. Commands required in the code header, i.e., the commands for arc striking (M3) and arc extinguishing (M5), the deposition speed value (which must be passed by the parallel module “parametric design and parameter definition” and the linear interpolation command (G1), among others, are inserted automatically. An example of a generated code by the proposed software is presented in Fig. 5.

Fig. 5
figure 5

Example of a G-code generated by the developed software for a 3-axis CNC machine

3 The software in an open-source environment for WAAM preprocessing planning

The proposed in-house software in an open-source environment for WAAM preprocessing planning was developed in the Scilab environment (an application for numerical computing), an alternative to the commercial MATLAB, both already portrayed in the introduction section. Scilab, however, is open-source, free of costs to users and widely used by engineers (including the authors of the current work). The overview of the primary graphical interface of the software is shown in Fig. 6. This interface concerns the workflow steps described in Fig. 1 related at the moment only to the module “trajectory planning and machine code generation.” Behind the interface, first, the STL file is read when the load 3D model button is activated. Immediately after, the interface plots three—the model dimensionally. According to the axis input, the rotation command rotates the part, representing the axis of rotation (x, y, or z), and the angle (in degrees) input, which represents the rotation angle. The second step in the schedule is the job “slicing,” in which the user must enter a value in millimetres at the editable rectangle layer thickness. With the value set, the slicing is performed when the slice button is enabled. After slicing, the operator can set a torch trajectory pattern for the layers by choosing an option within the fields of the path planning frame. The available strategy options at the present moment are raster, zigzag, contour, hybrid (contour + zigzag), and pixel (refer to Ferreira and Scotti 2021 for these strategies). At this stage, in the step-over distance editable rectangle, the distance between two parallel beads is set (in mm), aiming at sound pass intersections and fine quality of the printed surfaces. The deposition speed (mm/min) is required to be input to complete the process. However, the deposition speed will be estimated automatically, without human intervention, depending on the chosen path planning strategy. Finally, the machine code, applicable in this case to a coordinate table, is generated by clicking on the generate G-code button. After that, a.txt or the.gcode file is generated with the G-code command lines for printing the desired part.

Fig. 6
figure 6

An overview of the graphical interface of the proposed software for WAAM preprocessing planning, developed in Scilab (the field for parameter inputs are zooned in to better visualisation)

The advanced settings submenu, located at the topmost left side of the screen, sets up more details in the trajectory generation. For raster, zigzag and hybrid strategies, change is possible by shifting the trajectory angles between layers. Also, in this submenu, for cylindrical or conical parts, there is the possibility of setting the spiral contour trajectory and weaving (with the prospect of helical building up trajectory). For the pixel strategy [22], optimisation can be reached towards trajectory total distance (the objective function) as a function of the number of interactions, selection of stop criteria, and choice of the trajectory planning heuristics.

4 Experimental validations of the software

Performance validation of such software would be more reliable if demonstrators with different degrees of geometric complexities are tried out, using the several path planning strategies available. Therefore, single-layer and multiple-layers printed builds were proposed to validate the module “trajectory planning and machine code generation” already implemented in the software. The builds printed on a single-layer approach were chosen when the intention was the preliminary software validation (performance of the machine code execution in the printing CNC table). The software performance indicator was based on visual morphological analysis of the printed parts related to the planned trajectories. Therefore, single-layers were used to demonstrate the software flexibility and feasibility of printing circular shapes (disc with a central hole, circular tube, and bulky disc). For this, traditional deposition strategies, still with special features, were set in the software, such as contour (using the spiral contour and circular contour with weaving as alternatives) and bi-directional raster. To make this assessment more systematic, the machine codes generated were first evaluated in an off-line computational package for trajectory simulation, before the actual printings.

A second round with the multiple-layer approach was used to demonstrate the software’s capability to print bulky parts with more complex geometries, which infers the comparison of trajectories. A short in height V-shape profile, a bow tie bearing with holes and a hollow cylinder were printed through multiple-layer depositions. Through off-line simulation, performance criteria were defined by the authors to compare and make the decision on the best trajectory to de-adopt according to the part shape. The criteria were the trajectory length (paths with and without deposition), arc starts and stops, apparent voids on the deposited surface and path crossing (material accumulation). The stepover distance (track centre-to-centre distance in the same layer) used for all multiple-layer simulated prints was 3.0 mm. For qualitative morphological analyses of the printed parts, the multiple-layer printed builds were digitalised, and their silhouettes compared with the 3D model projected in planes (dimension was not the target, but shape consistency). Despite outlining path planning strategies, the authors have no intention to compare the printed part performances (e.g., mechanical properties). Instead, the intention of giving criterion-based information on each strategy is to qualify the performance and flexibility of the proposed software.

Section 3 introduced the available strategies in the current software. It is important to recall that the operator in the intended software can set the deposition strategy within the fields of the path planning frame of the software interface. Overall, the parallel contour strategy is likely beneficial for cylindrical bulky part printing with holes in the centre, while raster and zigzag work well to print bulksome parts with no central holes. Furthermore, the circular contours can be used to maintain the quality and accuracy of cylindrical bulky part surface, in which inner volume can be filled up by contour strategy (progressively decreasing the diameter or using spiral), or, in a hybrid way, with raster, zigzag, or pixel strategies. A mix of strategies (hybrid approach) presents some competitive advantages because it encompasses each strategy involved advantages. An example would be the hybrid strategy, which is composed of the contour and zigzag strategies. Zhang et al. [25] state that the contour strategy is suitable to print the edges (internal and external) of the bulky parts. By this strategy, geometrical accuracy of the printed part and distribution of residual stress can be reached. The zigzag strategy, in turn, is used to recoup the unfilled core area of the layer; according to Liu et al. [18], this strategy ensures better filling (fewer defects) than the parallel contour strategy. pixel strategy, on the other hand, can be used alone in both cases, as claimed by Ferreira and Scotti [22]. Accordingly, a hybrid trajectory, a parallel contour and the pixel strategies were objectively employed to demonstrate the software functionality during the second experimental round (multiple-layer approach).

A rig applied for wire arc additive manufacturing with near-immersion active cooling (WAAM-NIAC), originally described in Da Silva et al. [26], was used to print the parts. With this technique, the build is printed to a limited degree immersed in water (water level rises with the deposition of layers), so that forced colling is imposed into the already deposited layers. A WAAM-NIAC rig consists of a commercial arc welding device (Fronius TransPuls Synergic 500), a 3-axis CNC coordinate table (500 × 500 × 300 mm) and a water tank with the controlled flow to perform thermal management (active cooling). As feedstock, an AWS ER70S-6 wire with 1.2 mm diameter was used, shielded by a mixture of argon (96%) and carbon dioxide (4%). The depositions were carried out on a carbon steel substrate (AISI 1020), with 300 × 180 × 12 mm dimensions. Depending on the part, the power source operated at different modes (CMT and pulsed). Thermal management (NIAC approach) was entirely used only to print the hollow cylinder, keeping a top layer edge to water distance of 20 mm. In this case, there is no idle time between layers. For the other printings, which presented low build height, the NIAC was only partially used; cooling was carried out with the water at the substrate top level. Table 1 specifies the parameters used with the printed parts. It must be mentioned that all parameters were selected through pretests.

Table 1 Deposition parameters for the experimental validation

5 Results and discussion

The results of the experimental trials carried out with single-layer can be visualised from Figs. 7, 8, and 9 (typical examples of lids, stiffeners or bases of functional components, like flanges, etc.). Naturally, the replication of the single-layer one over the other would head to thicker components. However, multi-layers, as previously explained, was not the purpose of this first set of trials. The circular shape of the print shown in Fig. 7 was reached using a version of the contour strategy, named the spiral contour deposition strategy (option available in advanced settings of Fig. 6). This version is based on the Archimedes spiral equation. This type of trajectory is interesting because the deposition is continuous (one arc striking and one arc extinguishing), but, at a disadvantage, material accumulation may occur in the inner and outer contour (highlighted in Fig. 7c by blueish circumferences). Few studies have compared inside-out and outside-in deposition directions while using parallel, not spiral, contour as a strategy to reach a circular shape. For example, Xiong et al. [17] reported that the parallel contour strategy could cause heat accumulation if the trajectory starts applying an outside-in direction. On the other hand, Cui et al. [27] showed better-performed printing using outside-in, considering that the first external bead deposition serves as a limiting wall to guarantee dimensional accuracy. The spiral contour deposition strategy claims, to some extent, to balance the benefits and setbacks of the deposition direction.

Fig. 7
figure 7

Printing case with the spiral contour trajectory: a planned in software; b simulated deposition; c a printed single layer

Fig. 8
figure 8

Printing case with circular trajectory with weaving: a planned in software; b simulated deposition; c a printed single layer

Fig. 9
figure 9

Printing case with the bi-directional raster trajectory: a planned in the software; b simulated deposition; c a printed single layer

The use of the second version of contour strategy, called circular contour with weaving deposition (illustrated in Fig. 8), is an alternative to improve surface quality (option available in advanced settings in Fig. 6). Xu et al. [28], while printing a bulky prismatic block, found smoother surfaces and no significant lack of fusion compared to straight bead deposition when using weaving deposition. Ma et al. [29] add that weaving favours obtaining wider beads with good surface quality. These features are advantageous for printing truss structures of larger thicknesses or pipes with a wider wall. Considering this, the circular trajectories can be planned in the software using sine-wave weaving, as applied in the printed layer shown in Fig. 8.

Figure 9 presents the application of the bi-directional raster deposition strategy, one of the path strategy options implemented in the software object of this work. This strategy consists of non-continuous sweep movements. The movements can always be in the same direction, but usually, they are in reverted directions (shown by the red arrows in Fig. 9b). Whatever the movements, there is always arc extinguishing and re-striking to accomplish the movement reversion. According to Hu et al. [30], constant arc extinguishing/striking lead to imperfections, longer printing time (depending on the geometric complexity of the part), and low surface quality at the boundary of the parts. Ding et al. [16] reported further problems, such as warping and anisotropy, in parts printed by this strategy. To mitigate such problems, while keeping the raster strategy, direction changes can be carried out with intercalated tracks (with blank tracks to be deposited in a subsequent round to complete the cycle in one layer). However, the sound filling up of the printed part and the facility to implement inter-track temperature control (inserting inter-track dwelling time or manual activation of the next pass) can be considered advantages of this strategy.

As a whole, these single-layer prints demonstrated the software flexibility and feasibility of printing circular shapes (disc with a central hole, circular tube and bulky disc) through a good performance of the machine code execution in the printing CNC table (as proposed as validation criterion).

Further experimental trials used the proposed software to produce multiple-layers prints. Figures 10 and 11 present the workflow for printing more complex parts than those illustrated in Figs. 7, 8, and 9. The print topology has now non-convex angles and non-convex angles with holes, respectively. As mentioned, three deposition strategies used to build these parts were compared, namely, parallel contour, hybrid (contour + zigzag), and pixel. In the hybrid strategy, the outer and inner contours of the builds were cumulatively printed first. Then, the inner part was filled up using the zigzag strategy (thin blue lines). In the representation of the trajectories in Figs. 10, 11, and 12, the red dash lines represent trajectory with no material deposition regardless of the strategy. While still employing the contour + zigzag hybrid strategy to build the bow tie bearing with holes (Fig. 11), six arc stops needed to occur, pointed out by the red dash lines (the setbacks of extinguishing and re-striking arcs have been previously discussed). The parallel contour strategy was not also too effective for these topologies. Voids (highlighted by orange areas in Figs. 10 and 11) and material accumulation due to path crossing (indicated by blue arrows in Figs. 10 and 11). It is important to draw the reader’s attention that parameter optimisation could mitigate the effect of path planning and void formation, as shown by Ding et al. [31]. Therefore, pixel strategy was considered the best choice to print both parts (shortest trajectory length, no arc stops, no path crossing, and no apparent voids).

Fig. 10
figure 10

Workflow of the preprocessing planning for a V-shape profile: in the counter parallel strategy is pointed out imperfections (voids and material accumulation, the latter due to path crossing)

Fig. 11
figure 11

Workflow of the preprocessing planning for a Bow tie bearing with holes: in the hybrid and contour parallel strategies, the red dashed lines represent non-deposition movements, while in the counter parallel strategy is pointed out imperfections (voids and material accumulation, the latter due to path crossing)

Fig. 12
figure 12

Workflow of the preprocessing planning for a hollow cylinder: in the hybrid strategy, the red dashed line represents non-deposition movements, while imperfections (voids and material accumulation, the latter due to path crossing) are pointed out by arrows (orange for voids and blues for path crossing)

Moreover, as seen in Table 2, the hybrid trajectory (contour + zigzag) generally presented longer trajectory lengths but fewer imperfections than the parallel strategy. The eventually chosen strategy for the actual printing was pixel, considering all criteria. This strategy enables continuous deposition and uninterrupted arc holes, even for non-convex geometries and internal holes. For both cases, the trajectory length generated by the pixel strategy was shorter than that found for the parallel contour and hybrid strategies. Additionally, no arc interruptions, path crossing, or superficial voids were seen in the simulated deposition, which backs up the strategy choice.

Table 2 Performance criteria applied to different trajectories from off-line simulations

Figure 12 shows a third example of multiple-layer prints, representing the case of a hollow cylinder, like a thick wall pipe segment. This geometric pattern is applied for tube printing using the helical deposition approach. Contrary to the cases presented in Figs. 10 and 11, in this case, the best trajectory showed to be the weaving. Although the trajectory length was not the shortest, no apparent voids and material accumulation (due to path cross) were observed. Pixel strategy led to the shortest trajectory, but the simulation showed the likelihood of open voids in internal and external surfaces (pointed out by orange squares). Likewise, this nonconformity can be mitigated by using a hybrid strategy with parallel contour and pixel, likely at the expense of increased trajectory length. To lay important emphasis on the weaving, Shirizly and Dolev [32] performed printing of tubes with the sine wave, but they did not use a helical deposition approach. Instead, they chose incremental circular building up and waiting for cooling between layers (idle times). Hu et al. [30] and Venturini et al. [19] indicate that helical trajectory is more efficacious, avoiding imperfections caused by arc stops and starts. In the printing of Fig. 12, the NIAC approach (Da Silva et al. [26])) was used to avoid arc starts/stops, while keeping the heat flow (and wall width) constant. The quality obtained by weaving was combined with that obtained from the helical trajectory for printing this tubular profile in the planned trajectory.

To conclude the validation using the multiple-layer approach to print bulky parts with more complex geometries, the parts presented in Figs. 10, 11, and 12 were printed using the best trajectory chosen after simulation. Figures 13, 14, and 15 show the printed parts and their respective scanned meshes to indicate the top surface geometry oscillation and the geometric deviation (relative distance between the printed part and its projected 3D CAD model). The top view surfaces of the prints in Figs. 13 and 14 have in general negative deviations at the edges, possibly due to a lack of parameter optimisation for bead formation and by their uneven heating at the edges (heating dissipates more towards the inside). An additional layer could be deposited to compensate for this difference when the geometrical tolerance is reached by further machining. It is important to mention that the largest remaining surfaces of Figs. 13b and 14b fit the target dimension (3D model outline), as highlighted in green. The green colour mesh means that the linear deviations from the external model dimensions are between ± 0.5 mm, a reasonably manufacturing tolerance. Notwithstanding, These figures also show that more adequate parametrisation, or mixing of strategies (for instance, contour + pixel hybrid strategy), is needed to make up for the low shape fitting at the acute angles.

Fig. 13
figure 13

V-shape profile (Fig. 10): a printed part using the pixel strategy; b digitalised top surface of the printed part showing the geometric deviations from the model outline

Fig. 14
figure 14

Bow tie bearing with holes (Fig. 11): a printed part using the pixel strategy; b digitalised top surface of the printed part showing the geometric deviations from the model outline

Fig. 15
figure 15

Hollow cylinder (Fig. 12): a printed part using the parallel contour with sine wave weaving strategy; b digitalised top surface of the printed part showing the geometric deviations from the model outline

In relation to the piece presented in Fig. 15, although the model shape was kept, there was a significant deviation of dimensions between the printed part and the 3D CAD model (reaching up to 4.22 mm at the external dimension). The reason for this is that the beads deposited with weaving turn to have a longer amplitude than the programmed wave, as demonstrated in Ma et al. [29]. If the actual bead behaviour is known during parametrisation, this deviation could be mitigated by setting a smaller wave amplitude.

Recalling that the intention of obtaining criterion-based information out of these multiple-layer experiments to print bulky parts with more complex geometries was to qualify the performance and flexibility of the proposed software, one can devise that the proposed software accomplished its intentional functionality satisfactorily.

6 Conclusion and future work

The objective of this work was the development and validation of an in-house computational programme in an open-source environment for WAAM preprocessing planning and subsequent machine code generation. The authors elaborated on, originally, the module “trajectory planning and machine code generation” implemented in Scilab (open-source and free platform—low investment). A graphical interface was developed for a user-friendly interaction. The use of the software demands minimal, yet desired human intervention. Starting from a CAD drawing, instructions in G-code were generated with different trajectories made available in the software and selected by users (fulfilling the flexibility character target). The machine codes (G-code) were successfully run in a CNC WAAM printing machine. A complementary objective was that this computational tool would present similar efficacy to the already commercially disclosed tools or be competitive with some differential features compared to other similar published attempts. The varied prints used to evaluate the performance, with different topologies and printing complexities, led to the conclusion that this second objective was also fully accomplished.

Although ready to be used industrially on a pilot scale, this in-house software is advantageous for research, development, and innovation (therefore, of scientific importance). With the constant evolution of scientific and technological works in WAAM, daily emerging ideas can be reasonably easily implemented in such software, which is not always possible in commercial packages. These features boost the WAAM maturation. A future effort is towards implementing the module “parametric design and parameter definition” to reach a full version of the software. As shown in the diagram of Fig. 1, a series of steps constitute this module. The use of machine learning and optimisation are considered essential tools for the success of this module. To date, the definition of the parameters is possible from pretests.