1 Introduction

Additive manufacturing (AM) provides unique technical and economic advantages including the ability to fabricate highly complex geometry, compatibility with generative design methods, and the opportunity for inexpensive fabrication of low-volume niche and customised parts [1, 2]. These attributes enable the innovative engineering design of highly complex and high-value commercial products, many of which have technical requirements that are fundamentally correlated with surface roughness, including (Fig. 1):

  • Medical implants, whereby the interaction between additive manufactured implant and biological tissues is highly dependent on the associated surface roughness. Powder bed fusion (PBF) AM technologies are often applied, resulting in a surface roughness in the micrometre scale; this roughness has been demonstrated to influence bone ingrowth (osseointegration) [3] and interaction with bacterial biofilm formation [4].

  • Hydraulic and thermo-fluidic applications control fluid flow and associated heat transfer. These geometrically complex systems are potentially challenging for traditional manufacture, and PBF provides an opportunity for the fabrication of near-net conformal flow structures [5] as well as enabling part-consolidation for reduced risk and cost [6]. These commercial PBF applications require that the roughness aspects and influence on fluid response are measured and accommodated.

  • Dynamically loaded structures are susceptible to the fatigue failure mode, which is highly dependent on surface roughness [7]. Additive manufactured structures are associated with geometric surface roughness attributes including the effect of layer wise manufacture (resulting in the stair-step profile), adhered powder particles, and AM-specific processing parameters such as laser scan path [8]. The effect of these AM roughness attributes on fatigue response is poorly understood [9].

Fig. 1
figure 1

High-value engineering applications with roughness-critical functional requirements. Inset identifies challenging location for roughness-measurement (Elsevier permission 5343451242605 [2])

As highlighted by the above points, the physical characteristics of additive manufactured surfaces and part topologies have unique requirements for surface roughness characterisation. However, acquiring surface measurements using traditional methods requires line-of-sight access which is not possible for many additive manufactured parts featuring overhanging surfaces, internal surfaces, and complex topologies. To address this gap, a method is proposed to characterise additive manufactured surfaces with greater certainty, using existing technologies that are not restricted by line-of-sight. The method is validated against traditional methods for surface characterisation on parts with accessible surfaces and is then applied to more complex geometries. Importantly, the limitations of roughness measurement as relates to the image resolution are examined. Furthermore, investigation of the image filtering reveals a weak dependence of the measured profile roughness across a wide range of thresholding values.

2 Background on roughness characterisation

To understand the research gap, we first look at current definitions of roughness and their application to AM.

2.1 Standard measures of roughness

Surface roughness is formally characterised in terms of the variation in local geometry. Profile measurements are performed along a surface contour,\(z\left(x\right)\), whereas areal measures consider a two-dimensional surface projection, \(z\left(x,y\right)\). International Standards Organisation (ISO) standard measurements of profile roughness have been defined (Table 1) to characterise roughness aspects of interest over a given sample length, l, including arithmetic mean deviation (Ra), root-mean-square deviation (Rq), peak and valley height (Rp,Rv), and peak-to-valley height (Rz).

Table 1 Standard profile roughness parameters [10, 11]

The roughness of a surface is related to the variations of the surface height which occur at short wavelengths, while medium and longer wavelengths are respectively referred to as waviness and form. Filtering is used to separate roughness variation from the waviness and form. Gaussian, spline, and their related robust filters are recommended by ISO for roughness filtering. Other filtering methods proposed in the literature include Fourier transforms, wavelet transforms, and singular spectrum analysis [12].

2.2 Surface roughness characteristics associated with AM

AM processes introduce multiple new surface textures not previously observed via other traditional manufacturing methods [13]. These include the stair-step effect, AM process effects, design parameter influences, and the material feedstock. For powder bed fusion, these effects include stair stepping, partially melted particles; globules of solidified meltpool [14]; open surface pores; and surface roughness influenced by the local scan pattern and melt pool dynamics. For material extrusion (MEX) specimens, these effects include stair stepping, rounded peaks, relatively deep valleys, and a cusp geometry at the abutment of adjacent tracks [15, 16].

Surface roughness parameters can quantify the effect of variation in AM process parameters on manufacturing quality [17], where, for example, lower scan speed and increased power have been observed to reduce Ra of the upward-facing surface [18], but increase Ra for the lateral surface roughness due to increased balling [14]. Roughness of surfaces produced by AM can be influenced by post-processing. Sun et al. showed that both chemical etching and surface machining reduced surface roughness (Ra and Rz) by approximately 70% for PBF Ti-6Al-4 V specimens, thereby increasing strength and extending strain to failure to within the range of mill-annealed samples [19].

2.3 Selection of parameters for surface characterisation associated with AM

The surface roughness parameters listed previously in Table 1 are some of the most commonly reported [20]. However, the complexity of additive manufactured surfaces may not be sufficiently described by these parameters. The selection of appropriate roughness parameters to characterise specific surface texture can be achieved through an analysis of variance, and when analysed across multiple length scales also provides the appropriate decomposition scaleFootnote 1 [21]. The ability for standard roughness parameters to reveal underlying AM attributes is being assessed, including stair-stepping effects [22] and the size and spacing of adjacent tracks on the upper surface of MEX or PBF fabricated parts [23, 24]. Filtering methods have been proposed that better quantify deep surface recesses [25] as have non-standard parameters for better representing the quality of additively manufactured surfaces.

For example, Cabanettes et al. investigated roughness parameters that are sensitive to metal AM build and post-processing surface variations [13]. These include surface skewness, Ssk, to capture stair-stepping effect; surface fractal dimension, Sfd, and root mean square gradient, Sdq, of the upward facing surface increase with build inclination; and the profile Rsm parameter to measure the spacing of parallel scan tracks. Elsewhere, surface skewness, Ssk, indicated valleys due to open pores on the surface of high speed sintered polymer specimens, while kurtosis, Sku, showed sharp peaks and valleys [26].

3 Roughness measurement

Roughness characterisation is directly dependent on the limitations of physical measurement strategies. This section explores the current state of the art.

3.1 Contact and non-contact methods for acquiring surface roughness

There are multiple methods available for measuring surface variation, including tactile and non-contact methods, each having specific attributes to consider. Tactile methods require direct physical contact between the mechanical probe and the surface for measurement. The probe travels along a surface profile, recording vertical deflections. A mechanical filtering effect is introduced on the valleys which is dependent on the size of the probe tip; as the size of the tip increases, contact is made with the highest peaks only [15, 27].

There are a variety of non-contact methods for acquiring surface roughness, many of which may be classified as optical methods (involving the visible range of the electro-magnetic spectrum). Early optical methods often used fringe methods [28] and examined an area of the surface rather than a single profile. Confocal microscopy, coherence scanning interferometry, and focus variation microscopy are currently amongst the most prominent measurement methods [17, 29].

Measurement of surface deviation at higher resolution, including the nanometre scale, requires wavelengths of the electro-magnetic spectrum that are shorter than the visible range of optical microscopes. Newer scanning microscopes including scanning electron microscope (SEM) [30], scanning tunnelling microscope (STM), and atomic force microscope (AFM) offer these finer scale measurements.

The aforementioned non-contact methods provide non-destructive measurement of surfaces to which they have line-of-sight, but they cannot measure internal surfaces such as exist in an additive manufactured lattice structure. Computed tomography is the only viable commercial method for non-destructive evaluation of these internal surfaces [31].

3.2 Computed tomography–based methods for surface roughness measurement

Computed tomography (CT) projects high-energy electro-magnetic radiation (X-rays) at an object of interest from a range of directions. The object absorbs and scatters a proportion of the incident X-rays, the proportion being dependent on the atomic number of the object’s material, its thickness along the X-ray trajectory, and the energy distribution of the X-rays. The transmitted X-rays are then recorded as a transmission image (these images include a perspective angle due to the source position). Reconstruction techniques are then applied to convert the transmission images to a series of greyscale images representing parallel cross-sectional slices. The differentiation and identification of objects and features within these greyscale images are commonly achieved through selection of greyscale levels, known as thresholding. The volumes and surfaces identified by the thresholding can be saved in an appropriate digital format (such as STL — STerioLithography or Standard Tesselation Language; DICOM — Digital Imaging and Communications in Medicine; or 3MF — 3D Manufacturing Format) for further processing.

Unlike contact or optical profilometry, CT allows non-destructive imaging of internal surfaces; however, roughness is not directly observable in CT data. In response, several methods have been proposed for the evaluation of surface roughness from CT data, including:

  • Extraction of profile edges of an object from a single 2D slice of the 3D CT data, providing profile roughness parameters, Pa, Pq, and Pt [32]. Figure 2a and b show results extracted from a carefully aligned face-centred cubic (FCC) lattice, providing profiles for a strut’s upper and lower surfaces.

  • Conversion of CT-based STL surface data to point cloud data and then input to a commercial surface characterisation software [33]. The ten steps of the conversion process were trimming, vertex extraction, alignment, deviation check, cropping, elimination of re-entrant features, project to plane, cropping, filtering, and finally areal roughness parameter calculation. Figure 2c and d show a comparison of the CT-based and optical-based surface deviations. Careful technique and parameter selection for the CT derived areal roughness measurements provides similar results (Sa within 2.5%) as with conventional optical measurement techniques [33].

Fig. 2
figure 2

Examples of roughness data extracted from CT. a CT cross sections through lattice struts, b profile identification from binarized image (John Wiley and Sons, permission 5343460696413 [32]), c surface deviation obtained through CT, compared with d surface deviation obtained through focus variation (permission not required under Creative Commons licence [33])

3.3 Limitations of CT to roughness measurement

Despite the opportunities enabled by CT methods, several technical limitations and challenges exist for their application to roughness measurement [34, 35]:

  • Scaling: The magnification factor for detector pixel size to voxel size is determined as the ratio of source-to-detector distance (SDD) and source-to-rotation-centre distance (SRD).

    • Inaccuracies in SRD is the main source of errors in voxel size [35].

    • Focus drift due to tube temperature variation also affects SRD [36].

  • Cone-beam/Feldkamp artefacts: For common cone-beam source and flat panel detector arrangements, the projection of the object shifts in both the X and Y directions, so the accurate reconstruction is very sensitive to the alignment of the source, the rotation axis, and the detector [37].

  • Practical limitations on resolution: Guidelines for current industrial scanners suggest that the highest possible resolution is 2000 times smaller than the largest width of the sample [38]; this can reduce to 1000 times smaller when scanning to eliminate certain imaging artefacts.

  • Blurring of images: With the increased magnification associated with placing the object closer to the source comes the increase of blurring caused by the finite size of the X-ray spot [37].

  • Beam hardening: The penetration of X-rays through materials reduces with photon energy. So, fewer photons transverse thicker and denser materials making these regions appear duller.

    • Image reconstruction algorithms often incorrectly assume linear attenuation causing a cupping artefact, [35], or capping artefact if overcorrected [34], commonly observed at the centre of cylindrical samples.

    • Dark bands or streaks between two dense objects are another symptom of beam hardening [34].

    • Beam filtering removes lower energy photons from the beam, which can reduce the effects of beam hardening [34], but at the expense of reduced intensity and longer scan times.

  • Scatter: Coherent (Rayleigh) and incoherent (Compton) scatter contribute to the signal and error of the CT image and particularly at the object boundary [35].

  • Partial volume effects: Objects captured in the projection images from some positions and not from others can cause shading artefacts in the image [34].

  • Reconstruction of volume data: Algorithms are used to convert projection data into volume data, each with their own benefits and limitations. Filtered back projection (FBP) is relatively fast but lacks corrective measures, while iteration methods enable additional corrections but with time and computational cost [34]. More recently, machine learning has been applied for CT reconstruction [39].

  • Processing of volume data: The identification of object surfaces within the volume data can be challenging. Dissimilar materials may be distinguished by change in intensity; however, the change at the interface tends to be broad due to many of the above phenomena. Thresholding to identify surface interface is one of the simplest techniques but may be influenced by local errors [35].

  • User preference and experience: Choice of measurement parameters, setup of the workpiece, and expertise in postprocessing influence the results of CT-based dimensional measurement [37].

To reduce errors, master objects with known dimensions can be used to calibrate for voxel size scaling and reduce the contribution of threshold selection to the total dimensional errors [36]. Where accessible, the near coherent beam of a synchrotron X-ray beam can reduce issues relating to scaling and cone beam dispersion common to other systems.

Of the factors identified above, the CT resolution which sets the imaging scaling and the greyscale threshold selected to identify the material surface are perhaps the simplest for the user to control, made at the start and end of the image acquisition process, respectively. The influence of resolution and threshold on the accuracy of surface roughness measurement from CT data will be explored.

4 Proposed CT-based roughness measurement

CT technology and image analysis methods enable opportunities to acquire roughness measurements of surfaces that do not have direct line of sight or access for a contact profilometer. This is particularly important for complex additive manufactured components, for example, lattice type structures composed of cylindrical strut elements. However, there is a need to better understand the effect of CT data resolution and thresholding on the evaluation of surface roughness. The present work introduces a method for extracting roughness profiles along cylindrical strut elements and then compares the roughness measurements from the CT-based profile with measurements from a microscope using focus variation. In this comparison, the effect of CT resolution and greyscale thresholding on the roughness measurement is explored. Drawing inspiration from the Nyquist Sampling Theorem [40], the impact of CT resolution upon the measured surface roughness is investigated to highlight the limitations of the method with current CT technology.

The proposed CT-based roughness measurement, or virtual stylus method consists of several sequential stages to acquire profile roughness from CT data (Fig. 3). These stages are CT image thresholding (Section 3.1), image registration and axis determination (Section 3.2), and image profile extraction, filtering, and analysis (Section 3.3). Finally, the roughness metrics are calculated for the original and filtered profiles (Section 4.4). This proposed method is applied to determine the profile roughness of otherwise inaccessible surfaces of lattice strut element samples fabricated by various AM technologies (these samples are described in Section 6).

Fig. 3
figure 3

Proposed CT-based virtual stylus method

4.1 Step 1: Image thresholding

The identification of an objects surface boundary from CT images is a critically important step. Each material will scatter specific X-rays energy based on its atomic density, thickness, and surface texture. Thresholding is used to isolating a solid object from the surrounding environment according to the distribution of greyscale values (Fig. 4). The ISO50 method selects the threshold value to be the mean of the air and material peaks [41], while the Otsu method [42] uses cumulative moments of an image’s greyscale histogram to better account for the distributions of air and solid material.

Fig. 4
figure 4

Thresholding of grey-scale CT reconstruction image stack. The histogram of greyscale values shows distinct regions for (air) background and (Ti6Al4V) strut material

4.2 Step 2: Axis determination and image registration

Once the image stack is binarized, the cylindrical strut can be isolated (Fig. 5a). This is achieved through the evaluation of the centroid and principal moments of inertia. The strut central axis is identified as the principal axis associated with the minimum principal moment of inertia. Alternatively, the central axis may be determined by fitting a line through centroids of consecutive strut cross-sections. This image registration allows the identification of cross-sectional planes (and associated profiles) at selected angles, θ, around the central axis (Fig. 5c).

Fig. 5
figure 5

Method for generating cross-sectional images around cylindrical strut central axis; isolation of strut and identification of its principal axes and the central axis (a). Rotation of image plane around central axis (b). Example cross sections extracted from CT data to provide profile roughness measurements (c)

4.3 Step 3: Image profile extraction, filtering, and analysis

From each generated cross-section image, the profiles are found using the edge detection algorithm presented by Alghamdi et al. [43], with the additional capability of distinguishing the internal and external profile at re-entrant features. The algorithm examines the binary array representing the vertically aligned binarized image composing of ones and zeros. The ones represent solid material, the zeros represent air. At each row, the algorithm finds the start and end of all runs of consecutive ones representing contiguous strut material. For the internal profile it identifies the start and ends of the longest consecutive run of ones at each height. While for the external profile, the first one in the array till the last one in the array defines the diameter of the outermost strut material. The pixel locations are scaled and stored as the left and right surface profiles. The edge detection algorithm is sensitive to internal pores, both enclosed and open to the surface. By preparing the image with a binary filling step, only open surface pores are included in the roughness and diameter determination. Each profile is then filtered using convolution of the Gaussian filter [44] with cutoff, \({\lambda }_{c}\), to separate the shortwave length roughness from the longer wave length waviness and form (Fig. 6). The end effects region is removed before roughness parameters are calculated according to Table 1.

Fig. 6
figure 6

Extraction of profile and roughness data from CT of the downward facing surface of an PBF cylindrical strut fabricated at 30° inclination to the build platen. Gaussian filter with cutoff, \({{\varvec{\lambda}}}_{{\varvec{c}}}\), separates the roughness from the longer wavelengths

4.4 Step 4: Roughness evaluation

Once the surface profiles are extracted from the images and filtered, roughness parameters, Ra, Rq, Rp, Rv, and Rz as defined in Table 1, are then determined for each image profile. Where sufficient length is available, the filtered profile can be split into a number of samples with specified sample length, \(l\). Analogous parameters for the unfiltered profile (Pa, Pq, etc.) and the long-wave (waviness) (Wa, Wq, etc.) are also evaluated for each cross-section image.

5 Convergence assessment

In the following subsections, the minimum sample length required to achieve convergence of the profile roughness parameters is investigated (Section 5.1), as is the influence of CT resolution and thresholding upon accuracy and repeatability of roughness parameter calculations (Section 5.2).

5.1 Minimum sample length

Given a proxy surface profile \(z\left(x\right)\) represented by a sinusoidal waveform (Eq. 1), where \(a\) is the profile amplitude and \(\lambda\) the wavelength of the sine wave. The expected values of the profile roughness parameters may be determined by evaluating the integrals provided in Table 1 for a sample length, \(l\).

$$z\left(x\right)=a\mathrm{sin}\left(\frac{2\pi x}{\uplambda }\right)$$
(1)

In the limit, \(l\to \infty\), each of the profile roughness parameters converges to a specific limit value which is either constant or proportional to the amplitude, but independent of the associated wavelength. These limit values for the integrals are also determined when \(l\) is a precise integer multiples of \(\lambda\). In practical terms, each profile roughness parameter requires a finite minimum sample length for its finite integral to converge on the limit value within a specified tolerance. Table 2 shows the limit value for each of the profile roughness parameters, along with the sample length, measured in wavelengths, required to achieve the convergence tolerance of 10%, 5%, and 1%. Rz converges quickest, reaching its limit value within one wavelength; meanwhile, Rp and Rv oscillate anti-synchronously to one-another due to a continuously shifting mean line, both returning to the limit value at sample lengths that are integer multiples of the sinusoidal wavelength. Ra and Rq approach within 5% of their limit values inside of two wavelengths, but take more than five wavelengths to remain within 1% of the limit value.

Table 2 Profile roughness parameter limit values for roughness profile, \({\varvec{z}}\left({\varvec{x}}\right)={\varvec{a}}{\varvec{sin}}(2{\varvec{\pi}}{\varvec{x}}/{\varvec{\lambda}})\), and required sample lengths (in wavelengths, λ) to achieve 10%, 5%, and 1% errors

These convergence results indicate a theoretical minimum sample length required to correctly identify the contribution of a single sinusoidal wavelength within each of the roughness parameters.

The results of Table 2 are based on analytical solutions of integral equations within a finite length. The representation of the profile by pixels, as occurs in the processing of greyscale and binary images such as those from CT reconstruction, introduces further limitations on the accuracy of the calculation of the roughness parameters due to the relative resolution of the pixels defining the waveform.

5.2 Resolution limitations

To explore errors in profile roughness measurements associated with imaging resolution, the sinusoidal proxy surface profile of Eq. 1 is now considered at different levels of pixelation. The imaging resolution determines the voxel size, VL, and the associated accuracy of this voxelised approximation. Using computational analysis, the resolution required to achieve an acceptable level of measurement accuracy can be determined. An example of the voxel approximation is shown in Fig. 7. Implementing the 50% global thresholding value in a similar manner to other work [45], the voxels with 50% or more of their volume contained inside the profile were classified as solid regions and the remaining classified as void.

Fig. 7
figure 7

Voxel approximation of sinusoidal profile, denoted by solid red line. Voxel length, VL, wavelength, \({\varvec{\lambda}}\), roughness approximation, Rt.*, and true roughness, Rt, are defined, where Rt = 2 × a, with a being the amplitude of the sinusoidal profile

The error in the voxel approximation characterisation, \({E}_{R}\), is quantified by finding the difference between the roughness of the profile, \(R\), and voxel approximation, \({R}^{*}\)(Eq. 2).

$${E}_{R}=\left|R-{R}^{*}\right|$$
(2)

In this analysis, only voxel sizes less than or equal to the wavelength were considered. Figure 8 shows the error climbing to a maximum at VL/\(\lambda\) = 0.5, where the voxel representation can take the form at a continuous height. Voxel sizes larger than half the wavelength which return an error less than the maximum are caused by aliasing, as the Nyquist sampling theorem suggests. Previous imaging investigations support this, stating that a resolution approximately half the dimension of features of interest is required in order to accurately represent them [46]. This can be seen in Fig. 8 where no clear trend in the error data exists above VL/λ = 0.5. Therefore, the domain limit was set at VL/\(\lambda\) =1 to show the aliasing effects. The data was considered to have converged once the error is less than 10%, i.e., ER/R < 0.1.

Fig. 8
figure 8

Measurement error for Ra, Rq, and Rt of sinusoidal profile. Error, E, normalized by the roughness, R, is plotted against voxel length, VL, normalized by wavelength, \({\varvec{\lambda}}\). Full range of the investigation is shown in the upper figure; for clarity, a smaller range of the same data is shown in the lower figure

Surface roughness metrics Ra, Rq, and Rt were used to quantify error as all are commonly reported. Ra and Rt required VL to be at most 8% of the wavelength to converge, while Rq converged when VL was less than 12% of the wavelength. However, the required voxel size to reach convergence as a percentage of the total profile height is listed in Table 3. With the exception of \(\lambda /a\) = 5, each of the roughness approximations in Fig. 8 had converged when VL < \(\lambda /10\).

Table 3 Maximum voxel size VL to achieve convergence (ER/R < 0.1) as a percentage of total profile height, Rt

5.3 Case study — real profiles with re-entrant features

The voxel size analysis used for the sinusoidal wave was then applied to case study profiles extracted from [47]. These profiles were extracted from images representing a 3.6-mm length sample at 0.003 mm/pixel resolution. Error plots based on external and internal surface characterisations for five profiles are shown in Fig. 9a and b, respectively. For external characterisation, if multiple z coordinates exist for a single x coordinate, only the highest point will contribute to the roughness, the same principle as line-of-sight characterisation; see Fig. 9c. For internal characterisation, if multiple z coordinates exist for a single x coordinate, only the lowest point will contribute to the roughness; see Fig. 9d. A re-entrant surface feature is an example where the two methods would yield different results.

Fig. 9
figure 9

Error plot for 5 surface profiles from [47] based on a external characterisation and b internal characterisation. Voxel approximation of profile 3 showing c external characterisation and d internal characterisation

The total profile height ranges from 59 to 80 for profiles 1 to 5. The roughness values of these profiles obtained using the methods in this paper were within the standard deviation set in the original published work (Fig. 10).

Fig. 10
figure 10

Average roughness values for external method, internal method, and reference paper values [47]. Error bars represent one standard deviation from the mean

Converged voxel approximations for profile 3 are shown in Fig. 9c and d. The required VL to achieve convergence as a percentage of the profile height across all case study profiles is shown in Table 3. Convergence occurred for Rt when VL was 6% and 8% of profile height, for the sine wave investigation and for the external characterisation of the case study profiles, respectively. Theoretically, these two cases follow the methodology of a line-of-sight characterisation. All case study profile errors converged with a larger relative VL than the theoretical sine wave error. For the case study profiles, Ra and Rq converged with a larger relative VL when compared to Rt. A pixel size approximately 1/7th the Rt value was required for the profile parameters Ra, Rq, and Rt to converge within 10% of the values calculated for each curve extracted from profile images.

6 Analysis and results

To validate the proposed virtual stylus method, a variety of samples were fabricated to represent AM technologies, materials, and geometries of interest, including (Table 4):

  • Flat dog-bone titanium (Ti-6Al-4 V) fatigue specimens fabricated with PBF at a range of inclination angles, providing profile roughness measurements within the gauge region.

  • Solid titanium (Ti-6Al-4 V) struts fabricated with PBF at build inclination angles of 30°, 60°, and 90°, to investigate the effect of diameter and inclination angles.

  • Polylactic acid (PLA) struts fabricated at build inclination angles of 0°, 30°, 45°, 60°, 75°, and 90° to distinguish roughness measures that characterise a MEX process.

Table 4 Sample description, including process and CT scan parameters

The additive manufactured specimens (Table 4) were characterised by the proposed virtual stylus method and are assessed according to the impact of threshold values on acquired surface roughness, in comparison with optical methods. These outcomes are used to compare metal PBF and polymer MEX AM roughness attributes and to quantify the roughness of upward and downward facing strut elements.

6.1 Roughness assessment of flat dog-bone specimens

To benchmark the CT-based roughness characterisation, focus variation with the Alicona optical profilometer was used to characterise the same regions of interest. The results of both methods have been listed in Table 5 for comparison. The CT data was generated at two resolutions, 10 μm and 5 μm, and then processed using internal and external profiles which differ at open pores, and re-entrant features. The external method follows the same principle as a line-of-sight technique, considering the highest points of the surface profile. Conversely, the internal method considers the lowest point of the surface profile. External and internal methods are plotted in Fig. 9c and d, respectively.

Table 5 Profile parameters from different imaging methods, PBF Ti6Al4V dog bones

In the case of 10 µm resolution scans, external and internal methods yield near identical results. At 5 µm resolution, the differences between methods are evident at this level of precision. This demonstrates that 10 µm resolution is not sufficient to capture overhanging and re-entrant features for these samples.

The roughness values obtained from optical profilometer and 5 µm resolution CT data show a high similarity for 50° and 70° samples using both external and internal methods. Ten-micrometre resolution CT roughness data of the same angles tend to underestimate the surface roughness in comparison. This is caused by the higher voxel size of 10 µm scans smoothing out the surface and unable to represent acute features which can then be realized using a smaller voxel size in 5 µm scans. Roughness data from 90° samples does not show the same level of similarity with the optical profilometer characterisation; however, the measurement discrepancy is less in 5 µm data than 10 µm data.

6.2 Roughness assessment of metallic solid struts manufactured with PBF

The threshold value influences the identification of the external and internal surfaces of the strut, affecting the principal axes, the measured diameter, internal porosity, and the roughness. To explore this effect, the threshold value of the CT data is applied iteratively through the greyscale range, and at each threshold value, the strut geometry extracted using the method described in Section 4.2, and the profiles roughness determined as described in Section 4.3. From the CT data of a single strut, Fig. 11b shows the effect of greyscale threshold value, Gt, on the total material volume and largest connected material volume (designated as the strut) and the pore volume, while Fig. 11c and d show the range of mean diameter, Dmean, and roughness, Ra, determined from profiles along the strut taken around the strut at a set of angles (θ defined in Fig. 5) in 15° increments. These graphs highlight that there is a significant change in volumes with threshold as the greyscale versus voxel count histogram nears a peak in Fig. 11a. The pore volume given in Fig. 11b remains low as it includes only fully enclosed pores, while the large cavity visibly growing with threshold in the 2D slices is actually an open cavity in 3D, connecting to the external environment outside of the region of interest.

Fig. 11
figure 11

Effect of threshold on CT-based measurements. Histogram of greyscale values across entire volume of CT reconstruction (a). Volumes of total material and pore regions (b). Strut diameter range (c) and roughness, Ra, range (d) with greyscale threshold, Gt. The ranges determined from all profiles extracted every 15° increment rotations around the strut. Greyscale above threshold defines material; the largest connected region is designated as the strut. Below the threshold represents internal pores or external background including open pores. Sample is 1-mm-diameter Ti6Al4V strut, 30° build inclination

There is a small but observable reduction in the strut volume compared to the total material volume around 110 greyscale value (Fig. 11b), indicating that as the threshold is increased, some material is becoming isolated from the main cluster of material. The diameter (Fig. 11c) and roughness (Fig. 11d) show sharp changes around 140 greyscale, as a result of the external surface profiles splitting as seen in the later binarized images of Fig. 11.

An important consequence of these observations is that the roughness is largely unchanging across a significant threshold range while the strut volume is reducing at a greater rate, from both internal and external erosions. The greyscale intensity is higher at the external surface than for the inner material of the strut, likely a result of X-ray scatter at the surface and cupping in the image reconstruction.

It is well known that downward facing surfaces will have inferior roughness to upward facing surfaces. For this reason, we investigate the variation of roughness around the circumference of cylindrical struts. Figure 12 shows Ra for each of the nine Ti6Al4V struts. The struts fabricated with inclination of 30° relative to the build plate, i.e., α = 30°, show a large variation in the roughness as it is measured along the axis at different orientations θ (with increments Δθ = 1 5°). The peak roughness aligns with the 0°/180° plane, i.e., the plane with the larger diameter as determined by the middle principal axis of inertia. θ = 180° corresponds to the downward facing surface, while θ = 0° corresponds to the upward facing surface. For the 0.6 mm and 1 mm, the minimum Ra is near the side surfaces at θ = 90° and θ = 270°, while the upward facing surface, at θ = 0°, has an intermediate Ra. In contrast, the minimum Ra for the 0.2-mm-diameter strut is on the upward facing surface. The remaining struts, fabricated at inclinations of α = 60° and α = 90°, have relatively consistent roughness, in the range 0.005–0.015 mm, as measured along the axis at different orientations. The middle principal axis was observed to align with the upward and downward facing surfaces for the α = 30° struts. The roughness on the side surfaces of the 30° struts are similar in magnitude to those measured on the 60° and 90° struts.

Fig. 12
figure 12

Profile roughness with rotational angle for PBF Ti6Al4V struts of various diameter and build inclination angle. The struts with 30° build inclination show a large variation with peak roughness corresponding to the downward facing surface. The struts with 60° and 90° build inclination show more consistent roughness measured across the range of linear profiles around the strut’s centroid (greyscale threshold, Gt = 120)

6.3 Roughness assessment of polylactic acid solid struts manufactured by MEX

The roughness of the inclined printed polymer struts shows characteristics related to the additive manufacturing process. As observed in Fig. 13, PBF struts feature rough surfaces with attached particles, particularly on the downward facing surface. The profile of the MEX struts shows characteristic bulges that are determined by the diameter of the extruded filament. Some profiles highlight deep crevices where there is a lack of fusion within layers and between layers due to the tool path and at the ends of the filament.

Fig. 13
figure 13

Example cross sections from metal PBF (nominal 1 mm diameter, inclination 30°), θ = 0° (a), θ = 45° (b), θ = 90° (c), and polymer MEX (nominal 2 mm diameter, inclination 45°) for d θ = 330° and e θ = 15°

Figure 14 shows the cylindrical polymer strut unwrapped with the circumferential coordinate linearized to aid visualisation of the radial variation of the surface. For these examples, there is a continuous valley region that is created where the filaments start and align in consecutive layers. A deep valley is visible running the length of the α = 45° sample (Fig. 14c), while a line of shallower and shorter valleys are visible in the α = 90° sample (Fig. 14d); these occur where scan pattern repeats across layers and filament ends align in adjacent layers.

Fig. 14
figure 14

Unwrapping of the cylinder to show radial changes with θ. a Contours for a variety of build inclination angles and diameters. The samples show a prominent wave pattern, due to the projection of layers with build inclination angles. The red line indicates the downward facing surface for the inclined specimens and the end of filament deposition for the 90° specimens. Nominal diameter 2 mm, build inclination α = 0° (b), α = 45° (c), α = 90° (d)

Figure 15 shows the profile roughness change with orientation around the PLA struts. Each curve represents a 2-mm nominal diameter strut with different build inclination angle. The largest measured roughness values are seen in the struts with low build inclination. The roughness of the low build inclination struts varies by rotation angle, and this appears to be dominated by the relative position of the start and end of the filament. For these inclined samples, the angular location of the start and ending of the filament is consistent along the length of the strut, so the profiles through these regions show higher roughness than other profiles from around the strut. The higher inclination angles also show this behaviour but to a lesser magnitude.

Fig. 15
figure 15

Profile roughness with rotational angle for MEX PLA struts of nominal diameter 2 mm and alternate build inclination angles. For low inclination angles, the largest roughness was found near the downward facing surface (approximately 180°). At higher inclination angles, the largest roughness appears on the side of struts (approximately 90° and 270°); these profiles pass through the start and end of the filament with each layer

The horizontally built strut (α = 0°) shows both the highest and lowest roughness depending on the profile orientation around the strut. With its filament layers aligned with the strut axis, those unsupported on the downward facing surface tend to droop and show high roughness as the measured profile jumps between disjointed filaments. Meanwhile, those on the side and upward facing surface provide lowest roughness, with the filaments laying parallel to the strut axis.

7 Discussion

The proposed virtual stylus method enables traditional profile parameters to be obtained non-destructively; however, the voxelised representation of surface geometry can lead to errors in the accurate measurement of the profile roughness.

Through investigation of profile roughness of a sinusoidal profile with amplitude, \(a\), and wavelength, \(\lambda\), it was found for roughness parameters to converge within 10% of the theoretical values of \({R}_{a}=2a/\pi\) and \({R}_{q}=a/\sqrt{2}\), that the required voxel size was less than 8% and 12% of \(\lambda\), respectively. This voxel size requirement was also dependent on the ratio \(\lambda /a<5\).

The relationship between voxel size and error in roughness parameters was investigated using five published profile images. For the real surface profiles, they converged with a larger voxel size relative to the sine wave investigation. This is due to the irregular spacing between peaks and valleys, and also the variation in the extremities of such features. Similar explorations by [48] found that a pixel size less than 1/5th of the mean peak lateral spacing was required to keep measurement errors for \({R}_{a}\) and \({R}_{q}\) within 10% of the values measured using optical microscopy.

7.1 Practical implications of resolution

The implications of the error, E, with voxel resolution, VL, is that it places additional limits on the range of measurable roughness by a given CT system. The preferred sampling lengths for a given range of profile roughness as recommended by ISO [49], and reproduced in Table 6, are presented graphically as vertical lines in the chart of \({R}_{z}\) versus sampling length in Fig. 16. A shaded region is shown representing interpolation between these recommended ranges indicating possible non-standard sampling lengths. Overlayed with this region are the achievable roughness measurements for the two CT systems used in this work. These lines represent the lower limits based on their specified minimum resolution and detector size (Table 7) and the 10% error convergence. These intersect the recommended shaded region at the upper end of the sample length and roughness range.

Table 6 Profile roughness value ranges for standard recommended sampling length (ISO 4288)
Fig. 16
figure 16

Recommended and achievable profile roughness sampling lengths for example CT systems (given in Table 7). The ISO recommendations for roughness bounds for a given sampling length (Table 6) as well as non-standard ranges interpolated between the ISO recommended ranges. Limitations, due to the minimum voxel size and the detector size for the CT systems used in this paper, restrict measurements to the upper most roughness scales recommended by the standard

Table 7 Detector array size and achievable minimum voxel resolution of CT systems used in this research

Where available, a non-square detector or a helical scan method elongated in the sampling direction could enable a system to extend the achievable sample length bounds.

The minimum voxel size is the main limiting factor for the proposed CT-based roughness measurement method. With minimum voxel size of 1 μm, the smallest reliable roughness measurements using the proposed method are of the order of 10 μm. To improve on this limitation, the use of partial volume methods to provide sub-voxel identification of the surface is likely to bring the smallest measurable roughness closer to the minimum voxel size.

7.2 Effect of threshold on measured results

The selection of image greyscale threshold was observed to have a strong influence on the measured specimen volume, but was found to have a lower effect on the measured surface roughness. The greyscale values within the solid were lower than those at the outer surface. Therefore, internal cavities were seen to increase, while the sharpness of the outer surface was less affected. This finding is important in that it shows that the CT-based identification of the external surface provides a margin for threshold selection which does not significantly affect roughness of the external surface. Furthermore, the variability of surface deviation with threshold could be used to aid in the selection of an appropriate threshold value for other purposes.

This CT-based method significantly improves on the optical silhouette profile method developed by Alghamdi [43], which is suitable only for external convex surfaces, with line of sight to the profile, and loses accuracy as the surface curvature is reduced. Furthermore, the measured profile from the silhouette can be influenced by adjacent profile features in a manner analogous to using a broad edge rather than a fine round tip on a tactile probe. With this analogy, it becomes apparent that the silhouette method is best applied at edges and profiles on tight curvatures. In contrast, the proposed CT-based method allows access to any surface profile discernible from the CT data, whether external or internal, convex or concave, effectively recreating a cross-sectional slice from the reconstructed volume that is not impeded by line-of-sight requirements, just the appropriate selection of the intersecting plane for defining the profile.

8 Conclusions

The paper describes the virtual stylus method for evaluating profile surface roughness from CT data. This method enables non-destructive measurement of surfaces that are not accessible by standard tactile or optical methods. The virtual stylus method responds to the commercial requirement for systematic methods to non-destructively acquire roughness data for complex AM geometry in a mode that can be algorithmically applied. The proposed method is demonstrated for solid cylinders as are relevant to high-value AM lattice structures, extracting profiles from the external surfaces within planes revolved around the central axis.

For high-quality CT data, the identification of the external surface and the calculation of its profile roughness change slightly over a range of image greyscale threshold values. This is attributed to X-ray scattering effect at the specimen surface, locally increasing the greyscale intensity at the surface boundary. A secondary observation is that internal surface boundaries are not as sharply defined as external surface boundaries. This is attributed to reduced scattering at the internal surface boundaries and implies that roughness measurements are more reliable for external surfaces than for internal surfaces.

A fundamental study of the effect of CT image pixilation on measured roughness of a sinusoidal profile indicates that to achieve 90% accuracy for Ra, Rq, and Rt, the proposed method requires pixel resolution to be 6% of the total profile height or less. Investigation into pixel resolution of case study profiles, using external characterisation, showed that the roughness parameters Ra and Rq achieved 90% accuracy when pixel size reached approximately 20% of the profile height. However, Rt required the pixel size to be less than 11% of the profile height to achieve the same accuracy. Using internal characterisation did not yield significant changes in convergence limits compared to traditional external characterisation, which follows the outer profile of the surface contour.

The virtual stylus method is limited by the attainable CT resolution, which is determined by the relative distances of the source, object and detector, and by the size and pixel density of the detector array. For current industrial CT systems using cone beam source to distinguish a micron scale surface roughness, these physical limitations restrict the object to millimetre scale. Therefore, the cone beam system is not able to provide fine roughness measurements on larger parts using the current method.

While the method has been demonstrated for flat plates and cylindrical structures, the virtual stylus method is fundamentally compatible with roughness measurements on any surface, including on curved internal surface structures, such as conformal cooling channels. The method can also be extended to accommodate areal roughness parameters for surfaces with larger area and less curvature than the small cylindrical samples investigated in this study.