Automatic Feature Recognition of Cross Holes in Hollow Cylinders

Automatic Feature Recognition (AFR) techniques provide the capabilities for translating the data of the part definition between Computer Aided Design (CAD) system and the feature needed to be determined; these techniques take a general CAD model, which is commercially available for providing an automated interface to extract and recognize the manufacturing features from the CAD model. Standard for Exchange of Product (STEP) format is an international standard for transporting geometric and non-geometric data between CAD and Computer Aided Manufacturing systems. Many researches have investigated the AFR in symmetrical features in rotational parts, but few studies have tried to recognize the cross-hole feature because of the recognition difficulty of such feature. A cross hole is recognized with existence of (B-spline Curve with Knots) string in (STEP AP203) neutral file. Cross holes might be perpendicular, offset or inclined to cylinder’s axis, it also can be blind or through. Extraction of the necessary information from (STEP) file for generating the parameters of the manufacturing operation becomes a significant task. In this paper, a new approach for automatic recognition of cross hole feature in hollow cylinders is developed, This approach has been built by connecting the Visual Basic programming language (VB) to the SolidWorks software. The drawing is sent to the VB after saving it as a (STEP AP203) file. VB extracts and recognizes the cross-hole feature according to the rule-based reasoning, some case studies for demonstrating the application of this method on different cases of the cross-hole are presented.


Introduction
The main target of any manufacturing organization is to produce products with high quality and low price, in the other hand, is to satisfy the customer needs. So, several software for numerous fields have been designed to ensure a faster, an easier and a flexible workflow [1]. Feature techniques includes feature-based design, feature recognition, and alteration of feature. Feature recognition (or feature extraction) is primarily concerned with categorizing specific features from the different kinds of product representations like Boundary Representation (B-Rep) and solid model [2].
Feature recognition is to specify feature objects and classify them from the model of a geometric part. In fact, it extracts features and their parameters from the solid models [3].
Recognition of features from solid models is considered as a solution for bridging Computer Aided Design (CAD) system and Computer Aided Manufacturing (CAM) systems [4,5]. The extraction and recognition of the manufacturing features in a design database have received a significant attention since the mid-1970s, therefore, many standards for data exchange have been developed for solving the problem of design complexity and for integrating between various CAD systems, such as Initial Graphics Exchange Specification (IGES), Data Exchange Format (DXF), Standard Exchange Transfer (SET) and Standard for Exchange of Product (STEP) format [3,6].
There exist a lot of issues that illustrate the importance of feature recognition as a part of the CAD/CAM systems [7].
Feature recognition procedure can be performed manually by selection of appropriate features for the application of downstream by using an interacting system, and it can be performed automatically by development of an algorithm for picking the appropriate features for the application of downstream from a features' library which contains pre-defined basic features [8], as explained in Fig. 1.
Automatic Feature Recognition (AFR) system involves many steps that are applied automatically regardless of features number involved in the model. These are feature extraction, process plan generating, and tool path. Figure 2 shows the flow diagram of AFR system [8].
STEP is a standard which gives the obvious and complete representation of the part data during the life cycle, independent of any system [9,10]. In STEP file, the specification of product data is standardized by ISO10303, and there are many Application Protocols (APs) available    [9] in it which used for different applications, such as AP203, AP214, AP224, AP238, AP242 etc. as illustrated in Fig. 3.
B-spline surface is a balanced or polynomial parametric surface that is characterized by control points, basis functions and weights. And B_Spline_Curve_with_Knots (BSp) is a subtype of bounded curve; it is defined as piecewise parametric polynomial or rational curve described in terms of control points and basic functions. However, vertex of BSp (V) is a point defining the geometry of BSp, and vertex direction of BSp (Dx, Dy, and Dz) are the direction of linear extrusion of the BSp in (X, Y and Z) axis [12].
If a cross hole is made on a surface, then both ends are B-Spline-Curve-with Knots. So, the construction of Edge curve is two lines and two B-Splines. In STEP file, the cross-hole's radius is found in the string CYLIN-DRICAL_SURFACE corresponding to ADVANCED_-FACE string, the string axis2_placement_3D in STEP file indicates the axis of cylinder and cross hole [6].
Cylindrical parts have cylindrical (symmetric) and noncylindrical (non-symmetric) features. Cylindrical features are produced using turning machines, while non-cylindrical features are produced using drilling and milling machines after turning operations in process planning schedules. In Fig. 4 Data extraction and feature recognition process [3] this work; non-cylindrical features such as through or blind perpendicular cross hole feature, inclined cross hole feature, and offset cross hole feature in the hollow cylindrical parts were automatically recognized. These features were recognized by realizing the strings responsible for these feature in the STEP file, and finding the relation between the string repetition and the feature type. Here; the STEP file was used in recognizing new features that have not been dealt with before in literature.
This paper contains six sections; the 1st section is the introduction section, followed by the 2nd section that demonstrates the related literature review. Moreover, the 3rd section presents the architecture of the proposed system, and the 4th section explains the steps of data recognition and extraction. After that, the 5th section shows the validation of the proposed method, and the last section draws the conclusions.

Literature Review
In the field of AFR, several techniques had been presented and implemented. The literature review section introduced the work that is more closely related to the approach used in this paper, namely, D. Sreeramulu and Rao [9] have developed a methodology for 3D prismatic parts which are modeled using any CAD software and saved as STEP file format. Then, JAVA program is used for implementing the algorithm of geometric data extraction from the (STEP) file. The algorithm of feature recognition was used for recognizing different features of the part [9].
Rameshbabu and Shunmugam [13] had presented a system for feature recognition, which is basic in nature, and used in orthogonal features recognition. The system considered (STEP AP 203) file format for representing the 3D model of the components. The authors considered both face adjacency graph and volume subtraction of a component for feature recognition [13].
Taylor et al. [14] had proposed (a STEP-based platformindependent system) for designing and manufacturing features. The system had recognized features from the lowlevel geometry and topology which were in (STEP) file [14].  (1) Sreeramulu and Rao [15] had developed a model which was able to extract the geometrical information of rotational parts from (STEP) file and used this information for recognizing the turning features. The system used a written Java code for extracting the data from (STEP) file and for recognizing the features. The proposed approach integrated with (STEP) file as a seamless integration technique of CAD, Computer Aided Process Planning (CAPP), and CAM [15].  Hussien et al. [16] had suggested a methodology based on rule-based reasoning for extracting the features from this 2D drawing. This system extracted the data and features from turning parts. The system constructed as a standalone software based on (visual basic 2008) linked with CAD software (EWDraw) module [16].
Venu et al. [17] had presented a new hybrid approach for recognizing of the machinable features of prismatic Fig. 9 The faces of the part Fig. 10 Feature recognition of a perpendicular cross blind hole parts having multiple features on different faces represented (STEP AP 203) file format. A hybrid approach of graph-based feature recognition and syntactic pattern recognition and other heuristics had been used for recognizing the machinable features of prismatic parts. The model data represented in (STEP AP 203) file format were accessed using Java Standard Data Access Interface (JSDAI) [17].
Jaider and Elmesbahi [18] had proposed a new system to recognize the isolated and interacting features of rotational parts by analyzing the extracted topological and geometric data from (STEP AP203) file, this system reduced the combinations generated by interacted features, considering the manufacturing rules and principles of metal removal process [18].
The current research introduces a system for AFR of cross hole in hollow cylindrical parts, in which the workpiece is drawn using the SolidWorks program and saved as a (STEP AP203) file format, a tailor-made software is used Fig. 11 Drawing and dimensions of case study part (2) 123 Fig. 12 The software is showing part (2) and its (STEP) file Fig. 13 A report of the extracted data of part (2) for extracting and recognizing the cross hole feature of the cylinders based on rule-based reasoning.

Architecture of the Proposed System
The system of the current research has two steps, the first one is extracting data from (STEP AP203) file and the second one is recognition of cross-hole feature in different cases. This system has been built by connecting the Visual Basic programming language (VB) to the SolidWorks software. The drawing sent to the VB after saving it as a (STEP AP203) file. A tailor-made software is set up on VB which used for showing the drawing on a special screen. VB extracts and recognizes the cross-hole feature according to the rule-based reasoning, Fig. 4. shows the data extraction and feature recognition process [3].

Data Extraction and Feature Recognition
The method used for extracting data from the (STEP) file is the object-oriented approach, and the VB extracts the part data in a specific neutral file format, in which the system reads the (STEP AP 203) file searching for (B_Spline_-Curve_With_Knots) string which indicates the existence of cross-hole feature. Then it traces the data related to that string to identify the type of the cross-hole feature. The technique used for representing the geometrical structure of the part is boundary representation (B-Rep). The type of all faces and its orientation will be specified using the (B-Rep) data base that contains the geometrical and topological data. Figure 5 shows a flowchart of feature recognition process, which is based on geometric properties and an objectoriented approach for recognizing cross-hole feature. The flowchart shows that the number of B_Spline_Curve_-With_Knots (BSp) indicates that the cross-hole feature is blind or through. For recognizing the offset cross hole, the system reads the values of vertex (1 and 2) of (BSp), if both values are (= 0), this indicates that the cross-hole is offset from the axis of the cylinder. For recognizing the inclined cross-hole, the system reads the directions (Dx, Dy and Dz) of BSp, if the values of two directions of these three are ([ 0), this indicates that the cross-hole is inclined.

Validation of the Proposed Methodology
The methodology had been tested in recognition of cross hole feature in different cases, initially, the part was drawn using SolidWorks software and the drawing was saved as (STEP AP203) file, then, a tailor-made software was used, which was installed on VB to extract data from (STEP AP203) file and to recognize the cross hole feature. In addition; the software presents the recognized feature information such as location, orientation, and geometry in a  Figs. 10, 14, 18, and 22, where the center of the reference circle drawn from the outer cylinder surface of the part in (X axis) is 'X', 'Y' is the circle center in (Y axis), 'Z' is the circle center in (Z axis), 'Radius' is the cross-hole radius, 'Angle' is the inclination angle of the cross-hole to the right, and 'Depth' is the distance between the first circle center to the end circle center of the crosshole.
For validating the presented methodology, the following cases were studied: Case Study (1) Perpendicular Cross Blind Hole Figure 6 Shows the drawing and dimensions of a cylindrical part (1), AFR of the cross hole was done through the following steps: 1. Drawing of part (1) on the SolidWorks program and saving it as (STEP AP203) file format. 2. Running the VB, and let it extracts the data from the (STEP AP203) file and compares it with the feature recognition rules. 3. The Software shows the (STEP AP203) file of the part as shown in Fig. 7 with B_Spline_Curve_With_Knots string which indicates that there is a cross hole on the part, and the software extracts the data of part (1) in a report as shown in Fig. 8. The faces in the extracted report are shown on the 3D part model in Fig. 9. 4. The software counts the number of B_Spline_Curve_-With_Knots which is (8 BSPs), this means that the cross hole is blind. To identify the orientation of the cross hole, the systems checks the direction of BSPs as follows: The answer is no.
Then the system checks the values of vertex of BSPs as follows: Are values of V1 and V2 of BSPs = 0?
The answer is no.
The system identifies that it is a perpendicular cross blind hole feature as shown in Fig. 10. Figure 11 shows the drawing and dimensions of a cylindrical part (2), AFR of the cross hole was done through the following steps:

Case Study (2) Offset Cross Blind Hole
1. Drawing of part (2) on the SolidWorks program and saving it as (STEP AP203) file format.
2. Running the VB, and let it extracts the data from the (STEP AP203) file and compares it with the feature recognition rules. 3. The Software shows the (STEP AP203) file of part (2) as shown in Fig. 12 with B_Spline_Curve_With_-Knots string which indicates that there is a cross hole on the part, and the software extracts the data of part (2) in a report as shown in Fig. 13. 4. The software counts the number of B_Spline_Curve_-With_Knots which is (8 BSPs) and this means that the cross hole is blind. To identify the orientation of the cross hole, the systems checks the direction of BSPs as follows: The answer is no.
Then the system checks the values of vertex of BSPs as follows: Are values of V1 and V2 of BSPs = 0?
The answer is yes.
The system identifies that it is an offset cross blind hole feature as shown in Fig. 14. Figure 15 Shows the drawing and dimensions of a cylindrical part (3), AFR of the cross hole was done through the following steps: 2. Running the VB and let it extracts the data from the (STEP AP203) file and compares it with the feature recognition rules. 3. The software shows the (STEP AP203) file of part (3) as shown in Fig. 16 with B_Spline_Curve_With_-Knots string which indicates that there is a cross hole on the part, and the software extracts the data of part (3) in a report as shown in Fig. 17. 4. The software counts the number of B_Spline_Curve_-With_Knots which is (16 BSPs) and this means that the cross hole is through. To identify the orientation of the cross hole, the systems checks the direction of BSPs as follows:

Case Study (3) Inclined Cross Through Hole
The answer is yes.
Then the system checks the values of vertex of BSPs as follows: Are values of V1 and V2 of BSPs = 0?
The answer is no.
The system identifies that it is an inclined cross through hole feature as shown in Fig. 18.
problem. The current paper proposes a new simple method of AFR of non-symmetric features in cross holes in hollow cylinders (perpendicular, offset, and inclined holes; through or blind holes), which to the best of our knowledge have not been tackled before in literature. This was done using (STEP AP203) neutral file which is able to provide a generic representation of geometrical and topological data of the product, this algorithm extracts data from (STEP AP203) file with full details of the part geometry and recognizes the cross holes in hollow cylinders in different cases. The software has been built by connecting the VB to the SolidWorks software.
In future work; these recognized non-symmetric features will be used in determining the required machining process to manufacture the recognized hole, then automatically select and design the suitable traditional jigs and fixtures needed to manufacture that hole to overcome the limitations of the manual design. This kind of jigs and fixtures still occupies a large scale in the traditional industry that uses traditional machines. However, most literature were concerned with modular jigs and fixtures. Based on the Fig. 19 Drawing and dimensions of case study part (4) Fig. 20 The software is showing part (4) and its (STEP) file Fig. 21 A report of the extracted data of part (4) work presented in this paper, many applications could be achieved such as calculating clamping force from the STEP file data and etc.
Funding None.
Code Availability Custom VB executive program file is available.

Compliance with Ethical Standards
Conflicts of interest Authors have no conflicts of interest to declare.