Prof. Daniel Tortorelli and Mr. Felipe Fernandez Ayala from the University of Illinois have developed a system and method for optimal toolpath generation for additively manufactured composite structures. With this techniques, it is easy to impose Direct Ink Writing (DIW) manufacturing constraints such as no overlap, no sag of just-printed material, minimum radius of curvature of each toolpath, and toolpath continuity. In addition, to minimize manufacturing cost, the system formulates and solves a travelling salesman problem to obtain the shortest continuous toolpath for each layer that avoids overlap and crossing holes.