Generative Gcode is produced using Grasshopper to make FDM 3D printing toolpaths part of the parametric design process. Engineers are always taught to design for the process, which means understanding the limitations of the material and the machines used to create it. 3D printing has historically been considered a prototyping tool, essentially because of the limitations of the materials and process. The limitations of FDM printing are the anisotropic properties due to the slicing software determining where to extrude material. Slicing software was originally developed with prototyping in mind, where the end goal was to produce a solid object out of extruded plastic. The FDM process has many advantages due to its low cost, availability, and scalability. If you design a part while considering the process, it can be a very viable resource. Better yet, design the toolpaths to create the part.

Generating gcode using Grasshopper is fairly straightforward. Gcode is essentially a list of coordinates for the tool to move to and a feed rate for the speed to move. With FDM, the extruder acts as the 4th axis. The amount of extrusion is a function of the distance traveled and the desired bead width. It can get more complicated when considering retraction and nozzle lifting to reduce strings, but these are the basics. When designing toolpaths you consider your layer height, then produce a series of curves on each layer for the tool to follow. These paths were created by modulating and rotating each layer of a sliced object. The modulation gives the walls structure while the rotation determines the shape of the structure.

When considering structural strength, you have to think about the material structure as a fiber. The fibers have good tensile strength but not very good compressive strength. The shear strength is a function of how much surface area of contact there is between layers, so wider, overlapping paths have more strength in the x/y direction. This is a continuous truss toolpath for making structural walls inspired by Arthur Mamou-Mani and his designs for Food Ink's pop-up resturants The idea is to create a corrugation pattern that will have better compressive strength, much like an open-web truss.

For structural infills, typical rasters or honeycomb patterns are very anisotropic. They are basically a 2d extrusion, so they have good properties in the Z direction but poor in the x/y. 3d infills are like a shell based lattice structure, be tessellating parallelohedra. These are polyhedrons that can tessellate prefectly in 3 directions. These have similar structural properties in both directions. An interesting one is the gyroid. It has no planes of symmetry, constant curvature so no stress concentrations, and is one continuous surface.

This was an experiment in creating 3D toolpaths for FDM. This could be used for processes much like layup fabrication. Typically when using fiberglass or carbon fiber, you first create a positive "buck" that you lay the material onto. Fiber direction plays a big factor in the strength of the final part. With FDM, you could print the buck in one material, then secondly print a 3d surface in another material as a continuous strand, having complete control over fiber direction. For this to work well, a 5 axis machine would be needed to extrude onto complex surfaces.

There is currently an open source for plugin for generating gcode called Silkworm We will be integrating our tools with silkworm to create robust toolpaths for FDM.