PROTOTYPING A FEATURE BASED MODELLING SYSTEM FOR AUTOMATED PROCESS PLANNING S.K. SIM1 and K.F. LEONG2 lSenior Lecturer, Applied Mechanics Division, School of Mechanical and Production Engineering, Nanyang Technological Institute, Nanyang Avenue (Singapore) 2Lecturer, Engineering Production Division, School of Mechanical and Production Engineering, Nanyang Technological Institute Nanyang Avenue (Singapore)
SUMMARY In recent years, there have been tremendous amount of interest in manufacturing automation and Computer-integrated Manufacturing (CIM). To attain a high level of automation in CIM, there has been relentless effort in trying to integrate the islands of automation in manufacturing. These are often fraught with much frustrations and difficulties. The main calamity in integration is due to the mismatch of information available from the CAD system and that required by CAPP system. The geometric information generated by the solid modellers in most CAD systems are low level whilst the CAPPs will operate efficiently only at a higher level of abstraction. CAPP systems thrives on feature information but such information in CAD databases are rather implicit and at times not even available. Although there has been much research and development work in making these feature information in CAD databases more explicit through feature recognition and extraction, this is really a regressive step. A much better approach is to define features as they exist right at the start at the modelling stage and store these feature definitions in a feature database which can be assessed directly by CAPP. In this way the likelihood of making errors in interpretation is minimized as the feature information are derived at source. This paper describes the prototyping of a feature-based modelling system in an AI logic language, Prolog. Feature hierarchy depicting the part-feature relationships can be defined by the designer when he is making the design of the part. By defining features as objects and through object oriented programming, generic and specialized feature properties can be defined or inherited through a child/parent relationship. These constituent features are composed semantically and meaningfully through a bottom-up strategy based on feature composition rules and feature primitives. The result of the parsing exercise is a solid representation of the global model depicted as a CSG tree of features. This solid model will ultimately be translated into solid modeller specific commands and further evaluated to give active boundaries representing geometric and topological information for rendering. INTRODUCTION Computer-aided Design (CAD), Computer-aided Manufacturing (CAM) and Computer-aided Process Planning (CAPP) are important components in improving the overall efficiency and performance in the automation of manufacturing.
used to convert a piece part from its initial from to a final form pre-determined from an engineering drawing. (ref. 1) It therefore seem obvious that the key to integration is to use CAPP as the link up between CAD and CAM. Thus much effort has been put into the development of effective CAPP systems that will be capable of this link up.
Unfortunately, even with the
application of artificial intelligence, manual intervention has not been totally eliminated thus not achieving total automation. (ref. 2-3) The main calamity in full integration and automation of these systems is due to the mismatch of the information available from the CAD systems and that required by the CAPP systems. Geometric information generated by the solid modellers in most CAD systems are low level 2D, 2-and-a-half-D CAD systems, wireframe systems are in even deeper predicament as far as total integration is concerned. CAPPs operate effectively only at a higher level of abstraction where features information are important. (ref. 4-5) To understand why this is so, it is necessary to first understand the characteristics and limitations of the existing CAD solid modelling systems. SOLID MODELLING SYSTEM FOR CAPP The Solid Modelling Systems The term geometric modelling refers to a collection of methods used to define the shape and other geometric characteristics of an object. (ref. 6) There are three distinct aspects of geometric modelling: 1.
Representation: Computing a mathematical approximation of the physical shape of an object.
2.
Design: Creating a new shape to satisfy some operational or aesthetics objectives. The variables defining the shape is manipulated until the objectives are met.
3.
Rendering: Generating the image of the model so that it can be interpreted visually.
Solid modelling centered more on the first two aspects of geometric modelling. It is a branch of geometric modelling that emphasizes the general applicability of models, and insists on creating only complete representation of physical solid models. There are several approaches to achieve this goal of which two of these representation schemes are most popular: boundary representation (B-rep) and constructive solid geometry (CSG). (ref. 6) a.
Boundary Representation, (B-rep) : B-rep modellers store the evaluated geometry as a redundant hierarchy of topological entities (face, edges, vertices) with pointers to geometric entities (surfaces, curves, points).
Euler-Poincar~ equations are used to
ensure the validity of the objects (ie. that they are solids). Point sets are classified as inside, on or outside the object, using a convention for the direction of surface normals. b.
Constructive Solid Geometry. (CSG) :
CSG is a modelling method that defines
complex solids as compositions of simpler solids (called primitives). operators are used to execute the composition.
Boolean
CSG representations of objects are
ordered binary trees whose terminal nodes are either primitives or transformation data
197 for rigid-body motions.
The nonterminal nodes are either regularized Boolean
operators (union, difference, and intersect) or rigid-body motions (translation and/or rotation) that operate on their two subnodes. Each subtree of a node represents a solid resulting from the combination and transformation operations indicated below it. The root represents the final object. If valid primitives are used with Boolean operations, then no validity check is required. A boundary evaiuator is used to determined the active boundaries of the final object. These two solid modellers (as well as the others) have two major deficiencies (ref.4) : 1.
Insufficient product definition : Only the complete representation of the geometric model is defined; specific precision data like tolerances and surface finishes and technological data like material specifications and surface treatments are not represented in the system. Such information are important and essential in process planning.
2.
Low-level product representation : Part and product representation are in low-level details, ie. geometry and topology for B-rep and primitives and operators in CSG. The data only become comprehensible when an image is displayed. Thus the interpretation of the data is done by the human viewer. High level information, such as form features, which should be available is missing.
Therefore it is very difficult to use these existing solid modelling systems alone to drive automated applications such as process planning because the information essential to these tasks is virtually absent from the solid modeller databases. Work has to be done to gather these information in order to work the CAPP systems. The Need for Feature-Based Modelling System A feature is a set of information related to a part's description. The description could be for design purposes, or manufacturing and inspection or even for administration purposes. It is convenient to classify features relating to the product as follows: (ref. 4) 1.
form features : functional, aesthetic, assembly aids.
2.
material features : properties, specifications, treatment (materials and surfaces).
3.
precision features : tolerances, surface finishes.
Since designers and engineers utilize these features for their work, it is therefore necessary that they are supported in a fully integrated engineering system, like in CIM. The first three categories of features are especially important in supporting process planning systems. Thus any automated CAPP systems that is to be used with a solid modelling CAD system must have the means to get these feature information from that CAD system. There are three fundamental approaches which can achieve this, namely human-assisted feature recognition, automated feature recognition and extraction, and feature based modelling.
198 Human-assisted feature recognition in CAPP is rather primitive and does not qualify for total automation. Automated feature recognition and extraction is a step that attempts to make explicit, usually by the application of artificial intelligence techniques, the features information that are available in the CAD databases.
This is in essence a regressive step in automation. A much
better approach is to define features as they exist right at the start at the modelling stage and store these feature definitions in a feature database which can be assessed directly by the CAPP system. This is a feature based modelling approach.
In this way the likelihood of making errors in
interpretation is minimized as the feature information are derived at source. It also makes better engineering sense that the designer's efforts will have to be more attuned to manufacturing needs, thus providing the opportunity to implement simultaneous engineering. (ref. 7) Hence a feature based modelling system is essential to the implementation of total integration of these systems. THE FEATURE BASED MODELLING SYSTEM The Feature based Modelling System contains all the necessary facilities for creating a product database at multi-levels of abstraction. A distribution system approach is adopted where each subsystem supports one type of feature. Essentially there are four subsystems : 1.
solid modeller.
2.
form feature modeller.
3.
precision feature modeller.
4.
material feature modeller.
The underlying knowledge representation scheme is framed-based system where generic features such as user-defined parameters, inheritance rules and solid representation specifications can be defined. The Solid Modeller The solid modeller serves the function of representing the physical solid models of the product to be manufactured. The CSG modeller is used here because it can effectively represents knowledge of the product at a higher level of abstraction and thus better able to support feature modelling and extraction. It also provides the means for user interface and interpretation of the model. The Form Feature Modeller The form feature modeller allows the definition of the nominal part geometry through a three tier database. At the top level is a feature relationship graph which depicts both adjacency links and child-parent links or primary feature-subfeature links. Primary features are major shapes modified by subfeatures. Primary features therefore do not inherit any parameters from any other features while subfeature inherit parameters from one or more features. The second level in the form feature modeller database is the definition of each form feature consisting of generic properties and instance data. The third level is the solid representation of the
199 form feature stored as a CSG tree of features producing volume of all features constructed through Boolean operation. This is expressed in a context free grammar for CSG which is later converted to solid modeller interface. Such a form feature database can be extracted directly by a CAPP for process planning without the need for an interface for feature extraction and feature recognition. Feature-Based }dodelling System
Product Database
Solid Modeller I
i
.
' Form Feature Modeller I
User Interface
Precision Feature [ Modeller I ]
[ Material ModellerFeature I
lntelli ent Computer-Ai_ded Process Planning System
_~
, Process Selection
Technological l)aLabase
I
Machine Tools ] Selection l User Interface
Sequencing Operations Selection of Holding Devices Operations and Machines Data Process Optimization
I
I I
I I
I Cost and Time [ Analysis Process Plan Output
1
Fig. 1 : Schematic diagram of the modelling system, the planning system and the databases.
200 Th.e Precision Feature Modener The purpose of the precision feature modeller is to enable the definition of allowable deviations from nominal form and size i.e dimensional tolerances and surface finish by creating a library for generic precision features. These generic features can be instanced and attached to form features and their geometric entities. The Material Feature Modeller The purpose of the material feature modeller is to associate material information with form features.
These information can be the material name, type, composition, physical and
mechanical properties, material processing and treatment, etc. Material features can be defined and stored in a library. This again can be linked to a form feature. Fig. 1 shows the main subsystems of the Feature based modelling system and the modules of the intelligent generative process planner to be developed. PROTOTYPE OF FEATURE BASED SYSTEM Because of the complexities in the feature based modelling system, it is necessary to first develop this system by prototyping with due consideration to multiple level representation (ref.9). Several ideas for the prototype are proposed and tested. One of the most successful is discussed in the following sections. Part Fcalme Grammar The part-feature structure can be described formally by a context free grammar for CSG, G( Vn, Vt, P, S) where: Vn denotes the set of non-terminals = { ,