1 Introduction

The importance of parametric solid modelling systems in design is widely recognised. They were described by Hoffmann and Joan-Arinyo as “a key technology to define and manipulate solid models through high-level, parameterised steps” (Hoffmann and Joan-Arinyo 2002). They highlight that tools used to construct and evaluate parametric models are based on defining features and geometric constraints. Feature-based modelling within commercial CAD packages (e.g. Dassault Catia, Siemens NX, PTC Creo) consists of creating an instance of a generic feature that follows a specific arrangement of geometric entities pre-defined by the software vendor. Specification of spatial and geometric constraints tailors a generic instance to the required geometric shape and position. These procedures provide flexibility in the geometry that can be modelled, ease of design modification, and a vital link with CAE disciplines through, for example, the Simulation Intent framework proposed by Nolan et al. (2015).

In the literature, the integration of feature-based geometry parameters has been considered for both shape and topology optimisation (TO) frameworks. Whilst shape optimisation enables design improvements (Upadhyay et al. 2021), a critical limitation is its inability to change the design topology, that is, the structural connectivity. It is recognised that more flexible approaches are required when the topology and geometry of the design are not known a priori. The potential of TO frameworks for these scenarios is widely recognised; however, these optimisation problems are often solved in isolation from feature-based modelling tools. This results in a situation where the power and flexibility of feature-based modelling strategies are lost, hindering subsequent design modifications or idealisation decisions for subsequent analysis. Continued research seeks to establish a firm connexion between TO frameworks and commercial feature-based modelling tools.

The motivation of this work is to develop methods that facilitate the integration of “feature-mapping” methods (Wein et al. 2020) with feature-based parametric models. More specifically, the MMC framework (Guo et al. 2014) is used for TO and Siemens NX is used for feature-based modelling. The aim is to construct parameterised feature-based models from TO designs that conform to conventional modelling practices. The assembly of interconnected features is also considered.

The remainder of this paper is presented as follows. Section 2 reviews published work on integrating TO results with parametric feature-based models. The methodology for the proposed framework is outlined in Sect. 3. This includes metrics for assessing the optimisation result, followed by a geometry clean-up framework. Section 4 presents several numerical examples demonstrating the proposed framework, followed by a thorough critique of the framework in Sect. 5. Key findings of the work are summarised in Sect. 6 and suggestions for future work are described in Sect. 7.

2 Literature review

The recent review of Subedi et al. (2020) acknowledges feature-based model construction as a major challenge associated with TO. They identify three primary downstream applications which require the conversion of a faceted TO result to a parametric feature-based model: prototyping, design validation, and design exploration. They also provide a comprehensive review of two main technologies that seek to address this challenge: post-processing strategies that are applied to TO results and constrained TO formulations that integrate geometric information in the optimisation formulation. Both strategies can be subdivided into surface-based and feature-based approaches. The primary objective of surface-based approaches is to produce a boundary representation surface model of the optimised design using, for example, B-spline or NURBS curves and surfaces. Subedi et al. highlight that whilst these techniques have been commonly utilised in commercial systems, they do not include the features and constraints typical of feature-based CAD models. Surface models also introduce limitations for downstream tasks. The resulting CAD representation is often challenging to modify in subsequent design activities where it may be desired to manipulate individual features. Challenges will also be introduced in analysis applications where different idealisations and properties will be attributed to different features. Consequently, this work focuses on feature-based approaches.

2.1 Post-processing strategies

Post-processing strategies offer significant potential for the construction of parametric CAD models. Hsu and Hsu (2005) presented an approach that constructs 3D swept features through B-spline cross-sections extracted based on density contours. This required manual selection of an axis for the cross-section extraction. Larsen and Jensen (2009) presented a methodology for constructing swept features through simple two-dimensional (2D) templates. Manual inputs were required to identify the surface facets included in the feature, the number of defining cross-sections, and the guide curve orientation. Stangl and Wartzack (2015) implemented a curve-skeleton extraction process based on mesh contraction. User modification was required for clean-up and cross-section identification. Nana et al. (2017) and Cuillière et al. (2018) presented a fully automated process for extracting skeletons from TO results. Circular cross-sections were assigned to each segment, the radius of which were calculated based on the local mean distance to the 3D surface of the optimised geometry. Gamache et al. (2018) highlighted limitations in previous skeletonisation methods and developed a MATLAB-based approach for deriving truss structures corresponding to TO designs. Yin et al. (2020) utilised skeletonisation algorithms to extract the skeleton of TO results with subsequent layout and size optimisation. The individual cylindrical primitives were assembled within a CAD system using Boolean operations. Watson et al. (2022) presented a skeletonisation algorithm for truss-type structures with the cross-sectional areas initially calculated using the method of joints and refined using shape optimisation. Amroune et al. (2022) also used a skeletonisation process to construct lofted features with B-spline representations of cross-sections at various intervals along the length of each segment.

In summary, most post-processing strategies place a significant emphasis on the assumption that the TO result can be idealised as a beam- or truss-like structure. Whilst some variations have been proposed, these require manual intervention for constructing a feature-based model (Larsen and Jensen 2009; Stangl and Wartzack 2015). In their review, Subedi et al. (2020) highlight that more general implementations are not fully robust. They highlight that automated methods to determine cross-sectional profiles and sweep paths are non-trivial. Furthermore, the generated CAD models do not establish a feature hierarchy, a strategy commonly employed in commercial design.

2.2 Constrained optimisation

The alternative to post-processing strategies is constrained optimisation, where the constrained TO formulation can alleviate the challenge associated with CAD model construction. Methods for feature-based model construction take the form of feature-mapping methods that explicitly model solid or void regions with high-level geometric parameters (Wein et al. 2020). A benefit of these methods is the retention of explicit geometric information throughout the optimisation. Typically, an array of geometric features is pre-defined, and the optimisation progresses by perturbing the explicit parameters that define the features. The geometric parameters explicitly express the topology and shape of the resulting design. Several types of geometric features have been considered. Guo et al. (2014) used rectangular features, with variation in feature width introduced by Zhang et al. (2016), and features with curved skeletons by Guo et al. (2016). The flexibility of curved features was developed through approaches that implemented Bezier skeletons (Zhu et al. 2021). Norato (2018) introduced another class of geometric features using supershapes. Shannon et al. (2022) developed feature types corresponding with swept features in CAD systems, using Bernstein polynomials to control both the shape of spine curves (Bezier curves) and the width variation along slender features.

Constrained approaches superficially appear to be easily integrated with feature-based CAD models, and the possibility of establishing this connexion is suggested by several authors (Hou et al. 2017; Smith and Norato 2019b). However, Wein et al. (2020) highlight that although these methods are often suggested as suitable for integration with CAD systems, there is little practical evidence of this in the literature. Further challenges with constrained approaches have been identified by Subedi et al. (2020). They highlight that imposing additional constraints on the optimisation may compromise the design performance, whilst also increasing computational cost. They also suggest that these strategies often target a particular application and integration with CAD systems is not automated.

2.3 Research aims

Based on the literature, this paper will address the challenge of integrating feature-mapping methods with feature-based CAD models. The aim is to automate the transition of TO designs produced by FM frameworks to a feature-based CAD model.

The objectives are to

  • Construct parametric feature-based models compliant with downstream applications, such as feature suppression and feature idealisation for subsequent analyses.

  • Utilise feature-based templates available in commercial CAD systems.

  • Construct designs with a minimal feature set.

  • Establish geometric connexions between overlapping features.

3 Methodology

Feature-mapping methods utilise explicit geometric parameters in the optimisation framework. This work uses linear features that correspond with extruded features in CAD systems.

For linear features defined by two control points, \(\left({p}_{0},{q}_{0}\right)\) and \(\left({p}_{1},{q}_{1}\right)\) and of fixed width, \(w\), the implicit representation is constructed using a topology description function (TDF) defined as

$$\phi \left( {{\varvec{x}}, {\varvec{D}}_{n} } \right) = 1 - \left( {\frac{{\left( {\frac{{p_{1} - p_{0} }}{L}} \right)\left( {x - \frac{{p_{0} }}{2} - \frac{{p_{1} }}{2}} \right) + \left( {\frac{{q_{1} - q_{0} }}{L}} \right)\left( {y - \frac{{q_{0} }}{2} - \frac{{q_{1} }}{2}} \right)}}{\frac{L}{2}}} \right)^{m} - \left( {\frac{{\left( {\frac{{q_{0} - q_{1} }}{L}} \right)\left( {x - \frac{{p_{0} }}{2} - \frac{{p_{1} }}{2}} \right) + \left( {\frac{{p_{1} - p_{0} }}{L}} \right)\left( {y - \frac{{q_{0} }}{2} - \frac{{q_{1} }}{2}} \right)}}{\frac{w}{2}}} \right)^{m},$$
(1)

where \(L\) is the feature length defined as

$$L = \left( {\left( {p_{1} - p_{0} } \right)^{2} + \left( {q_{1} - q_{0} } \right)^{2} } \right)^{\frac{1}{2}},$$
(2)

and \(\left({\varvec{x}}\right)=\left(x,y\right)\) represents grid point coordinates in a 2D design domain, \(\text{m}\) is a penalty parameter, set at 6 (Guo et al. 2014), and \({{\varvec{D}}}_{n}\) is the set of feature design variables given by \({{\varvec{D}}}_{n}=\left({p}_{0},{q}_{0},{p}_{1},{q}_{1},w\right)\).

The TDF in (1) is combined with a regularised Heaviside function, as used by (Zhang et al. 2016), given as

$$H\left( \phi \right) = \left\{ {\begin{array}{lll} {1,} & \quad {{\text{if}}\, \phi > \epsilon ,} \\ \begin{gathered} \frac{{3\left( {1 - {\upalpha }} \right)}}{4} \cdot \left( {\frac{\phi }{\epsilon } - \frac{{\phi^{3} }}{{3\epsilon^{3} }}} \right) + \frac{{1 + {\upalpha }}}{2}, \hfill \\ \alpha , \hfill \\ \end{gathered} & \begin{gathered} \quad {\text{if}} - \epsilon \le \phi \le \epsilon , \hfill \\ \quad {\text{otherwise}}, \hfill \\ \end{gathered} \\ \end{array} } \right.,$$
(3)

where \(\epsilon\) is set at 0.5 and \(\alpha\) is set at zero. For TO, a non-zero value of \(\alpha\) prevents singularities in the structural analysis; however, for the feature clean-up framework developed in this work, structural analysis is not required. A maximum operator is used to unite multiple features as \({\phi }^{s}\left({\varvec{x}}\right)=\text{max}\left({\phi }_{1},\ldots ,{\phi }_{N}\right)\), where \(s\) denotes the aggregated representation of \(N\) structural features. Whilst not smooth, this aggregation has not presented issues in the numerical examples considered. The set of design variables for all features is given by \({\varvec{D}}=\left\{{{\varvec{D}}}_{n}|n\in N\right\}\).

As the number of features required in FM optimisation is not always known a priori, it is common to initiate the design with an array containing multiple features (Guo et al. 2014). Whilst explicit geometric parameters are used to define the features that can be directly represented within a CAD system, the optimised design often contains undesirable geometric phenomena. As an example, a cantilever beam optimisation problem is initiated with 24 linear, constant width features in the design space (Fig. 1a). The objective is to minimise the structure compliance subject to a volume fraction constraint of 0.4. The optimised model (Fig. 1b) portrays why the transition to a feature-based CAD representation is not seamless. The exhibited phenomena, which are not uncommon when using FM, include

  1. 1.

    Small/redundant features.

  2. 2.

    Collinear features.

  3. 3.

    Overlapping features.

  4. 4.

    Ambiguous connexions.

Fig. 1
figure 1

Cantilever beam optimisation a initialisation and b optimisation result

Norato et al. presented an approach that can help mitigate the issues of small/redundant and overlapping features by introducing a density parameter to each feature (Norato et al. 2015). This has the ability to remove unnecessary features during the optimisation. However, not all unnecessary features may be removed. The present approach presents an alternative where these features are identified and removed subsequent to the optimisation. Watts and Tortorelli (2017) and Smith and Norato (2019a) presented techniques whereby geometric constraints are imposed between feature endpoints during the optimisation with the effect of reducing overlaps and small features. Imposing geometric constraints during the optimisation can also impose design variations as highlighted by (Smith and Norato 2019a). The present approach presents a method for imposing geometric constraints subsequent to the optimisation.

Whilst a direct transition of the design to a CAD system would not be acceptable, the explicit geometric parameters and implicit geometry representations facilitate the feature clean-up algorithms developed in this work. Figure 2a depicts the geometric parameters defining a single feature, whilst Fig. 2b depicts the corresponding implicit representationFootnote 1 where the feature has been mapped to the analysis mesh. The mapping ranges from 0 to 1, representing void and solid material, respectively. The implicit representation of all the features from Fig. 1b is shown in Fig. 2c.

Fig. 2
figure 2

Feature explicit parameters and implicit representation a single feature explicit parameters, b single feature implicit representation, and c aggregated feature implicit representation

Geometry assessment metrics that provide the basis for feature clean-up algorithms are calculated from the explicit parameters and implicit representations. The clean-up algorithms identify and correct each of the phenomena identified in Fig. 1b. For simplicity, only linear, constant width features are considered to develop and demonstrate the algorithms.

An estimate of the area of each feature, \({A}_{n}\), is calculated as

$$A_{n} = \mathop \sum \limits_{{e \in NE_{n} }} a_{e} \cdot v_{e,n},$$
(4)

where \({a}_{e}\) is the element area,Footnote 2\({NE}_{n}\) is a subset of the elements in the design space, \(NE\), given as

$$NE_{n} = \left\{ {\left. {e \in NE} \right|v_{e,n} > 0} \right\},$$
(5)

and \({v}_{e,n}\) is the element area fraction of element, \(e\), contributed by feature \(n\) given by

$$v_{e,n} = \frac{{\mathop \sum \nolimits_{i = 1}^{4} \left( {H\left( {\phi \left( {{\varvec{x}}_{i} ,{\varvec{D}}_{n} } \right)} \right)} \right){ }}}{4},$$
(6)

where \({{\varvec{D}}}_{n}\) is the design variable set for feature \(n\) and \({{\varvec{x}}}_{i}\) are the coordinates of each node of element, \(e\).

The implicit representation also provides a quantitative measure of overlaps between intersecting features. The overlapping area of feature \(m\) and feature \(n\) is given by the summation of the subset of elements \(N{E}_{m\cap n}\subseteq N{E}_{n}\), where the element area fractions for both features \(n\) and \(m\) are non-zero. This is calculated as

$$A_{m \cap n} = \mathop \sum \limits_{{\begin{array}{*{20}c} {m \in N\backslash \left\{ n \right\}} \\ {e \in NE_{m \cap n} } \\ \end{array} }} a_{e} \cdot v_{e,m},$$
(7)

where

$${NE}_{m\cap n}=\left\{e\in {NE}_{n}|{v}_{e,m}>0,m\in N\setminus n\right\}.$$
(8)

This summation identifies the set of features, \({I}_{n}\), which intersect feature \(n\), and the corresponding size of the intersections. The set of features that intersect feature \(n\) is expressed as those where the intersection area is non-zero,

$${I}_{n}=\left\{m\in N|m\ne n \wedge {A}_{m\cap n}>0\right\}.$$
(9)

Equation 4 also calculates the unique area, \({A}_{n}^{\text{unq}}\), of feature \(n\) that does not overlap with any other feature, (i.e. the unduplicated area). The summation is over a reduced set of elements, \({NE}_{n}^{\text{unq}}\), where the summation of the element area fraction for all other features is zero

$$NE_{n}^{{{\text{unq}}}} = \left\{ {e \in NE_{n} |\mathop \sum \limits_{{\begin{array}{*{20}c} {m \in I_{n} } \\ {e \in NE_{n} } \\ \end{array} }} v_{e,m} = 0} \right\}.$$
(10)

Two metrics are established for comparing features:

  1. (1)

    The size of each feature relative to the largest feature in the optimised geometry

    $$A{R}_{n}= \frac{{A}_{n}}{\text{max}({A}_{1},\ldots ,{A}_{N})},$$
    (11)
  2. (2)

    The ratio of the unduplicated area to the total area of each feature

    $${UR}_{n}= \frac{{A}_{n}^{\text{unq}}}{{A}_{n}}.$$
    (12)

The explicit geometric parameters are used to calculate connexions between intersecting features. Linear feature spines are calculated as

$${C}_{n}={\left({p}_{0},{q}_{0}\right)}_{n}\left(1-t\right)+{\left({p}_{1},{q}_{1}\right)}_{n}t,$$
(13)

where \(t\in \left[\text{0,1}\right]\) is the parameter range over which the spine is constructed.

The angle of each feature from the horizontal axis (Fig. 2a) is calculated in the interval \(\left[-\pi ,\pi \right]\) as

$$\theta_{n} = \left\{ {\begin{array}{ll} \hfill {\cos^{ - 1} \left( {\hat{\varvec{n}}_{n} \cdot {\hat{\mathbf{n}}}_{{\text{h}}} } \right),} & \quad \hfill {{\text{if}}\,\left( {q_{1,n} - q_{0,n} } \right) \ge 0 } \\ \hfill { - \cos^{ - 1} \left( {\hat{\varvec{n}}_{n} \cdot {\hat{\mathbf{n}}}_{{\text{h}}} } \right),} &\quad \hfill {{\text{otherwise}}} \\ \end{array} ,} \right.$$
(14)

where \({\widehat{\mathbf{n}}}_{\text{h}}\) is the horizontal unit vector given by \(\left(\text{1,0}\right)\) and \({\widehat{{\varvec{n}}}}_{n}\) is the unit normal vector along the spine of feature \(n\) from point \({\left({p}_{0},{q}_{0}\right)}_{n}\to {\left({p}_{1},{q}_{1}\right)}_{n}\), given by

$$\hat{\varvec{n}}_{n} = \frac{{\left( {p_{1} ,q_{1} } \right)_{n} - \left( {p_{0} ,q_{0} } \right)_{n} }}{{\left\| {\left( {p_{1} ,q_{1} } \right)_{n} - \left( {p_{0} ,q_{0} } \right)_{n} } \right\|}}.$$
(15)

Throughout the feature clean-up process, a series of algorithms are used to manipulate features. When an inappropriate manipulation is attempted, for example, replacing two perpendicular features with a single feature, the algorithms can propose geometry that deviates significantly from the original geometry. A measure of this deviation is calculated from the implicit representation as a geometric error, calculated as

$$\delta A = \frac{{\mathop \sum \nolimits_{e \in NE} \left| {v_{e}^{*} - v_{e}^{0} } \right|}}{{\mathop \sum \nolimits_{e \in NE} v_{e}^{0} }},$$
(16)

where \({v}_{e}^{0}\) is the original element area fraction before the feature clean-up process is initiated and \({v}_{e}^{*}\) is the element area fraction after the feature clean-up process.

Feature changes are discarded if they violate an error threshold, \({\delta A}_{\text{lim}}\). This metric is implemented in the feature removal algorithm (Sect. 3.1) with thresholds set in the range of 0.25–5.0% for the examples in Sect. 4. This threshold can be tailored to the design problem being considered, providing flexibility in the framework. A larger threshold will reduce the total feature count and corresponding design complexity, whilst a lower threshold will limit geometric deviations.

The following sub-sections outline the algorithms developed to manipulate FM optimisation results. The aim is to produce a geometry representation consistent with conventional feature-based modelling practices by removing unnecessary features, which would typically be avoided by a designer, and establishing connexions between features. An overview of the framework is presented in Fig. 3, highlighting the key algorithms and the order in which they are implemented. The first process, feature removal (Sect. 3.1), can be implemented in isolation from the other processes if the only aim is to minimise the number of features in the optimised design, equivalent to reducing the design complexity. The following process, establishing feature hierarchy (Sects. 3.2, 3.3), ensures the features comply with a hierarchical feature-based model. The final process, feature connexions (Sect. 3.4), connects intersecting features to ensure subsequent design changes propagate to dependent features.

Fig. 3
figure 3

Flowchart of feature clean-up framework. (Color figure online)

3.1 Feature removal

The final feature-mapping solution may contain small features that are below the size of interest or that do not contribute to the structural response of the model. The latter category may include features that are fully embedded within larger features or those that are entirely disconnected from the load-bearing structure. These would not naturally be included in a CAD representation of the optimised design and so can be removed from the total set of features, \(N\).

3.1.1 Feature removal algorithm

When a feature is marked for removal, as described below, the geometric parameters of intersecting features must be updated to minimise changes in the geometry representation. This is achieved by constructing a representation of the initial design for the selected feature \(n\) and its intersecting features \({I}_{n}\) with their initial design variables, \({{\varvec{D}}}^{0}\), as

$$H\left( {\mathop {\max }\limits_{{i \in I_{n} \cup \left\{ n \right\}}} \left( {\phi \left( {{\varvec{x}},{\varvec{D}}_{i}^{0} } \right)} \right)} \right).$$
(17)

Feature \(n\) is then removed from the design space, and the design is represented by the set of intersecting features \({I}_{n}\), only, as

$$H\left( {\mathop {\max }\limits_{{m \in I_{n} }} \left( {\phi \left( {{\varvec{x}},{\varvec{D}}_{m} } \right)} \right)} \right),$$
(18)

where \({{\varvec{D}}}_{m}\) is the set of geometric parameters that define feature \(m\).

A non-linear least squares (NLSQ) algorithmFootnote 3 is used to minimise differences in the implicit geometry representation (i.e. the grid point values of the TDF) by perturbing the design variables of the intersecting features. The NLSQ algorithm is formulated as

$$\begin{array}{ll} {\mathop {\min }\limits_{{{\varvec{D}}_{DV} }} \mathop \sum \limits_{j \in NN} \left( {H\left( {\mathop {\max }\limits_{{m \in I_{n} }} \left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{m} } \right)} \right)} \right) - H\left( {\mathop {\max }\limits_{{i \in I_{n} \cup \left\{ n \right\}}} \left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{i}^{0} } \right)} \right)} \right)} \right)^{2} } \hfill \\ {{\text{Subject\, to}}: {\varvec{D}}_{DV} \in {\mathbb{R}}^{s} } \hfill \\ \end{array},$$
(19)

where \(NN\) is the set of mesh nodes and \({{\varvec{D}}}_{DV}\) is the aggregated set of design variables for each feature in \(m\in {I}_{n}\), given as \({{\varvec{D}}}_{DV}=\left\{{{\varvec{D}}}_{m}|m\in {I}_{n}\right\}\), and \(s\) is the cardinality of the set of optimisation variables.

3.1.2 Implementation

In this work, three metrics are used to identify which features to test for removal:

  1. 1.

    The feature size ratio, \(A{R}_{n}\) (Eq. 11). The features are ranked according to ascending size ratio and features less than a threshold \({AR}_{\text{lim}}\), set at 0.1, are selected for potential removal.

  2. 2.

    The feature unique area ratio, \(U{R}_{n}\) (Eq. 12). Features are ranked according to their ascending unique area ratio, \(U{R}_{n}\) and those less than a threshold \({UR}_{\text{lim}}\), set at 0.3, are selected for potential removal. When a feature has a \(U{R}_{n}=0\), the feature is fully embedded within its intersecting features \({I}_{n}\), indicating the feature is not uniquely responsible for any area within the design domain. Additionally, a feature \(U{R}_{n}=1\) indicates that the feature is disconnected from the structure and does not contribute to a structural load path. Both these features can be removed without executing the feature removal algorithm.

  3. 3.

    Feature orientation, \({\theta }_{n}\) (Eq. 14). The difference in angular orientation of a feature and its intersecting features \({I}_{n}\) provides a measure of the collinearity between intersecting features. The possibility of removing feature \(n\) is considered for all intersecting features which have a collinearity measure less than a specified threshold, \({\theta }_{\text{lim}}\), set at \(10^\circ\). Note, the MATLAB implementation accounts for 180\(^\circ\) variations in the feature angle.

The thresholds imposed on the three metrics limit the number of features for which removal is attempted. Setting these too low may result in features not being considered for removal which could be removed without compromising the design. Conversely, setting large values for these metrics will result in all features being considered for removal. This will incur unnecessary computational expense, as the feature removal algorithm will be executed for features when it is evident that they cannot be removed without incurring a significant geometric error. For example, removing a feature that is perpendicular to its intersecting feature will inevitably cause a large geometric error and should not be considered for removal. Whilst these metrics determine the features for which removal is attempted, a suggested change is only accepted if the calculated geometric error estimate (16) is less than a specified threshold, \({\delta A}_{\text{lim}}\). If the geometry changes are accepted, the feature is removed from the original set of features, otherwise, the feature is added to a \(Retained Features\) list to ensure the same feature is not repeatedly considered for removal.

3.2 Feature enlargement

To establish a feature hierarchy, precedence is given to wider collinear features and geometrically larger features, hereafter referred to as parent features. Parent features are enlarged to maximise their intersection with each child feature \(m\), which intersects the parent feature. A subsequent step (Sect. 3.3) then reduces the size of each child feature \(m\) to minimise the intersection. Whilst the child feature cannot be removed from the design space, the size of the parent feature may be increased and the child feature reduced without imposing significant changes in the original design geometry. The aim is to produce a consistent and clear hierarchy in the feature connectivity, where parent features will be modelled in a CAD system first and child features modelled relative to them.

3.2.1 Feature enlargement algorithm

An NLSQ algorithm is used to enlarge parent features. A representation of the initial design for a parent feature, \(n\), and an intersecting child feature, \(m\in {I}_{n}\), is constructed as

$${\varvec{H}}_{n \cup m}^{0} = H\left( {\max \left( {\phi \left( {{\varvec{x}},{\varvec{D}}_{n}^{0} } \right),\phi \left( {{\varvec{x}},{\varvec{D}}_{m}^{0} } \right)} \right)} \right).$$
(20)

The abbreviated form, \({{\varvec{H}}}_{n\cup m}^{0}\), is used to conserve space in the optimisation formulation below.

The objective of the optimisation is to minimise the difference between the original representation given by (20) and the representation of the selected parent feature alone. This is done by increasing the size of the parent feature, increasing its dominance in the design. The optimisation is formulated as

$$\begin{array}{ll} {\mathop {\min }\limits_{{{\varvec{D}}_{n} }} \mathop \sum \limits_{j \in NN} \left( {{\varvec{H}}_{n \cup m,j}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{n} } \right)} \right)} \right)^{2} } \hfill \\ {{\text{Subject to}}: {\varvec{D}}_{n} \in {\mathbb{R}}^{s} } \hfill \\ \end{array}.$$
(21)

Whilst maximising the intersection of a parent feature \(n\) over a child feature \(m\), the optimisation function (21) may perturb feature \(n\) such that it deviates from its original representation, \(H\left(\phi \left({\varvec{x}},{{\varvec{D}}}_{n}^{0}\right)\right)\). This may cause the parent feature to also increase its overlap with the originally void design space or to move away from grid points that were once within the parent feature itself. This can cause unwanted changes in the design and is controlled by adding a penalty, \(\alpha\), to the set of nodes in \(H\left(\phi \left({\varvec{x}},{{\varvec{D}}}_{n}^{0}\right)\right)\) initially one (solid) and a penalty, \(\beta\), to the set of nodes originally zero (void) in the implicit representation as

$$\begin{array}{llll} {\mathop {\min }\limits_{{{\varvec{D}}_{n} }} \mathop \sum \limits_{j \in NN} \left( {\left\{ {\begin{array}{lll} {\left( {{\varvec{H}}_{n \cup m,j}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{n} } \right)} \right)} \right) \cdot \alpha ,} & {{\text{if}}\, H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{n}^{0} } \right)} \right) = 1,} \\ \begin{gathered} \left( {{\varvec{H}}_{n \cup m,j}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{n} } \right)} \right)} \right) \cdot \beta , \hfill \\ \left( {{\varvec{H}}_{n \cup m,j}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{n} } \right)} \right)} \right), \hfill \\ \end{gathered} & \begin{gathered} {\text{if}}\, {\varvec{H}}_{n \cup m,j}^{0} = 0, \hfill \\ {\text{otherwise}}. \hfill \\ \end{gathered} \\ \end{array} } \right.} \right)^{2} } \hfill \\ {{\text{Subject \,to}}: {\varvec{D}}_{n} \in {\mathbb{R}}^{s} } \hfill \\ \end{array}.$$
(22)

As a guideline, \(\alpha\) and \(\beta\) have been set at 10. The implication of not using the penalty parameters can be seen in Fig. 4c, where \(\alpha\) and \(\beta\) were set at 0. There is an obvious increase in the geometric deviation from the original design as Feature A has increased its intersecting area with Feature B. With the penalty parameters applied, the potential intersection increase is achieved (depicted by the region highlighted in Fig. 4b) whilst minimising changes to the original geometry.

Fig. 4
figure 4

Feature enlargement a situations for considering feature enlargement, b feature enlargement result, and c the result with no penalty parameters, \(\alpha\) or \(\beta\) applied to Feature A

3.2.2 Implementation

In this work, two scenarios are considered for enlarging features:

  1. 1.

    Feature size. Each feature in the design space is ranked in descending size. When a feature \(n\), has the potential to replace part of a child intersecting feature, \(m\in {I}_{n}\), but not fully replace it (demonstrated by features A and B in Fig. 4a), the feature enlargement algorithm maximises the size of the parent feature, Fig. 4b. By default, the first feature (the largest) considered will only have geometrically smaller intersecting features. For all other features, the algorithm is only executed for smaller intersecting features.

  2. 2.

    Collinear features. When there is a step change in the width of two intersecting collinear features, this would conventionally be modelled with the narrower feature extending from the wider feature. This may not be captured using the previous logic as the wider feature may be geometrically smaller. Consequently, the algorithm is executed when intersecting features are within a collinearity threshold, regardless of their size. Implementation is depicted in Fig. 4a, where feature C cannot increase its intersection with feature D without introducing a large error (denoted by the red box in Fig. 4a). Logic considering collinear features produces the desired result (Fig. 4b).

3.3 Overlap minimisation

Feature intersections are a common attribute of FM optimisation. This is a consequence of the implicit geometry representation, where a solid material transition is not guaranteed between two features that contact geometrically (Fig. 5a, b). Hence, features overlap to achieve a solid material transition (Fig. 5c, d). This is also observed when a feature extends beyond the design domain boundary to ensure a solid connexion with applied loading and boundary conditions. Whilst overlaps are necessary to ensure a continuous load path, they hinder the identification of the position and nature of feature connexions. An algorithm is developed to minimise the size of intersections between parent and child features, a subsequent step to Sect. 3.2, before establishing feature connexions. This is also applied to minimise features extending outside the design domain, an attribute that does not conform with conventional CAD modelling strategies.

Fig. 5
figure 5

Geometrically contacting features (a) and the corresponding non-solid material transition (b). Geometrically overlapping features (c) and the corresponding solid material transition (d)

3.3.1 Design domain boundary intersection algorithm

A ghost layer is added to the initial design domain by shifting the original boundaries perpendicularly outwards by a pre-defined distance \(\Delta\), set at 100 mm, to model the presence of features outside the design domain. An NLSQ algorithm minimises feature extension beyond the design domain and changes in geometry inside the design domain.

An initial representation of a feature \(n\) which reflects the desired feature geometry (i.e. not appearing outside the design domain) is calculated using the initial feature design variables as

$${\varvec{H}}_{{{\text{inf}}\,n}}^{0} = \left\{ {\begin{array}{ll} {H\left( {\phi \left( {{\varvec{x}}, {\varvec{D}}_{n}^{0} } \right)} \right),} & {{\text{if}}\, {\varvec{x}} \in NN,} \\ {0,} & {{\text{if}}\ {\varvec{x}} \in NN_{{{\text{inf}}}} \backslash NN.} \\ \end{array} } \right.,$$
(23)

where \(NN\) is the set of mesh nodes associated with the original design domain and \(N{N}_{\text{inf}}\) is the set of mesh nodes corresponding with the inflated design domain. This reflects the desired design representation, where all the features are modelled as expected within the original design domain but are modelled as void for all the nodes outside the original domain boundary, even if the feature extends beyond the original domain boundary. This is in contrast to the feature representation on the ghost layer/inflated domain, where feature extensions beyond the original domain are modelled, represented as

$$H\left( {\phi \left( {{\varvec{x}},{\varvec{D}}_{n} } \right)} \right), {\varvec{x}} \in NN_{{{\text{inf}}}}.$$
(24)

An NLSQ algorithm is used to minimise the extension of feature beyond the original design domain, formulated as

$$\begin{array}{ll} {\mathop {\min }\limits_{{{\varvec{D}}_{n} }} \mathop \sum \limits_{{j \in NN_{\inf } }} \left( {{\varvec{H}}_{{{\text{inf}}\,n,j}}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{n} } \right)} \right)} \right)^{2} } \hfill \\ {{\text{Subject\, to}}: {\varvec{D}}_{n} \in {\mathbb{R}}^{s} } \hfill \\ \end{array}.$$
(25)

The objective of the optimisation is to minimise the extension of feature \(n\) beyond the original design domain without causing geometric deviations within the design domain.

3.3.2 Feature intersections algorithm

Intersections between features are also minimised using an NLSQ algorithm. The objective is to minimise the overlap between a parent feature \(n\) and child feature \(m\). A representation of the region of a child feature \(m\) that does not overlap the parent feature \(n\) or its intersecting features \({I}_{n\setminus \left\{m\right\}}\) is constructed using the initial design variables as

$${\varvec{H}}_{{{\text{unq}}\,m}}^{0} = H\left( {\mathop {\max }\limits_{{i \in I_{n} \cup \left\{ n \right\}}} \left( {\phi \left( {{\varvec{x}},{\varvec{D}}_{i}^{0} } \right)} \right)} \right) - H\left( {\mathop {\max }\limits_{{i \in I_{n} \backslash \left\{ m \right\} \cup \left\{ n \right\}}} \left( {\phi \left( {{\varvec{x}},{\varvec{D}}_{i}^{0} } \right)} \right)} \right).$$
(26)

Whilst the optimisation will seek to minimise the size of feature \(m\), the initial representation denoted by (Eq. 26) is the region that must be preserved. Note, the set of features \({I}_{n}\) that intersect feature \(n\), will by default include feature \(m\). The NLSQ algorithm is formulated as

$$\begin{array}{ll} {\mathop {\min }\limits_{{{\varvec{D}}_{m} }} \mathop \sum \limits_{j \in NN} \left( {{\varvec{H}}_{{{\text{unq}}\,m,j}}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{m} } \right)} \right)} \right)^{2} } \hfill \\ {{\text{Subject\, to}}: {\varvec{D}}_{m} \in {\mathbb{R}}^{s} } \hfill \\ \end{array}.$$
(27)

As with (Eq. 22), penalty parameters prevent nodes that were initially within feature \(m\) only from being removed from feature \(m\) using a penalty parameter, \(\alpha\). Nodes that were originally outside the subset of features \(\left\{{I}_{n}\cup \left\{n\right\}\right\}\) are penalised from being introduced into features using a penalty parameter \(\beta\). The NLSQ algorithm is reformulated as

$$\begin{array}{llll} {\mathop {\min }\limits_{{{\varvec{D}}_{m} }} \mathop \sum \limits_{j \in NN} \left( {\left\{ {\begin{array}{lll} \begin{gathered} {\varvec{H}}_{{{\text{unq}}\,m,j}}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{m} } \right)} \right) \cdot \alpha , \hfill \\ {\varvec{H}}_{{{\text{unq}}\,m,j}}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{m} } \right)} \right) \cdot \beta , \hfill \\ \end{gathered} & \begin{gathered} {\text{if}}\, {\varvec{H}}_{{{\text{unq}}\,m,j}}^{0} = 1, \hfill \\ {\text{if}}\, H\left( {\mathop {\max }\limits_{{i \in I_{n} \backslash \left\{ m \right\} \cup \left\{ n \right\}}} \left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{i}^{0} } \right)} \right)} \right) = 0, \hfill \\ \end{gathered} \\ {{\varvec{H}}_{{{\text{unq}}\,m,j}}^{0} - H\left( {\phi \left( {{\varvec{x}}_{j} ,{\varvec{D}}_{m} } \right)} \right),} & {{\text{otherwise}}.} \\ \end{array} } \right.} \right)^{2} } \\ {{\text{Subject \,to}}: {\varvec{D}}_{m} \in {\mathbb{R}}^{s} } \\ \end{array}.$$
(28)

The optimisation formulation minimises the intersection of feature \(m\) with its parent feature \(n\) and other intersecting features, whilst simultaneously ensuring there is no significant deviation in the original geometry representation. These penalty parameters prevent scenarios of a similar nature to that depicted in Fig. 4c. The objective is to further establish the feature hierarchy by reinforcing the distinction between parent and child features.

3.3.3 Implementation

A three-step process is implemented for minimising unnecessary feature intersections:

  1. 1.

    Design domain boundary intersections. All features are checked for intersections with the domain boundary. If the feature spine intersects the offset boundary, it is terminated at the offset boundary. Subsequently, (Eq. 25) minimises feature representation outside the design domain. There are two scenarios where this has benefits over “hard” spine termination at the domain boundary:

    1. a.

      Reducing excessively wide features that are parallel with a design domain boundary. Termination of the feature spine at the domain boundary will not correct this as demonstrated by feature \(A\) in Fig. 6a. Hard termination only cuts the left end of the feature (feature \(C\) in Fig. 6b), whereas (Eq. 25) offsets the feature and reduces its width (feature \(D\) in Fig. 6b).

    2. b.

      Preventing invalid termination when a feature is approximately parallel to a domain boundary but intersects it. Hard termination would result in a significant error in the geometry of the feature, demonstrated by feature \(B\) in Fig. 6a and the updated blue feature in Fig. 6b. The updated yellow feature depicts how (Eq. 25) minimises feature extension outside the design domain and feature changes inside the design domain.

  2. 2.

    Intersections between collinear features of varying widths. For each feature \(n\) with an intersecting narrower feature \(m\) that satisfies a collinearity threshold. Feature \(n\) is treated as fixed and (Eq. 28) minimises the feature intersection by modifying feature \(m\).

  3. 3.

    Intersections between parent and child features. Each feature \(n\) is selected according to descending size and an intersecting child feature \(m\in {I}_{n}\) is selected according to ascending size. If feature \(m\) is smaller than the feature \(n\), (Eq. 28) is executed to minimise the feature intersection by modifying feature \(m\).

Fig. 6
figure 6

Minimising design domain boundary intersections; a example problem and b comparison of hard termination and NLSQ intersection minimization. (Color figure online)

Applying feature intersection minimisation to the example depicted in Fig. 4b produces the result shown in Fig. 7, demonstrating a clear feature hierarchy conforming to conventional modelling practice.

Fig. 7
figure 7

Minimising feature–feature intersections using NLSQ intersection minimisation algorithm

3.4 Establishing feature connexions

In feature-based models, intersecting features are often constructed relative to each other, rather than independently within the design space. When a feature instance is created within a CAD model, it is normally attached to other features already defined within the model (Bronsvoort et al. 2006). The connexions used vary depending on the feature type. For example, feature dependency may be established in 3D solid modelling when a pocket, slot or extruded feature is constructed relative to the face of a parent feature. Spines of long slender features are often snapped together forming a dependency, where an endpoint of a child feature is constrained to the spine or to the endpoint of the parent feature. Whilst imposing restrictions on the design, these connexions enable the propagation of design updates between features. This work models connexions between spines of linear features.

The point where feature \(m\in {I}_{n}\) intersects feature \(n\) is determined by solving where the two feature spines intersect in terms of the feature parameter, \(t\). This can be expressed algebraically as

$${t}_{m\to n}=\frac{{p}_{0,n}-{p}_{0,m}+D\left({q}_{0,m}-{q}_{0,n}\right)}{{p}_{0,n}-{p}_{1,n}+D({q}_{1,n}-{q}_{0,n})},$$
(29)

where \(D\) is the ratio of the feature \(m\) length in the \(p\) axis, to the length in the q axis, expressed as

$$D=\frac{{p}_{1,m}-{p}_{0,m}}{{q}_{1,m}-{q}_{0,m}}.$$
(30)

A more useful metric for CAD representation is the physical distance from the starting point of feature \(n\), \(\left({p}_{0,n},{q}_{0,n}\right)\). This is evaluated using the calculated intersection point of feature \(n\) as

$$L_{m \to n} = t_{m \to n} \cdot L_{n},$$
(31)

where \({L}_{n}\) is the length of feature \(n\) (Eq. 2).

The appropriate endpoint of the child feature \(m\) that will be connected to the parent feature \(n\) is determined by the point where feature \(n\) intersects feature \(m\), \({t}_{n\to m}\), calculated as

$${t}_{n\to m}=\frac{{p}_{0,n}-{p}_{0,m}+{t}_{m\to n}\left({p}_{1,n}-{p}_{0,n}\right)}{{p}_{1,m}-{p}_{0,m}}.$$
(32)

As the feature spines are expressed as a function of \(t\in [\text{0,1}]\), a value of \({t}_{n\to m}<0.5\) indicates the connexion is in the vicinity of the first endpoint, \({\left(p,q\right)}_{0}\). Otherwise, if \({t}_{n\to m}>0.5\), the second endpoint, \({\left(p,q\right)}_{1}\), is used to establish the connexion.

3.4.1 Implementation

Two connexion strategies are implemented in this work:

  1. 1.

    Endpoint to endpoint. When the endpoint of an intersecting feature is made coincident to the endpoint of its parent feature. There are four possible combinations of endpoint connexions:

    1. a.
      $${\left({p}_{0},{q}_{0}\right)}_{m}\to {\left({p}_{0},{q}_{0}\right)}_{n},$$
    2. b.
      $${\left({p}_{1},{q}_{1}\right)}_{m}\to {\left({p}_{0},{q}_{0}\right)}_{n},$$
    3. c.
      $${\left({p}_{0},{q}_{0}\right)}_{m}\to {\left({p}_{1},{q}_{1}\right)}_{n},$$
    4. d.
      $${\left({p}_{1},{q}_{1}\right)}_{m}\to {\left({p}_{1},{q}_{1}\right)}_{n},$$
  2. 2.

    Endpoint to spine. When the endpoint of an intersecting feature is made coincident to the spine of its parent feature.

The principle that geometrically smaller and/or narrower features extend from larger features is used in this implementation. Features are ranked according to descending size and considered in turn. Potential connexions for each intersecting feature \(m\in {I}_{n}\) of feature \(n\) are determined by

  1. 1.

    Testing almost collinear features. If the spine intersection point of feature \(m\) with feature \(n\) is outside a specified range of spine parameter of feature \(n\) (i.e. when \(\left|{t}_{m\to n}-0.5\right|\) is greater than a specified threshold, \({{T}_{1}}_{\text{lim}}\), set at 1), the feature endpoints are checked for proximity, as an endpoint-to-endpoint connexion may be feasible. If, for a given endpoint-to-endpoint combination, the distance between the endpoints is less than the width of the parent feature the endpoints are made coincident. This logic targets approximately collinear features with nearby endpoints. If an endpoint connexion cannot be formed, the two features remain independent.

  2. 2.

    If \(\left|{t}_{m\to n}-0.5\right|\) is less than \({{T}_{1}}_{\text{lim}}\) the connexion type is determined by a threshold \({{T}_{2}}_{\text{lim}}\), set at 0 to favour endpoint-to-spine connexions, or set greater than 0 to favour endpoint-to-endpoint connexions.

    1. a.

      If \(\left|{t}_{m\to n}\right|\) or \(\left|{1-t}_{m\to n}\right|\) is less than \({{T}_{2}}_{\text{lim}}\), an endpoint-to-endpoint connexion is established. The relative values of \({t}_{m\to n}\) and \({t}_{n\to m}\) identify which endpoint combination is selected.

    2. b.

      If \(\left|{t}_{m\to n}\right|\) or \(\left|{1-t}_{m\to n}\right|\) is greater than \({{T}_{2}}_{\text{lim}}\), an endpoint-to-spine connexion is established. The relative value of \({t}_{n\to m}\) determines if the \({\left({p}_{0},{q}_{0}\right)}_{m}\) or \({\left({p}_{1},{q}_{1}\right)}_{m}\) endpoint is selected. The connected endpoint coordinates are determined as a function of the master spine and the distance, \({L}_{m\to n}\), from the point \({\left({p}_{0},{q}_{0}\right)}_{n}\).

Whilst \({{T}_{1}}_{\text{lim}}\) and \({{T}_{2}}_{\text{lim}}\) are set relative to the parametric range of \(t\), they may also be defined as a physical distance relative to the length, \({L}_{n}\), of feature \(n\). Only one connexion can be established for each feature endpoint.

3.5 CAD model construction

Implementation of the proposed algorithms resolves the design issues depicted in Fig. 1b whilst retaining the geometric parameters that define the remaining structural features. The geometric parameters of each feature are used to sketch the feature profiles in a CAD environment. These sketches provide the necessary information for extruded feature templates. Individual features are united using a Boolean union. The final design is fully parametric, enabling modification in subsequent design tasks.

4 Numerical examples

This section outlines feature-based CAD model construction of a cantilever beam and a Messerschmitt–Bölkow–Blohm (MBB) beam from FM optimisation results. Readers are referred to the well-documented MMC process for details on the optimisation setup for these problems (Guo et al. 2014; Zhang et al. 2016). In these examples, the presented feature colours are for visualisation purposes only.

4.1 Cantilever beam

A rectangular design domain (3000 × 1000 mm) is defined with its left end constrained and a point load at the right end. The design domain is discretised with a 600 × 200 regular Cartesian mesh. This corresponds to the density of the integration points used for the feature representation in the original MMC optimisation. A 120 × 40 analysis mesh was used and a degree 4 Newton–Cotes formula was used for numerical integration of the smoothed Heaviside to calculate the density of the analysis elements.Footnote 4 A regular array of 24 linear features are defined within the design space (Fig. 1a), and the optimisation converges to the result shown in Fig. 8.

Fig. 8
figure 8

Cantilever beam optimised design

4.1.1 Feature removal

Each iteration of the feature removal algorithm attempts to remove a single feature. A user-defined threshold on the geometric error, set at 0.25% and 1.0% in this example, determines if the feature removal is accepted or rejected. Figure 9 plots the geometric error calculated for each iteration, demonstrating rejected removal attempts when the error threshold is violated. The output geometric error associated with each feature can guide the user whether a greater or smaller value could be used to obtain alternative designs with less or more features, respectively. Figure 10a and b shows the updated feature set for error thresholds of 0.25% and 1.0%, respectively. In the first case, eight of the original twenty-four features were removed and in the second case ten were removed. This is analogous to a 33.3% and 41.7% reduction in design complexity, respectively. The remaining features were updated to minimise changes in the geometry. Whilst both designs are valid, the design depicted in Fig. 10a is selected to demonstrate the subsequent stages of the framework.

Fig. 9
figure 9

Geometric error for each iteration of the feature removal algorithm on the cantilever beam model

Fig. 10
figure 10

Cantilever beam design with redundant features removed a geometric error 0.25% and b geometric error 1.0%. (Color figure online)

4.1.2 Feature enlargement and intersection minimisation

For establishing feature hierarchy, the collinearity threshold is set at 0°, which only considers features based on relative areas (Fig. 11), and at 5°, which considers features that are approximately collinear separately, ensuring the wider feature remains dominant (Fig. 12). The highlighted region in Fig. 11a shows how the purple feature has increased its size in the top left of design domain (relative to Fig. 10a) to increase its dominance as a parent feature. Although differences are seen in the intermediate steps (Figs. 11a, 12a), there is little variation in the final results.

Fig. 11
figure 11

Cantilever beam feature hierarchy with a 0° collinearity threshold a feature enlargement and b intersection minimization. (Color figure online)

Fig. 12
figure 12

Cantilever beam feature hierarchy with a 5° collinearity threshold a feature enlargement and b intersection minimization

4.1.3 Feature connexions

Two snapping conditions are considered, firstly setting \({T}_{{2}_{\text{lim}}}\) at 0 favouring endpoint-to-spine connexions, albeit, the endpoints of collinear features are snapped together (Fig. 13a). Secondly, \({T}_{{2}_{\text{lim}}}\) is set at 0.12, favouring endpoint-to-endpoint connexions (Fig. 13c). The updated designs have a compliance of 305.3 and 302.7, respectively (relative to the original result of 289.3), and both violate the design volume fraction by 7.9e−3 and 8.3e−3. Whilst not in the scope of this work, this suggests a subsequent shape optimisation may refine the geometric changes resulting from the proposed framework. A feature-based approach is used to construct each feature within Siemens NX. Feature connexions are maintained resulting in a fully integrated model. Figure 13b and d corresponds with the CAD representation of the models in Fig. 13a and c, respectively.

Fig. 13
figure 13

Cantilever beam feature connexions a endpoint-to-spine connexions favoured, b corresponding CAD model, c endpoint-to-endpoint connexions favoured, and d corresponding CAD model

4.2 MBB beam

An MBB beam problem is defined with a rectangular design domain (6000 × 1000 mm), constraints at the two bottom corners, and a point load at the midpoint of the top edge (Fig. 14a). Using symmetry, the right half of the domain is modelled in the analysis. As in the previous example, a regular array of 24 linear features is defined within the design space (Fig. 1a), and the optimisation converges to the result as shown in Fig. 14b. As before, a 600 × 200 mesh grid is used for the subsequent feature clean-up algorithms.

Fig. 14
figure 14

MBB beam a design space initialisation and b optimisation result

4.2.1 Feature removal

Figure 15 plots the geometric error calculated for each iteration of the feature removal algorithm, the threshold for which is set at 1.5% and 5.0%, producing the designs in Fig. 16a and b, respectively. In Fig. 16a, seventeen of the original twenty-four features are removed; however, the updated design still includes a thin geometric feature (green) that intersects and is almost parallel to a larger feature. Increasing the threshold to 5.0% in Fig. 16b results in the removal of this feature. The updated model in Fig. 16b is used to demonstrate the subsequent stages of the framework.

Fig. 15
figure 15

Geometric error for each iteration of the feature removal algorithm on the MBB beam model

Fig. 16
figure 16

MBB beam design with redundant features removed a geometric error 1.5% and b geometric error 5.0%. (Color figure online)

4.2.2 Feature enlargement and intersection minimisation

For establishing feature hierarchy, the collinearity threshold is set at 0°, which only considers features based on relative areas (Fig. 17) and at 5°, which considers features that are approximately collinear separately, ensuring the wider feature remains dominant (Fig. 18). The result shown in Fig. 18 is suggested to follow a more conventional modelling approach with the narrow green feature modelled as a child of the blue feature. Figure 18b is chosen for progression in the framework.

Fig. 17
figure 17

MBB beam feature hierarchy with a 0° collinearity threshold a feature enlargement and b intersection minimization

Fig. 18
figure 18

MBB beam feature hierarchy with a 5° collinearity threshold a feature enlargement and b intersection minimization. (Color figure online)

4.2.3 Feature connexions

Two snapping conditions are demonstrated, firstly setting \({T}_{{2}_{\text{lim}}}\) to 0, favouring endpoint-to-spine connexions, albeit, the endpoints of collinear features are snapped together (Fig. 19a). Secondly, setting \({T}_{{2}_{\text{lim}}}\) to 0.2, favouring endpoint-to-endpoint snaps (Fig. 19c). The updated designs have a compliance of 346.5 and 336.1 (relative to the original result of 328.9), respectively, and both violate the design volume fraction by 1.7e−2 and 2.2e−2. Connected feature-based models for each design are constructed using extruded features in Siemens NX, as shown in Fig. 19b and d, respectively.

Fig. 19
figure 19

MBB beam feature connexions a endpoint-to-spine connexions favoured, b corresponding CAD model, c endpoint-to-endpoint connexions favoured, and d corresponding CAD model

The computational cost for each algorithm is reflected by the times shown for each algorithm as applied to each example in Table 1. These were executed on 2.3-GHz Intel Core i9 with 32-GB RAM.

Table 1 Computational cost

5 Discussion

A challenge with FM optimisation is determining the number of features to initiate in the design domain, thus redundant features are inevitable when more features are specified than are required to define an optimal structure. The numerical examples presented in Sect. 4 demonstrate the effectiveness of the proposed geometry clean-up strategy for identifying and removing unnecessary features. Furthermore, the simple logic employed has been effective in establishing a clear and consistent feature hierarchy, a strategy naturally employed in feature-based design. It is acknowledged that the numerical examples presented are not sufficient to challenge the proposed framework exhaustively. However, additional logical reasoners may be introduced to each algorithm to provide additional control over these functions.

Whilst the proposed framework seeks to minimise changes in the geometry of the optimised design, minor deviations have inevitably occurred. Geometry deviation is most notable when establishing endpoint-to-endpoint connexions because of the perturbation of the child feature endpoint to match the parent feature endpoint. Consequently, it would be prudent to use shape optimisation to ensure the design is in an optimal configuration without violating optimisation constraints.

An additional limitation with the present implementation is the constraint to linear features. It is suggested that the framework could be extended for other feature types used in FM frameworks, such as Bezier-defined features. Implementing other feature types in the framework will also enable the use of more complex geometric features available in commercial CAD systems, beyond the extruded features used in this work. The current implementation has also only considered 2D geometry.

A large number of the post-processing strategies reviewed in Sect. 2 can be executed independently of the TO strategy employed in the design optimisation. The framework outlined in this paper is suited specifically to the feature-mapping process. Whilst this addresses a well-documented limitation of feature-mapping frameworks, extensions that facilitate generic application to other TO strategies would be advantageous. A significant advantage of the synergy with feature-mapping frameworks, however, is the potential for subsequent shape optimisation in the same framework. Alternative post-processing strategies require a shape optimiser for subsequent design refinement.

6 Conclusions

This paper has presented a framework for constructing feature-based CAD models of FM optimisation designs. Significantly, the strategies developed have focused on:

  • Constructing geometry following a feature-based modelling strategy to ensure ease of integration in subsequent design and analysis tasks.

  • Using the minimal number of features to represent the designed geometry.

  • Establishing a clear feature hierarchy and feature connexions.

  • Creating features that can be constructed using feature-based templates found within the Siemens NX CAD package. The functionality is also available in competing systems.

7 Future work

Future work will seek to address some of the challenges and limitations outlined in Sect. 5. Developments that will

  • improve the generality of application to include other TO formulations

  • increase the types of features that can be modelled in the proposed framework

  • facilitate the extension to consider 3D geometry

are considered to be the most pertinent by the authors.