# Computed Tomography-Driven Design and Fused Filament Fabrication of Graded Density Bone Scaffolds
## 2 Materials and Methods
### Cam
#### 2.2.1 Lattice Structure Design  
As mentioned in the introduction, porosity design is a key element in scaffold engineering. The lattice structure is designed during G-code generation by choosing the infill type and infill density (\(\rho_{s}\)) and the lattice unit cell type to control the cell size [42]. The \(\rho_{s}\) can be calculated using the following function [42]:  
\[\rho_{s}=\frac{k_{c}\cdot m}{L_{cell}}\Big{(}1.25\cdot\varphi+\Big{(}\frac{\pi} {4}-1\Big{)}\cdot l_{h}\Big{)}, \tag{1}\]  
where \(L_{cell}\) is the unit cell dimension in mm; the coefficient \(k_{c}\) depends on the infill type and is defined as the ratio between the average length of the toolpaths within a unit cell and the cell size \(L_{cell}\); \(m\), referred to as the multiplicity, is linked to the symmetry properties of the lattice unit cell and indicates the number of independent toolpaths per unit cell in a single layer; \(\varphi\) is the nozzle diameter in mm and \(l_{h}\) is the layer height in mm. The \(k_{c}\) and \(m\) values of three infill types, named gyroid, rectilinear, and 3D honeycomb, are reported in Table 1.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Infill Type** & \(\mathbf{k_{c}}\) & \(\mathbf{m}\) \\ \hline Gyroid & 1.221 & 2 \\ Rectilinear & 0.707 & 2 \\
3D Honeycomb & 1.011 & 2 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Model coefficients for the considered infill types.  
The \(\rho_{s}\) functions for the three types of infills we considered are shown in Figure 2. The different infill patterns were chosen due to their 3D geometries and to ensure interconnected porosity, particularly in the case of the rectilinear pattern (Figure 3).  
The \(L_{cell}\) should be chosen based on the infill type, model coefficients, maximum extrusion width \(E_{w}\), and maximum relative density needed \(\rho\), which is usually set to 1 to provide a fully solid structure.  
The extrusion width \(E_{w}\) (Figure 4) has lower and upper limits \([E_{w,min};E_{w,max}]\), which relate to the material, extrusion flow rate, nozzle diameter, temperature, viscosity, and print quality [42].  
Considering the actual limits for part stability in the \(Z\) direction, \(E_{w,min}\) can be approximated as:  
\[E_{w,min}=l_{h}, \tag{2}\]  
while \(E_{w,max}\) can be approximated as:  
\[E_{w,max}=3\varphi. \tag{3}\]  
Figure 3: Close-up views of the gyroid (**a**), rectilinear (**b**), and 3D honeycomb (**c**) infill types, all printed at a constant setting of \(E_{w}=0.4\) mm. These images highlight the holes in the pattern that enable complete interconnectivity.  
Figure 2: Graphical representation of the model for the infill patterns considered in the case of \(E_{w}=0.4\) mm, \(\varphi=0.4\) mm, and \(l_{h}=0.2\) mm.  
For a constant \(l_{h}\) = 0.2 mm and a common nozzle diameter \(\varphi\) = 0.4 mm, \(E_{w,min}\) and \(E_{w,max}\) become 0.2 mm and 1.2 mm.  
Given the material, \(\varphi\), \(l_{h}\), and infill type, and consequently the \(E_{w,min}\) and \(E_{w,max}\), it is possible to compute \(L_{cell}\) as:  
\[L_{cell}=E_{w,max}\cdot m\cdot k_{c}/\rho, \tag{4}\]  
Therefore, the \(E_{w,max}\) and infill type establish the optimal value of \(L_{cell}\), and using Equation (1) or Figure 2, \(\rho_{s}\) could be determined.  
It should also be considered that the maximum flow rate \(Q_{max}\) for a single material must be identified. One solution is to test the extrusion behavior for each pair of extrusion temperature \(T_{ext}\) and speed (feed speed \(v_{feed}\) or movement speed \(v_{sp}\)) values with a fixed nozzle (material and diameter) to understand if the material is extruded continuously or not [43; 44].