1 Introduction

Today, standard parts are widely used in material handling, die molds, and automobile industries as a component of large assemblies. These parts follow a specific set of protocols (such as company-specific standards, ISO, functional, and safety standard) that improves interoperability, compatibility, repeatability, and quality of the assembled products [1]. Generally, standard parts are outsourced to small/medium scale industries to make the assembly cost-effective. The design and manufacturing of such components require less workforce and resources as compared to custom-made parts. Hence, it is beneficial for any design and manufacturing firm to follow some design protocols while manufacturing such standard parts.

The standard parts incur frequent dimensional changes due to changes in functional requirements (like load, size, and cost) that allow the reuse of existing designs. However, minor design changes often lead to a complete renewal of the CAD model and manufacturing sequence based on application requirements. Typically, in a manufacturing firm, 15% of the manufacturing cycle time is spent in technical decision making, 40% in data table lookout and calculations, and 45% in text and documentation [2]. Thus, data lookup and documentation constitute a significant portion of the total lead time of manufacturing such parts.

To manufacture a product that involves machining in its production route, first, the design engineer calculates the basic dimensions of product geometry. Other necessary dimensions are found from design handbooks, international standards, and industry-specific manuals with additional geometry calculations based on these values. The next step is to communicate these product specifications with the manufacturing engineer, who will then recognize machining features and develop CNC codes for machining the standard part. This traditional approach to design and manufacturing is cumbersome, error-prone, and time-consuming. Thus, to remain competitive in today's volatile markets, more efficient methods to perform these tasks must be deduced. The integration of CAD and CAM could be a solution. This work proposes an interactive approach for the same.

2 Related literature

The integration of CAD and CAM for interactive automated product development pertains to three main research portfolios: automatic design, feature recognition, and part program generation. However, there is a lack of work focused on combining all three research directions.

Potočnik et al. [3] developed a system for the automated design of compound washer dies. They made use of knowledge-based generative models for the proposed system development. Virtual modeling of a shoe for the footwear industry using image processing and geometrical rules was presented by Raffaeli and Germani [4]. They achieved good results, but the method was computationally intensive. Li and Liang [5] proposed an intelligent design method for stamping dies based on parameterization and sketch drive. Wei et al. [6] exemplified a methodology to design the layout of standard parts for the automated design of multi-plate die based on distributed assembly modeling strategy. Carfagni et al. [7] proposed an automated design procedure for vane-motor based on constructive parameters and the mathematical model obtained from the design of experiments approach. Colombo et al. [8] designed a 3D interactive environment to design medical devices based on the patient's data. Bai et al. [9] presented a semantic-based approach for partial retrieval of 3D CAD models for design reuse. However, the CAD model reconstruction was not discussed in this work. Gong et al. [10] devised a decision-making system to develop a method of design for remanufacturing. Their approach was non-empirical that caught the designer's subjective preferences. It is evident from the literature that no system exists, which tries to reduce the remodeling time of standard parts during CAD modeling.

After CAD modeling next step in automatic product development is to identify the machining features. Literature reports various automatic feature extraction/recognition approaches from different part models, such as STL, IGES, and STEP. The feature information is used for downside applications like CNC code generation [11], process planning [12], defeaturing [13], etc. The feature recognition techniques viz., rule-based [11], hint based [14], syntactic pattern recognition [15], attributed adjacency graph-based [16, 17], Artificial neural network-based [18] are most widely used. For the complete automation of manufacturing, a feature recognition technique should be generic and easy to implement on industrial parts. Generally, the research work in this area is specific to the types of machining features or their applications. Liu et al. [19] proposed an algorithm for the extraction of the features of the prismatic part from IGES. Arivazhagan et al. [15] developed a module for recognition of tapered and curved features from the STEP file. Sunil et al. [20] reported the automatic recognition of machining features using artificial neural networks from the SAT file for sheet metal parts. Leo Kumar et al. [21] presented a feature extraction technique from XML file for micromachine components. Rameshbabu and Shunmugam [17] presented a hybrid approach to recognizing prismatic manufacturing features by volume subtraction and face adjacency graph from STEP format. It is seen that if the types of features are known a priori, as in the case of standard parts, the rule-based techniques could be very useful. The rule-based technique on XML and STEP files is easy to implement, fast, and accurate.

Automatic toolpath generation is one of the applications of feature recognition. Sivakumar and Dhanalakshmi [11] developed a Numerical Control (NC) code generation system for cylindrical parts using the STEP file as input. Suh et al. [22] presented a method to generate CNC part programs from the STEP AP-203 file. Han et al. [23] performed feature recognition from STEP, followed by tool path planning and finally cost analysis to prove the requirement of process planning along with feature recognition. Leo Kumar et al. [21] presented a toolpath planning approach for micro-machined components. Patil and Pande [24] reported an intelligent feature-based process planning (IFPP) system for prismatic parts. They used a Feature-Based Modeler (FBM) to make the CAD model using a design by feature approach, followed by Computer Aided Process Planning (CAPP). Khan et al. [12] developed a process planning approach for prismatic die parts using the STEP AP-203 file. Carlos et al. [25] described a method for an internet-based CAD/CAPP/CAM system using STEP-NC. As an end application of an integrated CAD/CAM system, Letaief et al. [26] proposed an approach to use company database and geometrical and topological parameters of the CAD model to estimate manufacturing cost. However, the designing of a new CAD model and machining planning were not devised in this work.

The link between the CAD modeling, feature recognition, and CNC toolpath generation is usually established manually. Literature suggests that scant work is done to integrate them. Most of the approaches either perform automatic remodeling/intelligent design, automatic feature recognition (AFR), or automatic CNC toolpath generation. Thus, there is a need to automate and combine the design process and generation of part programs for manufacturing standard parts to reduce the product development cycle time. This paper is an attempt in this direction. It presents a new interactive way of automatic remodeling and manufacturing of standard parts with minimal human intervention.

The organization of the rest of the paper is as follows. Section 3 explains the different modules of the system. Section 4 presents a case study to show the capability of the developed system, and Sect. 5 presents the conclusion.

3 Modular components of the smart system

Figure 1 shows the flowchart of the system. The method proposed in this paper consists of three main modules—automatic remodeling, feature extraction/recognition, and part program generation. The first module generates the CAD model of the standard part. The system then exports the CAD model as XML and extracts the features. If there is any change in conventional design, such as the addition of slots, steps, and tapers, the CAD model is updated manually and exported as a STEP AP-203 file. The system then reads the STEP file to recognize the machining features. The third module generates the CNC part programs using the information provided from the previous module about the machining features.

Fig. 1
figure 1

The proposed methodology for the development of the smart system

As noted earlier, the original equipment manufacturers (OEMs) and several small/medium scale industries use CAD and CAM software in tandem to develop a product that is error-prone and inefficient. The proposed system automates the process of CAD modeling and integrates the modules mentioned above to increase productivity.

These modules are configured to create an interactive system [27]. A user interface (UI) is designed for remodeling, AFR, and generate CNC part program as shown in Fig. 13. The remodeled CAD can be visualized. Besides, a decision support system prompts for adding any new features to the product. The user can also edit the CNC part program (if needed) before saving or transferring it to the CNC machine. Thus, interactive design of the system gives the user control over the course of action while automating the whole process to manufacture a product efficiently. The following sections describe the modules of the developed system in detail.

3.1 Automatic remodeling of standard parts

The designing of a product requires finding out the basic parameters of the product by experienced design engineers. Then, for each product component, the primary dimensions are taken from the databook/manuals corresponding to the basic parameters. The remaining secondary dimensions are calculated using these extracted values based on the geometry and topology of the part. For example, in the case of the ball bearing design, primary dimensions are the diameter of the hole, the diameter of the balls, the thickness of the bearing, and the width of the bearing. These dimensions can be extracted directly from the standard manuals corresponding to the basic parameters viz. load, shaft diameter, and type of fit. And the secondary dimensions, such as the outer diameter of the bearing and the diameter of the labyrinth seal, are calculated using primary dimensions.

The CAD model of the product is designed using the primary \(\left( {p_{j} } \right)\) and secondary dimensions (\(s_{l}\)). The change in the basic parameters \(\left( {\beta_{k} } \right)\) changes the primary and secondary dimensions, which often leads to complete redesigning of the product. The proposed method tries to eliminate this shortcoming of the conventional designing process. It involves the extraction of parameters, establishing constraints, scaling, and using empirical relations to carry out this task.

Figure 2 shows the modular diagram of the proposed Automatic remodeling system. A VB.net script was written to link the various modules of the designed system. The user only needs to give new basic parameters as the input. The developed program would then read the values of the modified parameters and update the CAD model automatically using Inventor COM API for remodeling of parts.

Fig. 2
figure 2

Modular diagram of the automated remodeling system

The steps to design the system are as follows:

  1. 1.

    Prepare the database of technical handbooks, standard manuals, and company standards stored as individual arrays (Mpara).

  2. 2.

    Initialize all the geometry parameters \(\left( {\alpha_{i} \forall i = \left( {1,n} \right)} \right)\) of the CAD model in the database.

  3. 3.

    Extract the values of primary dimensions (\(p_{j} \subset \alpha_{i}\)) from the database (Mpara) based on the basic parameters (\(\beta_{k} \subset \alpha_{i} )\).

  4. 4.

    Calculate the secondary dimensions (\(s_{l} \subset \alpha_{i} )\) from \(p_{i}\).

  5. 5.

    Design the CAD model of the standard parts using Autodesk Inventor's part modeling module.

  6. 6.

    Inter-Link the dimensions of the CAD model with the \(\alpha_{i}\) in the Autodesk Inventor.

  7. 7.

    Create the assembly of the complete model by including suitable dimensional constraints and spatial constraints for keeping the relationship between all the modeled standard parts intact.

After designing the system, the modules are interlinked using VB.net script to automate the process. This approach could bring a considerable reduction in the lead time for redesigning the CAD model. Section 4 explains the proposed system with the help of a case study.

3.2 Automatic feature extraction/recognition system

After the remodeling of the CAD model, the next step is to identify the machining features. For standard parts, the system exports the CAD model as XML. Whereas automatic feature recognition (AFR) was used for additional features that are out of the scope of the standard part feature library.

3.2.1 Automatic feature extraction from XML file

The remodeling changes the dimensions of the standard parts. The developed program automatically reads and extracts the parameter names and their corresponding dimensions from the XML file. The xmlread function of VB.net was used to read the XML file. Figure 3 shows a sample XML file. A feature library is created in the system to define various features of the part. This feature library is used to interpret the variables extracted by reading the XML file, and a suitable algorithm is used to generate part programs for each extracted machining feature.

Fig. 3
figure 3

Sample XML file

3.2.2 Automatic feature recognition (AFR) from a STEP file

The STEP (AP-203) file has a hierarchical structure. It starts with the Shell that is formed by a combination of advanced faces. Each advanced face has bounds and surface types, which could be planar, cylindrical, conical, or toroidal. Bounds are of two types, face bound and face outer bound, which specify whether the type of edge loops of the entity are internal or external, respectively. Next, the edge loop is defined by oriented edges, which have edge curves. The edge curves are finally defined as lines or circles along with their vertices.

The hierarchy of the STEP file must be traversed to take out useful information regarding geometrical entities such as the type, coordinate values, and directions. The proposed method uses Regular Expression (RegEx) to perform this operation. A RegEx is a way of describing a search pattern using a unique combination of strings. The RegEx engine matches the defined string pattern and extracts the data. The data is stored in a data grid view, a temporary tabulation of data in VB.net. The arrangement of strings helps in identifying the pattern for feature recognition without reading the STEP file recursively. As opposed to the methods that either use line-by-line text reading or some available tools for reading STEP files, feature recognition performed on the temporary tabulation speeds up the navigation process through the hierarchy of STEP files. The regex search pattern for a few strings in an ISO 10303-21 (STEP) file is given below in Table 1, and Fig. 4 shows the extracted data stored in the data grid view of VB.net.

Table 1 RegEx for some geometrical strings of STEP
Fig. 4
figure 4

Data grid to store geometrical strings temporarily

Figure 5 shows the flowchart for recognizing the turning features from the stored tabulated data grid. The advanced faces are arranged in the table as per their distance from the origin. The system reads the advanced faces and extracts the following information by horizontal lookup.

  • Type of surface Ts, i.e., cylindrical, conical

  • Center point of top (Ct,i) and bottom (Cb,i) face

  • Radius of the top (Rt, i) and bottom (Rb,i) face

  • Length of the surface (Ls).

Fig. 5
figure 5

Flowchart to recognize the turning feature

The algorithm checks two advanced faces at a time. A turning feature is present if the two advanced faces are connected at the same point, i.e., Cb of AFi is equal to the Ct of the AFi+1. If the radius of the second face is greater than the bottom radius of the first face, then the feature is classified as a step. Otherwise, it is a groove. The profile of the feature depends on the type of surface. Figure 6 shows a typical axisymmetric part with various turning features.

Fig. 6
figure 6

Axisymmetric part with turning features

Machining features for vertical machining centers differ from CNC turning features regarding topology and the process of recognition. In this work, basic non-intersecting prismatic machining features are recognized, such as pockets and holes. The developed system uses the pattern matching technique for the recognition of machining features on prismatic parts.

In the STEP file, holes are specified by cylindrical advanced_face. It must have bottom face_outer_bound and top face_bound to identify it as a hole. The face_bound center is the center of the hole, and the distance between the face bound and face outer bound gives the depth of the hole.

For recognizing a pocket, a Planar advanced_face with only one face_bound is identified. Let one such advanced_face A1 have vertices V1,1V6,1 (Fig. 7). If another advanced face A2 is present in the STEP file with the same number of vertices (V1,2V6,2). And the direction vectors of all the vertices from A2 to A1 are the same. Then the feature is identified as a pocket. The direction vector \(\hat{d}\) of the pocket can be found using Eq. 1.

$$ \hat{d} = \frac{{\overrightarrow {{V_{i,1} }} - \overrightarrow {{V_{i,2} }} }}{{\left| {\overrightarrow {{V_{i,1} }} - \overrightarrow {{V_{i,2} }} } \right|}} = \frac{{\overrightarrow {{V_{j,1} }} - \overrightarrow {{V_{j,2} }} }}{{\left| {\overrightarrow {{V_{j,1} }} - \overrightarrow {{V_{j,2} }} } \right|}}\;\;\;\;\forall i,j \in \left[ {1,n} \right] $$
(1)

where n is the total number of vertices in the selected advanced face. Equation 2 gives the depth of the pocket 'h.'

$$ h = \left| {\overrightarrow {{V_{i,1} }} - \overrightarrow {{V_{i,2} }} } \right|\;\;\;\;\forall i \in \left[ {1,n} \right] $$
(2)
Fig. 7
figure 7

Prismatic part with milling features

The proposed method of feature recognition might give better accuracy than the ANN-based feature recognition techniques. In addition, it does not require time for training the network because it uses a rule-based approach. However, for every new feature, new rules need to be written. Therefore, it is most suitable for industries where the types of features remain fixed.

3.3 Automated part program generation system

After extraction of geometry and position of features, the next step is to use this information to generate CNC codes. The output of the feature extraction module is the type, profile, size, and position of the machining feature. The CNC turning machine is used to manufacture the axisymmetric parts, and 3-axis vertical milling machine is used for prismatic parts.

The machining features are projected on the X–Z plane for CNC turning features, where Z is the spindle axis. The width of the workpiece is divided into parallel horizontal segments of the user-defined step size. The intersection of the projected features and the parallel segments forms feed paths for step turning. A plunge toolpath is used for grooves, which is generated by segmenting the projected contour using vertical lines. Ramp-on and ramp-off moves are added at the start and end of the feed paths. The toolpath generated by the developed system was verified using CNC simulation software (Discriminator 2.1.0.32). Figure 8 shows the toolpath to machine the part shown in Fig. 6.

Fig. 8
figure 8

Simulated toolpath for CNC turning

The developed system generates layer by layer roughing toolpath for milling features. The pockets are machined using contour parallel toolpath topology. The contour of the pocket is recursively offset inside to create the toolpath. The offset is done until the width of the contour becomes less than the radius of the tool. Next, the holes are machined by taking the drilling tool above the center point of the hole. Which is then interpolates into the workpiece to the required depth of the hole. Figure 9 shows the simulation of the machining operations (pocketing and drilling) for the part shown in Fig. 7 using simulation software Discriminator 2.1.0.32.

Fig. 9
figure 9

Simulated toolpath for milling features

4 Demonstration of the proposed system: case study

The proposed smart system is developed in a VB.net programming environment and implemented on a desktop with Windows 7 OS, Intel Core i3, and 4 GB of RAM. The system used the commercial software Autodesk Inventor© for CAD modeling and visualization. The spreadsheet was meant for database mining, and calculation was prepared using Microsoft Excel®. A VB script links the spreadsheet with the CAD package to automatically update the CAD model and generate the CNC part program.

This section presents a case study of an idler assembly, an essential part of the conveyor system. Figure 10 shows the complete assembly of an idler consisting of various components such as shafts, middle bracket, and outer bracket that can be partly manufactured using CNC machines.

Fig. 10
figure 10

A CAD model of an idler assembly

Dimensions of an idler depend on two main basic specifications, viz. belt width and roller diameter. Based on these, primary dimensions are extracted from the standard manual of belt conveyors (IS 11592:2000 Selection and Design of Belt Conveyors—Code of Practice) [28] viz. length of the shaft, the diameter of the shaft, dimensions of the notch. The secondary dimensions are then computed using primary dimensions and geometry calculations. Typical primary dimensions and their dependency on basic dimensions for idlers are shown in Table 1. And the dependency of secondary dimensions on basic and primary dimensions is shown in Tables 2 and 3.

Table 2 Dependency of basic on primary
Table 3 Dependency of basic and primary on secondary

Figure 11 shows the spreadsheet prepared to evaluate the primary and secondary dimensions. The cells of primary dimensions use lookup functions to extract values from the database, and the cells with secondary dimensions use geometry equations. For example, Eq. 35 are used to calculate the length of the shaft, middle bracket, and outer bracket, respectively (Fig. 12a–c).

$$ L_{s} = L_{s} + 2 \times C + w_{b} $$
(3)
$$ L_{m} = h_{i} + D + C + w \times \cos 45 + \frac{{w_{b} }}{2} + \left( {2 \times C + \frac{{h_{b} }}{2}} \right) \times \pi \times \frac{{\left( {\left( {180 - \emptyset } \right)} \right)}}{180} + C + \frac{{d_{s} }}{2} + \left( {\frac{D}{2} + C + \frac{{d_{s} }}{2}} \right) \times \left( {2 \times C + \frac{{t_{b} }}{2} + \tan \frac{\emptyset }{2}} \right) $$
(4)
$$ L_{o} = d_{s} + D + 4 \times C + \left( {L_{s} - L_{n} \times 2 + t_{b} } \right) \times \sin \emptyset - C \times \cos \emptyset + W_{g} + \frac{{h_{b} }}{2} $$
(5)

where LS, LO, LM, LR, and Ln, are the lengths of the shaft, outer bracket, middle bracket, roller, and the notch, respectively. hi, is the idler height; D, roller diameter; w, stringer width; wb, bracket width; Wg, the gap between roller and stringer; hb, bracket height; ds, shaft diameter; tb, bracket thickness; and C is clearance (generally taken as 4 or 5 mm).

Fig. 11
figure 11

Spreadsheet for database mining and calculations

Fig. 12
figure 12

CAD model of Idler parts a Shaft, b Middle Bracket, and c Outer Bracket

Figure 13 shows the user interface developed for the system. A VB script is linked with each button to perform a specific task.

Fig. 13
figure 13

The user interface of the system

The script reads the modified parameters from the excel file and updates the CAD model using the API functionality of Autodesk inventor. Figure 14 shows the change in the design of the idler assembly on changing the belt width from 1000 to 500 mm and roller diameter from 127 to 139 mm.

Fig. 14
figure 14

Automatic remodeling of the CAD model with the change in basic dimensions

The system then exports the CAD model as an XML file and extracts machining features. The main features extracted for the manufacturing of the shaft are steps and grooves. Whereas, for the middle and outer brackets, it is the external dimensions of the bracket, notch location, and dimensions of the notch. The system enables the addition of new prismatic machining features that are in the scope of the AFR module (such as holes, pockets, and slots) in the standard CAD model. By clicking the Export as STEP and extract identifiers button, the system exports the modified CAD model as the STEP AP-203 file and recognize machining features. The machining feature parameters thus obtained are taken as input to generate CNC part programs for turning and milling machines.

A simulation software (Discriminator, Version Discrim_V2_ 1_0_40) was used to check the accuracy of the generated tool paths. Figures 15 and 16 show the tool paths generated for the manufacturing of shaft and middle bracket for 1000 mm belt width and a roller diameter of 127 mm, respectively.

Fig. 15
figure 15

Simulation of tool paths for the shaft

Fig. 16
figure 16

Simulated toolpath for the middle bracket

The developed system works well for all the belt widths that are there in the database. The database for the manufacturing of parts can always be extended to produce more variants.

5 Conclusion

This paper proposed a smart system for integrated CAD/CAM. It uses feature-based CAD to enable automatic remodeling and a new efficient Regex-based pattern matching technique for feature extraction and recognition. The recognized features are finally used to generate contour parallel CNC toolpath for milling automatically. An interactive system was established to seamlessly integrate these modules and reduce the manufacturing lead time of standard parts. It is an attractive option for small/medium industries that engage in the manufacture of standard parts, as it improves the efficacy and productivity during the part design and manufacturing stage.

In the future, various other modules can also be added to the system, such as cost estimation, computer-aided design analysis, computer-aided process planning, etc., to utilize its modular design effectively. Although robust, the AFR in the current system only works for prismatic parts. This work can be extended further to include more complicated features using ANN-based feature recognition technique.