1 Introduction

A surface of revolution or a revolved surface is a surface in Euclidean space created by rotating a curve around an axis of rotation [1]. A revolved face can be classified as regular form and freeform type [2], and based on the geometrical shape of regular form faces and freeform faces, three types of faces are classified: Type I, Type II, and Type III. Type I is cylindrical, conical, and planar faces form, Type II is the freeform 2.5D form face, and Type III is fillet and chamfer. This paper presents a novel algorithm developed to recognise regular form and freeform revolve surfaces that is not based on predefined geometric shape. Furthermore, the developed algorithm is also capable of automatic reasoning internal and external CAD part model features and generates associated material removal volume. Material removal volumes are incorporated into sub-delta volumes which are classified into roughing and finishing machining processes from the generated stock model. Volume decomposition of recognised features will be in the form of sub-delta volume for finishing (SDVF) and sub-delta volume for roughing (SDVR).

One of the challenges after feature recognition processes is machining process mapping for each feature. To do those, part model complexity (PMC) is introduced. With PMC quantifications, machining processes of a certain part model can be suggested. The complexity of the part model will be associated with part model’s topological elements and volume.

2 Related works

The turn parts and mill-turn parts are classified in many ways. In the research works performed so far, mill-turn part features are classified by its geometrical shape. Prismatic features are categorised as one group and features with rotational axis, i.e.: cylindrical, conical, and sphere are as one group [3]. Moreover, manufacturing parts are categorised into prisronal part which are parts that have primitive shapes with one common centreline [4]. By having these categories, milling features (prismatic) and as-lathed features (rotational) were segregated [5,6,7]. Internal features identified by part’s internal loop. These internal features are then eliminated in the early process leading to only as-lathe features to be recognised.

Neutral representation (n-rep) is used to recognise interacting and non-interacting features of rotational components resulting identification of user-defined features [2]. Features were also being recognised by a rule-based system implementing knowledge-based [8], edge boundary technique [9,10,11], artificial intelligence [12], and virtual loops [13]. Beside using generative algorithm technique [14], features were recognised by commercial CAD modeller’s feature recogniser such as SolidWorks [15], CATIA [16], and neutral file like STEP files [17]. To decompose material to be removed from the stock model, the volume decomposition method was introduced [18]. Exact volumes of material to be removed were generated and formed the sub-delta volumes of decomposed bodies. This method is then extended to suit roughing and finishing process [19, 20] and to suit milling components [21]. Moreover, an effort has been made to recognise uncut regions for electrical discharge machining [22]. Previous works on recognising regular surfaces of the cylindrical part model are presented in [23]. To extend the work done, this paper presents the recognition of regular and freeform revolved surfaces which are still new in the research world using volume decomposition method. These freeform feature’s type is specifically on the column-like and conical-like types of freeform features, as classified in Fig. 1. Most of the features can be machined by turning machining and involved revolved surfaces.

Fig. 1
figure 1

Type II revolved surface feature’s classification

Several methods to evaluate complexity were introduced from the past researches and have several interpretations. According to Chase et al., complexity can be divided into two types that are design complexity and CAD complexity. CAD complexity was introduced to measure the CAD part model for student assignment marking [24]. This method is based on CAD embodiment of the design and comparisons were made to part models via its file size, number of objects, instances, and layers. Recently, there are few studies measuring complexity published. Zhang et al. had introduced a knowledge-based measure of product complexity [25] based on BZT complexity method. Kwon et al. introduced Feature Shape Complexity (FSC) [26] by quantifying the feature’s properties such as edges type, faces type, and volume. This method is useful to rank feature complexity, so that it can be eliminated to reduce part model file size.

The present study will extend equations of FSC to suit the purpose of mapping machining processes to specific CAD part model. This study proposes part model complexity (PMC) as a new measurement criterion. The proposed PMC comprises element complexity, volume complexity with the considerations of the SDVF’s volumes. By having these considerations, numerical values of the complexity can be calculated, and part models can be classified according to the complexity scale and mapped into related machining processes. Table 1 summarizes the comparisons between PMC and previous complexity evaluations method.

Table 1 Comparisons of existing complexity evaluation method with PMC method

In this paper, definitions and classifications of revolved surfaces, internal features, stock model, and PMC are introduced in Sect. 3. In Sect. 4, the method of the algorithm implementations is explained. Section 5 explains the verifications of the algorithm with six CAD part models. Finally, the conclusions are given in Sect. 6.

3 Definition and classifications

This section provides three classifications including classification of part model surfaces, classifications of Type II surfaces, and classification of sub-delta volume. Detail definition of internal features, part model complexity (PMC), and stock model will also be provided.

3.1 Classification of part model surfaces

Including internal features, three types of surfaces will be recognised by the developed algorithm. Table 2 describes the type of surfaces that are classified by their geometrical shape and its machining process.

Table 2 Geometrical shape classification for surfaces

In this study, surface or more specifically faces which are in common native shape are defined as regular form faces (Type I). These regular forms include planar, conical, and circular form faces. The geometrical shape of these faces is an analytic type and spline face type will hold false.

CAD part model with freeform surfaces will be detected as spline surfaces and these will be categorised as Type II surfaces. Details explanation of Type II surfaces will be addressed in Sect. 3.2.

Concave and convex types of fillet and spherical face can be recognised as Type III surfaces. Fillet and sphere are recognised by their circular edges. To have a horizontal plane profile, the part model is sectioned in XZ-plane for the profile to be detected. Circular edge of the fillet information will be used to generate SDVF body by revolving and sweeping process. These bodies will be subtracted or subtract to other bodies by Boolean operations to get the desired shape volume.

3.2 Classification of Type II-freeform revolve surfaces

Common freeform face represented by Bezier, B-Spline, or NURBS face [27, 28]. Revolved surfaces are considered in term of a periodic surface (closed face). A freeform revolved surface feature is classified into two types of feature global shape that are column-like and conical-like. Figure 1 shows the classifications of the features. Based on these two shapes, a column-like shape can be sub-categories into a barrel shape, dumb-bell shape, and frustum shape. A conical-like shape can be sub-categories into conical shape and trumpet shape. Conoid-like freeform features are considered as non-symmetrical shape and will not be consider by the algorithm. Dumb-bell column-like freeform shape will be considered as one face if it is G1 and above in continuity. Representations of the revolved surface based on NURBS can be expressed in Eq. (1). Freeform with spline face with tangent continuity and above (G1, G2, and G3) along with u and v parameter is capable of being detected as a single face. For non-tangent continuity (G0), state faces will be recognised as two different faces:

$$S\left( {u,v} \right)=~\mathop \sum \limits_{{i=0}}^{k} \mathop \sum \limits_{{j=0}}^{n} {P_{ij}}R_{{ij}}^{{p,2}}\left( {{\varvec{u}},{\varvec{v}}} \right),$$
(1)

where u (the circle knot vector) and v (the profile curve knot vector) are the knot vectors of the revolution surface, as shown in Fig. 2. The weights wij are the product of weights of the profile, curve with the circle \({w_{ij}}~=~{w_i}w_{j}^{c}\), j = 0…, n. Planes z = zi locate the control points Pij for fixed i. \(R_{{ij}}^{{p,2}}\left( {u,v} \right)\) are the bi-variate rational basis functions [29]. Furthermore, a circular arc (or a full circle) with the centre on [0,0, zi]T and radius equal to the distance of Pi from the z-axis is defined by control points on each such plane [27].

Fig. 2
figure 2

Revolved surface, S(u,v) representations

3.3 Classification of delta volume

Volumes in terms of generated bodies of material removed from the stock model are defined as delta volume. These bodies of delta volume can be classified into three types: sub-delta volume for finishing (SDVF), sub-delta volume for roughing (SDVR), and sub-delta volume for filling region (SDVF-FR). SDVF is the volumes that will be removed during finishing or semi-finishing process from the stock model. Generations of SDVF bodies are from peripheral loop faces. In this study, although multiple machining operations, for example, external turning, tapering, facing, and grooving, can be done during roughing and finishing, sub-delta volume is grouped as a single body and did not separated by these machining operations.

SDVR is the volumes of material removal during roughing or semi-roughing process. Gap and opening from bodies of SDVF will be filled by SDVF-FR. Combinations of all the bodies of SDVF, SDVR, and SDVF-FR will be the overall delta volume (ODV). Bok and Abu Mansor had clearly defined SDVF and SDVR [19], while SDVF-FR had been defined by Kataraki and Abu Mansor [20, 30]. Furthermore, on regular form cylindrical part model, delta volume generations had been established in [23]. Therefore, Sect. 4.1 in this paper is adopting these previous works and will be briefly explained in this paper. This paper will extend the work for the generation of freeform revolve surfaces classified as Type II surfaces and the implementation of the complexity evaluations. This paper will differentiate the bodies of the sub-delta volume by colour. SDVF for Type I will be shown in green colour, Type II SDVF by red colour, SDVR by blue and SDVF-FR in yellow. Equation (2) shows the summation of sub-delta volume generated to combine as ODValg. These volumes are then being compared with a manual calculation of ODVmanual, as shown in Eq. (3). SDVF generations will consider input from the user for the finishing thickness, t:

$${\text{OD}}{{\text{V}}_{{\text{alg}}}}=\mathop \sum \limits_{{i=0}}^{n} {\text{SDVF}}+\mathop \sum \limits_{{i=0}}^{n} {\text{SDVF-FR}}+\mathop \sum \limits_{{i=0}}^{n} {\text{SDVR,}}$$
(2)
$$\left| {\Delta {\text{ODV}}} \right|=\left| {{{({\text{OD}}{{\text{V}}_{{\text{alg}}}} - {\text{OD}}{{\text{V}}_{{\text{manual}}}})} \mathord{\left/ {\vphantom {{({\text{OD}}{{\text{V}}_{{\text{alg}}}} - {\text{OD}}{{\text{V}}_{{\text{manual}}}})} {{\text{OD}}{{\text{V}}_{{\text{manual}}}}}}} \right. \kern-0pt} {{\text{OD}}{{\text{V}}_{{\text{manual}}}}}} \times 100} \right|.$$
(3)

3.4 Internal features

Faces from different vector direction will be analysed on the number of its loop. A face with more than one loop is defined as a face with protrusion or depression. Internal features (depression or protrusion) are features that detected as an internal loop with the winding number of zero rather than a peripheral loop with winding number one (Fig. 3) of part model. Features that are associated with an internal loop will be segregated from the de-feature part model. This paper will highlight de-feature model in cyan colour to differentiate with other bodies generated. Internal features can be in either freeform or regular form. Internal features will be detected as one entity of sub-delta volume different from SDVF and SDVR. Internal features will be generated as solid body and volume of these bodies can be evaluated. These bodies expressed the volume to be removed from the stock model during machining operations.

Fig. 3
figure 3

Peripheral and internal loops

3.5 Stock model

Stock model is the raw material before the machining process was done. For machining processes such as milling and turning, it can be in cylindrical, square, hollow, or hexagonal in shape. Among other shape, this study will only consider cylindrical stock model and the dimensions will be pre-set to tightest part model bounding box with the addition of boundary tolerances in x-, y-, and z-axis directions. Equation (4) shows the combination volume formula. Manual calculation of sub-delta volumes, ODVmanual, can be determined by subtracting CAD part model volume, VCAD from stock model volume, Vs with VCAD can be obtained directly from commercial software, for example, SolidWorks:

$${\text{Cylindrical stock model volume}},\;{V_{\text{s}}}=\pi {r^2}h={\text{OD}}{{\text{V}}_{{\text{manual}}}}+{V_{{\text{CAD}}}},$$
(4)

where VCAD is the CAD part model volume. r = maximum point of part model at x-axis + boundary tolerances in x-axis direction. h = maximum point of part model at z-axis + boundary tolerances in z-axis direction + boundary tolerances in z-axis direction.

3.6 Part model complexity

PMC is formulated to quantify part model complexity considering part model topological elements and volume. Generations of sub-delta volume as part of features being recognised will be considered in determining the PMC. This is one of the differentiation between PMC and FSC. Quantification of PMC is based on values of λ, α, and β. These values are determined from the developed algorithm. PMC is calculated, as shown in Eq. (5):

$${\text{PMC}}=\lambda /\alpha \cdot \beta ,$$
(5)

where \(0<{\text{PMC}} \leq 1\).

If \({V_{\text{CAD}}}>{\text{ODV}}{_{{\text{alg}}}}\), \(\lambda =\frac{{{\text{ODV}}{_{{\text{alg}}}}~}}{{{V_{{\text{CAD}}}}}}\).

If \({V_{{\text{CAD}}}}<{\text{OD}}{{\text{V}}_{{\text{alg}}}}\), \(\lambda =\frac{{{V_{{\text{CAD}}}}}}{{{\text{OD}}{{\text{V}}_{{\text{alg}}}}}}\)

$$\alpha ={C_{\text{V}}}/{C_{\text{E}}}\;{\text{and}}\;\beta ={C_{\text{V}}}+{C_{\text{E}}},$$
(6)

where CV and CE represent volumetric complexity and element complexity of the part model. α represents the ratio of volume complexity to element complexity and β represent the summation. CV and CE definitions will be explained in the next sections. \(\lambda\) value depends on VCAD and ODValg. This ratio is needed to be in between zero to one or equal to one. By having this value, PMC will be on the scale of zero to one.

3.6.1 Volume complexity

The volume complexity, Cv, is calculated, as shown in Eq. (7):

$$C_{{\text{V}}} = {{\sum\limits_{0}^{n} {{\text{SDVF}}} } \mathord{\left/ {\vphantom {{\sum\limits_{0}^{n} {{\text{SDVF}}} } {\left( {{\text{ODV}}_{{{\text{alg}}}} - \sum {{\text{SDVR}}} - V_{{\text{I}}} } \right)}}} \right. \kern-\nulldelimiterspace} {\left( {{\text{ODV}}_{{{\text{alg}}}} - \sum {{\text{SDVR}}} - V_{{\text{I}}} } \right)}},$$
(7)

where \(0<{C_{\text{V}}} \leq 1\).

Cv will consider only the SDVF as complex machining processes will take part for these sub-delta volumes for total n bodies. VI represents the summation of the internal feature’s volume. Parts with internal features will consider more complex to parts which do not have internal features. Internal features are considered to be machine in a secondary process such as drilling and boring.

3.6.2 Element complexity

The element complexity, CE, is formulated based on the FSC idea to quantify element complexity into a real number [26]. To suit the purpose of formulating the complexity for the part model instead of the feature, the ratio of the summation of the element of SDVF to the summation of part model elements is done. CE is calculated, as shown in Eq. (8):

$${C_{\text{E}}}=\mathop \sum \limits_{0}^{n} ({C_{{\text{SM}}}}+{C_{{\text{CM}}}})/\mathop \sum \limits_{0}^{n} ({C_{{\text{SF}}}}+{C_{{\text{CF}}}}),$$
(8)

where \(0<{C_{\text{E}}} \leq 1\)

$${C_{{\text{SM}}}}=\mathop \sum \limits_{{i=1}}^{n} w({\text{s}}{{\text{m}}^i}),$$
(9)
$${C_{{\text{SF}}}}=\mathop \sum \limits_{{i=1}}^{n} w({\text{s}}{{\text{f}}^i}),$$
(10)

where smiε SM, SM = {Plane, Cylindrical, Spherical, Conical, Toroidal and Spline Surface}, sfiε SF, SF = {Plane, Cylindrical, Spherical, Conical, Toroidal and Spline Surface}:

$${C_{{\text{CM}}}}=\mathop \sum \limits_{{i=1}}^{n} w({\text{c}}{{\text{m}}^i}),$$
(11)
$${C_{{\text{CF}}}}=\mathop \sum \limits_{{i=1}}^{n} w({\text{c}}{{\text{f}}^i}),$$
(12)

where cmiε CM, CM = {Linear, Elliptical and Circular Edge}, cfiε CF, CF = {Linear, Elliptical and Circular Edge}.

w(x) is defined as a total number of data unit calculated from the multiplication of the variable given from element properties and the total number of the element. CCF is the edge complexity for SDVF body and CSF is the surface complexity for SDVF body. On the other hand, CCM is for part model edge and CSM is for the part model surface. To define surface complexity for CSM and CSF, variables building the surface’s properties are considered. For example, a plane is defined by an origin (x,y,z) and a direction (u,v,w), and this will formulate w(Plane) = 6. Table 3 shows the w(x) values for S and their symbols. These symbols will be used in the verifications table for the ease of understanding. For spline surface, the variables will depend on the number of the control point. This paper will assume all spline surfaces to have four control points; thus, w(Spline) is equal to 12.

Table 3 Variables for complexity element

To define edge complexity CCF and CCM, variables building the edge’s properties are considered. For example, for the linear edge, two points with (x1, y1, z1) and (x2, y2, z2) are needed, so w(Linear) = 6. This study will only consider the linear edge, elliptical, and circular edge. Other types of edges such as helical edge and intersection curve edge are considered not suitable for revolving surface part model. It needs to be mentioned that the recognitions of this elements are done automatically by the CAD modeller software ACIS.

4 Algorithm frameworks

The algorithm was built in Microsoft Visual Studio 2010 Professional Edition version 10.0.40219.1 SP1Rel with Microsoft.NET Framework version 4.6.01055 SP1Rel platform and ACIS solid modeller version R25 SP1 platform. Time to generate was taken by inserting clock function before pre-processing and ended after post-processing of part model with the performance of 8 GB RAM Intel (R) Core i7-3770 CPU 3.40 GHz of 64-bit Operating System.

The structure procedure is shown in Fig. 4. CAD part model input is as Standard ACIS Text (.SAT) file.

Fig. 4
figure 4

Flow chart of the developed algorithm

4.1 Part model pre-processing

Stock model generation, orientation correction if needed, de-featuring and sectioning of the part model will be done in the first stage.

4.1.1 Validation of input model

The input model will be validated in term of volumetric and the manifold boundaries. Only solid part model and two-manifold boundaries of the input model will be executed. Other than these two conditions, input model will hold false and directed to the end of the process. Parametric surfaces will hold false.

4.1.2 Stock model generation

Next step will be the identification of the bounding point of the part model. The tightest vertices will be identified using api_get_entity_box function and used as input parameters (r and h) for the cylindrical stock model, as shown in Eq. (4), including boundary tolerances in x, y, and z-axis directions. The generated stock model body will be saved, and volume of the body will be calculated to determine Vs.

4.1.3 Part model orientations

To suit with lathe machining axes orientation, the part model is required being in a top plane (XZ-plane). The height of the part model should be in the z-axis position. The algorithm will identify the part model axis via the peripheral loops of its top face. Face’s direction of the part model’s top face should be in + z-axis or –z-axis direction, or else instruction to re-orient the part model will hold true and part model will be re-oriented. Part model orientations are performed in the beginning of the process as further calculation and verification will be based on x-axis and z-axis position only. This approach opted from the previous work in [23], as it is important that the part model is positioned in the correct position before it is being processed.

4.1.4 Part model de-featuring

The next phase is to identify geometrical data of the part model’s faces and its faces’ loop(s). This phase will only identify faces’ loop without differentiating face’s type. The internal loop, Nface, will be identified and if faces shows more than one loop under condition a single peripheral loop (Nsingle) under the condition 0 < Nface < 2 \(\in\)Nsingle or regular-freeform face with protrusion or depression with at least two loops conditions (Nmultiple) and 1 < Nface < ∞ ϵ Nmultiple. Figure 5 shows de-featuring of internal features of the part model. Profile edge highlighted in orange (Fig. 5b) of CAD model half-section will be recognised and a de-feature model will be generated. The approach wills automatically reasoning turnable and non-turnable features (internal features) of the part model, as shown in Fig. 5c. This paper will focus on the revolved surface as the peripheral loop of the part model only and not surfaces of internal features recognised from the internal loop.

Fig. 5
figure 5

Revolved surface part model with internal features. a Part model, b half-section of part model, and c de-feature model and its internal features F1, F2, and F3

4.1.5 Part model sectioning

Whenever a groove is located at the surface of the part model, there is a chance of error from the incompatible co-edge. The automatic sectioning process will eliminate error generated from the incompatible co-edge that happens if there is a depression or protrusion on the part model edge profile. XZ-plane (see Fig. 5a) is identified to be the section plane. Planar face in y-axis vector direction will not be considered as one of the surface recognition. Part model will be sectioned in two bodies. Because the possibilities of part model did not in symmetrical order if there is an internal feature had been eliminated during de-featuring process, the part model will be processed in half-section mode and will be re-assembled at the end of the pre-processing process.

4.2 Surface recognition and feature processing

Two types of surfaces will be recognised by the algorithm; regular form faces, and freeform faces. This section will explain on the identification of geometrical shape of each face.

4.2.1 Type I face processing

Regular form face is subjected to planar, conical, and cylindrical geometrical form. All spline faces detected will be discarded. Type I faces will be recognised first by the algorithm. Faces identified will be kept and process for the sub-delta volume generation that is to generate the SDVF of the surface. This method can be summarized as the pseudo-code, as shown below. If Type I faces (SFi) is a Type I, it will be duplicated twice by api_deep_down_copy_entity function into Sd1 and Sd2. Next, Sd2 will be offset by the normal direction in a distance of the finishing thickness, t. Next, these two faces will be lofted into a solid body using ACIS function of api_loft_faces. SDVF bodies generated will be saved and grouped according to their geometrical shape, for example, Conical SDVF, Cylindrical SDVF, and Planar SDVF for Type I face. By having this differentiations, volume of every SDVF can be calculated and analysed.

figure a

4.2.2 Type II face processing

Instead of planar faces in Type I face being identified, faces with the geometrical form of a 3D spline, B-spline, or NURBS will be identified as freeform faces. Any analytic (regular) type of faces detected will be discarded. To avoid co-edge error, spline edge of the spline should be seamed to unite all the spline faces before recognition. Surfaces recognised will be saved in lists. These lists are going to be used for sub-delta volume generation in form of SDVF bodies. G0 faces (faces that touch at a single point but not tangent) will be separated into faces by the beginning or end of the meeting.

4.2.3 Type III face processing

Fillet face’s processing Fillet are identified by a circular edge that has maximum vertex point, Dmax, after sectioning process is done. Circular edges either in convex or concave edges will be used as a profile to generate a torus. This is done by identifying the edges centre, CE, and generates the circular with the same radius of fillet radius, RE. The circle is then being sweep by the same axis of part model and a torus body is generated, T1. Another torus body, T2 is generated with a circle that less than half of finishing thickness, t/2 and then being subtracted from the initial torus to generate a hollow torus with finishing thickness, t. Next, the hollow torus will perform few more subtractions resulting only fillet SDVF body needed. The pseudo-code is developed as below.

figure b

Sphere face’s processing Sphere faces intended to be in top face (normal + z-axis direction). Similar to fillet face’s processing, circular edge of the sphere face (after sectioning) will be identified. This edge profile will provide such information parameters in generating a sphere, especially a radius and centre. A larger sphere with t/2 larger radius than original sphere face radius will be generated. Next, the generated sphere will subtract the original part model to generate a hollow sphere.

Fillet and sphere do not require SDVF-FR, as the face boundaries of these two will be according to adjacent geometries shape boundaries; thus, gaps and overlapping between bodies are not generated. Although these methods produce an efficient volume of Type III bodies, these methods require more generation time compared to other two types’ face recognition thus allocated into higher complexity scale.

4.2.4 SDVF file generation

SDVF is generated by creating volume apart from recognised face with the new duplicated face and translation with finishing tolerances, t (Fig. 6) by lofting function. To solve non-uniform thickness cause by self-intersecting issues in [19] of generated SDVF bodies, offset function being used. Vertices of face, for example, P0,1 will be copied and translated into another vertice P(0,1)T via a normal vector. Although for freeform cases of spline, faces have different vector magnitudes than the others, the offsetting approach will uniformly translate the faces. Error differences of ODV will also improve. Offset distances, t larger than the smallest radius of curvature (principal) will probably cause degenerate cases. Generation of SDVF for the entire classified freeform revolved surface with a thickness of finishing, t, equal to 1 mm is shown in Fig. 7. Figure 7b shows a G1 freeform face (f1). The algorithm will process only one body of SDVF in each section (left and right) from recognised face, fn−1, where n is the number of the face.

Fig. 6
figure 6

SDVF generation of Type II face. a Type II SDVF, b point representations of offset translation

Fig. 7
figure 7

SDVF generation of Type II faces (half-section) in red volumes. a Barrel-like, b dumb-bell like c frustum-like, d conical-like, and e trumpet-like

SDVF bodies generated will form body lists of both rights and left bodies of SDVF, saved and form an assembly form of SDVF.

4.3 Post-processing

To ensure the error generated from ODV is minimum, sub-delta volume generated needs to be optimized by removing gaps and overlapping between SDVF bodies that are a minor drawback in volume decomposition method [31]. This section will discuss how to overcome these issues.

4.3.1 Managing gaps

Gaps between SDVF bodies happen when identified surface offset in different normal directions especially when a different geometrical shape of the surface being identified. For example, the conical surface will have a non-horizontal (± y-axis direction) compare to cylindrical face normal face’s direction (y-axis direction). These conditions will produce gaps in an area that not covered by the normal direction.

Extended volumes from generated SDVF are needed to fill these empty regions. Additional bodies are created by extruding bodies from identified faces. These identified faces have different normal directions from main surfaces (surfaces that been identified to generate SDVF). For example, for cylindrical SDVF, a face that has a vertical (± z-axis normal direction) will be chosen. These faces are then generated extended bodies to fill the gaps. Any bodies from another geometrical shape that intersect each other will be kept by Boolean operations of an intersection. These extended bodies’ intersection is named sub-delta volume of filling region (SDVF-FR). To differentiate the bodies from other bodies, yellow colour will be used for Type I face SDVF-FR and purple for Type II face’s SDVF-FR. Equation (13) shows the intersection of all SDVF which F is the final SDVF-FR body and Fig. 8 shows the illustrations of the extended volumes:

Fig. 8
figure 8

Generations of extended volumes from SDVF. a Assembly of de-feature body with freeform SDVF and planar SDVF, b extension from planar SDVF, c extension from freeform SDVF and d filled combination

$$F=c^{\prime} \cap p^{\prime} \cap n^{\prime} \cap f^{\prime},$$
(13)

where F = filled combinations SDVF-FR, \(c^{\prime}\) = cylindrical SDVF extension if exist, \(p^{\prime}\) = planar SDVF extension if exist, \(n^{\prime}\) = conical SDVF extension if exist, \(f^{\prime}\) = freeform SDVF extension if exist.

4.3.2 Managing overlapping

Overlapping happens when normal directions of different identified faces directly in the same way or intersect each other. It is shown in Fig. 9. Overlapping volumes will produce more volume than it should be, thus contributing to greater error of ODV. To overcome this issue, all SDVF bodies will be called and intersect with each other using Boolean Union operation expressed in Eq. (14):

Fig. 9
figure 9

Gap and overlapping of SDVF features. a Part model with half-section of combined SDVF, b detailed view of the intersection [23]

$$S=r \cup f \cup s,$$
(14)

where \(S={\text{combined}}\,{\text{SDVF}}\), \(r={\text{Type}}\;{\text{I}}\;{\text{SDVF}}\), \(f={\text{Type}}\;{\text{II}}\;{\text{SDVF}}\), \(s={\text{Type}}\;{\text{III}}\;{\text{SDVF}}\).

4.3.3 SDVR generation

Volume thickness of SDVR will be from stock model boundaries (each axis direction) to the SDVF boundary. Each body from SDVF to the part model bodies will be deducted to produce SDVR bodies (Eq. 1). For the ease of planning for machining processes, SDVR bodies are divided into three segments which are top, contour, and bottom segment. These segments are generated by considering different normal vector directions of part model.

4.3.4 Part model complexity scale

Formulation of the complexity will lead to a numerical value of each part model. This numerical value can be classified to a complexity scale to map with the machining process. PMC will have a value of less than 1. Four scales are defined to associate with the part model. Higher PMC value indicates higher complexity scale part model and requires more machining processes than the lower PMC value. Part model with PMC value in complexity scale 1 will need basic lathe machining processes, and complexity scale 2 requires Type III faces machining process that requires forming tools for fillet and sphere. Complexity scale 3 and complexity scale 4 need secondary processes such as drilling or boring and have Type III face. The difference between complexity scale 3 to complexity scale 4 is that complexity scale 3 only has one type of faces either only Type I or Type II. Table 4 shows the classification of the quantified PMC to complexity scale.

Table 4 PMC value’s complexity scale and associated features and theirs machining processes

4.3.5 Output display

The output of the developed algorithm will be displayed in window console and text file notepad. Sub-delta volume bodies generated can be view at Scheme AIDE Hoops window via Scheme ACIS Interface Driver Extensions window in .SAT format.

5 Verification

Generation of different ODV volumes and exploded views of all the recognised faces and features of Detroit lock was performed. Sub-delta volume bodies are classified according to their body types. Table 5 shows the Detroit lock part model’s elements, and Table 5 shows its classification and their respective elements. In Fig. 10, the body of number 0 is the de-feature part model. Bodies’ numbers 1–8 can be in left or right sections as mentioned before it is being sectioned by XZ-plane. Item 5 in Fig. 10 shows freeform SDVF bodies recognised by the algorithm. The type of freeform revolved surfaces being recognised is frustums (2 bodies) types. Table 6 shows that the total volume is larger than ODValg volumes in Table 6. Total volume in Table 5 is volumes of all bodies without eliminating the overlapping bodies. Management of overlapping and gaps reduces total volume from 624,786.9 to 613,587 mm3 and thus leads to more sufficient ∆ODV. With separated bodies of the ODV, further analysis and application such as process planning can be done. From Eq. 7, CV equals 0.837885. From Eq. 8, CSM of Detroit lock equals 142, CCM equals 372, CSF equals 670, and CCF equals 2287. Therefore, CE equals 0.174. VCAD of this part model is lower than its ODValg, so λ is equaled to 2.42. From Eq. 5, PMC value is 0.49 that makes Detroit lock part model is in complexity scale 2.

Table 5 No. of part model’s element for Detroit lock (Example 3)
Fig. 10
figure 10

Exploded view of Example 3 (Detroit lock)

Table 6 Detroit lock (Example 3) complexity scale 2, sub-delta volumes generated before removal of overlapping bodies and its elements

To compare between other part models, total six examples were verified by the algorithm. The examples used to verify the algorithm will be in all complexity scale of the revolved surface part model. Six examples consist of a pinhead, chess pawn, Detroit lock, baseball bat, and baton, and one example from the previous literature was used. Table 7 shows all the examples and their details. Column five shows the SDVF generated, where green surfaces are the Type I faces, red surfaces are Type II faces, and cyan colour surfaces show Type III faces. All verification part models shown in Table 7 were using 4 mm of boundary tolerances in all directions (x, y, and z-axis directions) and 1 mm of finishing thickness, t.

Table 7 Features’ recognition

Table 8 shows the number of bodies generated based on faces’ type and time needed for the algorithm to generate the bodies. Example 1, Example 4, and Example 6 show less than a minute time to generate, and Example 2 needs about 197 s to generate, while Detroit lock as it has more bodies to generate took 106 s. It can be observed that as the number of bodies incremented, it will lead to more time to generate. Lower complexity scale part model requires less time to generate. For same complexity scale examples, higher body number will reflect more time to generate. All six examples show less than 0.02% of ∆ODV.

Table 8 Part model and its sub-delta volume generations n its complexity scale

Numbers of SDVF-FR will exist if there are no Type III faces in adjacent with other types of faces, for example, in Example 4 and 5, only Type I and Type II faces are in the adjacent or same type of face type in adjacent. Gaps and overlapping were managed to be optimized. G0 continuity Type II faces in adjacent to one another will lead to another gap. Apart from combinations of all the types of faces, for comparison and verification, Example 5 is one example of a part model without Type II face. Example 5 shows five internal features that are isolated and non-isolated that contributes to higher generation time, tg.

Type II faces that have been classified into five types based on feature global shape had been successfully recognised and this is considered a new contribution to the research. Despite these facts, the algorithm needs further augment for freeform faces for internal features (internal loop) identification especially for intersecting features. To reduce tg, methods for recognising internal feature and Type III faces can be simplified.

Figure 11 shows the comparisons between PMC, CV, CE, and λ for all the part model examples. It shows that the value of CE will influence the value of PMC. We can say that part model Example 2 has the largest volume to CAD volume ratio and the smaller CE. These values, therefore, increase the value of PMC. On the other hand, part model Example 5 has less volume to CAD volume ratio and large CE that decrease the PMC value.

Fig. 11
figure 11

Comparisons of PMC, CV, CE, and λ between part models

6 Conclusions

The developed algorithm establishes a new approach to recognise and generating the sub-delta volume of revolved surface part model automatically. Faces were classified into three types according to their geometrical shape. With quantification of PMC, further consideration towards machining process choice can be done. Six examples that consist of regular-freeform revolved surfaces were verified on the developed algorithm and comparison between \(\Delta {\text{ODV}}\) errors with previous researchers showed less than 0.02% \(\Delta {\text{ODV}}\). It can be observed that higher sub-delta volumes’ generation time, and tg was obtained through higher complexity scale features presences.

The proposed method of automatic surface recognition plus PMC quantification will be useful for further development of process planning and offers constructive information of material removal volume for turning machining.