A method of generating a continuous toolpath that can be biased in a user-specified direction of travel is proposed for the fabrication of density-based functionally graded parts through Additive Manufacturing (AM). The methodology utilizes Lin Kernighan's (LK) Travelling Salesman Problem (TSP) solver over a digitized grid within the contour domain to generate a toolpath with minimal lifts and a common start and end point. Three force-based methods of digitization, namely rectangular, circular, and contour adaptive, are proposed in this work. Each of these methods initialize from a structured or an unstructured grid, where the grid points are assumed to be connected with either linear (rectangular digitization) or a combination of linear and torsional springs (circular and contour adaptive digitization). Enforcing an equilibrium amongst the spring forces and appropriately selecting the ideal spring length, the necessary configuration of grid points can be generated for a desired toolpath.
The density of grid points (consequently, part density) can be varied through the user-defined input function or an image-based density map imposed on the ideal spring length over the contour domain. The proposed toolpath, as a case study, was implemented for printing a bone with density prescribed through a CT scan image stack. The CT scan of the printed part qualitatively establishes the conformity of the toolpath to the user-specified density gradient.