1 Introduction

Additive Manufacturing (AM) technologies have found applications in diverse industries such as automotive, aerospace, energy, consumer products and medicine [1,2,3]. Fused Filament Fabrication (FFF), one of several AM technologies, is the most accessible 3D printing technology due to its low-cost entry barrier, a strong user community and availability of open-source resources. For FFF [4], slicing software generates predefined print toolpaths based on parameters such as layer height, extrusion width, print speed, number of perimeters etc. Slic3r [5] is an open source FFF slicing software developed in 2011 and utilized by researchers employing open source FFF because of its customizability [6,7,8].

3D printing has been utilized for fabricating personalized pharmaceutical dosage forms for controlled drug release due to its precision and repeatability [9], the potential to fabricate highly porous and geometrically complex products, combine multiple drugs into one pill [10,11,12] and cost-effectiveness [13]. In 2015, the US Food and Drug Administration approved the first additive manufactured drug, using a proprietary technology [14]. Researchers in the last decade have begun exploring the manufacturing of tablets using FFF [11, 15,16,17,18,19,20,21]. Goole et al. observed reduced drug release rate with increasing fill density [22]. Goyanes et al. observed a strong correlation between the quantity of Fluorescein released from 3D printed pills and the fill density [15]. The Ibuprofen release was found to be significantly affected by modification of fill density in a study by Yang et al. [20]. The fill density of 3D printed scaffolds/constructs strongly influences nutrient and waste transport [23]. Fill density is also strongly correlated with compressive strength [24,25,26]. The compressive strength of constructs was found to rise from 40 to 140 MPa as the fill density rose from 20 to 40% in an investigation by Fu et al. [27]. The compressive strength of scaffolds changed from 2 MPa to 3.2 MPa corresponding to a change in fill density from 45% to ~ 62% in a study by Williams et al. [26]. Fill density is accurately controllable only via the intra-matrix amount of extruded material. Researchers have reported measured fill densities (porosities) and a few have mathematically modeled it, however, none have compared their measurements to apriori defined software values [27,28,29,30,31,32,33]. This is perhaps because commercial slicing software packages have closed source algorithms. Thus, fill density significantly affects critical bioscaffold and pharmaceutical construct functional and performance properties like weight loss, content release rate and compressive strength [34]. Moreover, it is possible that fill density may have a significant effect on the performance of constructs in other important applications.

While the relationship between raster width, gap and infill on the mechanical properties of 3D printed structures have been studied [35,36,37], to our knowledge there is no focused investigation of how slicing parameters affect the actual fill density in the printed structure, particularly in the pharmaceutical and biomedical domain. As aforementioned, the actual fill density in a printed pill or scaffold strongly influences important functional and performance characteristics such as weight loss rate, content release rate, compressive strength etc. and this fill density is almost entirely influenced by the print parameters defined at the slicing stage. Thus, the goal of this research is to investigate the effects of slicing parameters Extrusion Width (EW), Layer Height (LH), Slicing Fill Density (SFD) on the Measured Fill Density (MFD) of cylindrical constructs using Slic3r and a single nozzle. Slic3r is a widely employed open-source program and its algorithms are documented and publicly available. The cylindrical geometry is commonly employed in pharmaceutical and biomedical research, and these applications are the principal reasons the current research focuses on this geometry only. In addition, this paper also describes a mathematical algorithm to predict the construct fill density. This model is used to predict the proportion of material extruded in parallel rasters and raster-to-raster interconnects, which is a novel contribution to the literature. Although we used common 3D printing grade PLA material, the approach and model described in our work will be useful to 3D print constructs using medical/pharmaceutical grade material with targeted fill density. Furthermore, the methodology and results presented could be employable in other applications as well.

The manuscript is structured as follows; the 3D printing methodology is first presented including details of the study plan, 3D printing settings, measurement technique/tools and error calculation. This is followed by a section on the theory that includes a description of how Slic3r calculates fill density and the development of the mathematical model for PFD calculation. Next, the results from the study are presented and discussed considering measured sample weights, fill densities and associated errors, raster and interconnect lengths and verification of the PFD. In this section, limitations of the study are also discussed. Finally, the conclusions from the study are presented along with recommendations for continuing research.

2 Materials and methods

2.1 Study plan

From the Slic3r fill density calculation (Sect. 3.1), the 3 major slicing parameters affecting part fill density were identified to be EW, LH and SFD. With a 0.4 mm diameter nozzle the lowest value for EW used is 0.4 mm and the LH is set to 0.2 mm to ensure good bonding between layers in FFF 3D printing. The SFD is typically set to low values (< 40%) in biomedical and pharmaceutical applications to ensure sufficient strength while ensuring high enough porosity for achieving targeted weight loss and content release rates [29,30,31]. Therefore, the EW was set to 0.40, 0.44 and 0.48 mm, the LH was set to 0.15, 0.20 and 0.25 mm and the SFD was set to 15, 25 and 35% in the study. The three values for each control parameter resulted in a total of 27 (= 3 × 3x3) combinations (treatments) for a full factorial consideration. Each treatment was 3D printed in duplicates as shown in Table 1 resulting in 54 total samples.

Table 1 The 27 treatment combinations for the slicing variables Extrusion Width (EW), Layer Height (LH) and Slicing Fill Density (SFD)

2.2 3D printing of cylindrical samples

The 3D printer used for this research was the Anycubic Mega-S (Anycubic, Commerce, CA, USA) with PLA + brand material, a Poly(lactic acid) filament, (Anycubic, Commerce, CA, USA) with diameter 1.75 ± 0.02 mm and density 1.26 g/cc. The extrusion temperature and print speed were defined as 220 °C and 15 mm/sec respectively. A Rectilinear fill pattern with 0/90 degree alternating fill angles and 0 perimeters/outlines was defined. Slic3r 1.3.0 (by Alessandro Ranellucci) was used to generate toolpaths bundled within Repetier-Host 1.2.0 (Hot-World GmbH & Co. KG, Willich, Germany). The cylindrical solid models of the components to be printed were created in SolidWorks (Dassault Systemes Americas Corp., Waltham, MA, USA) and transformed to the STL format. Representative printed samples are shown in Fig. 1.

Fig. 1
figure 1

Representative 20 mm diameter x 9 mm height cylindrical samples for treatment number 14 (left) and 27 (right) with parameters Extrusion Width (EW), Layer Height (LH), Slicing Fill Density (SFD) set to 0.44 mm, 0.2 mm, 25% and 0.48 mm, 0.25 mm, 35%, respectively. Scale bar is 10 mm

The study used cylindrical samples of 9 mm height and 10, 20 and 30 mm diameter. The 20 mm diameter samples were used for the main experiments, and the 10 and 30 mm diameter samples were used to verify the predictive performance of the mathematical model. All of the 27 treatments for the 20 mm diameter were 3D printed in duplicates for the main analysis resulting in a total of 2 × 27 = 54 study samples. The effect of part diameter on PFD and MFD as compared to SFD was also examined with the smaller (10 mm) and larger (30 mm) diameter cylinders by 3D printing in duplicates resulting in a total of 2 × 2 = 4 samples with constant process parameters of 15% SFD, 0.40 mm EW and 0.20 mm LH as shown in Table 2.

Table 2 Levels of the slicing parameters, cylinder diameters and corresponding treatment numbers fabricated in duplicates to test the effect of part size on Measured Fill Density (MFD)

2.3 Sample weight and dimensional measurement

After 3D printing, each sample was carefully removed from the print bed and the weight was measured using a precision digital scale (Newacalox 8028, Newacalox, USA). The scale resolution was 0.001 g and accuracy was ± 0.005 g. The diameter of the sample was measured first at 0 degree and then at 90 degrees using the rasters as a guide (equivalent to X and Y axes) with a digital caliper (Fowler, Newton, MA, USA). The average diameter value from the two measurements was used for further analysis. The height along the Z-axis was measured once per sample using the same digital caliper. The caliper resolution was 0.01 mm and accuracy was ± 0.02 mm.

2.4 Predicted fill density (PFD)

The developed mathematical model was coded in Mathematica (Wolfram, Champaign, IL, USA) to calculate PFD, object weight, Raster Length (RL), and Interconnect Length (ICL). The inputs to the mathematical model are the object diameter and additive manufacturing parameters defined at the slicing stage; SFD, LH and EW. The details of the theory are presented in the Theory and Predictive Model Development section.

2.5 Measured fill density (MFD) and error calculations

The MFD was calculated by dividing the measured volume of the cylindrical sample by the measured volume obtained from caliper measurements. The numerator is multiplied by 1000 to convert cc to mm3.

$${\text{MFD}} = \frac{{{\text{Measured Weight}}/{\text{Material Density}} \times 1000}}{{\frac{\pi }{4} \times D_{{{\text{measured}}}}^{2} \times H_{{{\text{measured}}}} }} \times 100$$
(1)

The percentage error between SFD and MFD, MFD vs. SFD Error%, is calculated relative to the measured quantity according to

$${\text{MFD vs. SFD Error}}\% = \frac{{{\text{ABS}}\left( {{\text{SFD}} - {\text{MFD}}} \right)}}{{{\text{MFD}}}} \times 100$$
(2)

The percentage error between SFD and PFD, SFD vs. PFD Error%, is calculated relative to the slicing quantity according to

$${\text{SFD vs. PFD Error}}\% = \frac{{{\text{ABS}}\left( {{\text{PFD}} - {\text{SFD}}} \right)}}{{{\text{SFD}}}} \times 100$$
(3)

The percentage error between MFD and PFD, MFD vs. PFD Error%, is calculated relative to the measured quantity according to

$${\text{MFD }}vs. {\text{PFD Error}}\% = \frac{{{\text{ABS}}\left( {{\text{PFD}} - {\text{MFD}}} \right)}}{{{\text{MFD}}}} \times 100$$
(4)

3 Theory and predictive model development

The theory for the mathematical predictive model has two components, a general slicing component and a specific geometric component. The general slicing component is described elsewhere [34] and is included in this manuscript in Sect. 3.1 for completeness and ease of following the model development. The geometric component is specific to the current cylindrical geometry and is described in Sect. 3.2.

3.1 Slic3r fill density calculation

Slic3r assumes a cross-sectional shape of a rectangle with rounded ends for extruded rasters (Fig. 2a). The total width is EW and the height is equal to LH. The diameter of the semi-circular ends is LH.

Fig. 2
figure 2

a The cross-sections of two adjacent rasters with the fill area for computation boxed. The cross-sectional shape assumed for the rasters is an oblong i.e. a rectangle with semi-circular ends. The diameter of the semi-circular ends is assumed to be equal to the layer height. b Toolpathing within a cylindrical construct illustrating the nozzle center path (dotted line), raster length (RL), interconnect length (ICL), Gap and Extrusion Width (EW)

From this assumption and model, the extruded raster area (EA) is given by:

$${\text{EA}} = \left( {{\text{EW}} - {\text{LH}}} \right) \times {\text{LH}} + \frac{\pi }{4} \times {\text{LH}}^{2}$$
(5)

The Gap distance is calculated using a cross-sectional area-based model (Fig. 2a). Using the cross-sectional areas, we get:

$$\frac{{{\text{SFD}}}}{100} = \frac{{{\text{EA}}}}{{\left( {{\text{EW}} + {\text{Gap}}} \right) \times {\text{LH}}}}$$
(6)

For a fill density defined by the user (SFD), the software Slic3r computes the Gap distance based on a re-arrangement of Eq. 6 to yield:

$${\text{Gap}} = \frac{{\frac{{{\text{EA}}}}{{{\text{LH}}}}}}{{\frac{{{\text{SFD}}}}{100}}} - EW$$
(7)

The area-based fill density calculation relies on the assumption that the gap between rasters is vacant, but adjacent rasters are joined by interconnecting struts (Fig. 2b). However, this assumption works well at sufficiently large fill densities where more rasters are generated resulting in a reduced Gap with increasing SFD according to Eq. 7. Not accounting for the interconnect length in the calculation for low fill density causes substantial errors in the fill density calculation which could have an enormous bearing on the functional performance of biomedical scaffolds and rapid drug release pharmaceuticals generally printed at low fill densities.

The number of parallel rasters to be generated within a layer is determined by Slic3r based on the center to center spacing (Gap + EW), EW and part size. Dividing the part diameter by the spacing (Gap + EW) yields the number of spacings that can fit within the contour (Fig. 3). The number of initial spacings is then rounded down to the nearest integer value n_ini. However, the number of initial spacings (and consequently rasters) is not necessarily the number used for further processing in Slic3r. As such, an additional step is performed to ensure the number of spacings (n_spc) is always even and that of rasters (n_ras) is always odd. If the number of spacings is even then the number of parallel rasters is odd and is simply set at n_spc + 1. If the number of spacings is odd, then it is reduced by 1 such that n_spc (= n_ini—1) becomes even and consequently the number of parallel rasters generated per layer becomes odd (= n_spc + 1). For example, the schematic in Fig. 2b shows the number of spacings and parallel rasters to be 6 and 7, respectively.

Fig. 3
figure 3

Slicing preview of a cylindrical part illustrating the two right triangles with parameters considered in the model development. a is used to calculate the total interconnect arc length between parallel rasters and b is used to develop a model to calculate the total raster length for all parallel rasters

3.2 Mathematical model for predicting cylindrical part fill density (PFD)

A visual sample slicing preview of a cylindrical part is shown in Fig. 3a. The number of spacings is represented with variable n instead of n_spc for simpler notation. The length L is estimated as (Gap + EW) x n. The angle alpha is then found using:

$$\alpha = \cos^{ - 1} \frac{L/2}{R}$$
(8)

where \(R={D}_{cyl}/2-k\times EW/2\) and k is a constant with value 0.9587 included to assure the ratio in Eq. 8 is always less than or equal to 1.

Because of the nature of a circular geometry, the raster to raster interconnecting arcs are symmetrical on the top and bottom half. This fact can be used advantageously to calculate the total raster center to center interconnecting arc length directly using:

$${\text{ICL}} = \left( {\pi - 2 \times \alpha } \right) \times R$$
(9)

To calculate the total parallel raster length, we use the right triangle in Fig. 3 B. To find the length of each parallel raster (yi) we use R and the horizontal distance from the part center for the raster (xi). R is already known as \({D}_{cyl}/2-k\times EW/2\) and \({x}_{i}\) can be found using \(L/2~{-}~{\text{spacing}} \times i\) where i is incremented from 0 to n. Therefore, yi is found using the Pythagorean theorem as:

$$y_{i} = \sqrt {R^{2} - x_{i}^{2} }$$
(10)

where i goes from 0 to n. The total raster length (RL) is evaluated according to

$$RL = 2 \times \mathop \sum \limits_{0}^{n} y_{i}$$
(11)

The total extruded mass, m, for a cylinder with uniform layer geometry, is simply evaluated as the extruded mass per layer times the number of layers (cylinder height/LH) times density \(\rho =1.26\mathrm{g}/\mathrm{cc}\).

$${\text{Total Extruded Mass }}\left( m \right) = \left( {{\text{RL}} + {\text{ICL}}} \right) \times {\text{EA}} \times {\text{number of layers}} \times \rho$$
(12)

Then, the predicted fill density (PFD) is estimated according to:

$$PFD ={\text{PFD}} = \frac{{{\text{Total Extruded Mass}}}}{{{\text{Total Volume}} \times {\text{Density}}}} = \frac{m}{{\left( {\frac{\pi }{4} \times D_{{{\text{cyl}}}}^{2} \times H_{{{\text{cyl}}}} } \right) \times \rho }} \times 100\%$$
(13)

4 Results and discussion

4.1 Sample weight and dimensions

Sample weights for the duplicates within each treatment code were highly consistent. The weights were usually within 0.005 g of each other, with the maximum observed difference of 0.013 g and a minimum of 0.000 g between duplicates within each treatment/sample code. The ranges of measured height and average measured diameter for each printed component are presented in Table 3.

Table 3 Measured diameter and height ranges for all printed cylinders

4.2 Measured fill density (MFD), predicted fill density (PFD) and associated errors

The results for the defined slicing, predicted and experimentally measured fill densities and associated percentage errors for all 54 main experiments are graphically presented in Fig. 4. The results are grouped by the three slicing fill densities (SFD) defined in Slic3r. The figure shows the PFD as identical pairs (markers next to each other) since they are mathematically evaluated for all the treatments.

Fig. 4
figure 4

Fill densities and errors grouped by Slicing Fill Density (SFD) for all the 54 main experiments (X-axis values represent experiment numbers). The error between Measured Fill Density (MFD) and Predicted Fill Density (PFD) was less than 5% in all instances, whereas the error between SFD and PFD was nearly 20% in some instances

The PFD and MFD are consistently greater than the SFD defined in Slic3r for all control parameter combinations. A statistical analysis for all 54 data sets yielded maximum and minimum errors of 4.30 and 0.02%, respectively with a mean of 1.97% and a standard deviation of 0.90%. These consistently smaller errors between PFD and MFD indicate the holistic consideration and inclusion of all the control parameters in evaluating PFD. The results also indicate that the PFD values are a better indicator of the actual or measured fill density (MFD) than the SFD. This behavior is consistent in the whole range of fill densities examined as shown in Fig. 4. The SFD is thus an underestimate of the actual fill density for the range of parameters examined in this research.

The percentage errors between the corresponding sets of PFD and SFD are the largest at the smaller SFD and decrease as the SFD increases as shown in Fig. 4. An examination of the numerical values for these errors indicate a mean and standard deviation of 8.98 and 5.10% respectively. An analysis of the 9 data sets for the low 15% SFD value reveals a mean and standard deviation of 14.99 and 3.45% respectively with maximum and minimum values of 19.50 and 8.50% respectively. At the medium value of SFD of 25% for all 9-data sets, the statistical analysis showed improvement in all parameters (mean = 7.81%, standard deviation = 1.78%, minimum = 4.43%, maximum = 9.83%). The results of the analysis for the larger SFD of 35% revealed further improvement for all statistical parameters (mean = 4.13%, standard deviation = 1.20%, minimum = 2.30%, maximum = 5.82%). These results indicate that the difference between slicing and predicted fill densities reduces as the fill density increases, and thus the erroneous effects are much more prominent and important at the lower values of fill density.

A statistical analysis of the error between the MFD and SFD corresponding sets indicates that the largest error mean and standard deviation occur at the low SFD values and decrease as the SFD increases, as shown in Fig. 4. The low SFD values (15%) exhibit an average percentage error mean of 14.18%, standard deviation of 2.76% with a minimum value of 10.00% and a maximum of 18.62%. The medium SFD values (25%) show improved statistics with an error mean of 8.95%, standard deviation of 1.44% and minimum and maximum values of 6.79 and 11.88% respectively. The statistics at the higher SFD value (35%) show further improvement, i.e. the difference between SFD and MFD values reduced as follows; an error mean of 5.60%, a standard deviation of 0.96%, with minimum and maximum values of 4.32 and 7.31% respectively.

The fill density error analysis demonstrates that the PFD is a better indicator of the MFD than the SFD defined in the slicing software for the range of parameters studied in this research. It also demonstrates that the differences between SFD vs. PFD and SFD vs. MFD are largest at the low SFD values with these differences decreasing as the SFD increases. These differences are attributed to the contribution of the interconnect lengths.

These findings have important implications in the pharmaceutical and biomedical domain where open-source 3D printing is employed, because we have demonstrated that the software defined fill density cannot blindly be trusted to yield the desired fill density in the part. The other important parameters of layer height and extrusion width also have an effect on the actual printed construct fill density and this must therefore be considered apriori to the 3D printing of constructs wherein the actual fill density has a critical bearing on the functional characteristics of interest.

4.3 Predicted raster length and interconnect length and their contributions

The Raster Length (RL) and Interconnect Length (ICL) were not experimentally measured in this study. They were calculated for each set of control process parameters using the developed mathematical algorithm. The ICL contribution is important in evaluating the PFD, and as already discussed is the major source of error between the PFD/MFD and SFD.

The length of the total extruded material is the sum of the predicted RL and ICL. The percentage contribution of the ICL to the total length is evaluated according to the following formula, ICL% = ICL/(RL + ICL) × 100. The ICL% for the range of values considered in this research has only 27 values corresponding to the 27 treatments, since the ICL and RL predictions are identical for each duplicate within a treatment.

These evaluated values are then sorted from the maximum to the minimum and plotted as shown in Fig. 5. The ICL% is largest at the smaller SFD values and decreases as it increases, which indicates the importance of ICL% at the smaller fill density values. It is also observed that the ICL% is not constant for a particular group of SFD since it also depends on the other control parameters of EW and LH.

Fig. 5
figure 5

Interconnect length contribution (ICL) percent plotted in decreasing order for the 27 treatments grouped by Slicing Fill Density (SFD). The corresponding SFD and Predicted Fill Density (PFD) values are also shown

This behavior is explained by revisiting the definition of ICL as the total length between successive parallel rasters on the perimeter of the cylinder as discussed in Sect. 3.2 and the data presented in Fig. 5. As the fill density increases more rasters need to be generated and consequently the spacing between them decreases. The RL increases rapidly with additional rasters and the relative contribution of the ICL reduces. The statistical analysis of ICL% for each set of SFDs (15, 25, 35%) was also performed with the results presented in Table 4.

Table 4 Interconnect contribution (ICL)% statistical results for each set of 9 treatments per Slicing Fill Density (SFD) level for the 20 mm diameter cylinders

The effect of the cylinder diameter on the ICL% was also examined using the verification builds with 10 and 30 mm diameter cylinders for only one combination of control parameters (SFD, EW, LH) =  > (15%, 0.4 mm, 0.2 mm). The ICL% values for the three diameters of 10, 20, 30 mm are 32.38, 16.92 and 11.68% respectively (Table 5). The ICL% increased for the reduced diameter and decreased for the increased diameter compared to the 20 mm diameter cylinder. This analysis, for the single combination of control parameters examined, indicates the contribution of ICL% is much higher at smaller than larger diameters. The importance of ICL% at low fill density values is further compounded for cylindrical constructs of small diameters that could possibly be 3D printed for applications in pharmaceuticals, controlled drug delivery tablets or bioscaffolds with desired porosity, biodegradation or load bearing properties.

Table 5 Summary of the errors for the 3 diameter cylinders fabricated at 15% Slicing Fill Density (SFD), 0.4 mm Extrusion Width (EW) and 0.2 mm Layer Height (LH) for verification of the predictive model

4.4 Verification of analysis and predictive performance of model

The presented analysis and quantitative predictive performance of the mathematical model is verified by printing in duplicate two objects of different diameters. The control parameters were EW = 0.4 mm, LH = 0.2 mm, and SFD = 15%, and diameters of 30 mm and 10 mm as compared to the 20 mm diameter used in the main experiments. Predicted and experimentally measured quantities for the 10 mm, 20 mm and 30 mm diameters are shown in Table 5. The 20 mm diameter is included in this table to show the relative magnitudes of the corresponding quantities for the 10 mm and 30 mm diameters.

The results for the different diameter cylinders are obtained for a single SFD, EW and LH. The number of spacings and rasters increases as the diameter of the cylinder increases. This increase of the raster count and spacings has an effect on the raster and interconnect lengths and the ICL% which is larger at smaller diameter. The maximum toolpath length that can be extruded along raster interconnects has a ceiling value close to half the circumference (\(\pi /2\times diameter\)), whereas the maximum toolpath length along rasters has a ceiling value of approximately the cross-sectional area divided by EW, (\(\frac{\pi }{4}\times {diameter}^{2}/EW\)). Therefore, for a constant set of slicing parameters, reducing the cylinder diameter increases the relative proportion of material extruded in the interconnects for the same slicing fill density and hence the error.

The PFD and MFD values were always larger than the SFD for the levels of parameters studied. It was observed that the PFD (and MFD) slightly decrease as the cylinder diameter increases which was associated with a decrease in the ICL%. The MFD vs. PFD Error% values were much smaller than MFD vs. SFD Error% and even smaller than the SFD vs. PFD Error%. This general fill density behavior i.e. MFD vs. PFD Error% less than MFD vs. SFD Error% and SFD vs. PFD Error% was also observed for all the control parameter combinations for the 20 mm diameter cylinder. The relative magnitudes of the fill density errors indicate that PFD% was a better indicator of the actual MFD% than SFD% defined in the slicing software. This behavior was also observed for the 20 mm cylinder. It was also observed that for the control parameters (SFD, EW, LH) defined, the fill density errors improved (got smaller) as the cylinder diameter increased which correlates with a smaller ICL%.

The analysis of the results for the 10 mm and 30 mm cylinders further demonstrated the quantitative predictive performance of the mathematical model. The model results were better indicators of expected and predicted quantities such as FD, ICL%, and RL% as well as actual material usage.

It is thus important to be particularly careful when fabricating cylindrical scaffolds or pills with relatively small diameter and fill density using open-source software in order to ensure that the actual part fill density is accurate compared to the targeted value. Commercial PLA filament such as the one used in this study is usually amorphous and lower molecular weight to allow easier melt-extrusion, since crystallinity and higher molecular weight materials are generally harder to melt-extrude [38]. Even though we used commercial PLA material, the developed model and results presented could be employed with similar extrudable materials in applications requiring more accurate control of the material extruded within a cylindrical construct such as for targeted drug dosage loading, timed content release and tailored compressive strength common in the pharmaceutical and biomedical research space. The model could be applied to any cylindrical shaped construct. However, it is important to remember that this model is expected to be of true value primarily in situations where the cylinder diameter is relatively small (such as for pills and scaffolds), and the fill density is less than 40%. It is also true that different slicing software perform fill calculations differently, however, Slic3r being one of the first open-source software and in widespread usage, it is possible that other slicers employ similar methodologies. Future research could focus on evaluating the developed algorithm across different slicing softwares. Furthermore, the in-depth description of the fill process provides an improved understanding of the slicing calculations and could be helpful in spurring other yet unknown innovations in the 3D printing field.

5 Conclusions

In this research, we investigated the effects of slicing parameters on MFD for a cylindrical geometry. We found the MFD to deviate substantially from the defined SFD at low fill densities with a maximum error of 18.62% for the 20 mm diameter cylinder and 19.84% for the 10 mm diameter cylinder. The primary reason for this difference was that the raster-to-raster interconnects are excluded in the original fill calculations performed by Slic3r. The deviation between MFD and SFD increased when the cylinder diameter was reduced and decreased when the diameter was increased. The predictive model developed in this research was able to consistently predict measured fill density to within a 5% maximum error in all 58 experiments. Our work highlights the perils of employing open-source 3D printing without a sound understanding of the parametric relationships in applications requiring a fairly high level of fill density accuracy in the printed construct. Our findings could be helpful in fabricating pharmaceutical tablets and biomedical scaffolds with more accurate part fill density that could potentially lead to more accurate mechanical properties and weight loss behavior. Furthermore, the novel explanation of the in-matrix material in terms of the raster and interconnect lengths provides intriguing insight into the distribution of material within the 3D printed matrix of constructs that could lead to other innovations in the burgeoning pharmaceutical 3D printing field. Future research could focus on developing algorithms to accurately predict fill density for arbitrary shapes and validate their performance across multiple open-source and commercial proprietary slicing software packages.