1 Introduction

Model-based definition (MBD) [1] technology is gradually being applied in the manufacturing industry, which is transitioning the machining process planning from two-dimensional (2D) to three-dimensional (3D) [2, 3]. 3D process models, as the MBD information carrier [4], can directly reflect the dynamic evolution of the part in terms of geometric shape and plays an important role in process planning.

In general, a 3D design model is constructed in the form of “adding design features,” which needs to be converted into the form of “removing machining features” during the process of constructing 3D process models. In the traditional design pattern, this process needs to be completed manually by experts who are proficient in both modeling knowledge and machining knowledge [5], which is time-consuming and error prone [6]. Automatically converting a 3D design model into 3D process models has become a bottleneck problem in 3D machining process planning.

Many efforts have been devoted to automatically generating 3D process models in recent years, and various methods have been proposed, which can be classified into knowledge-based approaches and feature-based approaches.

In knowledge-based methods, Zhang et al. [7] took 2D engineering drawings containing process information as the input, extracted the machining semantics of each process by process language understanding and reasoning, and established the mapping relationship between the machining semantics and 2D process drawings to reconstruction 3D process models. However, it is difficult to recreate process model aid in new process planning, and obtaining machining feature information from 2D drawings is ambiguous in such methods. Therefore, Wan et al. [8] adopted the MBD part model, created MBD process models with the aid of machining knowledge, and then obtained machining knowledge from MBD process models, in which the machining ontology, modeling ontology, and their relationship were established. On this basis, the process models were generated forward or reversely. However, such methods only focus on the independent features, and the correlation between features is not considered. Liu et al. [4] modified the existing process models of approximate parts to generate process models for new parts. The relationship between process models was considered. Based on the modified content of the process route and relationship among process models, the process models and process information of approximate parts were updated to generate process models for new parts. The above knowledge-based process model generation methods usually only focus on the induction and conversion of knowledge and ignore the utilization of modeling operations, as well as geometric and topological information such as feature relationships. Moreover, constructing a knowledge base is long-term cumulative work.

In feature-based methods, Guelesin [9] and Park [6] generated process models from the process plan by using the solid model and B-Rep model, respectively. By analyzing the machining operation in each process, the machining information was obtained, and then the changes in the workpiece volume or the feature surface position were computed. Finally, the process models were generated by volume modification or feature surface modification after each process. However, these methods are restricted to the existing process plan. Zhang et al. [10] adopted B-Rep part models, and defined machining features as a set of surfaces formed by one or a series of machining operations. Feature surface modification methods were defined for each type of machining feature. Finally the process models were generated by recognizing the machining features and then modifying the feature surfaces. However, the modification method only focuses on a single feature and is computationally expensive. Li et al. [11] obtained the parameterized feature machining volumes by recognizing machining features, instantiated the feature machining volumes through relevant manufacturing feature parameters, and finally obtained 3D process models by performing Boolean operations. However, it is difficult to obtain the feature machining volumes of intersecting features. Zhao et al. [12] adopted the volume decomposition method and performed a hierarchical decomposition operation on the machining volume based on the concave edges in the machining volume. Then, the subvolumes were merged to generate the maximal machining features. Finally, the process models were generated by performing Boolean operations. However, the decomposition algorithm ignores the information contained in the design model, which makes it difficult to guarantee the correlation between the recognition results and the design model. There is also a combination explosion problem in the combination algorithm for complex features.

The automatic 3D process model generation method based on volume decomposition proposed in this paper follows these steps. First, the 3D design feature model is preprocessed to generate the candidate cut-cutoff surfaces sequence and the machining method chains of each main machining surface. Second, the machining volume units are generated by performing Boolean operations and the volume decomposition method. Then, the machining features are generated by linking the machining method chains to the machining volume units. Finally, the 3D process models are generated by performing Boolean operation between the blank model and the machining feature volumes.

Compared with the conventional methods based on volume decomposition [12,13,14], the proposed method (1) selects the cutting surfaces from the design feature surfaces instead of the machining volume surfaces to make full use of the information in the design model. It solves problems, such as complex and inefficient decomposition algorithms, caused by the information gap between the decomposition operation and the design model information; (2) decomposes the machining volume directly into machining volume units, each of which has machining semantics. It also avoids the subsequent merging operation, thus changing the mode of “decomposition then merging” and solving the combination explosion problem in the merging process for complex features.

2 Methodology

2.1 Related concepts and definitions

Definition 1:

Machining volume (MV) is a set of volumes removed from the rough in the process of machining a blank model into a finished part, which is as follows:

$$ MV= BM- DM=\sum \limits_{i=1}^n{mv}_i $$
(1)

where BM is the blank model, DM is the design model, n is the number of subvolumes contained in the MV, and mvi is the i-th subvolume. MV can be obtained by Boolean subtraction of BM and DM. Figure 1 illustrates the MV generation process.

Fig. 1
figure 1

Machining volume generation

Definition 2:

Process machining volume (PMV) is a set of volumes removed from the workpiece in one machining process operation. The relationship between PMV and MV is expressed as follows:

$$ MV=\sum \limits_{i=1}^n{PMV}_i $$
(2)

where n is the maximum number of processes and PMVi is the i-th PMV.

Definition 3:

The process model (PM) is the intermediate model formed by a certain process in the process of machining a blank into a finished part. The initial PM is the BM, and the final PM is the DM, that is, PM0 = BM, PMn = DM.

In conclusion, the relationship between PMV and PM is as follows:

$$ {PM}_i={PM}_{i-1}-{ PM V}_i $$
(3)

where PMi and PMi-1 are the process models of process i and process i-1, respectively, and PMVi is the PMV of process i-1. The sequences of PM and PMV can intuitively show the dynamic evolution process from blank to part product.

Definition 4:

Machining volume unit (MVU) is one of the volume units removed from the workpiece in one process step. MVU is the minimal entity that has machining semantics. A PMV contains at least one MVU, which can be expressed as follows:

$$ {PMV}_i=\sum \limits_{j=1}^{S_i}{MVU}_j^i $$
(4)

where PMVi is the process machining volume of process i, Si is the number of MVUs contained in process i, and \( {MUV}_j^i \) is the j-th MVU of process i.

In summary, the mathematical solution expression for generating the process model for the k-th process in a positive sequence is:

$$ {PM}_k= BM-\sum \limits_{i=1}^k\sum \limits_{j=1}^{S_i}{MVU}_j^i $$
(5)

Definition 5:

The cutting surface (CS) and cutoff surface (COS) are the construction surfaces in the decomposition process. CS is used to decompose the MV, and COS is used to limit the decomposition range of the CS. COS depends on the CS, and one CS corresponds to 0 or more COSs, which is expressed as s(s1, s2..., sn), where n is the number of COSs corresponding to the CS. It is called cut-cutoff surface (C-COS). When the decomposition range of a CS is global, no COS is required, which is denoted as s().

Setting COSs for CSs can also avoid unnecessary decomposition caused by feature interaction. Figure 2 illustrates the COS function. By adding COSs to the CSs of the relief groove feature, the feature machining volume is separated without damaging other feature machining volumes and merge operations are no longer required.

Fig. 2
figure 2

Cutoff surface function

Definition 6:

The main machining surface is the molding surface of each feature in the machining process, as well as the surface that determines the shape or quality of the part, such as the working surface or datum surface.

2.2 Overview of approach

Process planning is a decision-making activity of selecting appropriate operations and operation sequences [15] so that the excess volumes can be removed from the blank in an appropriate order to form surfaces that meet the requirements [16]. Under the MBD mode, the construction of 3D process models is the key to machining process planning and includes three aspects: acquisition of removed volumes in each process, selection of machining methods, and determination of machining sequence [17].

The automatic 3D process model generation method proposed in this paper focuses on the above three aspects. The process is shown in Fig. 3, and follows these steps:

  1. 1)

    Design feature model preprocessing: DF information is extracted by traversing the DFs in the part model to construct an extended feature relation graph (EFRG). Then, the candidate C-COS sequence and the machining method chains are generated through the corresponding operation.

  2. 2)

    Machining volume generation: The MV is generated by Boolean subtraction of BM and DM.

  3. 3)

    Machining volume unit generation: The C-COS sequence is generated by mapping the candidate CSs and COSs selected in step 1 to the MV surfaces, and then checking the invalid surfaces. Then, the CSs are extracted from the sequence, in turn, to decompose the MV to obtain the MVUs.

  4. 4)

    Process model generation: The machining features are obtained by linking the machining method chains to the MVUs. Finally, the 3D process models are generated by removing machining feature volumes from the blank in turn.

Fig. 3
figure 3

Automatic process model generation schematic diagram

3 Part model preprocessing

3.1 Extended feature relation graph

An extended feature relation graph is used to describe the attributes of each DF and the topological relation among them to obtain the required information quickly and accurately.

3.1.1 Hierarchical representation of the part design model

The part EFRG proposed in this paper takes the feature surface as the basic unit, so the part model is first transformed into a three-layer hierarchical model with a feature surface as the basic unit, as shown in Fig. 4. In the part layer, the parts are classified according to their geometric structure. In the feature layer, the DFs are classified into main features and subordinate features; the main feature is the feature that determines the structure of the part and the subordinate feature is the dependent feature of the main feature. In the feature surface layer, the feature surfaces are classified into main machining surfaces and secondary machining surfaces.

Fig. 4
figure 4

Part design model hierarchical representation

The common feature surfaces include plane, cylinder, cone, sphere, torus, and thread surface. The thread surface is out of consideration since it is usually not used as a CS. For the above five typical feature surfaces, a unified structured expression is adopted to constrain them, and the data structure is defined as follows:

$$ s=\left\{t,p,l,\theta, r\right\} $$
(6)

where t is the type of surface, p is the point, l is the line, θ is the angle, and r is the radius. Each feature surface can be determined by these five factors, as shown in Table 1.

Table 1 Constraints on typical shaft part feature surfaces

3.1.2 Structure of extended feature relation graph

The feature relation graph (FRG) [10, 18] is a graph used to describe the relation of part DFs, which can be defined as:

$$ FRG=<F,E> $$
(7)

where F is the set of nodes, representing part DFs, and E is the set of edges, representing the topological relationship between features.

The extended feature relation graph (EFRG) adds attribute information for each node and edge based on the FRG to describe the feature attributes and topological relationship between features, respectively, to give a more comprehensive part description and to provide the required information for process model generation. EFRG is defined as:

$$ EFRG=<F,E,R,G> $$
(8)

where

F is the set of nodes, expressed as F={fi, i=1,2...,n}, n is the number of nodes, and fi is the node corresponding to the i-th feature.

E is the set of edges, expressed as E={eij=(fi×fj), i,j=1,2...,n}, n is the number of nodes, eij is the edge between nodes fi and fj, which represents the topological relationship between the two features.

R is the s-dimensional vector function describing feature attributes, expressed as R : fi → ri = (r1(fi), r2(fi), …, rs(fi))T, ri is the vector that represents the attributes of feature fi, such as name, type, depth level, and parameters;

G is the vector that represents the topological relationship between features, which can be classified into six categories, as shown in Table 2.

Table 2 Feature topological relationship list

The depth level is a feature attribute used to represent the processing sequence of features with association relationships in terms of topology. The node corresponding to the main feature is called the root node, whose depth level is 0. The depth level of the other nodes is the depth level of their parent nodes plus 1. Figure 5 shows a local EFRG example of a part model (hereinafter referred to as the sample part).

Fig. 5
figure 5

EFRG of the sample part

3.1.3 Extended feature relation graph construction

The EFRG construction process is shown in Fig. 6. The design feature model [19] constructed by the design-by-feature system is used as the system input. The design features are extracted from the design feature tree of the design feature model. Then, the EFRG is obtained through DF node construction, node attribute extraction and edge construction.

Fig. 6
figure 6

EFRG generation flowchart

Taking the cylinder feature f2 of the sample part as an example, the EFRG establishment process is shown in Fig. 7. The key steps are explained below.

  1. (1)

    DF node generation

Fig. 7
figure 7

EFRG generation process

First, the design feature tree is obtained from the design feature model, and each design feature is extracted from the feature tree. Then, the design feature is matched with the feature template in the parameterized design feature library. Finally, a DF node is created for each design feature.

  1. (2)

    Node attribute extraction

Node attribute extraction consists of three parts:

  1. 1)

    Component surface and main machining surface acquisition based on feature surface extraction: Extract the component surfaces of the design feature first and then extract the main machining

surface from the component surfaces according to the main machining surface of the template in the design feature library. The main machining surface can be changed or added manually;

  1. 2)

    Depth level calculation by main feature identification and feature dependence extraction: The design features that may become the main features, such as cylinder and cone, are marked in the design feature library. Find all the qualified features from the design features, and check whether their axes coincide with the part axis. If so, they are the main features, and their depth level attribute is set to 0. Then, according to the feature dependency relationship constructed during feature modeling, the subfeatures are searched successively from the main feature, and the depth level is increased by 1 in turn;

  2. 3)

    Feature parameter acquisition by PMI extraction: According to the predefined parameters in the template, the geometric parameters of each design feature are extracted from the PMI of the design feature model.

  3. (3)

    Edge generation

The topological relationship between design features can be divided into 6 categories as shown in Table 2. According to the topological relations between the features, the nodes corresponding to the two features are connected with an edge, and the attribute of the edge is set to the corresponding value in Table 2. Edges with attribute values of 0 or 1 are omitted. The relationship between features is obtained by a feature topological relationship analysis operation: the feature volume of each design feature is established, and the topological relationship is obtained by interference detection between two features.

3.2 Candidate C-COS sequence generation

3.2.1 Candidate C-COS selection

After the EFRG construction, the candidate C-COSs are selected from the component surfaces of each DF with the aid of the C-COS selection library. The selection principle for each DF is to ensure the integrity of the main machining surfaces and feature machining volumes so that the MV can be decomposed into MVUs.

The COS setting principle is to limit the CS decomposition range to avoid the main machining surfaces and the feature machining volumes from being destroyed by the CS intersection. The normal direction of COS is from the DM side to the MV side, and the decomposition operation is performed in this direction.

For a selected CS: (1) if it is a part datum surface, the decomposition range is global, and no COS is required; (2) if it is damaged or lost due to feature interaction, virtual links [20, 21] can be added to complete it. Some samples from the C-COS selection library are shown in Table 3.

Table 3 Cut-cutoff surface (C-COS) selection library for common shaft part features

The part DFs are extracted from the EFRG, and the candidate C-COSs of each DF are selected based on the selection library. The candidate C-COS selection result of the sample part is shown in Table 4.

Table 4 Candidate C-COS list of the sample part

3.2.2 Redundant candidate CSs removal

The redundancy removal operation should be performed when a feature surface is used more than once as candidate CSs of different features. Redundant candidate CSs usually have different COSs, i.e., different decomposition range, in different features. The different decomposition ranges should be merged. Figure 8 shows an example of a decomposition range merge operation in the redundancy removal operation.

Fig. 8
figure 8

Decomposition range merge operation in the redundancy removal operation

The redundancy removal operation is performed as follows:

  1. 1)

    Redundancy detection: extract the CSs in the candidate C-COS list in turn and determine whether each CS is redundant: if it is, go to step 2; if not, extract the next CS until all the surfaces are checked.

  2. 2)

    Decomposition range merging: merge the different decomposition ranges of the redundant CS to obtain a new COS set. Then, update the COSs of the current CS and delete other redundant CSs. Return to step 1 to deal with the next candidate CS.

3.2.3 Candidate C-COS sequencing

The candidate C-COS sequence is generated by performing a sequencing operation so that the decomposition operation can be performed in an appropriate order to ensure that the MVUs are not destroyed and to improve the decomposition efficiency. First, the DFs are sequenced, then the feature surfaces are sequenced based on the DF order, and finally, the candidate C-COSs are sequenced based on the feature surface order.

The sequencing rules can be preset according to the part type or configured interactively by users. The DF sequencing rules for the sample part, which is a typical stepped shaft, are shown in Table 5.

Table 5 Design feature sequencing rules for stepped shaft parts

The feature surfaces are sequenced on the basis of the DF priority. The feature surface sequencing rules are shown in Table 6.

Table 6 Feature surface sequencing rules

The datum surfaces are automatically determined by the system according to the part type or specified as well as changed interactively by users. For the sample part, surfaces s1 and s10 are set as datum surfaces to ensure the machining quality of each cylinder feature. Based on the above rules, the DF sequences, feature surface, and candidate C-COS are generated, as shown in Table 7.

Table 7 DF sequence, feature surface sequence, and candidate C-COS sequence of the sample part

3.3 Machining method chain generation

3.3.1 Machining method chain determinants

The machining method chain generation process selects the appropriate machining methods and method sequence according to the main machining surface processing requirements and obtains a machining method sequence. The machining method chain determinants can be defined as:

$$ C=\left\{P\left(t,g,s,r\right),S\left(m,b\right)\right\} $$
(9)

where P(t,g,s,r) is the part information function and S(m, b) is the manufacturing environment [22] function specific to the job shop. The factors in the functions can be represented by the model in Fig. 9.

Fig. 9
figure 9

Machining method chain determinants

Factors t, g, and s in function P are geometric information that can be obtained directly from the EFRG, and factor r is manufacturing information, which is included in product manufacturing information (PMI) [23].

Factors m and b in function S represent the achievable machining methods and the processing capacity, respectively, which can be determined in advance according to the job shop conditions.

Taking the inner cylindrical surface of the hole feature as an example, Table 8 shows the machining methods and machining accuracy that can be realized in a certain job shop.

Table 8 Machining methods and machining accuracy for the inner cylindrical surface of the hole feature

3.3.2 Machining method chain template

The machining method chain template is a set of machining method chains under different processing requirements formulated in advance for each type of feature surface, which can ensure processing quality and efficiency as well as preserve process knowledge. Figure 10 shows an example of a machining method chain template for the inner cylindrical surface of the hole feature.

Fig. 10
figure 10

Machining method chain template for the inner cylindrical surface of the hole feature

Each component unit in the template is called a machining method unit (MMU). The cost [5] of using an MMU, which can provide support for the next machining method chain optimization step, can be calculated through the resources called by it.

3.3.3 Machining method chain generation

The machining method chain generation process can be summarized as matching the PMI of the main machining surfaces with the MMUs and optimizing the processing cost. The main steps are as follows:

  1. 1)

    PMI extraction: traverse the nodes in the EFRG to obtain the main machining surfaces of each DF, then extract the processing requirement information of each main machining surface from the PMI;

  2. 2)

    Machining method chain generation: for each main machining surface, search the MMUs that meet the processing requirements according to the surface type and PMI to obtain the MMU sequence. If there are multiple MMU sequences that meet the requirements, the total cost of each sequence is calculated by accumulating the cost of each MMU. The minimum cost sequence is used as the optimal machining method chain.

Figure 11 shows the machining method chain of each main machining surface of the sample part.

Fig. 11
figure 11

Machining method chains of the main machining surfaces for the sample part

4 Machining volume decomposition and process model generation

4.1 Machining volume decomposition

The MV is decomposed into a set of MVUs by performing a decomposition operation. The decomposition operation process is shown in Fig. 12.

Fig. 12
figure 12

Decomposition operation flowchart

The main steps are as follows:

  1. 1)

    CS mapping: according to the corresponding relationship between the DFS and the MV surface, the surfaces in the candidate C-COS sequence Sc are mapped to the MV surface to form the C-COS surface sequence Sc’.

  2. 2)

    Ineffective CS removal: some of the CSs are invalid within their decomposition range due to the COS limitations. The invalid surfaces can be obtained by detecting whether each CS intersects with other surfaces within its limited range. Then, they are removed from Sc’.

  3. 3)

    Machining volume decomposition: sequentially extract the effective CSs in Sc’ to decompose the MV. Traverse the subvolumes after each decomposition and store the subvolumes whose composition surfaces do not include the unused CSs in the MVU group.

Figure 13 shows the MV decomposition process for the sample part.

Fig. 13
figure 13

Machining volume decomposition process for the sample part

4.2 Machining feature and process model generation

The machining feature (MF) [24] can be obtained by linking the machining method chain to the corresponding MVU. The main machining surfaces are taken as the processing information carrier, as well as the basis for machining feature sequencing in the MF and PM generation process. The machining feature generation process is shown in Fig. 14.

Fig. 14
figure 14

Machining feature generation process

The MF generation process is summarized as follows:

  1. 1)

    Feature contact surface extraction: the MVU composition surfaces are classified into three types: rough surfaces, feature contact surfaces, and decomposition sections, from which the feature contact surfaces are extracted.

  2. 2)

    Main machining surface matching: match the feature contact surface with the corresponding DFS of the DM. If the DFS is the main machining surface, create a mapping between them.

  3. 3)

    Machining method chain linking: for each mapping relation established in step 2, link the machining method chain of the main machining surface to the MVU corresponding to the feature contact surface to generate the MF.

Figure 15 takes the MVU v2 in Fig. 13 as an example to show the MF generation process. The machining method chain of the main machining surface s2 is linked to the MVU v2 to generate the outer cylinder MF.

Fig. 15
figure 15

Outer cylinder machining feature generation

Then, the MVUs are sequenced according to the order of the main machining surfaces generated in the “Candidate C-COS sequencing” section. If multiple MVUs have the same priority, they are merged into one PMV. In addition, the PMV sequence is obtained. Finally, remove the PMVs from the BM or the last PM sequentially by Boolean operations to obtain the PMs, as shown in Fig. 16.

Fig. 16
figure 16

3D process models of the sample part

5 Development and experiment

The automatic generation system of the 3D process model of shaft parts was established based on the above method. Visual Studio 2015 was taken as the development environment, NX10.0 was taken as the development platform, and the UG/Open API was used for system development. A typical shaft part was used for 3D process model construction verification. The user interface of the system is shown in Fig. 17.

Fig. 17
figure 17

User interface of the automatic generation system for the 3D process model of shaft parts

The MBD design model of the part shown in Fig. 17 is taken as the input of the system. In the preprocessing stage, the EFRG was established inside the system. Then, the candidate C-COS sequence was generated. The main machining surfaces were taken as the processing information carrier to generate machining method chains. In the decomposition stage, the MV was decomposed into 19 MVUs, as shown in Fig. 18. After that, in the machining feature generation stage, the machining feature sequence was generated. Finally, the 3D process models were generated by performing Boolean operation, and the result is shown in Fig. 19.

Fig. 18
figure 18

Machining volume decomposition result for the typical shaft part

Fig. 19
figure 19

Result of automatic process model generation for the typical shaft part

6 Conclusion and future work

The volume decomposition method was used to generate 3D process models for shaft parts automatically in this paper. Compared with the conventional methods based on volume decomposition, the proposed method:

  1. 1)

    Selects the CSs from the DFSs rather than the MV surfaces, which can make full use of the information in the design model to solve the problems caused by the information gap between the decomposition operation and the design model information in the existing methods.

  2. 2)

    Changes the mode of “decomposition then merging” by decomposing the machining volume directly into machining volume units, each of which has machining semantics, avoids the subsequent merging operation, and solves the combination explosion problem in the complex features merging process.

Moreover, setting the main machining surface and EFRG improves the process model generation efficiency.

However, the proposed 3D process model generation method focused only on shaft parts, and the effectiveness of this method on other part types will be studied in the next step. Process optimization will also be the main work in the next stage.