Temporal design for additive manufacturing

Additive manufacturing (AM) is expected to generate huge economic revenue by 2025; however, this will only be realised by overcoming the barriers that are preventing its increased adoption to end-use parts. Design for AM (DfAM) is recognised as a multi-faceted problem, exasperated by constraints to creativity, knowledge propagation, insufficiencies in education and a fragmented software pipeline. This study proposes a novel approach to increase the creativity in DfAM. Through comparison between DfAM and in utero human development, the unutilised potential of design through the time domain was identified. Therefore, the aim of the research is to develop a computer-aided manufacturing (CAM) programme to demonstrate design through the time domain, known as Temporal DfAM (TDfAM). This was achieved through a bespoke MATLAB code which applies a linear function to a process parameter, discretised across the additive build. TDfAM was demonstrated through the variation of extrusion speed combined with the infill angle, through the axial and in-plane directions. It is widely accepted in the literature that AM processing parameters change the properties of AM materials. Thus, the application of the TDfAM approach offers the engineer increased creative scope and control, whilst inherently upskilling knowledge, in the design of AM materials.


Introduction
Additive manufacturing (AM) offers huge benefits to industry and healthcare through reduced material costs, weight reduction, customisation and reduction of the time-to-market for products. The expected economic benefits of this technology could exceed $16 billion by 2025; however, only if the current trend of adoption changes [1]. It is repeatedly reported, across multiple commercial sectors, that there are barriers that need to be overcome to increase the application of AM to end-use parts [2,3]. Design for AM (DfAM) is a crucial yet multi-faceted challenge, which remains unsolved by research and industrial endeavours. Thomas-Seale et al. [4] highlight that there are three fundamental problems which intersect with DfAM: Software to support DfAM needs streamlining; design engineers require a new perspective enhanced by increased creativity and knowledge; a paradigm shift in education is needed to infuse engineering graduates with comprehensive AM knowledge [4]. Figure 1 utilises a functional analysis to visualise the potential number of software interfaces that may be involved in detailed DfAM. The current design framework not only spans to various interfaces but also utilises different file formats to encode the topology data. Different spatial data formats include parametric computer-aided design (CAD) representations, discretised Finite Element Analysis (FEA) meshes and the tessellated stereolithography (STL) files, compatible with most AM computer-aided manufacturing (CAM) software. This "software-hopping" leads to inefficient transformations between parametric, tessellated and meshed datasets. Figure 1 represents the most commonly used design software and formats; it is acknowledged that computational design techniques are constantly evolving and more recent developments will be discussed in line with the research. DfAM is further hindered by bottom-up knowledge propagation, where platformspecific knowledge of DfAM stems not from education but from hands-on experience of design and manufacturing.
Finally, the creativity offered by the increased topology capacity of AM is constrained by not only the fragmented software and the incomplete knowledge of the design engineer but also psychological inertia. Psychological inertia refers to the human propensity to think and solve problems in the manner that you have been conditioned to think. Therefore, design is inherently constrained by a history of designing for subtractive manufacturing methods.
To increase creativity in DfAM, yet develop a process that does not compound the fragmented nature of knowledge and software in AM, a profoundly different approach is required. Human development in utero and AM demonstrate an encapsulated process both spatially and temporally. The uterus and duration of pregnancy are analogous to the build volume and duration of AM. Whilst design could be considered analogous to genetics, information on the location of the cell is not contained in DNA [5]. Instead, the cells of the embryo and foetus are responsive to the environment that surrounds them. They demonstrate a dependency on spatially and temporally varying biological, chemical and mechanical signals. The manufacture of responsive materials, also referred to as smart materials, using AM, is known as 4D printing [6]. However, 4D printing is strictly the stimulus of the material after manufacture. "The uniqueness of AM lies in the fact that the material is being made" [4]. The material formation demonstrates an inherent responsiveness to the parameters of manufacturing, mirroring the phenomena demonstrated in utero. This study proposes to overcome the issue of psychological inertia, in how engineers think about DfAM, through innovation generated by reflecting between these comparable yet also contrasting knowledge domains.
This study will utilise time as a dimension for design during manufacturing, through reflection of the temporal responsiveness of the foetus in utero. This research will outline the creation of a new temporal design approach, the functionality of which will be demonstrated in silico. The aim of this paper is to develop a CAM programme to allow temporal design of a manufacturing parameter through an additive build. Temporal design applied to AM offers a radically new way of conceiving the design of AM materials.

Background
Industry and academia have both approached the challenge of increasing the design space and creative potential of AM, via design theory and software developments. Extensive literature exists on defining the process-dependent geometric design constraints of AM, for example [7,8]. Design methodology has also been developed to incorporate AM platform-specific manufacturing considerations [9][10][11]. Software research has focussed on expanding creativity by incorporating the spatial variation of material composition into design, for example, the Monolith and Foundry interfaces [12,13]. Commercial interests have been dominated by design for function using topology optimisation, for example, OptiStruct [14]. This approach utilises a discretised interface to optimise the geometry of a part for a specific design criteria subject to manufacturing parameters. Generative design [15] aims to expand creativity through combining the topology optimisation approach with machine learning to give the designer a wider range of solutions subject to design criteria. The review by Pradel et al. [16] crucially demonstrates how previous literature into DfAM maps onto a framework which defines the distinction between research aimed at different stages of the design and manufacture interface.

Human development and additive manufacturing
The research approach applied in this study was developed by drawing analogies between the fields of AM and the developmental biology of the foetus. The Double Diamond framework maps out the design process in terms of the divergence and convergence of thinking [17]. The first phase of this approach requires convergent thinking to "discover" or map-out the problem. This is required before the divergent phase to "define" design problem. Analogies draw parallels between situations to stimulate learning and generate innovative problem solving [18]. Bonnardel et al. [19] concluded that analogical reasoning from sources of different domains increases the research space for innovation. Indeed, transferring knowledge between different engineering systems already underpin established design techniques [20]. Thomas-Seale et al. [21,22] first used this approach to expand the definition of design in terms of materials and manufacturing. Thomas-Seale et al. [22] proposed in situ DfAM as a method of designing material through the temporally and spatially varying parameters of the AM build. This study also outlines in greater detail how the foetus utilises temporal stimuli [22].
The Theory of Inventive Problem Solving (TRIZ), 9-boxes tool [20], was used to conduct a spatiotemporal analysis on factors that influence design in both systems. Figure 2 outlines the parameters that control the growth of the geometry and function of the foetus and the design of the part during AM. During pregnancy and the AM build, these systems are both constrained within spatial and temporal envelopes. The foetus is encapsulated within the uterus from fertilisation, through pregnancy until birth; this is for a fixed time duration. The part undergoing AM is similarly constrained within the time and volume of the build. The development of the foetus is both dependent on pre-defined DNA and inherently on spatial and temporal stimuli and receptors which vary throughout pregnancy. Yet, AM is solely dependent on varying the point of fusion geometrically to define the part. The process parameters themselves do not vary through the build.
AM materials already demonstrate an inherent responsiveness to manufacturing parameters [23][24][25][26]. However, to date, the design of AM materials does not incorporate variable Fig. 2 Spatiotemporal system analysis of the parameters which influence a design for additive manufacturing and the b development of the foetus manufacturing parameters into design software. Yet, the resulting material and mechanical properties depend on these manufacturing variables. Thus, in this study, the ability to design through the time domain is explored and integrated into a CAM design software. In doing so, the synergy of development of function and form, inherently displayed in the development of the foetus, will begin to be reflected in DfAM.

Temporal design for additive manufacturing
The design of functionally graded materials, i.e. the graduated change in mechanical properties through a material, has been predominately approached in terms of the spatial variation of the composition of material deposition [12]. This approach limits the technique to multi-material AM platforms. A few recent studies have proposed the optimisation of build parameters to control a design variable such as magnetic functional grading [27], grain distribution [28] and phase [29].
This study proposes the ability to design materials incorporating time-variation of manufacture in-line with the creation of the spatial form. The concept of expanding the design space of AM through manufacturing parameters will be defined as temporal design. Its application to AM will be known as Temporal DfAM (TDfAM). Design in the context of AM is broader and more encompassing than it has ever been; hence, all developments in the field of AM must first and foremost consider their integration into the current design framework. The issue of giving the designer full control of all additive parameters is a long-standing problem; the development of AM is progressing at such speed that supporting new methodologies with efficient yet encompassing design software is invariably lagging. The lynchpin of translating these concepts into manufacturing techniques which are sustainable and will impact industry is if they are supported by a design pipeline that allows full parameter control and also validation. The proposed software will be developed to be compatible with open-source computer-aided manufacturing (CAM) for AM software.

Method
A TDfAM CAM software was developed using MATLAB 2018a (The MathWorks, Inc., Natick, MA, USA). This software was programmed to be compatible with the open-source CAM-AM software, Repetier-Host (Hot-World GmbH & Co. KG, Willich, Germany). The code is available in full on the GitHub software development platform [30].
The user is presented with a series of dialogue boxes to establish geometric or printing parameters, within a range of values compatible with a MakerBot Replicator 2X (MakerBot New York City, NY, USA). The geometry of the cuboid is automatically centred on the print bed at x = 100 y = 100.
The manufacturing parameters which are not defined by the user were sourced from the commercial literature [31]. Additional G-code commands require initialisation; these parameters, commands and their range of variables are outlined in Table 1. Though the reference platform was a dual nozzle extruder, in this study, only a single extruder was used. Shell layers were excluded from the results of this study to allow visualisation of the inner layers.
The G-code is based on commands aimed at the extruder. In the first instance, the extruder is sent to the first point, in this case the upper left vertex of the cuboid cross section. All movements are instructed using the "G1" code which instructs a linear travel move between the current position and next position. No material is extruded when moving towards the first point of each layer or towards the first point of each infill pattern. Each movement is described by a line following the pattern "G1 Xxx Yxx Fxx Exx". X and Y represent the absolute coordinate value for the next position. 'F' dictates the extrusion speed value. The variable manufacturing parameter in this study is extrusion speed, which was permitted to vary between 60 and 82 mm/s. The value of 'F' at each extrusion line is worked out by the infill pattern function. E represents a continuous axis of extruded material in millimetres. The value next to E represents how much of the raw material (of 1.75 mm diameter) should be extruded during each travel move. To calculate this value, the distance between subsequent points is worked out using Eq. 1. A ratio is then worked out between the volume of extruded raw material (1.75 mm diameter) per millimetre and the volume of extruded material of the user's selected resolution per millimetre. ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi A toolpath infill pattern function ("Varying toolpath angle") works out the necessary coordinates forming the rectangular infill using the infill density at the necessary angle. Once all the required material has been extruded for a particular layer, the value of z is changed by the layer height and therefore the extruder head is instructed to move to the new z value. The code gives a preview of the final layer of the toolpath. A gcode.txt file is outputted into the MATLAB working folder. The text of this file may then be directly inputted into Repetier-Host.

Varying toolpath angle
The toolpath of a fused deposition modelling (FDM) AM platform can be perceived as extrusion of material with the sequential movement of the nozzle through an array of coordinates. The toolpath can be altered simply by using a different array of coordinates. Infill toolpaths with varying angles can be created by systematically listing the required coordinates which they must pass through. Infill angle can be varied between layers or after a set of number of layers. These points are mathematically calculated at each layer through the infill toolpath function. In the first instance, an exaggerated number of lines are plotted at the required infill angle, ensuring that the whole rectangular boundary of the part is covered. The spacing between subsequent lines, t, is calculated as shown in Eq. 2, to satisfy the user-defined infill density.
Any points of intersection between these lines and the boundary of the part are saved in an array. The programme joins the subsequent infill lines of the toolpath, thus joining the coordinates. Material thickness is taken into consideration in the calculation of the adjoining toolpath between lines of infill, to ensure that part dimensions set by the user are not exceeded.

Varying extrusion speed
Speed can be varied between layers or after a set of number of layers. The programme works out the required change in speed for a predetermined number of changes depending on the initial and final speed. A G-code instruction altering the extrusion speed is added to the NC before toolpath creation commences, such that each layer is printed at the correct speed. Hence, the value of speed at each layer can be considered dynamic whilst the change in speed is fixed, to create a linear change of variable.
The programme also allows for speed variation within each layer. In this case, the G-code instruction for extrusion speed is added to each line of movement. Hence, each individual line is extruded at the same speed, with speed variations occurring in between lines. When both the change in speed change from initial to final values (inputted by the user) and the total material to be laid (calculated) are known, the speed at which the nozzle must extrude material at a certain point can be calculated using ratios and added to the respective line of code. Figures 3,4, and 5 demonstrate the functionality of the CAM software. Figure 3 shows the variation of toolpath angle, through 3 increments between 0 and 90°. Figure 4 shows discretisation of the extrusion speed, linearly varied between a prescribed minimum of 60 mm/s and maximum of 80-82 mm/s. The results are visualised as follows: Fig. 4 a, incrementally across the number of layers in the axial direction of the sample; Fig. 4 b, incrementally across a specific number of grouped layers through the axial direction of the sample; Fig.  4 c, incrementally, by discretizing across the in-plane direction of the sample. Figure 5 combines these functions to demonstrate the ability to vary both the toolpath angle and extrusion speed. In this instance, Fig. 5 shows a variation of toolpath angle between 0 to 90°and the extrusion speed between 60 mm/s and 82 mm/s, discretized in between each layer through the axial direction.

Results and discussion
The ability to vary toolpath angle is not a standard CAM function for FDM platforms. However, software such as Eiger (MarkForged Inc., [32]) does offer this functionality in line with the ability to design for composite AM materials. The in silico results demonstrate the capacity to discretize a linearly varying process parameter across the time and space of the finite AM build, represented as G-code. Finally, the combination of varying the toolpath angle, a parameter which is widely associated with the mechanical properties of material across multiple AM platforms and the temporal design of the extrusion speed, demonstrates the capacity of this software to design heterogeneous materials. The hypothesis that temporal design can vary material or mechanical properties of the material, as indicted by previous literature [23,25], requires further experimental validation.  This research demonstrates the temporal design principle on open-source FDM CAM software. The parameter of extrusion speed was chosen arbitrarily; however, in principle, any parameter within the capacity of an AM platform could be chosen, for example, the scanning speed on a selective laser melting platform [25]. Similarly, the linear variation of manufacturing parameters utilised in this research, in theory, could be expanded to a multitude of time functions. To experimentally validate the code, it will need to not only be tailored to a specific AM platform and its manufacturing parameters but also the material. This may require compensation for any lag between change in process parameters and material fusion.

Implementation
The key thing which this study demonstrates over recent studies that have explored the impact of varying process variables [27][28][29], and software which computationally optimises for a target parameter [14,15], is that the control of process parameters, and their impact on the design, resides with the design engineer. The advantages of this approach are that the design knowledge and control over manufacturing will inherently upskill the engineer, allowing both increased creativity in DfAM and bridging the knowledge gap between design and manufacturing. Thomas-Seale et al. [4] discuss in depth the barriers that software fragmentation, pocketed knowledge and a lack of creativity pose to the application of AM to more industrial products. Figure 6 shows that TDfAM is applied during the design for manufacture stage. In this research, it was integrated directly into the CAM, applying the temporal functions to the process parameters via the G-code. This approach assigns process parameters, and therefore indirectly the mechanical properties, during design for manufacture. However, these variables are validated through process simulation and FEA during design for function.   Figure 6 also shows that the exchange of information between CAD and CAM is one way, i.e. once the design has been discretised through the toolpath, the geometric design can no longer be edited. Whilst no additional changes in the type of dataset is required to implement TDfAM, the pre-existing "software-hopping" and multiple transformations between datasets (as discussed in the "Introduction" section) are still integral to the DfAM framework. Therefore, upon the integration of TDfAM, a design loop is created, where the CAM defines parameters that are validated earlier in the framework. This will require the designer to repeatedly iterate through the entire design framework. The concept of concurrent engineering, to consider all stages of the product life cycle synonymously, during the design process [33], is a well-acknowledged requirement of efficient product design. However, it still remains a challenge, through inefficient software and communication across the design-manufacture interface. The one-way propagation of information between CAD and CAM is a long-standing inefficiency within DfAM. Therefore, to increase the efficiency of the TDfAM framework, further development is required to make CAM synonymous with geometric design and mechanical validation. Referring back to Fig. 1, the largest obstacle to this development will be to overcome the discrepancy between the different spatial data formats required by each software.

Conclusions
Design in the context of AM has moved far beyond solely geometric considerations. To efficiently progress AM to more industrial end-use products, DfAM needs to incorporate considerations of both materials and manufacturing, into both design methods and software. This study proposes to achieve this through a paradigm shift in the perception of design, by reflecting the synergy of the spatial and temporal development of the form and the function in the growing foetus through DfAM. TDfAM was computationally demonstrated by discretising a linearly varying manufacturing parameter through AM build. The implementation of the technique is outlined on the existing DfAM framework. Whilst this research has demonstrated how the technique may easily be integrated into or alongside CAM, further development is required to increase the efficiency of design for manufacturing, an issue which is pre-existing in DfAM. This research has presented a new method of designing for AM materials, and offers increased creative scope to the technique. Nomenclature AM, additive manufacturing; TDfAM, temporal design for additive manufacturing; STL, stereolithography; CAD, computeraided design; CAM, computer-aided manufacturing; FEA, Finite Element Analysis; DNA, deoxyribonucleic acid; 4D, four-dimensional; TRIZ, The Theory of Inventive Problem Solving; NC, numerical control; G1, linear movement; X, X position; Y, Y position; Z, nozzle height; F, extrusion speed; FDM, fused deposition modelling; t, distance between laid material in same layer; 2D, two-dimensional Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Fig. 6 Theoretical software framework to support the implementation of temporal design for additive manufacturing