1 Introduction

Until a decade ago, AM was merely used for prototyping, while nowadays it is increasingly used to produce also functional parts [1] even for industries where reliability and quality certification are strictly required, e.g., aerospace, and medical fields [2, 3], proving that AM can be used to create functional products with a high added value. Currently, the most used materials for AM are polymers and metals [4, 5].

Material Extrusion (MEX) is one of the most widespread technologies, thanks to its ease of use and cost-effectiveness [6]. In accordance with the ISO/ASTM 52900:2021 [7] Material Extrusion is a “process in which material is selectively dispensed through a nozzle or orifice” where a filament is heated up in an heater block until it reaches the molten state, then this material is pushed through the orifice of a nozzle, mounted at the end of the heated block, and the object is produced layer by layer by moving selectively the printhead on the built-plate. Over the past decade, MEX has experienced great technological growth and it is increasingly used in certain industries [2, 8] including automotive, biomedical and aerospace that focus more on the production of high-quality and complex geometry products [1, 3]. Some of the main benefits are the decreased production time and, most importantly, the possibility to control the product properties (physical, chemical, mechanical, and thermal) by using a wide range of materials and by creating optimized and lightweight structures, i.e., lattice [9].

Despite all these advantages, there are many issues limiting the spreading of MEX across the industrial landscape. The current MEX technological level does not guarantee either reliability or repeatability of processes, which are key features for those sectors where high precision is required. Furthermore, the metrology for AM is still lacking [10] and the presence of many defects within parts, as well as low dimensional and geometric accuracy, brought the attention of researchers and industrial players operating in the AM sector toward systems and methodologies capable of capturing the most important information on both process and product inline. Defects occurring during a MEX process are many, such as warping, first layer issues, layer misalignments, missing layers, cracks and pillowing, stringing, over-extrusion, under-extrusion. All these defects can be explained if one considers the high number of parameters affecting a single print [3, 11,12,13]. One of the easiest ways to deal with these issues is to find the so-called “process signatures”, i.e., measurable quantities able to explain the relationship between process parameters and the generation of defects [14]. This is made possible by using proper monitoring systems able to detect the occurrence of defects in time and eventually, by enabling the correction of printing parameters during the process through a closed loop. It would result in reduced production time, reduced waste of both energy and material, making MEX more sustainable and more accessible even to less experienced users. Such a system would also give the possibility to conduct quality inspection and analyses on external and internal features, both real-time and off-line.

Optical sensors have been widely used for the purpose of in-process monitoring [15], as they can provide fundamental information of the part while it is built without touching the object. In literature, there are already works dealing with optical monitoring systems for MEX processes [3, 10, 16, 17]. Among the optical methods implemented for in-process monitoring purposes, it is possible to distinguish between 2D image-based methods and 3D scanning methods. The typical output of the first group is in the form of 2D images which can provide useful information about geometry and dimensions, as reported in [18, 19], but with some issues related to the fact that they are limited by the two dimensions. The second group is instead well represented by 3D scanning systems laser-based or structured light based [20] and they can provide a higher amount of topological information, but at a higher cost in terms of equipment and computational time for data processing.

Moretti et al. [21] mounted multiple different sensors on a low-cost MEX printer to evaluate the inspection defect capability of different sensors. They highlighted the powerfulness of the 2D images acquired by a camera mounted next to the printer head, to evaluate the poor cohesion between infill and walls that would have been impossible to detect relying on the other sensors mounted on the printer. In subsequent works [22, 23], the same authors mounted a digital microscope on a low-cost 3D printer and from the acquired 2D images they evaluated the reliability of different machine learning classifiers in individuating surface defects, such as the voids between walls and rasters [23]. While, in [22], they created a digital twin of the printer and performed an in-process monitoring able to compare the ideal contour of the printed object generated from the digital twin with the actual one, acquired by the digital microscope. Holzmond et al. [24] showed another example of MEX monitoring based on 2D images: their work relied on the 3D-DIC (Digital Image Correlation), where two cameras were mounted on a 3D printer and took images of each layer. Then, the point cloud of each layer was compared with the ideal point cloud obtained from the CAD model and the surface defects were extracted, such as holes and blobs, by comparing the height differences between the two point clouds. Liu et al. [25] mounted two borescopes on the opposite sides of the nozzle of a 3D printer to monitor the state of the surface and evaluate either under-fill, over-fill or normal condition through an image textural analysis algorithm. The major critical issue with 2D image-based systems is that the quality of the results obtained is highly dependent on the environment light conditions [18], furthermore these systems can detect surface defects but they are not always able to obtain quantitative information about them and, most importantly, they are not able to provide the height information (the third dimension). Moreover, the accuracy of the data provided by those systems is not always assured. On the other hand, 3D scanning-based monitoring technique are able to obtain a point cloud either of the layer or the entire object to assess the quality of the printed part directly during the manufacturing phase. They allow the detection of miniature shifts on the layer surface (according to the resolution capabilities), but also to obtain quantitative results from the surface analysis. The working principle of these optical monitoring systems can be laser-based or structured light-based. Ye et al. [26] mounted a 3D structured-light scanner on a low-cost 3D printer and they used a deep cascade model to compare the point clouds obtained from the 3D scan with the reference ones for evaluating the effect of the variation of some printing parameters, such as nozzle temperature and flow rate. Charalampous et al. [27] exploited a structured-light layerwise monitoring system, mounted on a consumer 3D printer, to compare the geometrical deviation of the point cloud of the scanned layer with the one generated from the G-code, the theoretical one, showing the effectiveness of such a system for obtaining quality information about the printed part. In other works [28, 29], to reduce the computational cost of the point cloud analysis, it was applied a well-established procedure: the point cloud was rasterized, transformed into a depth image and compared with the nominal one, i.e. an image generated from either simulation or directly from the G-code. The above-mentioned procedure is well suited for subsequent applications of neural networks to establish if there is the presence of a surface defect or not. More in details, Lyu et al. [28] mounted a red-light profilometer on a 3D printer and observed the occurrence of surface defects (over-fill or under-fill) by transforming the point cloud of the layer in a depth image and sending it into a neural network. Lin et al. [29] used as well a laser line scanner and the monitoring method consisted of subtracting the theoretical depth image, obtained from the nominal point cloud, from the real depth image, obtained from the rasterization of the profilometer point cloud, in order to point out the occurrence of surface defects. They were also able to obtain a 3D reconstruction of the morphology of the defects. Other in-process monitoring approaches based on 3D scanning are also applied on other Additive Manufacturing processes, such as powder bed fusion [14, 30] and direct energy deposition [31,32,33,34], where optical sensors have been used also for the characterization and morphology analysis of the powder [35] among others, while the literature regarding MEX monitoring through 3D scanning systems need to be widened.

One of the major advantages of using a 3D scanning hardware for monitoring purposes is the high amount of information which is possible to extract and analyze able to depict a complete picture of the process. Few works have implemented 3D scanning methodology for the in-process monitoring of MEX processes and most of them did not analyze the raw point cloud but the rasterized one, loosing fundamental information about the layer quality.

This paper discusses a novel in-process MEX monitoring methodology that uses a blue-light laser line profilometer to scan the surface of each layer and assess the layer height accuracy, the occurrence of a defect and, more generally, the quality of the printed part, thanks to its high resolution. The use of a blue laser source allowed to reduce errors due to the subsurface scattering which is known to affect the measurements on parts made of polymers [36]. The analyses were performed on the raw point clouds with the aim to provide a comprehensive picture of the quality of the process/part by using different indexes, computed layer by layer, able to evaluate height inaccuracies and to detect typical surface defects, such as blob, material accumulation and lack of material.

2 Material and method

2.1 Hardware description

The monitoring system used in this work was composed by a blue-light laser profilometer (MicroEpsilon scanControl 2900–50 BL) embedded in a consumer 3D printer (GeeeTech A10), through a frame that fixed the position of the laser scanner with respect to the printing platform, see Fig. 1a.

Fig. 1
figure 1

(a) Hardware set-up; (b) Axis-direction of the GeeTech A10

The GeeeTech A10 (Fig. 1a) has a cartesian architecture with a printing volume of 220 × 220x260 mm3, a heated bed (up to 100 °C), an extruder capable of reaching 250 °C as maximum temperature with a 0.4 mm nozzle diameter. The feedstock material is provided in filament form (the compatible filament has a 1.75 mm diameter) and it is fed into the hot end through a bowden architecture. Thus, the MEX process performed in this study could be referred to the widely used Fused Filament Fabrication (FFF). The maximum printing speed is 180 mm/s from manufacturer’s specifications. In Fig. 1b, the three axes movement directions of the 3D printer are shown: the printing head moves on the gantry along the x-axis and the z-axis, while the movement along the y-axis is performed by the printing platform.

The MicroEpsilon scanControl 2900–50 BL is a laser line profilometer with 405 nm wavelength. The measuring range is 50 mm along the z-axis and 50 mm along the x-axis. The resolution along the z axis, which is also the object building direction is 4 µm (from manufacturer’s specifications). The optimal working distance between the sensor and the object is equal to 95 mm. At this distance, the resolution along the x-axis is equal to 39 µm. The first output of the considered monitoring system is a 2D profile displayed on the xz plane. To achieve a 3D point cloud of the entire object, it is necessary to add another movement orthogonal to the profile plane, along the y-axis. Considering the implemented system, this movement was executed by the build platform. This way, the laser line profilometer can record a profile series along the y-axis direction and return the point cloud of the scanned surface. The resolution along the y-axis depends on the scan speed and on the frequency of the acquired profiles, according to Eq. (1). For the experiments conducted in this work, the scanning speed was set to 5 mm/s and the profile frequency to 135 profile/s, which were the maximum allowed values to achieve a resolution along the y axis comparable with the x-axis one (39 µm). Thus, the resolution yielded in the y direction was equal to 37 µm.

$${Res}_{y}=\frac{scan speed\left(\frac{mm}{s}\right)}{profile frequency (\frac{profile}{s})}$$
(1)

To keep the y-resolution constant, each scan was performed with the same parameters of scan speed and profile frequency.

The implemented monitoring system is a layerwise monitoring method. After the deposition of each layer, the printhead reaches an endstop mounted at a specific machine location (Fig. 1a), which works as scan trigger. Thus, once the endstop circuit is closed, it triggers the sensor to acquire profiles. Meanwhile, the building platform moves along the y axis, forcing the sample to pass under the laser line, allowing to collect surface profiles of the layer surface. Following the above mentioned procedure and by setting the scan speed and the profile frequency, a 3D point cloud was obtained, composed by the acquired and registered profiles.

2.2 Monitoring system calibration

As already explained, the laser line profilometer needs a further movement to collect the object profiles along the scan direction. In order to correctly register those profiles, the scan speed and the profile frequency should be accurately known. In this case, the scan movement was executed by the build platform and the scan speed set to 5 mm/s. Although, the former value is not assured due to possible cinematic errors, and a prior calibration is required. With this aim, a proper artefact was designed, based on the following requirements:

  • Geometric – The geometry should allow an easy evaluation of distances along the scan direction to compute a correction factor.

  • Dimensional – The overall dimensions should cover the entire scanning volume of the monitoring system.

Based on these two criteria, the calibration artefact was composed by a support plate characterized by 50 × 70x8 mm3 of overall dimensions and six spheres (ø12 mm) made of steel placed at a certain distance to each other, see Fig. 2.

Fig. 2
figure 2

Calibration artefact. All dimensions are expressed in mm

The designed artefact was then scanned by the laser line profilometer using the same scan speed and profile frequency used for the acquisition of each layer surface, i.e., 5 mm/s and 135 profile/s, respectively. Thus, spheres diameters and distances between spheres were measured. As reference, the same artefact was scanned using a structured-light scanner GOM Atos Q 8 M equipped with 100MV lenses, having a measuring volume of 100 × 70x60 mm3 and certified accuracy (0.005 mm of Length Measurement Error assessed according to the VDI/VDE 2634- Part 3). The calibration spheres were shiny and highly reflective and for this reason they were sprayed with a sublimation matting spray before executing the scanning operation both on the blue-light profilometer (BLP) and the structured light scanner (SL). After the data acquisition, all the conducted analysis were carried out using the GOM Inspect software. Six spheres were fitted with the 3σ Gaussian method. Spheres diameters and centres coordinates were then extracted with their relative distances, as reported in Table 1. These values were then used to compute the correction factor c along the y direction, according to Eq. (2) and (3).

$$c=\frac{1}{N}\sum_{i=1}^{N}{c}_{i}$$
(2)
$${c}_{i}=\frac{\Delta {y}_{SL,i}}{{\Delta y}_{BLP,i}}$$
(3)

where, ∆yBLP, was the i-th distance measured on the point cloud obtained with the BLP, while ∆ySL,i was the same quantity measured on the mesh obtained from the structured light scanner. As shown in Table 1, it was found an error of 0.41 mm on 34.72 mm along the y-direction. By using Eq. (2) and (3), the correction factor c was found to be 1.012, highlighted in bold in Table 1. This simple calibration method allowed to compute the error along the scan direction caused by non-precise cinematic and correct for it by properly re-scaling the point cloud. After the correction procedure, the spheres distances were re-measured and it was found a maximum error of 0.02 mm. 

Table 1 Errors evaluated on the y-direction

2.3 Experimental plan and layerwise monitoring method description

The experimental plan was designed considering prism-shaped samples characterized by 15 × 15 × 2 mm3 of overall dimensions, see Fig. 3a. The first step consisted of generating the STL file based on the CAD model of the object. This file was loaded into the slicer CURA, one of the most widely used to handle MEX prints. The material used was white PLA supplied by Fabbrix ®. The main printing parameters used are reported as follow: layer height of 0.2 mm, nozzle printing temperature of 210 °C, printing platform temperature of 60°, solid infill (100%) and 40 mm/s as printing speed.

Fig. 3
figure 3

In (a) the sample geometry and dimensions; in (b) the positioning of the samples on the building platform; in (c) the infill line direction considered (raster deposition angle)

To effectively test the implemented in-process monitoring system, different process conditions were generated to induce defects and process deviations and non-optimized printing parameters were used. The process shifts induced in the experiment were obtained by varying the location of the specimens on the building platform and the raster deposition angle (ɵ), according to the experimental plan reported in Table 2. This way, it was possible to vary the process conditions and the surface quality of the obtained samples by using the same printing parameters.

Table 2 Experimental plan

A total of 12 samples were printed, as combinations of three sample positions, named TOP, MID, BOT (see Fig. 3b) and four raster deposition angles (ɵ), 0°, + 45°, −45° and 90° (Fig. 3c). Then, each sample was monitored layer by layer by using the procedure described in Fig. 4.

Fig. 4
figure 4

Proposed in-process layerwise monitoring method based on surface analysis

After the completion of each layer, the layer surface scan was performed automatically and analyzed according to the following procedure. Before starting the print, a scan of the build platform was executed and from the point cloud obtained a plane was fitted using the Gaussian method (3σ criterion). This plane was considered to have z = 0 and it was kept as reference plane for the subsequent analyses. From the latter, a series of parallel planes, called nominal planes, were constructed, spaced apart by an amount equal to the theoretical layer height (0.2 mm). Once the scan of the building platform was completed, the printing process could start, and after the completion of each layer, the data acquisition was carried out, as previously described (Section 2.1). The parameters used for the layer surface scan were previously selected in accordance with the optical properties of the printed material and the build plate. To avoid possible negative influences of the build platform, (transparent glass), it was coated with a white aluminum adhesive tape, high temperature resistant and with optical properties similar to the printed material. Moreover, thanks to the use of the endstop for triggering the monitoring process, the acquired point clouds were already aligned along the y direction, reducing the time needed for the alignment operations and derived errors.

The point cloud obtained from the BLP, as already stated, contains many topological information, but it was also necessary to summarize the content of information by selecting proper process indexes easier and faster to compute and to interpret. In this preliminary study, the proposed monitoring methodology was evaluated through the observation of four indexes. The first analysis (Fig. 4-1) was aimed at assessing the average height increase at each layer and then the cumulative height by computing distances between the surface points of each layer and the reference plane (build platform plan, z = 0). The second analysis (Fig. 4-2) which corresponded to the first quality index, was instead aimed at assessing the height deviation between the point cloud of the layer surface and the corresponding nominal plane, generated as a plane parallel to the reference plane (z = 0). It was called Layer Height Average Deviation (ADLH), and it was computed as the average distance d between all the n layer-belonging points measured by the monitoring system with respect to their relative nominal plane evaluated along the build direction (z-axis), as it is shown in Eq. 4:

$${AD}_{LH}=\frac{1}{N}\sum_{i=1}^{N}{\pm d}_{i}$$
(4)

Each distance was kept with its sign. The sign of the distances is worth of further considerations because it was a first indicator of the kind of deviation: negative means that the actual layer surface point lies under the nominal plan (having a z coordinate lower than the one of the reference plane); on the other hand, a positive deviation means that the layer surface lies above the nominal plane (having a z coordinate higher than the one of reference plane). Thanks to this parameter it was possible to retrieve precious information about the layer surface conditions enabling, eventually, the possibility to operate a typical process control. The second index was the Residual Absolute Deviation (RAD), and it was computed as the average value of the distances between each actual layer points and the plane fitted (Gaussian method, 3σ criteria), using the same points. This index allowed to emphasize the occurrence of surface defects and geometric inaccuracies with respect to dimensional issues. Finally, the last index, identified as process stability indicator, was the slope s of the line segment generated by two subsequent ADLH values, which were the y-values, having the layer height on the x-axis. The resulting value was dimensionless and scale independent, and based on its absolute value, its sign and the sequence of subsequent values, it was a good indicator of the process stability.

3 Result and discussion

In this section, the results obtained from the performed analyses are shown and discussed. As first output, the cumulative height was evaluated at each layer and for each sample (Fig. 5). Different raster deposition angles led to different results. Moreover, keeping fixed the raster angle, also the sample location on the building platform produced different results. Among the locations analyzed, the location called MID led to results close to the nominal (1.9–1.96 mm), while the TOP and BOT locations produced more variable results and higher dimensional deviations (the worst was 1.84 mm). The cumulative height allows to monitor the printing process and, in particular, the height increase at each layer. A shift of this parameter from the nominal conditions could be caused by the onset of defects, which can be related to dimensional and geometric inaccuracies or other local process alterations. For all the analyzed cases, this index allowed to observe that the cumulative height was always below the nominal value, and this can be related with many printing issues, i.e., the flatness of the bed, the accuracy of the z-axis movement, the material flow rate, etc.… Moreover, a shift of the cumulative height was detected between Layer 7 and 8 for the samples fabricated with raster angle equal to 0° for all the locations involved and it was more marked for the sample realized at the BOT location (see Fig. 5c).

Fig. 5
figure 5

Results obtained from the cumulative layer height analysis. (a, b, c and d refers respectively to −45°, + 45°, 0° and 90° raster deposition angles respectively)

Although, by using this index only, it was not possible to assess the surface quality and to make hypothesis about what caused the height deviation. To make the analysis more focused on each layer, the so called Layer Height Average Deviation (ADLH) was computed (Section 2.3, Eq. 4), and results are reported in Fig. 6. As a general consideration, for all the analyzed samples the first layers were characterized by the lowest values of the above-mentioned index (ADLH). As the layer number increased, however, the ADLH tended to increase (if one considers the absolute value). In accordance with the cumulative layer height data (Fig. 5), the registered deviations, represented by the ADLH values, were all negative, meaning that the deposited layers had a height lower than the nominal one. In some cases, the value of the ADLH reached approximately the absolute value of 0.18 mm, close to the layer height value used to print the specimens (0.2 mm). Such an index allowed to analyze more in details the height deviation of each layer and to detect a process shift from the desired and nominal conditions. According to the ADLH, the samples characterized by the most accurate height were the -45°-MID and the 90°-MID, with values of ADLH comprised between 0 and 0.05 mm. All the other combinations of location and raster angles generated less accurate results with values of the ADLH covering a larger range and approaching 0.2 mm in one case (Layer 9, sample 0°-BOT).

Fig. 6
figure 6

Results of ADLH, where a, b, c and d are related to respectively −45°, + 45°, 0° and 90° raster angles

Moreover, when analyzing the graphs related to the ADLH and the trend of this index as the layer number increases, it was possible to assess the stability of the process and the occurrence of a process shift by considering the slope of the line segment connecting the values of ADLH registered at two subsequent layers. Results of the slope values are reported in Table 3 for each couple of subsequent layers. The higher the value of the measured slope, the higher the change of the surface layer conditions, in terms of height accuracy, evaluated on two subsequent layers. This way, significant process shifts can be detected, possibly related to the occurrence of defects. More in details, to negative slope values corresponded a worsening of the ADLH index, while, when the slope had a positive value, a ADLH improvement was registered. Finally, when the slope was equal to zero no significant ADLH changes were detected, and the process conditions could be considered quite stable. If samples -45°-MID and 90°-MID are considered as reference (they have the lowest values of ADLH with no significant changes), a range comprised between ±0.05 could be considered acceptable (see Table 3).

Table 3 Slope values

As it is possible to observe from the values reported in Table 3, the most significant changes were registered for the samples characterized by 0° of raster deposition angle, for all the locations considered (0.2–0.25), in line with what observed on Fig. 5c. To verify the occurrence of severe height deviations, the worst case was analyzed (0°-BOT) and the colored maps showing the height deviation evaluated for each surface point was also reported in Fig. 7. Two exemplary cases were compared: a severe worsening of the layer height deviation was observed between Layers 7 and 8, where the measured value of the slope reached its maximum value (0.25). While, between Layer 5 and 6 (s comprised between 0–0.5), the process was almost stable, as it was possible to observe from the corresponding colored maps. It is important to point out that this parameter is sensitive to deviations observed between two subsequent layers, but if only the slope between two subsequent layer is considered, it is not possible to detect all the cases characterized by a negative trend and severe height deviations. As an example, the samples 90°-TOP and + 45°-TOP were characterized by severe height deviations, however, values of slopes registered for these two samples were on the order of 0.05 and 0.1, which were not the highest values registered. This suggests another consideration about this index, and it is related to the slope sign and the sequence of slope values. For the above-mentioned samples (90°-TOP and + 45°-TOP), indeed, even if the slope values were quite low, a trend of all negative slope was detected, meaning a continue worsening of the height deviation. Moreover, this index was not able to display which kind of defect occurred and it can be considered only as a first warning for the user.

Fig. 7
figure 7

The slope between Layer 5 and 6 is the minimum one and no worsening of layer surface is detected, while the value between subsequent layers grows until reaching its maximum value between Layer 7 and 8 where under-extrusion defects are detected and highlighted

Besides the layer height deviations assessed through the ADLH, another index was considered able to evaluate the closeness of the actual layer point cloud with respect to an ideal planar geometry. With this aim, the RAD was introduced (see Section 2) and results are shown in Fig. 8. Based on its definition, the higher the RAD, the worse is the layer quality due to the likely presence of defects. When observing the graphs reported in Fig. 8, it is possible to notice a quite stable trend of the RAD for the sample -45°-MID, with values ranging from 0.01 and 0.019 mm. All the other samples were characterized by more variable values of RAD and the highest values were achieved for samples -45°-BOT and + 45°-TOP, starting from Layer 3 and from Layer 1 to Layer 6. respectively. Considering the samples realized with raster deposition angle equal to 0°, a worsening shift of the RAD was registered from Layer 7, similarly to what observed for the ADLH index.

Fig. 8
figure 8

Graphs obtained from the RAD analysis for all different strategies considered. a, b, c and d are related to respectively −45°, + 45°, 0° and 90° raster angles

The way the RAD is defined puts it as a good index able to express the surface condition of each layer and it is important to point out that it was not influenced by the average height deviation (ADLH), since it was computed as absolute average distance between each actual layer point and the ideal plane fitted on the same points and not with respect to the nominal plane (as the ADLH). Thus, it does not account for the height dimensional error.

Both the ADLH and the RAD indexes were able to identify process anomalies in terms of, respectively, dimensional accuracy and surface quality, meant as surface defectiveness. In Figs. 9 and 10 the above-mentioned indexes were shown on the same graph to depict a complete picture of the process at each considered layer for some selected cases. It is important to notice that the values of the two indexes had different order of magnitude, thus considering the graphs reported in Figs. 9 and 10, the left vertical axis is referred to the RAD while the right one is referred to the ADLH, which was considered with its absolute value (\(\left|{AD}_{LH}\right|)\). Moreover, in order to explain the meaning of the two indexes clearer, they were also displayed as colored maps (Figs. 9c and 10c). The one related to the RAD index shows the deviation of each point with respect to the plane fitted on the actual layer points. The one related to the ADLH, on the other hand, shows the point deviation from the nominal plane.

Fig. 9
figure 9

Comparison on the same graph between RAD and ADLH for 90°-TOP strategy (a) and 90°-MID strategy (b), respectively; in image c) the point height deviation comparison from A, B, C and D boxes are displayed

Fig. 10
figure 10

RAD and ADLH comparison by graphs, respectively, for 0°-BOT strategy (a) and for -45°-BOT (b); height deviation images obtained from ADLH and RAD for most significative layer is shown in c)

In Fig. 9a and b, the samples with 90° of raster angle printed on TOP and MID locations, were considered, and some significant layers highlighted and displayed as colored maps. As a general comment on graph (a), the ADLH tended to constantly increase, while the value of the RAD was quite stable and comprised between low and medium levels (0.016–0.019 mm). Considering the graph (b), a low value of ADLH was maintained through each layer, indicating good height accuracy, while the RAD value was slightly variable indicating the likely presence of defects on the surface. More in details, considering the box A corresponding to Layer 1 on the graph (a), it is possible to notice a low ADLH and a RAD on the order of 0.017 mm, which corresponded to the presence of some localized defects as excess of material. On the same sample, the box B showed a high value of ADLH and a slightly higher RAD, which corresponded, respectively, to low height accuracy and to a higher spreading of defects. The box C was more interesting, since the RAD was characterized by a quite low value (0.016 mm), while the ADLH was high and close to 0.15 mm. If just the surface quality is considered, this was quite acceptable, although the height accuracy was very low. The box D on graph (b) shows the combination of a low value of RAD and ADLH denoting a quite acceptable surface quality and height accuracy. Other two representative graphs are reported in Fig. 10. In Fig. 10a, the reported trend of both RAD and ADLH showed other interesting combinations of these indexes: the box E, corresponding to Layer 1, was characterized by a low value of ADLH (< 0.05 mm) and a high value of RAD, denoting the presence of widespread defects. On the same sample, the case F, corresponding to Layer 9, was characterized by both severe surface defects and severe height deviations. A similar case was highlighted on box G, with different level of defects and height deviations.

Through the conducted analysis, it was possible to assess that the RAD value was influenced by both local and distributed defects such as blob and accumulation or lack of material (Fig. 11a, b, c). While the ADLH can be considered a good indicator of the height deviation of the entire layer, less influenced by local and small defects. In Fig. 11, some of the observed defects are reported. In Fig. 11a, a severe accumulation of material was shown, and the cause was the waiting time of the nozzle in that specific position. In fact, if the nozzle stopped on the surface during the print, an accumulation of material can be detected on the same spot. Furthermore, the same area showed missing points. Sensors that exploit the triangulation principle can detect points only when the laser line is seen from the sensor. In some cases, the sensor may not be able to detect points on the object, for example due to the shadow effect or in the case of vertical walls. Since the monitoring was performed on a flat surface, it can be excluded the shadow effect, while missing points can be caused by vertical walls generated by not expected protrusions on the layer surface which were related to bad surface conditions.

Fig. 11
figure 11

Examples of layer surface defects detected from the scanning of a single layer: a) blobs; b) missing rasters or simply lack of material; c) material accumulation

3.1 Validation of the result

The validation of the results obtained is of fundamental importance to assure the reliability of the data acquired and processed using the proposed monitoring system. This validation is intended to evaluate the presence and, if it occurs, the quantity of the measurement error with respect to a reference.

Once completed the samples fabrication, they were measured by using the LS structured-light scanner, described in Section 2.2 section, already implemented for the monitoring system prior calibration. The validation procedure consisted in the comparison of the average height of the as-built sample evaluated offline through the structured-light scanner system with the corresponding information coming from the monitoring procedure, and it was executed considering only the last layer of the sample, meaning their overall height. The average value of all the registered errors was 0.014 mm with a standard deviation of 0.007 mm demonstrating the reliability of the monitoring method proposed and the effectiveness of the calibration procedure. Moreover, it should be also considered that the resolution of the two compared systems was different which can be a relevant factor when dealing with parts produced by MEX, as reported in literature [37]. To corroborate these results, the comparison was also conducted considering the deviation maps corresponding to the ADLH index. Few relevant cases were considered showing the effectiveness of the proposed method in different process conditions. All the coloured maps are referring to the last layer. Results reported in Fig. 12 showed a good correspondence between the two compared deviation maps for all the conditions analysed.

Fig. 12
figure 12

Validation results obtained by comparing ADLH of last layer point clouds with ADLH of references

4 Conclusion

MEX processes are experiencing an increasing appeal in many industrial sectors thanks to its ease of design of complex geometry and its time-saving feature in producing small/medium batch of manufacts. All these positive aspects are countered from both low repeatability and reliability that needed to be enhanced for an effective improvement of this process. The answer to these critical issues is the developing of such system that enable real-time defect detection and capable of correct process shifts from the optimal condition through the correction of related-defect parameters.

In this work, a preliminary study on a new MEX monitoring methodology was proposed. It was based on the use of a blue laser profilometer, with a resolution along the z-axis of 4 µm, mounted on a MEX- consumer machine with the aim to retrieve, in-process, the actual layer height and information about the possible occurrence of defects. Several quality indexes capable of detecting the height accuracy with respect to the nominal value, as well as the surface layer quality (defectiveness of the layer surface) and the stability of the process itself, were then collected and analyzed for each layer by using a novel and automated procedure. Different process conditions were generated by varying the raster angle and the location of the sample on the building platform. The resulting samples registered different trends and surface defects that the proposed system was able to detect using specific quality indexes. The cumulative height resulted to be an indicator of the average layer height increase at each layer along the building direction of the object and it was computed in-process, enabling a first check on the overall quality of the as-built part directly during the printing process. For a more focused and detailed analysis, the ADLH, the RAD indexes were introduced. More in details, the ADLH, based on its definition, was able to assess the dimensional accuracy of the sample (considering the sample height), while the RAD was able to detect the occurrence of defects on the layer surface, independently from the dimensional error evaluated through the ADLH. This concept was highlighted by comparing both indexes for the same samples. In this context, significant cases were shown, highlighting the capability of the RAD to detect surface defects. High value of ADLH corresponded to high dimensional deviation, but not always to surface defects. High value of RAD are related to the presence of defects, mostly widespread defects, which not always significantly influenced the dimensional deviation. High values of both RAD and ADLH corresponded to a high surface defectiveness and height average error. The stability of the process was also assessed by analyzing the slope value of the ADLH data trend. Besides the absolute value, the slope sign, and the sequence of the slope values, were also indicative of the process shift trend: based on the definition of ADLH, a negative value of slope meant a worsening of the layer height deviation, while a positive slope meant an improvement of the layer height accuracy.

The use of a laser profilometer and the analysis of highly detailed point clouds allowed to retrieve different classes of information on each layer, showing the powerfulness of the proposed systems and enabling further investigations involving machine learning algorithms to find mathematical relationship between the indexes and the occurrence of defects. Furthermore, even if the proposed monitoring system was tested on a MEX process it could be suitable also for the in-process monitoring of other AM technologies involving metals, such as Powder Bed Fusion or Direct Energy Deposition.