Introduction

Additive manufacturing (AM) processes are gaining traction within many high-value engineering sectors (Jiang & Ma, 2020; Jiang et al., 2021). Success stories associated with AM link directly to the layer-by-layer creation of 3D geometry. Layer-by-layer production reduces significant barriers presented by traditional manufacturing processes in terms of internal, overhanging, undercut and otherwise complex geometrical features (texture, high curvature, etc.). Separately, recent advancements in energy delivery (e.g. laser or electron beams) have led to significant advancements in the production of thin-wall (Jinoop et al., 2019) and delicate, needle-like geometries (Ghouse et al., 2017).

The above benefits are often celebrated in components that have been specifically designed for AM processes. As such, ‘good design for AM’ can be heuristically linked to an elevated surface-area-to-volume-ratio (SAVR) for a given component. This is especially true when comparing an AM component with a legacy version that was produced with another manufacturing technology (e.g. lightweight hydraulic manifold (Diegel et al., 2020), porous triply periodic minimal surface scaffolds (Yoo, 2014)). As material is only placed where it is needed, material that would otherwise be present for manufacturing convenience can now be removed or converted into a lightweight structure with a high SAVR. Often, components are reduced to their obviously functional surfaces, with minimal additional material joining, supporting or thickening these functional surfaces (e.g. topology optimised structures (Panesar et al., 2018), support-free structures (Wang et al., 2018)).

This emerging approach to component design is having a profound impact on light-weighting (Plocher & Panesar, 2019), heat transfer (Ge et al., 2020a; Pizzolato et al., 2019), filtration (Burns et al., 2016), impact attenuation (Fabro et al., 2020), communications (Thornton et al., 2016), and more (Ge et al., 2017, 2020b). However, this design freedom is not unbounded. There are important design constraints that are imposed by the manufacturing process. For example, a major issue during powder bed fusion (PBF) (Bhavar et al., 2014) process is that the melting and solidification of powder materials can induce residual stresses, and defects such as distortion and local cracks may develop in the final component (Bartlett & Li, 2019; DebRoy et al., 2018). The thermal stress issues arising during metal AM processes have been experimentally and numerically investigated. Several experimental techniques (e.g. x-ray diffraction (Simson et al., 2017), neutron diffraction (Ghasri-Khouzani et al., 2017), hole drilling (Robinson et al., 2018) and the contour method (Robinson et al., 2018)) have been applied to investigate the effect of process parameters (e.g. scan speed (Levkulich et al., 2019; Simson et al., 2017), laser power (Simson et al., 2017), scan strategy (Robinson et al., 2018), and substrate condition (Levkulich et al., 2019)) on residual stress. Recently, an in situ X-ray diffraction technique was used to study the strain and stress development during AM (Schmeiser et al., 2020). Numerical modelling has been applied to understand the process strategies and to optimise geometry topologies for AM (Markl & Körner, 2016). Finite Element Analysis (FEA) is commonly used to understand the transient thermal history and build-up of residual stress during AM (Luo & Zhao, 2018). The effects of different process parameters and scan strategy have been studied by different researchers (Ganeriwala et al., 2019; Lu et al., 2019; Parry et al., 2016). The presented studies mainly address process parameters on the stress/part distortions during AM. Although these works provide invaluable data to further optimise the process to reduce the thermal stresses/distortions, investigations of this issue from a perspective of design for additive manufacturing (DfAM) are scarce.

Previous research has demonstrated that thermally-induced stresses and defects are closely related to a component’s geometrical features (Parry et al., 2019; Wu et al., 2014; Yu et al., 2019). For instance, high aspect ratio (AR) needle-like geometry has poor mechanical load bearing capacity. In addition, heat build-up may occur during the build process in these features, which also impacts the final quality. Some heuristic design guidelines have been proposed to avoid the potential defects. For example, the AR, the ratio of height to width within a geometry, should be less than 8:1 (Metal et al., xxxx). Typical additive manufactured high AR features with defects are illustrated in Fig. 1 (Demir, 2018; Krieger et al., 2019; Suard et al., 2014).

Fig. 1
figure 1

Additive manufactured geometries with high aspect ratio features (Demir, 2018; Krieger et al., 2019; Suard et al., 2014)

The use of AR as a design guideline is undoubtedly useful to avoid costly failures. However, as a concept, it is only intuitive for certain primitive shapes: thin walls, fine needles, ellipsoids, etc. Furthermore, the boundaries between geometrical features not always obvious or, indeed, unique, which makes quantifying AR more difficult. This is at odds with the mantra of design for AM, which encourages people to think freely about geometry and celebrate the use of sculptured surfaces and complex, highly connected topologies (Jiang et al., 2020). Finally, AR is independent of scale, position and orientation. These factors make it very challenging to capture and maintain an awareness of all aspect ratios within a component.

As there are seemingly limitless geometrical features, development of a universal detection criterion of AR in a component is a significant challenge. Several necessities need to be considered in a universal AR metric (Compactness measure of a shape xxxx), for example, it should:

  1. (a)

    Agree with the intuitive notions of the AR definition. The classical definition of AR is the ratio of height to width for a rectangle shape (Aspect ratio xxxx). The proposed measure should be numerically sound to reflect the characteristic length and width within a certain 3D geometry.

  2. (b)

    Be applicable to all geometrical shapes. The method should generalise to describe various shapes such as rods, helices, ellipsoids and polyhedra. In some cases, the shapes have no clearly defined height and width, e.g. the cases of helix or polyhedron. Also, the geometry may have three characteristic dimensions. For example, a thin wall has one small dimension and two large ones. An effective analogy must be constructed to extract the representative characteristic dimensions from a general shape.

  3. (c)

    Work in conjunction with robust feature extraction, as AR is typically expressed at the feature level and not at the component level for practical cases. AM components usually have complex features. To have a more reliable estimation of the AR, these features need to be extracted and analysed individually.

  4. (d)

    Be independent of scale and orientation. As the overall measurement of a geometry is of interest, the developed method should not be affected by the varied scales and orientations of a certain feature. For instance, a cylinder has the same AR value when scaled proportionally or rotated to a different orientation.

  5. (e)

    Be a dimensionless number. A dimensionless number can allow better comparison of different geometries, and also build mathematical relationships with other physical properties, e.g. distortions, thermal stresses.

With the above points in mind, this research presents a computational method to detect the AR and problematic features of component designs. Mesh processing algorithms have been used to analyse triangulated meshes, such as a Stereolithography (STL). Some AM check methods have already been developed for feature recognition or part partition (Campana & Mele, 2018; Hao et al., 2011), and calculation of characteristic dimensions (e.g. thickness, curvature) (Shabat & Fischer, 2015). However, a general method for detecting the aspect ratio in the AM community is still lacking. In this work, two distance metrics (D1 and D2) are proposed to describe the characteristics dimensions of a certain geometrical feature. D1 is calculated based on heat method (Crane et al., 2017), which represents the characteristic length, while D2 is calculated based on a ray shooting method such that it represents the characteristic width of a geometry (Shapira et al., 2008). Detailed calculation methods of these two metrics are given in Sect. 2.1. The dimensionless ratio (D1/D2) can be treated as an expression of AR for the entire geometry or, perhaps, a similar and related notion of ‘thinness’. As illustrated in Fig. 2, the proposed metrics can either be calculated at each vertex within a meshed geometry or used to describe the entire geometry by calculating the average and maximum values.

Fig. 2
figure 2

Illustration of the proposed metrics applied to a meshed cubic geometry

The mathematical model and relevant algorithms are described in the Methodology section. In the Results and discussion section, different features (e.g. thin wall, helix, and polyhedron) are evaluated using this method to capture the prediction capabilities. To this end, the newly proposed distance metrics (D1 and D2) are combined with spectral mesh segmentation algorithms to further analyse the geometry on a feature-by-feature basis. The geometry was firstly segmented into individual features, and then the dimensionless ratio D1/D2 of each feature was calculated. In addition, further tests were conducted to explore the sensitivity to mesh refinement. Finally, the possible applications and future work of this model in the additive manufacturing field are discussed.

The main contribution of this work is a novel numerical approach to detect high AR features in meshed geometries prior to AM. To the best of the authors’ knowledge, this is the first time that this issue be addressed in the AM field. Compared to feature recognition and characteristic dimension calculation methods, the dimensionless ratio D1/D2 can be used to identify features across all scales and orientations. The results demonstrate that this approach provides a promising way to detect features with various shapes, especially for high AR features that can cause potential defects.

Methodology

Mesh processing algorithms were applied to infer information from triangulated mesh files (STL). The heat method and ray shooting method were used to define the distance metrics for meshed geometries (Crane et al., 2017; Liu et al., 2009), and a spectral mesh segmentation method was used to segment geometries with complex features (Liu & Zhang, 2004). An example meshed cubic geometry and an individual triangle element within this geometry are illustrated in Fig. 2a. Two distance metrics, i.e. D1 and D2 to measure the characteristic dimension of a certain geometry are defined. For the geometries with complex features, 3D mesh segmentation algorithm were applied to partition them into individual features (Liu & Zhang, 2004; Theologou et al., 2015). A flow chart is illustrated in Fig. 3 to describe how the algorithm works.

Fig. 3
figure 3

Flow chart of the application of the proposed algorithm

The definition of D1 and D2

  1. (1)

    D1 calculation

    The heat method proposed by Crane et al. (2017) is used to compute the geodesic distance from one mesh vertex to all others. As illustrated in Figure 4, when applying a heat source on a certain vertex of a triangulated surface, the heat, u, will spread over the entire surface after a period of time t. By solving the following heat equation, the heat flow, u, at a fixed time, t, can be approximated:

    $$ \dot{u} = \Delta u. $$
    (1)
    Fig. 4
    figure 4

    Distance calculation of a certain vertex over the entire surface based on the heat method

    The direction along which the distance increases can be determined and normalised:

    $$ X = - \nabla u/\left| {\nabla u} \right|. $$
    (2)

    Figure 4a demonstrates the level sets of distance from the heat source. The distance fieldφin Fig. 4b is recovered by solving the Poisson equation:

    $$ \Delta \Phi = \nabla \cdot X. $$
    (3)

    For the triangulated surface mesh, Eqs. (13) with Laplace operator (\(\Delta\)), discrete gradient (\(\nabla\)) and divergence (\(\nabla \cdot\)) need to be discretised. The discretisation of the Laplacian at the vertex i can be defined as:

    $$ \left( {Lu} \right)_{i} = \left( {2A_{i} } \right)^{ - 1} \mathop \sum \limits_{j} \left( {{\text{cot}}\alpha_{i,j} + cot\beta_{i,j} } \right)\left( {u_{j} - u_{i} } \right) $$
    (4)

    where Ai is one third of the surrounding triangle area incident on vertex i, j are the vertices surrounding vertex i, \(\alpha_{i,j}\) and \(\beta_{i,j}\) are angles opposing the edge (Fig. 5 a).

    Fig. 5
    figure 5

    Illustration of triangulated surface mesh processing for the heat method

    Fig. 6
    figure 6

    Distance calculation based on the ray shooting method

    The discretisation can also be expressed in matrix form:

    $$ L = A^{ - 1} L_{C} $$
    (5)

    where A contains the vertex area information, and \(L_{C}\) is cotan operator.

    The heat flow, u, at time t can be solved using the following equation:

    $$ \left( {A - tL_{C} } \right)u = \delta_{{\Omega }} $$
    (6)

    where \(\delta_{{\Omega }}\) is a Kronecker delta over the boundary \({\Omega }\).

    For solving the gradient \(\nabla u\), the following discretisation equation is used:

    $$ \nabla u = \left( {2A_{f} } \right)^{ - 1} \mathop \sum \limits_{i} u_{i} \left( {n \times e_{i} } \right) $$
    (7)

    where \(A_{f}\) is the triangle surface area, n is the unit normal, and \(e_{i}\) is the edge vector oriented counter clockwise (Fig. 5b).

    The discretisation of divergence \(\nabla \cdot X\) at the vertex i can be defined as:

    $$ \nabla \cdot X = \frac{1}{2}\mathop \sum \limits_{j} {\text{cot}}\theta_{1} \left( {e_{1} \cdot X_{j} } \right) + {\text{cot}}\theta_{2} \left( {e_{2} \cdot X_{j} } \right) $$
    (8)

    where j are the triangles surrounding vertex i, the \(X_{j}\), e1 and e2 are the corresponding unit vector and edge vectors (Fig. 5c).

    In the end, the distance field φ can be calculated using the following discretised Poisson equation:

    $$ L_{C} \phi = B $$
    (9)

    where B is the vector of divergences of the normalised vector X.

    For a certain vertex, D1 is defined as the maximum distance in the corresponding distance fieldφ.

  2. (2)

    D2 calculation

    A ray shooting method is used to decide a ‘shape aware’ distance inside the geometry (Liu et al., 2009; Shapira et al., 2008). As illustrated in Figure 6, given a certain centroid of a triangle, fi, a cone is centred around the inward normal direction ni of this triangle. Twenty (m=20) rays inside the cone are cast into the geometry, and the ray length, lj, inside the triangle mesh geometry is obtained.

    Fig. 7
    figure 7

    Illustration of ray-triangle intersection

    For calculating the ray length, ray-triangle intersection algorithm developed by Möller et al. (Möller & Trumbore, 1997) is used (Fig. 7). The ray equation R(x) can be defined as:

    $$ R\left( x \right) = p_{A} + x \cdot n_{p} $$
    (10)

    where \(p_{A}\) is the ray origin and np is the ray direction.

    The implicit equation of the triangle interaction plane is:

    $$ \left( {p - a_{0} } \right) \cdot n = 0 $$
    (11)

    where \(a_{0}\) is one vertex of the triangle, n is the normal direction of this triangle (Fig. 7).

    The interaction point position, \(p_{B} , \) can be calculated by combining the above two equations. The length between the ray shooting origin, \(p_{A} ,\) and the interaction position, \(p_{B} , \) can be defined as:

    $$ l = \left\| {p_{A} - p_{B} .} \right\| $$
    (12)

    For the centroid in a certain triangle, fi, the maximal inscribed sphere diameter, di, is defined as:

    $$ d_{i} = \arg \min_{j} \left\{ {l_{j} /\cos \theta_{j} } \right\} $$
    (13)

    where θj is the angle between lj and nj.

    For a certain vertex on the triangulated surface, D2 is defined as an average value of di of the neighbourhood triangles. Here, the neighbourhood triangles are defined as triangles sharing the same vertex.

    The AR value of a certain feature depends on the ratio of characteristic length and characteristic width. For evaluating the AR of a certain feature, D1 calculated by heat method represents the characteristic length of a 3D geometry, while D2 calculated by the ray shooting method decides the characteristic width of the geometry. These two measures can be applied to any meshed geometries regardless of their orientations. The dimensionless ratio (D1/D2) could then be used to describe various geometries.

Mesh segmentation algorithm

The above-mentioned dimensionless value D1/D2 offers a way to inspect a meshed geometry on a global level. However, in some cases, the geometry has complex features that need to be isolated and analysed individually. 3D mesh segmentation is one method to achieve this (Theologou et al., 2015). In the presented work, a spectral mesh segmentation method is applied to partition the complex geometries and it is based upon the methods in Liu and Zhang (2004).

The mesh segmentation method starts from a graph representation of the meshed surfaces. A dual graph of the 3D mesh is firstly constructed by connecting the centre node of triangle faces which share common edges (Fig. 8a). Afterwards, a weight matrix, Weight, between adjacent faces fi and fj is calculated. Distance measures between adjacent faces are derived on the dual graph and used in the weight matrix. During the segmentation, two faces tend to belong to different parts if they have a large distance value.

Fig. 8
figure 8

Dual graph, geodesic distance and angular distance for mesh segmentation

Three distance measures i.e. geodesic distance (GeoDist), angular distance (AngDist) and volumetric shape image distance (VSIDist) are used in this work. As illustrated in Fig. 8b, the geodesic distance (GeoDist) is the distance between the centres of adjacent faces:

$$ Geo_{{{\text{Dist}}}} \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) = \left\| {p_{{\text{i}}} - p_{{\text{C}}} } \right\| + \left\| {p_{{\text{j}}} - p_{{\text{C}}} } \right\| $$
(14)

where pi and pj are the centroids of fi and fj, and pC is the middle point of the common edge.

The angular distance is a criterion to identify concave edges for performing the segmentation. As illustrated in Fig. 8c, the angular distance between two adjacent faces can be defined as:

$$ Ang_{{{\text{Dist}}}} \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) = \left\{ {\begin{array}{*{20}c} { acos\left( {n_{i} \cdot n_{j} } \right) if \eta \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) > 0 } \\ { \cdot acos\left( {n_{i} \cdot n_{j} } \right) if \eta \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) \le 0} \\ \end{array} } \right. $$
(15)

In this work, \(\epsilon =0.1\) to emphasise the effect of concave edges.

The convexity \(\eta \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) \) is calculated by:

$$ \eta \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) = \left( {n_{i} \times n_{j} } \right) \cdot n_{e} $$
(16)

where ni and nj are normal of fi and fj, ne is the edge vector of the common edge.

The volumetric shape image distance (VSIDist) (Katz & Tal, 2003; Liu et al., 2009) is calculated by the previously described ray shooting method. As illustrated in Fig. 9a, the reference point, ri, of each triangle face, fi, is defined as the centre of the corresponding inscribed sphere. For each triangle face, fi, m (m = 100) rays are uniformly sent through a Gaussian sphere, and the interaction point sij between the rays and the meshed surface can be collected (Fig. 9b). The normalised interaction points for a triangle face fi are:

$$ S_{i} = \left\{ {s_{i}^{1} - r_{i} , \cdots ,s_{i}^{m} - r_{i} } \right\} $$
(17)
Fig. 9
figure 9

Computation of volumetric shape image (VSI) for mesh segmentation (Modified from Liu et al. (Liu et al., 2009))

This is defined as the volumetric shape image (VSI) for fi (Fig. 9c).

The difference between two triangle faces fi and fj is defined as:

$$ VSI_{{{\text{Dist}}}} \left( {f_{{\text{i}}} ,f_{{\text{j}}} } \right) = \frac{1}{{\mathop \sum \nolimits_{k} w_{k} }}\mathop \sum \limits_{k = 1}^{m/2} w_{k} \left( {l_{i}^{k} - l_{j}^{k} } \right)^{2} $$
(18)

where lk is the distance difference along the k-th direction:

$$ l^{k} = \left\| {S^{2k - 1} - S^{2k} } \right\| $$
(19)

wk is the Gaussian distribution:

$$ w_{k} = \left\{ {\begin{array}{*{20}c} {e^{{ - \left( {d_{k} - u_{ave} } \right)^{2} /\left( {2\sigma_{std}^{2} } \right) }} if d_{k} < u_{ave} + 2\sigma_{std} } \\ {0 if d_{k} > u_{ave} + 2\sigma_{std} } \\ \end{array} } \right. $$
(20)

where uave is the average value, and σstd is the standard deviation. dk is calculated by:

$$ d_{k} = \left( {l_{i}^{k} - l_{j}^{k} } \right)^{2} $$
(21)

The volumetric shape image distance (VSIDist) can be used to capture the volumetric feature information.

The pairwise distance matrix, Weight, between adjacent faces is then defined as a combination of the above three distance measures:

$$ Weight\left( {f_{i} ,f_{j} } \right) = \alpha Geo_{Dist} \left( {f_{i} ,f_{j} } \right) + \beta Ang_{Dist} \left( {f_{i} ,f_{j} } \right) + \gamma VSI_{Dist} \left( {f_{i} ,f_{j} } \right) $$
(22)

The parameters α, β and γ are used to control the relative importance of these three distance measures. The pairwise distance, Weight, is subsequently assigned to the constructed dual graph. Afterwards, a distance matrix, Dist, describing the shortest distances between all pairs of faces (fl and fm) is calculated. A symmetric normalised affinity matrix, W, can be obtained via a Gaussian kernel function:

$$ W\left( {f_{{\text{l}}} ,f_{{\text{m}}} } \right){ = }e^{{ - Dist\left( {f_{{\text{l}}} , f_{{\text{m}}} } \right)/\left( {2\sigma_{{{\text{ave}}}}^{2} } \right)}} $$
(23)

where σave is defined as the average value of distance matrix Dist. The segmentation based on the k-means clustering method is performed on the selected eigenvectors of the affinity matrix W (Liu & Zhang, 2004), in which the number of segment features Nf needs to be specified.

After this mesh segmentation procedure, the proposed criteria D1/D2 in Sect. 2.1 can be applied to each segmented sub-model.

Results and discussion

Single component

  1. (1)

    Evaluation of different geometries using D1/D2

    The proposed dimensionless ratio, D1/D2, is used to describe a group of test geometries, e.g. a thin wall, an ellipsoid and a helix. The prediction results are compared to the known AR values to evaluate performance.

    Figure 10 is a schematic of square shaped geometries: a 100 mm size square (d=100 mm) is extruded to have different lengths (l=0.1–2000 mm). In this way, various types of square shaped geometries can be obtained, e.g. thin wall, cube and rod, corresponding to different ARs. The two distance measures (D1 and D2) are applied for each square shaped geometry. For a certain meshed geometry, D1 and D2 are calculated at each vertex of the surface mesh, thus a set of values can be obtained. Figure 11 illustrates the D1 and D2 distribution for a typical meshed rod geometry. As D1 is calculated based on heat method, the smallest value is distributed in the middle of the geometry while the largest value representing the maximum distance appears at either end of the rod (Fig. 11b). D2 is calculated based on the ray shooting method and has a different distribution characteristic. In particular, the smallest values occur along edge regions of the geometry (Fig. 11c). As illustrated in Fig. 12, probability distributions of these two measures (D1 and D2) are further calculated for several square shaped geometries. The probability distributions are closely related to different shape features: for the thin wall geometry the largest D1 and D2 have the maximum probability, while the cube geometry shows a contrary trend that the smallest value has the maximum probability; the rod geometry has a relatively even probability distribution. The maximum value (D1max and D2max) and average value (D1ave and D2ave) in the probability graph are then obtained. The corresponding dimensionless ratios (D1max/D2max and D1ave/D2ave) are further evaluated and compared with the defined AR values as shown in Fig. 13. Here, the AR is defined as the ratio of the longest edge length to the shortest edge length within a geometry. As shown in Fig. 13a, considering different lengths, l, the geometry has different AR values (AR=1–1000). Fig. 13b demonstrates a linear relationship between the D1/D2 and the defined AR in logarithmic scale. The results indicate that D1/D2 can predict the AR of square shaped geometries, which is especially useful for detecting high AR features. It can also be concluded that in most cases D1max/D2max has a better prediction accuracy than D1ave/D2ave. In the following, only D1max/D2max is selected and studied for further evaluation of other geometries.

    The proposed dimensionless D1max/D2max is also applied to ellipsoids, as illustrated in Fig. 14. The dimension of an ellipsoid can be described by the length of three principal semi-axes a, b and c, and the AR is defined as the ratio of the longest axis length to the shortest semi-axis length. As shown in this graph, the proposed dimensionless D1max/D2max can capture the AR variation trend of the ellipsoids. When the three principal axes have the same length, the geometry becomes a sphere with an aspect ratio value of AR=1. In this case, D1 represents the semi-circumference of a sphere, while D2 is the diameter of a sphere, thus the predicted values are slightly higher than the defined AR. The analysis is performed on various polyhedra with AR=1 (Fig. 15). For all cases, the D1max/D2max is slightly larger than the defined aspect ratio (AR=1), which reveals the measure is prone to overestimating the aspect ratio, particularly for the low AR polyhedra. There is also a trend of decreasing D1max/D2max with an increasing number of faces from a tetrahedron to sphere. This indicates that this dimensionless measure is sensitive to morphology changes.

    Similar analysis has been performed on curved geometries as illustrated in Figs. 16, 17, and 18. For the curved rod and thin wall geometries (Figs. 16 and 17), they are set to have the same perimeter/thickness and AR values (AR=20 for curved rod, AR=1000 for curved thin wall). For both cases, the degree of curvature changes from 180 to 360 degrees. For the curved rod geometry, the D1max/D2max (≈20) can accurately predict the AR when the curved angle is less than 360 degrees. The geometry becomes a closed form when the curved angle is 360 degrees, and the D1max/D2max value drops sharply to around 10. For the curved thin wall geometry, the D1max/D2max (≈1200) is slightly larger than the defined AR when the curved angle is less than 360 degrees, and is equivalent to the defined AR for the closed form case with a 360 degree curved angle. Similar tendency can also be observed for the helical geometry as shown in Fig. 18. Here, the aspect ratio (AR=31.4) of the helical geometry is defined as the ratio of length (l=157 mm) to diameter (d=5 mm). The D1/D2max is about 15, which is about half the defined AR (≈31.4) when the height H=0, and it gives a good prediction when H>0. For all cases in Figures 16, 17, and 18, despite the curved geometry, the same characteristics dimensions exist until the geometry becomes fully enclosed. At this point, the D1max/D2max values are different to the open-form cases. It can be argued that the topology of the closed-form geometry is fundamentally different to the open-form geometry. Therefore, a precise definition of AR of these geometries needs to be further explored.

  2. (2)

    Evaluation of mesh sensitivity

    Triangulated STL files are created with a variety of meshing strategies and levels of refinement. Therefore, it is appropriate to conduct a mesh sensitivity analysis using the proposed criterion D1/D2. As illustrated in Fig. 19, four different mesh numbers (Nmesh) for the cubic geometries have been considered to evaluate the mesh sensitivity. Figure 20 presents the prediction results considering different mesh numbers for typical cubic shaped geometries. In general, for all geometries in Fig. 20, the proposed D1max/D2max can give reasonable predictions of aspect ratio values within the examined mesh number range (Nmesh=192–12288). In addition, with increased mesh numbers, the D1max/D2max approaches an asymptotic value, and can therefore give more reliable predictions. For the tested geometries used in this work, relatively high mesh numbers (>10000) are adopted to ensure reliable predictions.

Fig. 10
figure 10

Dimension of square shaped geometries

Fig. 11
figure 11

D1 and D2 at each vertex within a meshed rod geometry

Fig. 12
figure 12

Probability distribution of D1 and D2 values within typical square shaped geometries

Fig. 13
figure 13

Comparison between D1/D2 and theoretically defined aspect ratio (AR) for the square shaped geometries

Fig. 14
figure 14

Comparison between D1max/D2max and theoretically defined aspect ratio (AR) for ellipsoids

Fig. 15
figure 15

Evaluation of D1max/D2max for different polyhedra

Fig. 16
figure 16

Comparison between D1max/D2max and aspect ratio (AR) for the curved rod geometry

Fig. 17
figure 17

Comparison between D1max/D2max and aspect ratio (AR) for the curved thin wall geometry

Fig. 18
figure 18

Comparison between D1max/D2max and aspect ratio (AR) for the helical geometry

Fig. 19
figure 19

Cubic geometries with different mesh triangle counts

Fig. 20
figure 20

Mesh sensitivity checks for typical cubic geometries

Geometries with complex features

The developed method was then applied to evaluate geometries with complex features. As illustrated in Fig. 21, D1/D2 at each vertex within each test geometry is firstly calculated. In this figure, high values are usually found for thin wall features (a), sharp edges (c, d and e) and abrupt cross-sectional changes (b) within a component. All of these features are known to be related to complications in metal AM processes. This demonstrates that D1/D2 has the potential to distinguish those problematic features that are closely related to high thermal stresses during AM processes. For evaluating the aspect ratio of individual features within a complex geometry, the mesh segmentation algorithm is applied. As illustrated in Fig. 22, the geometries are segmented using a spectral method and assigned to different colours for different segments. D1max/D2max is calculated for each segment and plotted in a bar chart in, where the colour is kept the same as the corresponding segment (see online manuscript for colour information). In this way, high AR features such as the thin walls in Fig. 22a can be distinguished. The results in Figs. 21 and 22 demonstrate the applicability of this method for geometries with complex features.

Fig. 21
figure 21

D1/D2 distribution at each vertex for different components with complex features

Fig. 22
figure 22

Mesh segmentation results and corresponding D1max/D2max for each segmented part

Discussion and future work

Different test geometries including straightforward and complex features are evaluated using the proposed metrics D1 and D2. These two metrics are generally applicable for triangulated geometries. In addition, D1 and D2 vary at each vertex within a meshed geometry (Fig. 11), thus there is a probability distribution for a certain geometry as illustrated in Fig. 12. In this work, it was found that the maximum value i.e. D1max and D2max are most suitable for capturing properties similar to AR for a given geometry. The calculated ratio D1max/D2max is a good estimation of the component AR for most cases. Especially, D1max/D2max offers a general method to automatically check various high AR features, which will be useful in preventing associated defects during metal AM processing. In addition, the calculated D1/D2 at each vertex shows potential for detecting problematic features such as thin walls and sharp edges (see Fig. 21). The proposed dimensionless ratio is independent of geometry scale and orientations, and can be applicable to all geometrical shapes. It was found that curved geometry with same characteristic length and width, closure of the geometry resulted in a sudden change in the D1max/D2max values (Figs. 16, 17, and 18). In this work, the curved geometries shown in Figs. 16, 17, and 18 are assumed to have the same AR values. As the topology of the closed-form geometry and the open-form geometry are fundamentally different, this step change is unsurprising but requires further study to ascertain whether this sudden change is acceptable in the majority of cases.

With regard to geometries with complex features, a mesh segmentation algorithm has been applied to isolate and analyse the individual features (Fig. 22). The spectral method used in this work has shown an impressive capacity to segment distinct features, and the D1max/D2max can then be calculated for each individual feature. The proposed method could be used as a general check to distinguish high AR features within complex geometries. It should be noted that the number of segments needs to be defined a priori, which is arguably inconvenient. However, improvements in segmentation algorithms is beyond the scope of the present study (Theologou et al., 2015). An obvious improvement is unsupervised mesh segmentation, which would allow for automatic estimation of segment numbers. More advanced segmentation algorithm could also be applied to this research to analyse geometries that contain a variety of problematic features (Fang et al., 2011; Hase et al., 2020).

The proposed method in this article provides a promising way to automatically detect high AR features of meshed files prior to AM. In general, the developed algorithm can be used to distinguish high AR features for any processes using meshed STL files. There are various kinds of metal AM processes, e.g. powder bed fusion, and wire arc additive manufacturing. As one of the most common AM techniques, the powder bed fusion process could be a main application area of this algorithm, especially as high AR features are one of the major selling points of this process e.g. strut-based lattice structures. Currently, this algorithm is being integrated to a design software for additive manufacturing that can be used as a new manufacturability check for AM components. It will also be useful to combine this algorithm with other computer aided engineering (CAE) tools, especially thermal stress analysis. It can also be used as a criteria to further optimise the geometry design by some other intelligent methods (Jiang et al., 2020; Wang et al., 2020).

As a final discussion point, it is important to note that AR is a property of interest in numerous fields beyond AM. As such, the proposed approach may find useful application in fields such as medical imaging (Lehmann et al., 1999), biological studies (Weir et al., 2003) and, indeed, any other field in which AR is a property of interest.

Conclusions

Detecting problematic features in AM is necessary and has not yet been widely studied. Potential defects in metal AM are often associated with high AR features, e.g. thin walls and fine needle-shaped geometry. In this work, a dimensionless ratio, D1/D2, based on mesh processing algorithms was proposed. This ratio is analogous to the definition of AR (D1 is characteristic length, and D2 is characteristic width). Analysis of various geometries were performed using this method. The main conclusions are as follows:

  1. 1.

    Two distance metrics were defined based on heat method (D1) and ray shooting method (D2). The corresponding dimensionless ratios (D1/D2 and D1max/D2max) are therefore applied to detect high aspect ratio features of different geometries.

  2. 2.

    For most individual components e.g. square shaped geometry, ellipsoids and polyhedra, D1max/D2max can successfully predict the AR, especially for the high AR features. The defined dimensionless ratio is useful for characterising a group of similar or related shapes with different AR values.

  3. 3.

    If the method is accompanied by mesh segmentation, geometries can be analysed on a feature-by-feature basis, which is a valuable additional functionality. By combining spectral mesh segmentation method, the proposed dimensionless ratio can be used to detect problematic features in a global model.

Currently, there are very few checks that can be readily applied to a general 3D model in order to identify problematic features prior to manufacture. As the complexity of a component increases, it becomes very challenging to isolate problematic regions with confidence. This can be viewed as an important and early step in the avoidance of wasted build-time and material in metal AM. Avoiding these costly failures is paramount if the metal AM process chain (design through to manufacture) is to become productive and reliable in future years. In future, it would be necessary to further testify this algorithm by performing experiments on additive manufactured parts for specific material, machine and process combinations. In addition, it will be useful to combine this method with thermal stress analysis in AM as an integrated design approach.