Generation of workpiece orientations for machining using a rule-based system

Generation of workpiece orientations for machining using a rule-based system

Robottcs & Computer-Integrated Manufacturing, Vol 4, No 3/4, pp 545-555, 1988 0736-5845/8853 00 + 0 00 © 1988 Pergamon Press plc Printed in Great Br...

732KB Sizes 0 Downloads 41 Views

Robottcs & Computer-Integrated Manufacturing, Vol 4, No 3/4, pp 545-555, 1988

0736-5845/8853 00 + 0 00 © 1988 Pergamon Press plc

Printed in Great Britain

• Paper

GENERATION OF WORKPIECE ORIENTATIONS FOR MACHINING USING A RULE-BASED SYSTEM PLACID M. FERREIRA* and C. R. LIU School of Industrial Engineering, Purdue University, West Lafayette, IN 47907, U.S.A. This paper deals with the automatic generation of workpiece orientations on a machine for I~ll¢.hinin~ operations. A system capable of this has a wide spectrum of applications in many areas of manufacturing planning and is essential to the development of dynamic process planning systems. However, such a system requires the ability to reason about geometrical and spatial relation~hips, a topic of great difficulty for automatic reasoning. A study of the problem characteristics is made and its results are implemented in a rule-bnsed system. This system, when given a workpiece along with operation instructions and machine specifications is capable of generating a good orientation for the workplece. The functioning of the system is demonstrated by an example.

1. INTRODUCTION In this paper, we describe a rule-based system for the automatic generation of workpiece orientation with respect to the machine's coordinate system so that certain machining operations may be performed. Automatic process planning seeks to provide a mapping from the workpiece feature space to the shop's (machining) operation space, while automated fixture design systems attempt to restrain the workpiece while an operation or set of operations is performed on it. Much work has been reported recently in these fields. 1-8 However, the decision of the workpiece's spatial relation with respect to the machine, which borders both automatic process planning and tool design and is so important to the development of a dynamic process planning system, seems to have escaped notice. This decision is still made manually. In an earlier paper, 9 the authors identified the importance of the problem in a structured approach to fixture design (see Fig. 1) given a process plan and the workpiece description. However, besides the obvious application to fixture design, automating this decision function would have a substantial impact on manufacturing planning since it allows for: 1. Exploitation of the partial precedences in the

process plan to group operations which can be machined in a single orientation and minimize the amount of refixturing, transportation and manipulation of the workpiece. 2. Automatic programming of NC machines from within a process planning system by forming groups of operations for each orientation and providing the required datum information to which the NC program refers. 3. Automatic design and selection of auxiliary equipment, e.g. fixtures, once the orientation of the workpiece is decided. 4. Re-routing of workpieces to different machines in a flexible manufacturing environment. If the facility for automatic fixturing is available in an FMS, then such a system allows for the complete automation of a re-routing decision. Given this spectrum of applications, it is then extremely relevant to automatic process planning as well as to automated tool and fixture design/selection to be able to automatically plan the workpiece orientation on the machine.

Acknowledgements--This work was supported by the Engineering Research Center at Purdue University and the Office of Naval Research under contract #N83K0358. The authors acknowledge the help of Mr. S. Ho in some of

the programming. *Present address: Department of Mechanical and Industrial Engineering, University of Illinois at Urbana-Champaign, Urbana, IL 61801, U.S.A.

2. SYSTEM IDENTIFICATION In order to develop a system for automatically planning workpiece orientation with respect to the

545

546

Robotics and Computer-Integrated Manufacturing • Volume 4, Number 3/4, 1988

[Fixture design ]

Art posstbLe onentatpons

Orientatton generator

--II

FeasibiLity checker -

-

StabiLity [ [ FeastbLeoper [ [ ReLease analyzer [ [discrimination] [ checker

Precedence analyzer

[ReachablLity~-] r A c e s ~ [ analyzer [ checker

i

Fig. 1 AND/OR decomposition of a fixture design problem

machine it becomes necessary to understand the following: 1. What constitutes a good orientation for the workpiece. 2. The representation (of the workpiece, tools, operations and machine) required for such a system. 3. The chain of reasoning used to arrive at and identify a good orientation. Can it be achieved with the representation used? This understanding is obtained by simulating the role of a human planner deciding a workpiece orientation. The objectives used by the planner, the knowledge and information utilized and the reasoning behind the decisions are observed. When this is carried out for several different workpieces, machines, operation and manufacturing conditions in the domain of the system, certain patterns begin to emerge. The objectives used by the planner essentially provide a means of evaluating different orientations and act as broad guidelines for the direction in which a search should proceed. The information utilized indicates the extent to which the workpiece, tools, machines and operations must be described. Finally, the reasoning at each stage by the planner provides the heuristics, rules and strategies that the system should use to achieve the best possible orientation. 2.1. Objectives The objectives identified might be divided into basic and optimizing objectives. The former are

those that must be attained. One of the most basic objectives is: Every orientation generated must be associated with at least one operation which can be performed on the workpiece. The optimizing objectives direct the search to solutions that have features required for particular situations. Among these are the following: 1. The orientation chosen should allow as many operations as possible to be performed on the workpiece. 2. The workpiece should be easy to fixture in the orientation. 3. As many operations as possible should be "released" from the precedence specifications. 4. The accuracy with which specifications of dimensional relations are met should be maximized. 5. The workpiece should be stable against gravitational forces and possibly the machining forces in the orientation. The relative importance of each of these objectives and consequently their relative positioning in a hierarchy of objectives that the planner seeks to satisfy, depends on the particular manufacturing situation. For example, in large-scale production, it becomes essential to maximize the number of operations which can be performed in a single orientation (or setting). However, when only a small batch of the workpieces is required, the ease o f workpiece restraint becomes more important. The rationale is that for large-scale production it is possible to invest in expensive tooling which small-batch production

547

G e n e r a t i o n of workpiece orientations • P. M. FERREIRA and C. R. L1u

does not allow. Similarly, when strict tolerances are specified on the workpiece, the attainable accuracy moves up in the hierarchy of objectives. When the workpiece is very large and cannot easily be fixtured, stability against gravity becomes important. In this way, depending on the situation, the different objectives are placed in a hierarchy based on their importance to the problem in that situation and satisfied in the same order.

very low-level entities such as planes, edges and points for the description of the workpiece. This is good for reconstruction and basic analysis but does not lend itself easily to reasoning about the shape and features of the workpiece. Feature-oriented schemes are more natural to work with and avoid the problem of having to recognize features from the workpiece descriptions. The immediate availability of information about features makes basic inferencing about the shape of the workpiece easily possible. However, the domain for such schemes is restricted, the completeness is in doubt and it is difficult to obtain basic geometric and topological descriptions of the workpiece. From the point of view of this application it becomes necessary to blend these two representation schemes. The boundary representation scheme is used for the description of the geometry and topology of the workpiece. This is augmented by a feature description of entities such as through holes, blind holes, pockets and slots which are associated with faces in the boundary representation. Further, the boundary representation is further enhanced by descriptive information on the current status of the faces of the workpiece, i.e. whether a face has been machined and whether it is available as a locational reference for the workpiece. Reference information is also incorporated within the scheme. Figure 2 shows the hierarchical representation of a workpiece which includes geometry,

2.2. Information required With the objectives specified, the next step is the description of the inputs to the system. The workpiece, the operations to be performed on the workpiece, the machine and cutting tools associated with each operation have to be described to the system. The simulation of the human planner is particularly useful in identifying the kind of description to be used and the extent to which the inputs must be described to the system. 2.2.1. Workpiece description. In order to describe the workpiece to the system, information on geometrical, topological, referencing and descriptive (e.g. surface finish, accuracy) aspects of the workpiece have to be specified. At the two extremes of representation schemes available for workpiece representation are boundary representation 1° and feature-oriented schemes. H The former, used in solid modelers, is correct and unambiguous, but uses Workptece

I

I

I

Face_tist

I

I

I

Property _ List

I

I

CG

I

I Point -llst

I

I

Face I Face 2

1

I

I

Feature- fist

Ref--Qst

P[ P2

y

No o f product

Face - normat

I x

,

Weight

I

J

k

Feal

I

Fea 2

i

I

I Fea_type

I

i

I

Ref_face

Fea_name

I

I

Fea 3 Ref_name Ref I Ref 2

I

z

I

Dtrect~on

i

I

Dmtance (angle)

Tolerance

I Fea_parm

F e a _ R e f = Q s +. I

I

I

I

I

Ref_narne Ref I Ref 2

I Ref_ face Fig 2

1 D~rectton

I

I

I

D~stance (angle)

Tolerance

Hierarchical r e p r e s e n t a t i o n of workpiece information.

548

Robotics and Computer-Integrated Manufacturing I Volume 4, Number 3/4, 1988

provided by the reference list which is a list of lists containing the face or feature from which the position is referenced, the direction, distance or angle and the allowable tolerance on it. The faces affected by the operation are included in the representation. This is useful information for a fixturing system and can be used to update the workpiece representation after the operation has been performed. Finally, the operation selection list is a list of the possible options which the process planning system has identified as feasible for producing the operation result. For example, it might be possible to produce a slot by end milling or by periphery milling. Such options are stored in the selection list of an operation. With each of the possible options in the selection list is associated a generic type of operation, e.g. drilling, end milling or face milling, called the operation type, the major and minor axes for the operation, the major face (i.e. the face which is most affected by the operation) and the tool with which the operation is

features and descriptive information. The topological data is embedded in the data structure of the representation. 2.2.2. Representation of operations. The representation of operations in the system is important because it, in a way, specifies the requirements of the spatial relationship between the workpiece and the machine. The representation scheme is shown in Fig. 3. Associated with any workpiece is a list of operations to be performed on it and the precedence relationships between them. The operation itself is specified by a name, the kind of result it produces, the references for it, the faces affected by it and a list of possible methods of execution. The reason why the operation is represented by the result it produces is that the results can be categorized into nine classes. These are shown in Fig. 4. Usually a few distances and angles are required to specify the position and orientation of the result of an operation. This is Operatton

I

I Op_result

Op- name

Ref_ h s t

I

I Ref=name

Affected _face

I

I

Refl

Ref 2

I

I

Re f : face

Direction

Distance

SeL-I SEE-2

I ToLerance

I

I

Op- seL -name

O p - t ype

Drill

E_mttt

I

,

I

I

I

Op_sel_Qst

I

I

MaJor_axis

Minor-axis

I Major _face

Per_mKL Foce_mlLt

Fig. 3. Representation of operaUons.

/°/ (a) Through hole or blmd hole

(e] Full face

(b) Through pocket or blind pocket

( f ) Open pocket I

(c) SLot

(g) Open pocket 2

Fig. 4. Possible operation results.

(d) Step

I Tool_no

Generation of workpiece orientations • P. M. FERREIRA and C. R. LIU

performed. The major and minor axes of an operation specify the direction vectors for the tool axis and motion while the operation is being performed. Figure 5 shows the major and minor axes for different operations. 2.2.3. Representation o f machines and tools. The system uses a rather simplistic description of the machine and the cutting tool. The structure for the machine description is shown in Fig. 6. The machine is described by its name/number, type (i.e. milling, drilling, boring, etc.), orientation of the spindle with respect to its table, its workspace limits, possession/ lack of an index table and its power and accuracy limits. The tool representation is shown in Fig. 7.

This representation includes the geometry of the tool, some descriptive features (material and accuracy rating) and the angles made by the surfaces that can be generated with the tool axis. 2.3. Rules and strategies The simulation of the planner, as mentioned before, provides a large proportion of the rules that are part of the system. The other rules are obtained by basic analysis of the problem. Based on the level at which they function, the rules are classified into: 1. Strategic Rules 2. Main Body of Rules 3. Tools. The strategic rules rearrange the order of the objectives (and hence their relative importance) thus biasing the search to satisfy the more important objectives first. For example: When only a small number o f workpieces are to be produced, the ease o f restraint is more important than the number o f operations per orientation.

C Ho'e Major axts C Minor axis niL

Pocket Major axis C Mrnor axis A,B

549

When the accuracy requirements are o f the same order o f magnitude as the machine's capability, maximization o f accuracy becomes the most important objective. Such rules modify the default order of the objectives and point the search in the direction of a potentially "good" solution. The main body of rules perform the bulk of what might be called "reasoning" in the system to produce an orientation. These rules might be classified into three categories: 1. Synthesizing Rules 2. Constraining Rules 3. Heuristics. There rules, working in unison, reduce the solution space to a few orientations from an infinite number of possible workpiece orientations. The synthesizing

SLot Major axis A,B,C Minor axis A,B

Fig. 5. Examples of major and minor axes of operations.

Machine

I

I

I

ID

type

Splndl.e orientation

I

I

I

Travel. Limits

Index option

I CapabiLity Limits

Fig. 6. Machme representation.

I

ID

I Type

Cu±tmg tool I I

I

Geometry

Descrlptton

I

I I Surface Diameters generated j I Operating

I lengths j

I Accuracy

I # _ o f _ teeth

I I I OveraLLOpera~mg Overall Fig 7. Cutting tool representation.

I Mater,at

550

Robotics and Computer-IntegratedManufacturing• Volume4, Number 3/4, 1988

rules, as their name suggests, help move closer to an orientation. For example:

To make an operation feasible, reorient the workpiece so that the major axis o f the operation is oriented in the direction o f the tool. I f the machine has an index table, then a good starting orientation is one which maximizes the number o f operations that have a null inner product with the index table axis. The constraining rules identify the futility of a particular line of reasoning. For example:

I f an orientation offers no support (base) face, it may only be pursued if no other orientation, allowing an equivalent or better set o f operations, offers a support face. I f an operation cannot be related to a locational face offered by an orientation, then the operation cannot be performed with the workpiece in that orientation. Finally, the heuristics help make the search more manageable by trimming off the lines of reasoning which have low probability of success. For example:

I f a face has an area less than 10% of the average area o f a face on the workptece, then consider it unavailable for support /locational purposes. The tools are in the lowest category of rules and consist of data manipulation rules such as the database queries interfacing the workpiece description to the rule base to make access to data more convenient (e.g. obtain all faces with normals pointing in a particular direction, obtain all features on a face), computational routines for geometric manipulations and calculations (e.g. rotations, translations, convex hulls, polygonal intersections, areas) and miscellaneous functions (e.g. set membership, intersections). These tools help the main body of rules function at a higher level and help in avoiding duplication of code in different rules. 3. FORMALIZATION AND IMPLEMENTATION In the previous section (the scheme for representing information to the system) the objectives the system must seek to achieve and the rules by which it might achieve these objectives were discussed. This must be formalized and implemented in a RuleBased System. Formalization involves expressing the rules and objectives in a precise, tangible manner. For example, ease o f workpiece restraint has to be reduced to a statement or series of statements which

can be understood and evaluated by the system. Thus, an example of one of the rules formalizing the ease of workpiece restraint would be:

An orientation which presents three orthogonaI planes parallel to the machine's coordinate planes is better for workpiece restraint than one which does not. Another example, characterizing stability, would be:

A workpiece is stable in an orientation if the vertical projection o f its center o f gravity passes through the convex hull ofits support (base) face. A statement complementing this statement about gravity would be a statement about the stability against cutting forces:

A workpiece is stable against the machining force in an operation when the line o f action o f the force passes through the projection o f the convex hull o f the surfaces available for workpiece restraint in a plane perpendicular to it. In a similar manner other concepts (e.g. expected precision) may be formalized. Such formalized rules are incorporated into a Rule-Based System. The system is implemented in Prolog (CProlog 1.3) and addresses the problem of orientation of workpieces for operations on machining centers. The system is designed for the following domain: 1. Workpieces: any workpiece whose surfaces are predominantly planar. 2. Machines: three axes, vertical or horizontal milling, boring and drilling machines with or without index tables. 3. Operations: drilling, boring, reaming, facemilling, end-milling and peripheral-milling. The structure of the system is shown in Fig. 8. The rules are divided according to the structure mentioned earlier. Databases are maintained on the machines and tools that are available. Entries in these databases are in the form of Prolog facts. For example, a machine is represented by:

machine (m 7 7 8 09,milling, hortz, [40. O,50. O,60.0], 1, [70.0, O.0021). The entry is explained as:

machine(mach-N°'mach type'spin- °rient'travel-hmi' index_opt, mach_lim). which is the same as that described in the section on representations.

Generation of workplece orlentat~ons • P. M. FERREIRA and C. R. LIU

551

User

Interface



Synthesized orientation

Procedural knowledge ' [ Strategic rules ] "

Facts Machines toots workp~ece

[ Orienting rules

I

Geometric rout ines Convex hurl area computat ~on intersection etc

Fig 8 System configuration.

The hierarchical representation of the workpiece is stored as a set of facts in Prolog. For example, the workpiece shown in Fig. 9 is represented by the following set of facts:

workptece(face_list, prop_list). face_list(face_l ,face_2,face_3 ,face_4,face_5, face _6). prop_list(c_of_g, 1. O,100.0). face(face_l, [a_l 1],fn_l , [1,[roach,avail, ground],

rf_l). face(face_2, [a__21],fn_2, [], [mach,avail, fmach ], rf_2). face(face_3, [a_31],fn_3, [fea_l ], [mach,avail, fmach ],rf_3 ). z

D~rect~on of x

face(face_4, [a_41],fn_4, [fea_3 ], [mach,avail, fmach ],rf_4). face (face_5, [a_51],fn_5, [fea_2 ], [mach,avail, fmach ], rf_5). face (face_6, [a 61],fn_6, [], [mach,avad, ground ],

rf_6). face(face_7, [a 711,fn 1 , [], [rnach,avail, ground], none). face(face_8, [a_81 ],fn_6, [], [mach,avail, ground L none). face(face_9, [a_91],fn_4, [], [mach, unavail, ground],none). face(face_l O,[a_l O1],fn_l , [l, [roach, unavail, ground],none). face (face_l 1, [a _111 ],fn_2, I1, [mach, unavail, ground],none). face(face_l 2, [a_l 21 ],fn_4, [], [roach, unavail, ground ],none). face(face_l 3, [a_131],fn_6, [], [roach, unavail, ground ],none). face(face_14,[a_141],fn_2,[], [roach, unavail, ground],none).

/ tool

Fig. 9 Raw workplece.

point_on._face(a_l l, [p_l, p_2, p_3, p_4]). point_on__face(a_21, [p_I, p_9, p_12, p_2]). point_on_face(a_31, [p_2, p_12, p_11, p_20, p_21, p_16, p_15, p_7, p_6, p_22, p__23, p_3]). point_on_face(a_41, [p_7, p_15, p_14, p_81). point_on..face(a_51, [p_l, p_4, p_24, p_25, p_5, p_8, p_14, p_13, p_26, p_27, p_lO, p_9]). point_on_face(a_61, [p_9, p_l O, p_l l , p_12]). point_on__face(a_71, [p_5, p_6, p_7, p_8]). point_on_.face(a_81, [p_13, p_14, p_15, p_16]). point_on__face(a_91, [p_4, p_3, p_23, p_24]). point_on._face(a_lO1, [p_24, p_23, p_22, p_25]).

552

Robotms and Computer-Integrated Manufactunng • Volume 4, Number 3/4, 1988

point_on_.face(a_l l l, [p_6, p_5, p_25, p_22]). point_ on__face(a_121, [p_27, p_2 0, p_l l, p_l O]). point_on_face(a_131, [p_21, p_20, p_27, p_26]). point_on_face(a_141, [p_21, p_26, p_13, p_16 ]). point(c_of_g, [0.5, O.5, O.5]). point(p_l ,[O.O,O.O,l.01). point(p_2,[1.0,O.O,l.01). point(p_3,[1.O,O.45,1.0]). point(p_4,[O.O,O.45,1.O]). pomt(p_5,[O.O,O.5 5,1.O]). point(p_6,[1.0,O.5 5,1.O]). point(p_7,[1.0,1.O,l.O]). point(p_8,[O.O,l.O,l.01). point(p_9,[O.O,O.O,O.O]). point(p_l O,[O.O,O.45,0.O]). polnt(p_11,[1.O,O.45,0.O]). point(p_12,[1.O,O.O,O.01). point(p_13,[O.O,O.5 5,0.O]). point(p_14,[O.O,l.O,O.01). point(p_15,[1.O,1.0,O.O]). point(p_16,[1.0,O.5 5,0.01). point(p_20,[1.0,O. 4 5,0.05 ]). point(p_21,[1.O,O.5 5,0.05 ]). point(p_22,[1.0,O.5 5,0.951). point(p_23, [1. O,O.45, O.95]). point(p_24, [0. O,O.45, O.95]). point(p_2 5,[O.O,O.55,0.051). point(p_26,[O.O,O.5 5,0.051). point(p_2 7,[O.O,O.4 5,0.051). dtrection (fn_l , [0. O,O.O,1.0]). direction (fn_2, [0. O, - 1. O,O.01). direction (fn_3, [1. O,O.O,O.01). direction (fn_4, [0. O,1. O,O.01). direction (fn _5, [ - 1. O,O.O,O.01). direction (fn_6, [0. O,O.O, - 1.01). feature (fea_l ,thole, [1. O,O.5, O.511rff_1). feature(fea_2, thole, [0. O,O.5, O.51,rff_2). feature (fea _3,pocket, 10.5, O.5,1.011rff_3). ref_list(rf_l, 1face_6, [fn_l , 1. O,O.001, O.00511 [0.0,0.001,0.00911). ref_list(rf_2,[face_4,1fn_2,1.O,O.O l ,O.O111 10.0,0.001,0.009H). ref_hst(rf_3,[face_5,[fn_3,1.0,0.01,0.0911 I0.0,0.001,0.00111). ref_list(rf_4, [face_2, [fn_4,1. O,O.01, O.0911 0.001, 0.00111). ref_list(rf_5, [face_3, [fn_5, 1.0, 0.01, 0.01], [0.0, 0.001, O.O01H). ref_list(rf_6, [face_l, [fn_l, 1.0, 0.001, 0.00111 I90.0, 0.001, 0.00911). ref _list(rff_l , [face_l, [fn_6, O.5, O.001, O.00911 [90.O,O.O01,0.O0111face_2,[fn_4,0.5,0.O01, O.00811190.0,0.001,0.00911).

ref_list(rff_2 , [face _1, [fn_6, O.5, O.001, O.0011, [90. O,O.001, O.O0811face_2,[fn_4, O.5, O.001, O.00911190.0,0.001,0.00711). ref_list(rff_3 , [face _1, [fn_6, O.5, O.001, O.001 ], [90.O,O.O01,0.O0111face_3,[fn_3,0.5,0.O01, 0.0091, [90. O,0.001,0.00711). One of the interesting characteristics of this structuring of the workpiece data is that when the object is reoriented, the co-ordinate transformations have only to be used on the facts listed with points and direction. How the topological data of the object is inherent in the structure used will be obvious from studying the example. Studying Fig. 10, the operations to be performed on the workpiece include drilling the hole and machining the slot. The operations are represented as follows:

/, operation (op_name, op_goal, op_ref, affected..face, op__sec_list).

,/ /,

op_sec_list(op_type, major_axis, minor_axis, major_face, tool_No).

*/

operation(op_l ,slot, or_l , [face_2,face_5,face_311 oslist_l ). operation (op 2 , thole, or _2, [face_l ,face_2 ], oslist_2). ref_list(or _1, [face_4, [fn_2, O.8, O.01, O.01], [O.O,O.O01,O.O01],face_l,[fn_6,0.4,0.O09, O.011,[90.O,O.Ol,O.01],face_6, [fn_l,O.4,0.Ol,O.O1],[90.O, 0.01,0.01]]). ref_list(or_2, [face_2, [fn _4, O.3, O.01, O.O1], [O.O,O.01,0.O1],face_5, [fn_3,0.3,0.009,0.00111190.0, 0.01,0.0111). z

Fig. 10. Operatxonsrequired on workplece.

Generation of workplece orientations •

op_sec_list(oslist_l , [[emill,fn_4, [ill_3,fn_5 ], face_2,t7 9001], [per-mill,fn_l , [fn_3 ,fn_5 ], face_2,t79002 ], [per-mill,fn_6, [fn_3,fn _5], face_2,t79002 ]]). op_sec_list(oslist_2, [[drill, fn_6, [], face_1,t79001],

ldrill,fn_l,[l, face_ 6,t79002 ]]). From the above description of the operations, it can be seen that the input allows the system to select the method by which an operation can be performed. For example, the slot can be produced either by end-milling or by peripheral-milling. The rules which work on this input access it through a well-developed set of database queries and carry out analyses making use of the tools mentioned in the previous section. The evaluation of stability against gravitational forces is a good example:

gravity_stab ility (B_list, G_vector) :-/* B_list is the list o f base faces, G_vector holds the results */

( (B_list = [[, G v e c t o r = [unstable, 0.0]

)

(get_points_on_base (B Jist, [], P_list), prop_list(X, _., _), check_inclusion_in_convex_hull(X,P_list, Answer), find_area_o f _base( P_list, Area) , G_vector = [Answer, Area]

) ).

get__points on base([], Temp, P_lisO:-Temp = P_list. get_.points on base(B_list):-B_list = [F1 [B_rest], all__points_on_face(F1,X), append(X, Temp, Ternp l ), get__points on base(B_rest, Temp l ,P_list). check_inclusion_in_convex_hull(X, List, Answer) :-Listl = [X [List], find_convex_hull(Listl, Convex),

(

(member(X, Convex),

P. M. FERREIRA and C. R. LIU

553

). Answer = unstable ) (Answer = stable ) find_convex_hull(L1,L2 ) :-tell(convexdata), write_points to data_file(L1), system(" convex.ex (convexdata )convexout"), [convexout], convex_list(L2), retractalI(convex_list(_) ). find_area_o f _base ( P L,A ) :-find_convex_hull(PL, CH), tell(areadata), write__points to data_.file(CH), system(" area.ex (areadata )areaout"), [areaout], area(AX), A i s A X - 1.0, retractall(area(_) ). The above rule, though not complete, portrays how the rules access the database of information on the workpiece and work with the computational routines provided to the system. In the above rules, the vertices of the base faces are accessed through the query all._points_on_face and the geometric manipulations like convex hulls, areas and the inclusion of a point in a polygon are performed through the "tools" or routines defined to the system. The system uses a "generate & evaluate" strategy. It groups operations and, by manipulating these groups and the operations within them, generates an orientation. It then evaluates the orientation based on the order of its set of objectives (described in the previous section). After having generated most of the useful orientations, it proposes a set of the few best orientations. The reason is that, down the line, an automatic fixturing system might require a few orientations to work with before successfully designing a fixture. The generated orientation is described by a coordinate transformation matrix and is followed by a report stating the operations that can be performed in it, the faces available as location planes in fixturing, the expected accuracy, and the options selected for performing each operation. The workpiece shown in Figs. 9 and 10 is used as an example. These figures show the workpiece and the finished part, respectively. When a machining center with an index

554

Robotics and Computer-Integrated Manufacturing • Volume 4, N u m b e r 3/4, 1988

table is used, the system is able to obtain an orientation in which both the hole and the slot can be produced. Further, the first choice of operations (i.e. end-milling, as provided by the data) can be used to produce the slot. However, to maintain the choice of end milling the workpiece has to be indexed. This is shown in Fig. 11. The output is described as follows:

Transformation for orientation trafm (t_l, 1, [gi_2,gi_l 1, [0, O, - 11, [0, - 1,01, [-1,0,01).

lop_l, [HO.01,0.O91,face_2,face_41, [[0, 01,face_411, [1[0, 01,face_l 1,[[0.000999999, 0.0051, face_6,face_111, [[[0.000999999, 0.0009999991, face_l,face_61,l[O, 01,face_61111. When a machine without an index table is used, the system still obtained an orientation in which both operations could be performed, as shown in Fig. 12. However, for the slot, the system had to select a second-choice operation, i.e. peripheral-milling. Similar results have been obtained on different test pieces.

Operations possible [op_l ,op_2 ] Base_List : [face_3] Vert_List : [[face_21, [face 41, [face_7,face_11, [face_6,face_8 ]] List of possible combinations of three orthogonal faces: [[[face_31, [face_41, [face_6,face_811, [[face_31, [face_41, [face_7,face_l ]1, [[face_31, [face_21, [face_6,face_811, Hface_31, lface_21, [face_7,face_1111, Features available for fixturing: [fea_l l [lea_3] Stability test results: [stable, l] Operation References and Accumulated Errors:

llop_2, H[o, 01,face_21, II0.01,0.011, face_4,face_2]1, [HO.Ol,0.O11,face_3,face_511], z

Fig. 11 Orientation generated for a machine wlth an Index table

4. CONCLUSION AND FUTURE WORK Geometric and spatial reasoning is necessary to successfully plan the manufacture of a workpiece. Taking into consideration the fact that such reasoning has been a difficult area for the application of automatic reasoning, this work, in the current state of implementation, has been very successful. The groundwork has been laid and an initial working prototype has been developed for the automatic generation of workpiece orientations for machining. Such a system should contribute substantially to dynamic process planning. Work is underway to interface the system with a solid modeler so that the input can be obtained automatically from the design representation and the orientations generated can be inspected visually. More rules for dealing with special cases are being incorporated and the evaluation criteria are being refined. Also, the possibility of incorporating a learning system for deciding the weights to be given to the different objectives which have to be pursued in an orientation is being explored.

z

Fig 12 Orientation for a machine without an index table

Generauon of workplece o~lentations • P. M. FERREIRAand C R. L~u

REFERENCES 1. Weill, R., Spur, G., Evershelm, W.: Survey of computer-aided process planning systems. Ann. CIRP 31: 539-551, 1982. 2. Nau, D.S., Chang, T.C.: Prospects for process selection using artificial intelligence. Comput. Ind. 4: 253-263, 1983. 3. Descotte, Y., Latombe, J.: GARI: a problem solver that plans how to machine mechanical parts. IJCAI, Vancouver, 1981. 4. Ingrand, F., Latombe, J.: Functional reasoning for automatic fixture design. Proceedings of CAM-I's 13th Annual Meeting and Technical Conference, Arlington, Texas, 1984. 5. Markus, A., Markusz, Z., Farkas, J., Filemon, J.: Fixture design using Prolog: an expert system. Robotics Computer-Integrated Mfg 1: 167-172, 1984. 6. Englert, P.J., Wright, P.K.: Applications of artificial intelligence and the design of fixtures for automated

7. 8. 9.

10. 11.

555

manufacture. IEEE Conference on Robotics and Automation, 1986. Nau, D.S., Chang, T.C.: Hierarchical representation of problem-solving knowledge in a frame-based process planning system. J. Intell. Syst. 1: 29-44, 1986. Chou, Y.C., Barash, M.M.: Computerized fixture design from sohd models of workpieces. ASME Winter Annual Meeting, Bound Volume, 1986. Ferreira, P.M., Kochar, B., Liu, C.R., Chandru, V.: AIFIX: an expert system approach to fixture design. ASME Winter Annual Meeting Bound Volume, 1985. Reqmcha, A.A.G.: Representations for rigid solids: theory, methods and systems. Comput. Surveys 12: 1980. Luby, S.L., Dixon, J.R., Simmons, M.K.: Designing with features: casting as an example. Proceedings, 1986 ASME Computers in Engineering Conference, 20-24 July 1986.