Developing a STEP-Compliant Database System in Supporting Product Life Cycle Applications

. This paper presents details of developing a STEP-compliant database system which has the ability to support the implementation of product life cycle applications. Currently, most of CAD systems have the ability to generate geometrical and topological data in STEP file format. This developed STEP-compliant database management system has shown its ability to convert this generated STEP file format to database format, which is more suitable for the downstream of manufacturing applications, especially for process planning and machining processes based on STEP.


Introduction
TEP, the Standard for the Exchange of Product Model Data, is a large and powerful set of ISO (International Organisation for Standardisation) standards, all under ISO 10303. The overall objective of STEP is to provide a mechanism that describes a complete and unambiguous product definition throughout the life cycle of product. STEP provides both broadly useful data modelling methods and data models focused on specific industrial uses. The STEP standards contain several dozen separate documents [1]. Although EXPRESS is a powerful object-oriented data model descriptive language and independent of any platform. However, it is a kind of descriptive language rather than a programming language. This brings difficulty to implement the EXPRESS data model on a computer and it also undoubtedly brings a big problem with the STEP data model processing [2].

Translation methods
STEP database systems have been built by various research groups and commercial software companies. They can be categorized according to the type of the DBMS they used and mapping methods [3]: 1. with respect to the backend DBMS, such as relational DBMS, object-oriented DBMS, and in-house persistent data storage system 2. with respect to the mapping methods, such as mapping each STEP entity (class) into corresponding database tables-all entity attributes are stored in a same table as tuples or mapping each STEP data type into tables.
3. with respect to the programming language binding style.

Feature recognition
Many alternative techniques have been devised for creating feature-based models. These can be divided into two main categories based on whether features are extracted from geometry (FfG), or whether geometry is created from the feature (GfF). Currently, [4] developed a blend faces and holes recognition algorithm for detecting blend faces first, and then search for blend faces and holes in accordance with the loop data in the B-rep model. Meanwhile, [5] developed a method to search for all kinds of inner loops on a CAD model, including the ones within a face and those across multiple faces. This is because a feature locating on multiple surfaces is quite common in real CAD models, but it has not been received extensive study yet [5]. A new methodology was proposed by [6] to recognize manufacturing features of prismatic parts from STEP AP203 file. In an effort to use of database optimization technologies to feature recognition in CAD, [7] showed that a declarative feature definition can be turned into an SQL query, and database engine coupled to a CAD modeler can be used to find instances of entities satisfying the predicates which make up features. Besides that, [8] developed an automatic feature recognition system by using object oriented approach.
In this paper, STEP geometrical and topological file was used as an input for the generation of part geometrical database and which isuseful for subsequent product life cycle applications, especially used for machining feature recognition.  1 shows the proposed project framework with developing a relational database management system which could import geometrical and topological product data in Part-21 file from CAD. From text file-part21, EXPRESS model is mapped to relational database product model format. Direct mapping is a powerful way of translating entity and its attributes to the relational database format.

Implementation
Mapping EXPRESS model to relational model. Schema mapping method for object oriented to relational has several variations. Mapping alternative (R1) separates attribute to each entity type. (R1) makes largest number of mapping relations among the alternatives considered, which makes hard to manage all the relations efficiently [3]. Alternative (R2) duplicates all the supertype attributes in the subtype. (R2) separates attributes by entity type, so one relation carries an entity type and its attribute values [3]. Alternative (R3) includes every inherited entity type in one relation. The jobtype attribute is used to specify entity type.
(R4) is based on attribute type rather than entity type, which is quite distinctive from other alternatives. Number of relation is reduced to the number of basic attribute types, which is relatively quite small to number of entity type [3]. This proposed relational database management system uses entity-to-table method (R1) rather than type-to-table method (R4). The two mapping methods have their own strengths and drawbacks. However, we choose the first method for our system for the following reasons: entity-to-table mapping is considered simpler to implement because an entity and its attribute can be mapped into a corresponding table; in contrast, in type-to-table mapping entity and its attributes are stored in different tables so that additional mapping rules have to be specified to assemble dispersed attributes into an entity or vice-versa.
Translation of the EXPRESS entity attributes. Translation of EXPRESS attributes are done by one-to-one mapping, as most EXPRESS attributes types including defined types are reduced to basic data types. However, translation of aggregation types requires more translation steps than one-to-one mapping.
EXPRESS Aggregation types such as arrays and lists cannot be stored in one tuple because traditional data models don't have such data types. If the class has a fixed number of elements (e.g. an array), they can be translated as a series of attributes in a tuple. If the number of elements is indefinite (e.g. a list), however, we cannot store them in a single tuple and a separate table is required. In addition, EXPRESS aggregation class can also be nested indefinitely. This proposed database system translates aggregation classes as table external to their own entity.
Querying instance data from RDBMS. Query instance data is to access data stored in the RDBMS database. SQL (Structured Query Language) is a standard DML (Direct Manipulation Language) in relational database. However, the user should be familiar with the schema mapping and the schema itself to manipulate the database. Through this access, the user will have fast access and total control over the database. The other way to access database is to use system-generated SQL. System generate SQL for a specific instance type as well as the data on the fly. Response time is slower than user-generated SQL but the user does not need the knowledge regarding schema mapping to database.

Case study
In this project, STEP file is created from CAD system Autodesk Inventor. At first, a design part is created on Autodesk Inventer, as shown in Fig. 3 and then save the file as *.stp,. Then, the STEP AP203 text file in the form of B-Rep can be generated in Microsoft Notepad as shown in Fig. 4.
Implementation procedures are shown in the following steps.
Step 1: Design a part using CAD (Autodesk Inventor) and save the file as STEP file (*.stp) as shown in figure 3.
Step 2: Open the STEP file with Notepad and save as text file (*.txt) as figure 4. Copy and paste the text file into the RDBMS Step 3: Import the data into the created database system Step 4: Mapping EXPRESS model to relational model Read each line of character from the import STEP file Extract each line of geometry and topological data entity and then save them into different types of entity tables with entity-to -table method (e.g. advanced-face  table, edge loop table, face table, edge table, point table  and so on) Step 5: Display all geometry and topological data in different entity tables, for example, as shown in Fig. 5.    Table (Entity-To-Table Method) Product life cycle application: machining feature recognition. Machining feature is a high level data which is useful to product life cycle applications, especially in process planning, and useful in generating STEP-compliant CNC codes. SQL (Structured Query Language) is a standard DML (Direct Manipulation Language) in relational database. Through this access, the user will have fast access and completing the convexity test on every single edge curve entity and identify pocket feature with the result shown in Fig. 6 and Fig. 7.

Conclusion
In conclusion, a relational database management system has been developed successfully used for mapping geometrical and topological data in ISO 10303 part-21 file into database format. Database system has been used for storing all the geometrical product design data is more suitable then initial file data format. Besides, database optimization technologies to feature recognition in CAD through SQL which is a standard DML (data manipulation language), has been used successfully for supporting product life cycle development applications.