Manufacturing feature recognition method based on graph and minimum non-intersection feature volume suppression

Automatic manufacturing feature recognition (AFR) is a critical technology for realizing CAD/CAPP/CAM integration in the era of intelligent manufacturing. Despite the numerous feature recognition approaches that have been proposed, the recognition of intersecting features remains a challenge. The most important reason is that the boundaries of features and their geometric topological information are altered or destroyed when interacting with other features. To address this problem, this paper proposes a manufacturing feature recognition method based on graph and minimum non-intersection feature volume suppression. Firstly, the geometric and topological information of a part is extracted and represented as an attributed adjacency graph. Then, a subgraph isomorphism algorithm is designed to recognize the features corresponding to each subgraph. After that, a method to construct and suppress the minimum non-intersection volume of the recognized features is introduced to repair the boundaries of intersecting features. On this basis, intersecting features are separated and recognized at different stages. The experimental results indicate that the proposed approach is effective in recognizing intersection features. Moreover, the recognition result of the proposed method incorporates the surface and volume of a feature, providing enriched feature information for engineering applications.


Introduction
The information barrier between design and manufacturing inhibits the attainment of intelligent manufacturing [1]. The design phase focuses on the geometry (points, edges, surfaces) and topology of a part, and uses them as information carriers to specify the manufacturing requirements (precision, surface roughness, etc.). The manufacturing phase focuses on feature information (hole, step, boss, etc.) and selects appropriate machining operations for features to obtain the desired shape of a component. In traditional process planning, engineers expend a considerable amount of time "translating" the geometric and topological information of a part into manufacturing features [2]. Moreover, such a process relies heavily on engineers' experience and knowledge [3]. Therefore, converting geometric and topological information into manufacturing features in an automated manner, known as automatic feature recognition technology (AFR), has become one of the most important research fields in intelligent manufacturing [4].
Over the past four decades, several AFR techniques have been proposed, which can be broadly classified into two types: pattern matching-based and learning-based methods (discussed in detail in Section 2). Generally, the existing methods segment the regions where features are located from a solid model and then recognize the feature corresponding to each region using appropriate algorithms and rules. However, the features on a component are not isolated, and feature intersection may change the geometric and topological structure as well as the boundaries of features. The insufficient ability of the existing methods to deal with these changes makes some complex intersection features ignored or misrecognized.
To address the aforementioned issues, a multistage method for recognizing intersection features from 3D solid models is proposed. Instead of simultaneously recognizing all the features on a part, the proposed method separates the intersecting features and recognizes them at different stages. At each stage, the geometric and topological information of an input solid model is extracted and represented as an attributed adjacency graph (AAG). Then, a subgraph isomorphism algorithm is employed to recognize the features corresponding to each subgraph. Subsequently, the minimum non-intersection volume (MNV) of the recognized features is constructed and suppressed to repair the boundaries of unrecognized features that were altered or destroyed in interacting with other features. The feature suppression result is used as a new input for the next stage, and the above steps are repeated until all the features on the part are recognized. Rather than relying on the integrity of feature boundaries on a primitive input solid model, the proposed method repairs the boundaries of intersecting features by suppressing the MNV of the recognized features at each stage. Thus, it can correctly recognize complex intersecting features on a solid model. In addition, the recognition result of the proposed method incorporates the surface and volume of a feature, providing enriched feature information for engineering applications.
The remainder of this paper is organized as follows. Section 2 summarizes state-of-the-art AFR methods and describes the motivation of this study. The proposed method is described in detail in Section 3. Section 4 demonstrates the effectiveness through several cases. A conclusion and potential future research directions are given in the last section.

Related work
AFR refers to the automatic recognition of geometric shapes with engineering significance from a 3D CAD model to guide process planning and achieve the integration of design and manufacturing [5]. AFR was first performed at the CAD Research Centre at the University of Cambridge, UK, which pioneered AFR and pattern matching-based feature recognition [6]. Several AFR techniques proposed over the last four decades can be broadly classified into pattern matchingbased and learning-based methods.

Pattern matching-based methods
Pattern matching-based methods define feature templates and then search for regions on a 3D solid model matching the predefined feature templates to recognize features. Pattern matching-based methods can be further divided into graph-based, hint-based, rule-based, and volume decomposition methods according to the feature template definition method and feature search strategy used.
(1) Graph-based methods The graph-based approach is one of the most researched methods due to its inherent advantage that the geometric and topological information of a solid model can be naturally represented as a graph [7]. Joshi and Chang [8] first proposed a graph-based manufacturing feature recognition method and introduced the concept of an attributed adjacency graph (AAG). In an AAG, the faces of a solid model are represented as nodes, and the adjacencies between the faces are represented as arcs. The AAG is decomposed into subgraphs and then matched with predefined feature templates to recognize features. One trend in graph-based methods involves adding more attributes to a graph to enhance its representation capability. For example, Venuvinod et al. [9] extended AAG by adding surface-type nodes and developed a multi-attributed adjacency graph/matrix (MAAG/ MAAM). Li et al. [10] improved AAG by adding attributes such as face normal and the angle of adjacent faces and named it as holistic attribute adjacency graph (HAAG). It can be stated that graph-based methods are quite effective for isolated feature recognition and one can efficiently add or modify feature templates based on the flexibility of the graph representation. The most significant shortcoming of graph-based methods is their inability to handle the geometric, topological structure, and boundary changes of features caused by feature intersection [11]. To better support intersection features, a number of studies have combined graph-based methods with other methods. Gao and Shah [12] proposed a graph-hint hybrid method and developed the minimal condition subgraph (MCSG) as a feature hint to help recognize intersecting features. Sunil et al. [13] developed a graph-rule hybrid method for recognizing the interacting features from B-Rep CAD models. Ning et al. [14] used an AAG to segment the machining features from a solid model and a voxel 3D CNN method for classification. Similarly, Zhang et al. [15] used subgraphs decomposed from an AAG as input to a BP neural network to recognize features. The hybrid approaches combined the advantages of different original methods and improved the ability to handle features intersection. However, there also retain some limitations of original approaches like difficulties to extend feature class and limited range of feature interaction.
(2) Rule-based and hint-based methods The rule-based approach is one of the earliest research methods, in which features are defined as templates comprising characteristic patterns, and logical rules (such as IF-THEN rules) are used to recognize features [16]. The corresponding region on a part is recognized as a feature if predefined conditions are satisfied. However, the need for predefined rules for every conceivable feature makes this approach cumbersome and inflexible [17]. Hence, the rulebased approach later evolved into the hint-based approach. Based on the idea that incomplete representations can be searched for, hint-based methods recognize features by searching for traces of feature presence in a part [18]. A hint is defined as the minimum indispensable portion of a feature that must be present in the part, even when features interSection The hint-based method consists of two main steps. The first step generates hints using geometric inference [19] or feature taxonomies [20]. In the second step, the features represented by the generated hints are recognized by rule matching [21]. Hint-based methods are improved in dealing with intersecting features because they do not rely heavily on the completeness of geometric and topological information. However, because the recognition algorithms or rules used in hint-based approaches are hard-coded, system extendibility is compromised [22]. In addition, it is difficult to define feature hints for complex and variable interaction features.
(3) Volume decomposition methods The volume decomposition method was first proposed by Woo [23]. Rather than focusing on geometric elements (faces, edges, points), the volume decomposition method recognizes features from a volumetric perspective. In [23], a solid model is decomposed into a series of convex intermediate volumes, and features are subsequently generated by combining intermediate volumes based on certain rules. As the process of decomposition and summation is alternating, this is termed the alternating sum of volumes (ASV). Kim improved this method in [24] and proposed an alternative sum of volumes with partitioning (ASVP) method to solve the non-convergence problem of ASV. However, ASVP performs well for polyhedral parts but may fail for parts with curved surfaces [25]. Sakurai et al. [26] proposed a cell-based volume decomposition method that decomposes a solid model into minimal cells with a simple shape. The cells are recombined into a larger feature volume that can be removed by a single machining operation. The process requires a large number of Boolean operations, which is computationally expensive. Moreover, with such a prohibitive number of Boolean operations, it is difficult to guarantee that the result generates features of interest [27].

Learning-based methods
Recently, machine learning algorithms have enabled considerable progress in classification and recognition problems. Numerous researchers have transformed feature recognition into a classification problem and used machine learning algorithms to recognize features. The first step in learning-based methods is converting a solid model into a suitable format, such as a series of numerical or similar formats. Graph representation schema is commonly applied in learning-based methods. For example, Zhang et al. [15] used subgraphs decomposed from an AAG as input data and designed a BP neural network to recognize features corresponding to each subgraph. Zhang et al. [28] employed a 3D convolutional neural network (CNN) to recognize features from a 3D voxel model. In this method, the watershed segmentation algorithm [29] was employed to segment a solid model into separate regions as input data. To improve the accuracy of segmenting intersection features, Shi et al. [30] proposed a multiple sectional view-based (MSV) feature recognition method where a solid model is split by a number of randomly placed cutting planes perpendicular to the x-, y-, or z-axes to collect MNVs. The MNVs are then used as input to a deep neural network for feature recognition. Although the MSVbased method performs well on regular polyhedral solids, its performance on real industrial parts requires further investigation. A learning-based recognition system with a trained network had a significantly faster execution speed than a pattern matching-based system that exhaustively searched for matching patterns [31]. However, the performance of learning-based methods highly relies on the accuracy of feature segmentation. It is rather difficult to accurately segment intersecting features according to the shape information since the topology information of the features might be destroyed because of feature intersection [32]. Moreover, when a new feature is introduced to the system, the model must be entirely retrained using all training features.
In summary, although numerous approaches have been proposed in AFR, the following drawbacks persist: (1) Insufficient ability to deal with the geometry, topological structure, and boundary changes of features caused by feature intersection. Most existing approaches attempt to circumvent the impact of these changes by designing more robust algorithms or some heuristic rules. However, the complex and variable feature intersection still makes a number of features on a solid model misrecognized or ignored.
(2) Lack of information integration of surface and volume of the feature. The features recognized by most existing methods are either surface features or volumetric features. Surface features are useful sources of information about tolerances and manufacturing attributes to produce the part, but the manufacturing process is more easily described volumetrically [33]. Therefore, a combination of surface and volumetric features is required to better support engineering applications. To address the abovementioned issues, this paper proposes a manufacturing feature recognition method based on graph and minimum non-intersection feature volume suppression, which is introduced in detail in the next section.

Intersection feature recognition method
This section first defines several basic concepts and then briefly outlines the proposed method. The realization of the method is then described in detail.   Fig. 1,

Basic concepts and overview of the method
NF and FF are used to determine whether features interSection Given two features F a and F b on a part, if FF a ∩ NF b = ∅ , F a and F b are non-intersecting; otherwise, F a intersects with F b . For example, the part shown in Fig. 1 contains three manufacturing features F 1 (round hole), F 2 (slot), and F 3 (slot).

Definition 3.3. Minimum non-intersection volume of a feature (MNV).
The MNV refers to a sub-volume of feature that does not intersect with other features. If F a intersects with { F 1 , F 2 , … , F l }, MNV of F a is defined as where S i is the volume of F i and " − ", " ∑ ", and " ⋂ " are subtraction, merge, and intersection Boolean operations respectively.
The intersection of the three features in Fig. 1 is shown in Fig. 2(a). F 2 and F 3 share the feature volume S 2 because F 2 and F 3 are decomposed from a single slot in intersecting with F 1 . F 1 intersects with F 2 and F 3 , and the common volume of their intersecting parts is denoted as Fig. 2(b). Therefore, the MNV of F 1 is denoted as Fig. 2(c).

Definition 3.4. Feature suppression.
Given a feature F i on a part, feature suppression is a Boolean merge operation between the part solid model and the MNV of F i , denoted by S P ⋃ MNV i , where S P is the solid model of the part. Feature suppression is used to repair feature boundaries that have been altered or destroyed in feature intersection. Figure 2(d) shows the result of feature suppression for the round hole F 1 . After feature suppression, the boundaries of F 2 and F 3 altered in feature intersecting were repaired. Since the MNV of a feature does not contain the common volume of the intersecting parts, only non-intersecting features can be suppressed simultaneously. For example, if the MNVs of the three features in Fig. 2(c) are suppressed simultaneously, the common volume in Fig. 2(b) will be ignored.

Overview of the method
As described in Section 2, the major obstacle to intersecting feature recognition is the geometry, topological structure, and boundary changes of features. In general, the features of a part are machined sequentially during the manufacturing process, and the boundaries of the Inspired by this scenario, rather than attempting to recognize all the features from a solid model simultaneously, a multistage method for recognizing intersection features from 3D solid models is proposed. A general flowchart of the proposed approach, which consists of four main steps, is presented in Fig. 3.
Step 1: Extract geometric and topological information and represent it as an AAG To ensure that the proposed method is applicable to solid models designed from different CAD systems, neutral *.step format files (ISO STEP 10,303) of the solid models are selected as input data. Subsequently, the geometric and topological information of the input part is extracted and represented as an attributed adjacency graph (AAG) based on the concavity and convexity judgment method. Additional details regarding this step are provided in Section 3.2.
Step 2: Decomposing the AAG into subgraphs based on feature boundaries In this step, the AAG is decomposed into a series of subgraphs according to feature boundaries. To preserve the complete geometric and topological information of the features when decomposing the AAG, a convex edge endpoint matrix is introduced to extract feature boundaries. Subsequently, the AAG is decomposed by removing the arcs corresponding to feature boundaries. The details of this step are provided in Section 3.3.
Step 3: Recognizing features with a subgraph isomorphism algorithm A template library containing 12 types of primitive manufacturing features is established based on the graph representation schema. Subsequently, a subgraph isomorphism algorithm is designed to recognize the features corresponding to each subgraph obtained in the previous step. Further details regarding this step are provided in Section 3.4. Step 4: Repairing the boundaries of intersection features Features with complete boundaries are recognized in the previous step. In this step, a method for generating the minimum non-intersection volume (MNV) of recognized features is proposed. On this basis, the MNVs of the recognized and non-interacting features are suppressed to repair the boundaries of features that are altered or destroyed when interacting with others. Unsuppressed features are retained on the solid model and are recognized in the subsequent stages. The result of feature suppression at each stage is used as a new input, and the above steps are repeated until all features on the part are recognized. Further details regarding this step are provided in Section 3.5.

Extracting geometric and topological information and representing it as an AAG
Benefiting from the inherent advantages and flexibility of graph representation schema, in this study, the geometric and topological information of the solid model is represented as a graph G = {V, E, T, L} , known as the attributed adjacency graph (AAG), where V is a set of nodes, ∀v i ∈ V corresponds to a face on the part, E is a set of edges, ∀e(v i , v j ) ∈ E represents the common edge between the faces corresponding to v i and v j , T and L are the label functions for nodes and edges, respectively. T v i ∈ {0, 1, … } indicates whether the type of face corresponding to node v i is a plane, cylinder, etc. L(e(v i , v j )) ∈ {−1, 0, 1} indicates edge concavity and convexity. The construction of the AAG consists of the following steps.
(1) Extracting the geometric and topological information of the input solid model STEP, a neutral data exchange standard developed by the ISO, does not depend on a specific CAD system to represent the 3D solid model of a part [34]. It explicitly defines the geometric elements (faces, edges, points, etc.) of a part and their topological relationships. Therefore, the STEP-AP203 neutral file of a solid model is selected as input data. The geometric and topological data structures of the STEP-AP203 file are shown in Fig. 4(a). The required information is obtained by gradually searching for the keywords CLOSED-SHELL, ADVANCED_FACE, ORIENTED_EDGE, and CARTESIAN_POINT in the STEP AP203 file. Subsequently, the extracted geometric and topological information of the input solid model is stored in the database shown in Fig. 4(b), where each face contains several edges, and each edge has two points.
(2) Judgment of edge concavity and convexity As shown in Fig. 4(b), the type property of the face records whether it is a plane, cylindrical, or conical face, which can be obtained directly from the STEP file. The label property of an edge records its concavity and convexity, which requires further geometric analysis. Therefore, a method for determining the concavity and convexity of an edge is introduced. As shown in Fig. 5, f 1 and f 2 are adjacent faces, l is their common edge, and n 1 and n 2 are the normal vectors of f 1 and f 2 at P mid (midpoint of l ), respectively. Otherwise, an auxiliary circle O with radius r is constructed in the plane formed by vectors n 1 and n 2 . The center of O is P mid . Points p 1 and p 2 are the intersection points of circle O and faces f 1 and f 2 , respectively, and p x is the midpoint of the segment.
• If p x is inside the solid model, then l is a convex edge and label l = 1 , as shown in Fig. 5(b). • If p x is outside the solid model, then l is a concave edge and label l = −1 , as shown in Fig. 5(c).
To ensure the existence of intersection points p 1 and p 2 , Eq. (1) gives the boundary size of radiusr , where tol denotes the tolerance of the solid model, and Based on these two steps, the AAG of a solid model is constructed. Figure 6 shows a solid model and its AAG, where the node color represents the type of face, and the type of arc represent the concavity and convexity of edge.

Decomposing the AAG into subgraphs based on feature boundaries
In this section, the constructed AAG is decomposed into subgraphs based on the boundaries of features. Convex edgebased decomposition is a commonly used decomposition strategy that considers convex edges as feature boundaries and decomposes an AAG into subgraphs by removing the arcs corresponding to convex edges [35]. However, the convex edge-based decomposition strategy may over-decompose the AAG because not all convex edges of a solid model are feature boundaries. For example, edge(f 1 , f 2 ) and edge(f 4 , f 5 ) in Fig. 6 are convex edges but do not constitute a feature boundary. A feature boundary is a closed loop formed by connecting convex edges end-to-end, such as the boundary of the open pocket in Fig. 6. To preserve the complete geometric and topological information of the features when decomposing the AAG, a convex edge endpoint matrix P n×n is introduced to filter out nonboundary convex edges from all the convex edges. The value of p ij in P n×n indicates the number of convex edges connected between points i and j. For the i th row (column) in matrix P , if ∑ n j=0 p ij < 2 , the convex edge ending at point i cannot form a closed loop, implying that it is not a feature boundary. Recursively removing the row (column) in P that satisfies ∑ n j=0 p ij < 2 filters out the non-boundary convex edges. Figure 7 captures the geometric and topological information of the open pocket on the part shown in Fig. 6 and gives its convex edge endpoint matrix P . The 11 th , 12 th , 13 th , and 14 th rows (columns) of P satisfy ∑ n j=0 p ij < 2 , so the convex edges p 2−11 (corresponding to edge(f 4 , f 5 ) ) and p 5−14 (corresponding to edge(f 1 , f 2 ) ) are not feature boundaries. P is reduced to P ′ by removing the 11 th , 12 th , 13 th , and 14 th rows (columns). After that, the AAG is decomposed into subgraphs by deleting the arcs corresponding to the remaining convex edges in P from the AAG. Figure 8 shows the subgraphs decomposed from the AAG in Fig. 6, where non-boundary convex edges edge(f 1 , f 2 ) and edge(f 4 , f 5 ) are preserved in the subgraph.

Recognizing features by the subgraph isomorphism algorithm
In this section, a subgraph isomorphism algorithm is designed to recognize the features corresponding to each subgraph decomposed from the AAG. A template library  Figure 9 shows the constructed feature template library containing 12 types of primitive manufacturing features. In general, the geometric and topological information of the first 10 types of features shown in Fig. 9 is invariable. Therefore, the templates of the first ten types of primitive manufacturing features are constant. However, the geometric and topological information of the closed-pocket and open-pocket features is variable. Therefore, we define the templates of closed-pocket and open-pocket features as inconsistent structures.

Feature templates
• The closed-pocket template is a closed-loop graph with a central node ( f 0 ). The central node is planar and is connected to the other nodes by concave edges. For variable nodes and edges, we assign a special label (x) that can be matched to any type. • The open-pocket template is a chain graph with a central node ( f 0 ). The central node is planar and is connected to the other nodes by concave edges. For variable nodes and edges, we assign a special label (x) that can be matched to any type.
In addition to defining the feature template, the main face of the feature is specified in the template. The definition of the main feature face is given in Definition 3.5. The main faces of the slot, round ring, blind hole, round blind slot, step, boss, closed-pocket, and open-pocket are denoted as f 0 in Fig. 9. Under normal circumstances, some features do not have a main face. If a machining feature does not have a main face, a virtual main face perpendicular to the axis of the cylindrical (conical) face is created. For example, the round hole, round slot, taper hole, and compound taper hole features shown in Fig. 9 are features that do not have a main face. The main (virtual main) face of a feature is used to construct the feature volume, which is introduced in detail in Section 3.5.

Subgraph isomorphism algorithm
Based on the constructed feature templates, a subgraph isomorphism algorithm [36] is designed to recognize the features corresponding to each subgraph obtained in the previous step. The definition of subgraph isomorphism is  Table 1. The subgraphs decomposed from the AAG comprise the data graph set G = {g 1 , g 2 , … , g m } , and the predefined feature templates comprise the query graph set Q = {q 1 , q 2 , … , q n } . Feature recognition is performed for each g i ∈ G search for a q j ∈ Q satisfying sub(g i ) ≅ q j . Definition 3.6. Subgraph isomorphism. Given query graph q =< V, E > and data graph g =< V � , E � > , where V is a set of vertices and E is a set of edges. q and g share the same label functions T (node label function) and L (edge label function). q is isomorphic to a subgraph of g if there is an (1) and (2), which is denoted as sub(g i ) ≅ q j .
(1) ∀u ∈ V, ∃f (u) ∈ V � and T(u) = T(f (u)) The framework of subgraph matching algorithm is given in Algorithm 1, which takes g ∈ G and q ∈ Q as input and outputs a match M from q to g that satisfies sub(g) ≅ q . Line 1 generates the candidate vertex set C(u) of each vertex u in q , where C(u) is a set of vertices in data graph g that matches u . Line 2 generates a matching order Δ for all vertices in q with the ordering method in [37]. Line 3 enumerates the search space starting from i = 1 given (q, g, C(u), Δ) while recording the mapping from u ∈ q to v ∈ g in M . If all vertices in query graph q have been mapped ( i = Δ + 1 ), then M is returned in Line 4. Line 5 selects the next vertex u in matching order Δ . Line 6 computes the local candidate vertex set LC(u, M) of u by Eq. (2), where N Δ − (u) are the neighbor vertices that are located after u in Δ and M[u � ] is the vertex in data graph g mapped to u ′ . Lines 7-11 recursively invoke the Enumerate function.

Repairing the boundaries of intersection feature
In this section, a method for repairing boundaries of intersection features that construct and suppress the MNV of recognized features is proposed. Figure 10 illustrates the multistage recognition of intersecting features on a solid model and the boundary repair process. In Fig. 10(a), three features (F 1 , F 2 , F 3 ) on the input solid are recognized by the method mentioned in the previous section. FF 1 ∩ NF 2 ≠ ∅ ; thus, F 1 intersects with F 2 ; FF 2 ∩ NF 3 = ∅ , so F 2 does not intersect with F 3 . Therefore, at the first stage, we separate the independent features F 2 and F 3 from the three recognized features. Subsequently, the MNV of F 2 and F 3 is constructed and suppressed to repair the boundary of F 1 , as shown in Fig. 10(b). F 1 is retained on the solid model and recognized at the next stage. The result of feature suppression at each stage is used as a new input part for repeating the above process until all features on the part are recognized and suppressed. Figure 10(b) shows the complete process of recognizing all the features in Fig. 10(a), including the two stages. The first stage recognizes and suppresses two slots. Subsequently, the boundary of the round hole F 1 is repaired, and the result of feature suppression is used as a new input part for the second stage. Finally, F 1 is recognized and suppressed in the second stage.
The key point of the proposed method is to generate the MNV of the recognized features at each stage. The MNV of a feature is generated as follows: Step 1: Generating the approximate feature volume by sweeping the main (virtual main) face of the feature As shown in Fig. 11(a), an approximate volume of features with the main face can be generated by sweeping the main face along its normal vector. To ensure that the generated volume completely Query graph q ∈ Q and data graph g ∈ G V Vertex set of a graph E Edge set of a graph T(u) Label of a vertex u L(u 1    axis of the cylindrical (conical) face in the bounding box. An approximate volume of features is then generated by sweeping the virtual main face in both directions along the axial direction of the feature, where the sweeping distance is set to L , as shown in Fig. 11(b).
Step 2: Subtracting portions of the feature volume that intrude into the part The volume generated by sweeping the main (virtual main) face is an approximate volume that may intrude into the solid part. For example, the generated volume of the tapered hole in Fig. 11(b) is a cylinder instead of a cone. Therefore, portions of the generated volume that intrude into the part must be removed. In Fig. 12, a sectional view of a tapered hole is used to illustrate the removal of the intruding portions from the rough volume. Let V part and V f be the volume of the input solid model and generated approximate feature volume, respectively. Then, V int = V part ∩ V f represents the portions of V f that intrude into the part ("∩ " is the intersection Boolean operation). The intrusion-free portion of V f can be obtained by removing V int from V f , denoted as V f − V int (" − " is the subtraction Boolean operation).
Step 3: Splitting the approximate feature volume into a series of sub-volumes by extending the neighboring faces of the feature In this step, the approximate feature volume is split into a series of sub-volumes (denoted as sv i ) by extending the neighboring faces of the feature. For example, Fig. 13 illustrates a round hole and slot recognized on a solid model. Firstly, approximate feature volumes are constructed according to the previous steps. Then, the volume of F 1 is split into 12 sub-volumes by extending the neighboring faces of F 1 as shown in Fig. 13(a). The volume of F 2 is split into two subvolumes by extending the neighboring faces of F 1 as shown in Fig. 13(b).
Step 4: Generating the MNV of features A sub-volume belongs to a feature's MNV if it has at least one face overlapping the feature's faces. The MNV of the feature is obtained by the Boolean merge operation of all sub-volumes satisfying the above conditions. For example, the cylindrical faces of sub-volumes sv 4 , sv 6 , sv 7 , sv 8 , and sv 9 in Fig. 13(a) overlap with the faces { f 0 , f 1 } of F 1 . Hence, the MNV of F 1 is obtained by the Boolean merge operation between sv 4 , sv 6 , sv 7 , sv 8 , and sv 9 , denoted as MNV 1 = sv 4 ∪ sv 6 ∪ sv 7 ∪ sv 8 ∪ sv 9 . Similarly, the side faces of sub-volume sv 2 in Fig. 13 Repairing the boundaries of intersection features by feature suppression enables the proposed method to recognize features whose boundaries are destroyed in feature  Fig. 14 shows a part with four features, and its AAG is the same as the part in Fig. 10. Because the boundary of the step feature on the part is destroyed, only three feature subgraphs, corresponding to two slots and a round hole, can be obtained by decomposing the AAG at the first stage. The first stage suppresses the two non-intersecting slots, and the second stage suppresses the round hole. Subsequently, the step feature's boundary is repaired, and it can be recognized in the third stage.
Different recognition and suppression sequences of intersecting features may generate multiple interpretations of features. For example, Fig. 15 shows two different recognition and suppression sequences for the same part. In Fig. 15(a), the first stage recognizes and suppresses two slots, and then the round hole is suppressed in the second stage. In Fig. 15(b), the first stage recognizes and suppresses the round hole. Then, the boundaries of the two slot features on the original input solid model are repaired and merged into one slot. Although the current approach can generate  Fig. 14 Restoring the boundary of the step different interpretations, finding the optimal interpretation for a part is impossible unless issues such as geometric dimension and tolerancing (GD&T), product and manufacturing information (PMI), setup, and machining cost are taken into account [38]. For example, if the round hole in Fig. 15 is machined first under the aforementioned factor constraints, Fig. 15(a) is reasonable. In contrast, if the slot is machined first, then Fig. 15(b) is reasonable. Such considerations are not within the scope of this study. In this study, the maximum number of non-intersecting features is recognized and suppressed at each stage.

Example of multistage feature recognition
A solid model with 18 features was used to validate the effectiveness of the proposed multistage feature recognition method. The initial input solid model is shown above Stage 1 in Fig. 16.
The AAG of the initial solid model at the first stage, which contains 78 nodes and 214 edges, is shown in Fig. 17. In the first stage, the AAG is decomposed into 17 subgraphs. Table 2 shows the feature recognized by the subgraph matching algorithm. Then, the MNVs of  Table 2 are retained on the solid model and recognized at the subsequent stages. The feature suppression result is shown in Fig. 16.
Except for the first stage, each subsequent stage takes the result of the feature suppression of the previous stage as a new input. The constructed AAG and feature recognition results in each stage are presented in Fig. 17 and listed in Table 3, Table 4, and Table 5. As the features are gradually recognized and suppressed, the number of nodes and edges in the AAG gradually decreases. After four stages of recognition and suppression, all 18 features on the part have been recognized and suppressed, and a blank of the part is obtained, as shown in Fig. 16. Furthermore, only 17 feature subgraphs are obtained by AAG decomposition of the part at the first stage, but 18 features are recognized after four stages. This is because the boundary of F 4−1 is destroyed in intersecting with F 1−4 , F 1−16 , F 2−2 , F 2−3 , and F 3−1 , so that the subgraph of F 1−4 cannot be obtained in the first three stages. After three stages, the boundary of F 4−1 is repaired, as shown in Fig. 18. Feature F 4−1 is then recognized in the last stage.

Comparison of feature recognition results
To evaluate the feature recognition capability of the proposed method, we compared it with other state-of-the-art  Fig. 19, Part-A with 21 features is from the method in [28]. In [28], intersecting features are first separated by the watershed algorithm, and then a trained 3D neural network is employed to recognize the features. According to the experimental results in [28], 19 features were segmented from Part-A, 18 of which were correctly recognized, and two features are ignored because they cannot be segmented from the solid model. Figure 19 shows the recognition results of Part-A by the proposed multistage method, and all 21 features are recognized in three stages.
In addition, we compare the proposed multistage recognition method with the hybrid graph-and learning-based method proposed by Zhang [15]. In [15], the geometric and topological information of a solid model is represented as AAG. Next, subgraphs are obtained by removing convex edges in the AAG. Finally, a BP neural network is employed to recognize the features corresponding to each subgraph. Part-B in Fig. 20 is a complex bottom table from the industry. The proposed method recognizes all 42 features of Part-B in three stages, as shown in Fig. 20. Since the boundaries of the 40th and 26th features were destroyed in the feature intersection and their subgraphs cannot be decomposed from the AAG. Therefore, these two features cannot be recognized by the method in [15].
For the three test parts (test part in Section 4.1, Part-A, and Part-B), under the same computer environment (3.60 GHz CPU, 16 GB memory, and Windows 10 operating system), the feature recognition time of the methods in [15] and [28] is within 1 s. The recognition time of the proposed approach is given in Table 6, which is 6.45 s (test part in Section 4.1), 6.53 s (Part-A), and 25.53 s (Part-B). More recognition time is required for two reasons: (1) To accurately recognize intersection features, the proposed method separates and recognizes the intersecting features in different stages. Each stage needs to import a new solid model, increasing the processing time of the model. (2) Secondly, the methods in [15] and [28] only recognize the surface information of features, while the proposed method gives both the surface information and the volume information of features. The construction of the feature volume requires time-consuming Boolean operations. It is notable that all three methods have satisfactory runtime performance for automatic feature recognition.
In this section, the capability of the proposed method is verified to handle the changes in feature geometry, topology, and boundary caused by feature intersection. It is the first one to successfully recover these changes by using feature surface and volume information rather than heuristic rules. Test cases show that the proposed method has a significant improvement in its ability to handle intersecting features compared to the existing methods. As a result, it can effectively recognize intersecting features even when the feature boundary is destroyed. Furthermore, the recognition result incorporates the surface and volume of a feature, providing enriched information for engineering applications.

Conclusion
The objective of this study was to develop a method to overcome the shortcomings of the existing methods in feature recognition. First, the geometric and topological information of a solid model is represented as an AAG, and a subgraph isomorphism algorithm is designed to recognize the features with complete boundaries on the solid model. Benefitting from the flexibility and extensibility of the graph representation schema, the proposed recognition method can be easily extended to a variety of machining features without needing to rebuild it. Rather than simultaneously recognizing all the features on a solid model, the proposed method separates intersecting features and recognizes them at different stages. Furthermore, to repair feature boundaries that are altered or destroyed in intersection with other features, a method for generating and suppressing the minimum non-intersection volume (MNV) of recognized features is proposed. The results of feature recognition cases indicate that the proposed method effectively recognizes intersecting features even when the feature boundaries are destroyed. Moreover, the recognition result incorporates the surface and volume of a feature, providing enriched information for engineering applications.
Although the proposed method achieves excellent performance on intersecting feature recognition, it has several limitations that require further investigation. First, the graph schema only represents surfaces and topology, so it cannot differentiate features with the same surfaces and topology but different volumes, just like a round hole and an outer cylindrical surface. Therefore, additional steps are sometimes required to ensure correct recognition. For example, the concavity and convexity of a cylindrical surface is adopted to distinguish a round hole and an outer cylindrical surface. Second, as previously mentioned, different recognition and suppression sequences of intersection features can result in multiple feature interpretations.
The following types of future research are indicated: (1) Constraining the sequence of feature suppression by mapping GD&T and PMI from geometric elements (faces, edges) to manufacturing features would allow for a feasible machining process of part can be obtained. (2) Freeform feature recognition is very attractive in this domain; thus, it is desirable to extend the proposed method to freeform feature recognition.

Data availability
The datasets used or analyzed during the current study are available from the corresponding author on reasonable request.

Code availability
The code for the current study is available from the corresponding author on reasonable request.

Declarations
Ethics approval The authors state that the submitted work is original, the manuscript in part or in full has not been submitted or published anywhere and it will not be submitted elsewhere until the editorial process is completed.

Consent to participate Not applicable.
Consent for publication Not applicable.

Fig. 20
Multistage feature recognition Part-B