STEP-Based Assembly Feature Recognition Using Attribute Adjacency Graph for Prismatic Parts

This paper introduces the concept of STEP AP203(STandard for Exchange of Product model data) an ISO standard as a neutral format for exchange of CAD model data between different CAD/CAM systems, and how STEP AP 203 data is stored and how the feature information can be extracted and recognized from STEP file. In this paper a hybrid (graph and rule) based approach is used to recognize the features of mechanical prismatic parts. The Attribute Adjacency Graph (AAG) and Attribute Adjacency Matrix (AAM) approaches are used to recognize the form features, and rule based approach is used to recognize assembly features.The proposed methodology in this paper has been completely implemented by designing an integrated system called STEP-based Assembly Sequence Planning (ST-ASP) system. The (ST-ASP) system is built by using Visual Basic 6.0 supported by Solid works 2011 package and implemented on (HP Pavilion dv6) PC. The (ST-ASP) system is directed to 3D prismatic parts. The form features explored in this system include both depression and protrusion features, and the assembly mating relations explored in this system include; against, fit, and insert which is used in recognize assembly features. Finally the system has been tested to carry out a case study to demonstrate the feasibility of the proposed methodology.


INTRODUCTION
uring the last two decades much effort has been devoted to the area of feature technology to ease the problem of Computer Aided Design (CAD) integration with downstream activities.Features give a higher conceptual meaning to component characteristic by dissecting component geometry into recognizable and meaningful forms, and this is very important in the manufacturing context as they can capture the higher level engineering content of a part.Therefore, features are considered the communication medium between design and manufacture.Feature technology is categorized by two popular approaches is: Automatic Feature Recognition (AFR) and Design by Feature [1].Assembly features have been used by several researchers to improve the efficiency of the assembly planning process, but there have been significant variations in the definition of an assembly feature.Holland and Bronsvoort (2000) define an assembly feature as" all assembly specific information within modeling and planning".Their definition consists of two types of assembly information, one is generic level information used to handle a component and other is the instance level information about the connections between components [2].Shyamsundar and RajitGadh (2001) define assembly feature as "a property of an assembly unit (AU) with respect to (or in the context of) other component(s), which provides assembly related informationrelevant to the design, manufacture or function of the product assembly" [3].Zha and Du (2002) define assembly features as "particular form features that affect assembly operations, which are defined by connectors" [4].Chan and Tan (2003) define an assembly feature as "the elementary connection feature containing mating relationsbetween the components" [5].Hamidullahet. al. (2006) define assembly features as "a connection between two form features on mating parts, associated with assembly intents.Assembly intents include assembly and/or mating relations, assembly operation (e.g.fastening operation, and fusion operation), and other assembly attributes (e.g.feature's position and orientation etc.)" [3].Assembly feature transform, interpret CAD model to provide information to assembly planning for automated information interpretation process [6].A number of standardshave been developed for transferring product data, such as IGES and STEP.Thesestandards specify the format and contents of physical files; STEP provides a representation and exchange standard of product data in a formal manner interpretable by computers [7,8].

METHODOLOGY
The proposed methodology to recognize assembly feature composed of three components:parts representation, form features Recognition, and assembly feature recognition as shown in the

Parts Representation
In the first stage of the proposed methodology, the parts are designed through CAD software (Solid Works) and they are represented as solid models.Most of the CAD systems utilize some form of B-Rep as their internal representation.The detailed representation specific to each of these systems is different.The standards are developed to transfer geometric data between CAD and CAM systems that have different internal representations [9 ].
The CAD software generates and provides the geometrical information of the parts design in the form of STEP AP203 file that is then used as a standard format that provides the proposed methodology the ability to communicate with the different CAD/CAM systems.Various CAD systems support STEP AP203 and have their own internal conversion program to convert the CAD data to STEP AP203 format, such as SolidWorks, CATIA, and PRO/ENGINEER.In this paper the SolidWorks Package is used to represent parts.

Form Features Recognition
The feature information extraction from STEP file is to extract geometrical and topological information of the designed parts from data segment.The data structure of STEP file is tree-like which is composed of level of entity, face, edge and point.STEP file consists of two parts: the head file and data section.The head file includes administration and attribute information such as author, date and so on, which begins with the key word "HEADER".The data section is the principal part of STEP file, which begins with "DATA" and ends with "ENDSEC" [10].The data  The STEP file tracing logic is implemented as shown in Figure (3).The tracing of the STEP file is not just read from line 1, then line 2, then line 3.The reality is that, after reading line 1, reader may need to refer to line#266, then to line#342 and so on.According to the hierarchy of the STEP format, the most upper level is the "CLOSED_SHELL" so the keyword can be searched.In   PDF created with pdfFactory Pro trial version www.pdffactory.com The information extract from STEP AP203 file is converted into AAG to recognize the feature from the solid model of part.An Attribute Adjacency Graph (AAG) is defined as a graph in which nodes correspond to the part faces and arcs correspond to part edges.Each face of the feature is represented by a node, and every pair of nodes represents adjacent faces linked by an arc.The graph can be defined as G = {N, C, A} where N is the set of nodes, C is the set of connection arcs between nodes and A is the set of attributes which denote the kind of connection.The arcs of the AAG graph are labeled by binary digits (0 and 1).The attribute values attached to the arcs are determined by the convexity of the edge.If the faces sharing an edge form a concave angle, the attribute of arc is set to 0, and if two adjacent faces form a convex angle, the attribute of arc is set to 1.
The information extracted from STEP AP203includes the set of face, set of edge, set of vertex, and set of the relationship between geometric and topological entities.A set of face and a set of edge are converted to N and C respectively, the conversion producer is introduced as follows: 1. Create AAG nodes.Check the number of ADVANCED_FACE in the list of extracted data, if the number of ADVANCED_FACE in this list is N, then the number of nodes in AAG is N. 2. Create AAG arcs.Every edge in EDGE_LOOP corresponding to every ADVANCED_ FACE is examined to find whether the EDGE_ LOOP shared the same edge with other EDGE_ LOOP.If these two faces share the same edge, the arc between of these two faces is generated.Every edge in a manifold solid is shared by two faces.The edge will have a particular orientation when being part of one face, and the opposite orientation when being part of the other.This is because the external loops of all the faces are stored in an anti-clockwise sense in STEP.For example, in Figure (4), edge E has an orientation of V1 →V2 when being part of face F1, but the same edge will have an orientation of V2 → V1 when it is part of face F2. 3. The normal vector of these two adjacent faces and the shared edge between faces are recorded to compute the convexity and concavity of the arc.The normal vector of the face (N) is in the form ( ai+bj+ck ).The Edge Angle (Ѳ) is measured anticlockwise between N1 and N2 .If the Edge Angle is more than 180 o (Figure (4a), the edge is a Convex Edge.When it is less than 180 o (Figure 4b), the edge is a Concave Edge.Angle (Ѳ) can be calculated using the equation ( 1  In this paper the graph based approach is represented in the form of an Attribute Adjacency Matrix (AAM), the topological information can be represented in the adjacency matrix format according to the graph based approach.The form features taxonomy considered in this work is shown in Figure ( 5).If the matrix of a particular predefined feature matches that of the predefined template form feature matrix in the library, a form feature is identified and extracted out.The attribute adjacency matrix is a binary matrix whose elements are 0's and 1's.The row\column number in the matrix corresponds to the faces in the part.The a ij Value shown in the matrix represents: In the previous works of Joshi and Chang (1988) were the first to propose the Attributed Adjacency Graph (AAG) [11], Subsequently Trika and Kashyap (1994) [12], Yuhaniz and Bin Haron (2002) [13], and Sunil and Pande (2010) [14], used AAG and their work is limited to recognize only depression features.In this paper both depression and protrusion features will be recognized.The following steps will be followed to recognize the form feature: 1.After constructing AAG of the whole part based on the data extracted from STEP file, AAM of the whole part is constructed whose rows and columns are equal to the number of the faces in the part and then the adjacencies faces are found and the attribute are entered in to the cell of the matrix a ij .
2. The feature is represented as sub matrix from the part matrix.To extract feature matrix from the part matrix we classify the faces in the part matrix into two types of faces (feature faces and base faces).Feature faces represent the faces belonging to the feature and they have attribute (0), while the base faces represent the faces adjacent to the feature faces and they have attribute (1).
3. Extraction procedure of the feature matrix from the part matrix includes the following steps: a.
Checking the entire columns in the part matrix and choosing each column that contains attribute (0).Only the columns that have less than or equal to four relations will be chosen, these columns will represent the feature faces.b.
For each column we check the cells of the column to determine their relations with the rows, the row with attribute (1) represents the base face, we choose only the face that has less than or equal to four relations with other faces.c.
The chosen faces from (a &b) will be arranged in the new matrix and the Adjacency Counts (C A ) for each row in the feature matrix is determined.The Adjacency Count (C A ) included the calculation of the number of (0) and (1) attributes in each row where, A = (0), B = (1).

After calculation (A) and (B), (C A ) is determined [C A = (A) + (B)]. Adjacency
Count value and feature matrix will be used to matching the recognized feature with feature pattern to find out the type of feature.Figure (6) illustrates example of 3D solid model of box with rectangular boss feature and the AAG, AAM of box with rectangular boss and feature matrix for rectangular boss.0 i and j shared a concave edge 1 i and j shared a convex edge PDF created with pdfFactory Pro trial version www.pdffactory.com

Assembly Features Recognition
Assembly feature is defined as "matching pair of form features associated with assembly mating relations" Assembly mating relations include (e.g.against, fit, insert, align).The assembly feature can be represented mathematically as:

………… (2)
Where: (AF) shows an assembly feature, (F i , F j ) represents the matching form features, (R i j ) shows assembly relation between the matching features.The matching between form features can be determined by examination of the form feature type and form feature matrix, if the first form feature is depression feature and the second form feature is protrusion feature and attributes of the first feature matrix are opposite to the attributes of the second feature matrix, then these features can be matched.Figure (7) illustrates the matching between two form features (rectangular boss and blind pocket).PDF created with pdfFactory Pro trial version www.pdffactory.com The mating constraints considered in this work are fits, against and insert.Given two components having two features F1and F2, f i represents the i th face in F1 and f j represents the j th face in F2.The general rules used to automatically find mating surfaces among components shown as follows: Rule 1 IF the faces type of (f i ) and (f j )is planer AND the outward normals of two faces opposite each other (N i = -N j ) AND (P i , P j ) lies on the same plane THEN the mating type is Against.Where N is the normal vector of plane and P is a point on the plane.

Rule 2
IF the faces type of (f i ) and (f j ) is cylindrical AND satisfies two conditions that the axial center lines are collinear AND radiuses are equal (r i =r j ) THEN the mating type is Fit.This rule can be applied to planar faces like the mating between boss and pocket.

Rule 3
IF the faces type of (f i ) and (f j ) is planer AND any two adjacent vertical planar faces of F1 are coincident with the corresponding vertical planar faces of F2 AND both features have the same volume space THEN the mating type is Insert.

ST-ASP SYSTEM ARCHITECTURE
The proposed ST-ASP system has the ability to extract the information from the product description; this information includes geometry, geometric relationships, and dimensions.The system has the ability to recognize features and extract the parameters of the features.ST-ASP system is developed using Visual Basic 6.0 on HP Pavilion DV6 PC; this system is supported bySolid Works 2011 Package.ST-ASP system consists of two main modules: Design module and assembly feature module.Through the design module the system links automatically with Solid Works package to drawing the mechanical parts and then save the designed parts as STEP AP203 file which represents the input to the assembly feature module.The assembly feature module consists of three sub modules; features data extraction which extracts the necessary information for features recognition from STEP file, form features recognition based on Attribute Adjacency Matrix (AAM) approach, and assembly features recognition which is based on matching form features and mating relations.Figure (9) shows the architecture of ST-ASP system.

THE ST-ASP SYSTEM TESTING
A case study is carried out and detailed to demonstrate the feasibility of the proposed methodology and the capability of the ST-ASP system.PDF created with pdfFactory Pro trial version www.pdffactory.com

CONCLUSIONS
The main contributions of this paper include building a simple methodology for recognition and extraction form and assembly features from STEP file.STEP standard simplifies the extraction of faces, edges, and vertices because the structure of STEP file is similar to EXPRESS language, this low level information is useful to determine part form features.The recognition algorithms works on received STEP AP203 file format and generates an output feature file that can be interfaced with downstream planning activities such as assembly planning.The proposed form features algorithm has the capability to recognize both depression and protrusion features comparing with old form features algorithms that based on AAG.Graph and matrix of a feature are simplified by reducing the number of faces in a part volume so that feature representation complexity is greatly reduced.Also, for each feature type there exists standard AAM stored in the database of computer used as a signature of feature for recognizing that feature type.The developed ST-ASP system was success to recognize (blind and through holes, blind and through pocket, cylindrical and rectangular bosses, through step and slot, rib, and cylindrical and rectangular pins) features for prismatic parts with high efficiency.

Figure
pdfFactory Pro trial version www.pdffactory.com

Figure
Figure (1) Flowchart of Proposed Methodology Structure.

Figure ( 3 )
Figure (3) Data Extracts of STEP AP203 File for Box with Blind Pocket.
normal to the first face N2 : The normal to the second face │N1│ : The magnitude of N1 │N2│ : The magnitude of N2 PDF created with pdfFactory Pro trial version www.pdffactory.com
pdfFactory Pro trial version www.pdffactory.com pdfFactory Pro trial version www.pdffactory.com

Figure
Figure (6): (a) Box with Rectangular Boss, (b) AAG of the Box with Rectangular Boss, (c) AAM of Box with Rectangular Boss (d) Rectangular Boss Feature Model, (e) Rectangular Boss Feature Matrix.(f) Rectangular Boss Feature Matrix with Adjacency Count
Figure (8)  illustrates proposed algorithm for recognition and extraction form and assembly features.
Figure (10) shows case study designed by SolidWorks package; Figures (11), (12), (13) show the outputs result from assembly feature module window.PDF created with pdfFactory Pro trial version www.pdffactory.com

Figure
Figure (10) 3D CAD Models of Case Study.

Figure
Figure (12) Form Features Recognition Output.

Figure
Figure (13) Assembly Features Recognition Output.