3-D Interacting Manufacturing Feature Recognition Soundar R. T. Kumara (2), Ching-Yao Kao, Michael G. Gallagher, Rangachar Kasturi Received on January 15,1994
Abstract: Automatic recognition of machining features such as slots, holes and pockets is one of the major tasks of CAD/CAM. This research proposes the super relation graph (SRG) method for extracting shape features, The nodes of the SRG represent the faces in depressions; the links represent either super-concavity or face-to-face relationships which are generated from a set of new definitions of relationships between two faces. Hypotheses are generated from a combination of graph-based and neural network approaches. These hypotheses are verified using computational geometry techniques. The SRG method is implemented in an object oriented paradigm and the results obtained are proved to be better than the ones generated from most of the prominent existing methods. Key Words: ManufacturingFeature Recognition, CAD/CAM. Neural Network the features of a CAD object such that certain reasoning tasks Introduction can be accomplished. In this paper, the super relation graph The integration of CAD and CAM provides a vital link in (SRG) method is proposed to model shape features comprising Computer Integrated Manufacturing Systems (CIMS) [lo]. With non-adjacent faces. the recent surge towards solid modeling, researchers have begun to question the feasibility of having the computer automatically 2.1 Super Relations: Super-concavity and Face-to-Face reason and inter ret a design in terms of its higher level entities, Relation features, whic correspond to some family of machining The SRG model of feature uses two relationships between operations. The roblem of feature recognition involves faces: super concavity and face-to-face relation. They are recognition of the kgher level features from a set of lower level defined as follows: entities in the geometric model. Robust geometric reasoning procedures and representation models are essential to a Definition 1:(Super-concavity) successful feature recognizer. Two faces, face A and face B are said to be superconcaveto each other if: Several different techniques have been developed for 1) Face A and face B have orthogonal face normal, recognizing features from CAD data [l, 2, 3, 4, 6, 81. However, 2) Face A is completely or partly in face B s positive half most of the work has only limited capability of recognizing space and face B is completely or partly in face A's features with interactions. Marefat and Kashyap 171 used a positive half space. Each face of an object separates a 3:space into 2 half graph-based approach for extracting features from boundary data. They emphasize their method on the recognition of spaces: the spaces inside and outside of the object. The positive interacting prismatic features. However, a number of flaws in this half space of a face is defined as the half space that is outside of the object. It is used in defining face-to-face relation as well. method and counter-examples are found within their problem scope [5].Some of the problems can be summarized as follows: (1) Problem with the rules: The rules do not accommodate for the Definition2 (Face-to-facerelation): change of feature characteristics, such as adjacency between Face A and Face B have Face-to-face relation if: faces, caused by feature interaction. (2) Problem of limbo feature 1) face A and face B are paralleland face: Limbo feature face is defined as a face in a de ression 2) face A is completely within face B s positive half space without concave edges. Marefat and Kashyap's metho can not and face B is completely within face As positive half extract limbo feature face except when it is coplanar to other space. faces. (3) Problem of unresolvable graphs: The virtual links selected by Dempster-Shafer's clustering techniques are not In general, the two relations are called super relations. always correct. Vandenbrande [l 11 proposed a hint generation and feature completion approach, which is capable of recognizing 2.2 SRG Representations of Primitive Features relatively large number of classes of features but results in large With the two definitions given in the previous section, search space. Therefore, the main aim of this paper is to features can be defined using super relation graph (SRG). propose a new a proach which successfully recognizes Primitive features in this work include the followings: step, thru interacting features. he problem definition is given as follows: slot, blind step, blind slot, prismatic hole and pocket. Fig. 1 shows the six primitive features and their associated SRG Problem Definition:Given n features and m interactionsbetween representation. SRG is an undirected graph where each node the features, the roblem is one of retognizing and extracting the corresponds to a face in the feature and two types of links are iven features. n particular, the problem relates to prismatic used to represent the relation between two faces: solid links iatures in depressions with orthogonal interactions. represent super-concavity, and dotted links imply the existence of the face-to-face relationship. SRG is the basic model used in In the following sections, the super relation graph (SRG) this research for solving the specific problems addressed in the method for recognizing primitive features in the depressions of a introduction section. A com lete feature definition requires the machining part is presented. considerationof tool accessigility and the validity of the enclosed volume. 1.0
E
8
f
P
2.3
2.0 Feature Recognition Using the Super Relation Graph (SRG) Method
Feature has been loosely used by researchers to define a region of interest in a part. A good model is required to represent
Annals of the ClRP Vol. 43/1/1994
The SRG Method The SRG method can be divided into the following steps: (1) define global graph, (2) define envelope face set (EFS), (3) find interacting feature face sets (IFFS's), (4) obtain SRG's from IFFS's, (5)generate hypotheses from SRG using trained neural networks, and (6) verify hypotheses. The following sections describe each of these procedures.
133
I
(EFS) which is a set of faces coplanar to the envelop of the object. The EFS of the example object in Fig. 2 is EFSI :{I 2, 13, 14, 15, 19,20,21, 22).
SRG OF FEATURES
FEATURE
2.3.3 Finding the Interacting Feature Face Sets The procedure for finding interacting feature face sets (IFFSs) takes away the nodes belonging to the EFS and the links incident to them from the global graph. This procedure may result in several graphs or one single gra h. These graphs are called interacting feature face graphs (IF G's). Then IFFS can be obtained by athering all the nodes in one IFFG. Fig. 2 (c) shows that the1 FG1 and IFFG2 are obtained from the global graph. The IFFS's obtained from IFFGs are lFFS1: {I, 2,3,4,5, 6,7,8,9,10, 11) and IFFS2: (16,17, 18).
F
!
t
I
I
I
I
THRU SLOT
2.3.4 Obtaining Su r Relation Graphs (SRG's)from IFFS's For each I!%, its SRG consists of the nodes corresponding to the elements of IFFS, and the links re resenting either super-concavityor face-to-face relation. Fi . 3 carand (b) show the two SRG's of the IFFS1 and IFFS2. he SRG's may now be matched to the primitive SRG's. If there is a match, then it means that it is a primitive feature candidate. For example, the SRG in Fig. 3 (b) matehes the SRG of a thru-slot . Faces 16,17, and 18 therefore form a thru-slot hypothesis. In the case of Fig. 3 (a), the graph does not match any one of the primitive SRG's. In this case, the SRG contains interacting features and needs more procedures to identify features from it.
9
1
I
-
1
I
I
I
Fig. 1 Primitive Features and their SRG representations.
I
2.3.1 Defining the Global Graph A globalgraph is a representation for the entire object. It is a graph where each node corresponds to face fi of the object S, and each edge eyrepresents the adjacency between two faces fi and Fig. 2 (a) and (b) show an object and its global graph.
4.
2.3.2 Defining Envelope Face Set The concept of envelope has been applied to the roblem of assembly feature recognition [8]. An envelope IS defked as
2.3.5 Feature Hypothesis Generation . An object typically consists of several depressions. Each depression can be representedusin one SRG. If the SRG does not match any of the primitive RG's, it implies that this depression consists of more than one feature. To generate hypotheses, the SRG's are decomposed into sub raphs corres onding to the primitive SRG's. Consider the su graph forme by nodes 1, lo' and 11 from the SRG in Fig. 3 (a). It is isomorphic to the SRG of thru-slot and not a subgraph of any
s
t
8
1
HP 1 : T?IIU-S~O[( 1,8,9) HP2: ThIU-Slot(l, 10, 11) HP3: Hole(2,3,6,7) HP4: Hole(2.3.6.9) HP5: Hole(2,3,6, 1 1 ) HP6: Hole(2,3,8,9) HP7: Hole(2,3,8, 11) HP8: Hole(2.3, 10, 11)
tb)
HP9: Hole(2,5,6,7) HPlO: Hole(2, 5.6.9) HPI 1 : Hole(2.56, 11) HP12: Hole(2,5,8.9) HP13: Hole(2,5,8, 1 1 ) HP14: Hole(4.5.6.7) HP15: Hole(4,5,6,9) HP16: Hole(4,5,8.9)
(C)
Fig. 3 Examples of super relation graph.
Fig. 2 An example of an object, its global graph and interacting feature face graphs
other SRG (of primitive features). According to this match, a hypothesis thru-slot(1, 10, 11) can be enerated. Using the procedure described above, the enerate hypothesis set of the example SRG in Fig. 3 (a) is b e d as in Fig. 3 (c). These generated hypotheses will be verified using further algorithms in the next step in order to eliminate invalid hypotheses and propose the valid features.
the convex hull of an object and it should be of primitive shapes such as parallelopiped (ppd), cylinder, cone or prism. In this paper, emphasis is placed on finding the envelope face set
2.3.6 Hypotheses Verification All the hypotheses generated in the previous step,are not necessarily correct. The objective of the hypotheses verification
0
.,......... ..,.__....... ~
: Node belonging to
EFS,
..--..-... : Link incident to nodes of
EFS
(C)
134
cp
procedure is to eliminate incorrect hypotheses and propose the valid features. The basic idea of verifying the validity of a feature hypothesis is to check whether the feature volume of the hypothesis intersects with any part of the object. If any one of the faces intersects the volume then the feature is invalid and should be eliminated. It is observed that only the faces in the same cavity can intersect the volume of feature hypotheses. Using the feature verification algorithms, the valid feature hypotheses of the object in Fig. 2 (a) are: HP1 thru-slot (1,8,9) HP2 thru-slot (1,10,11) HP6 hole (2,3,8,9) HP3 hole (2,3,6,7) HPg hole (2, 3, 10,ll) HP14 hole (4,5,6,7) HPi6 hole (4,5,8,9) The seven hypotheses are verified and become the recognized features to form the cavity. Note that the union of the seven features is exactly the cavity. 3.0
Implementations
This system is interfaced to I-DEAS VI solid modeling system, since IDEAS is a integrated engineering environment which provides interface with a variety of applications. An interface program has been written in Borland Ct+ to perform the graph construction tasks. The details of the implementationare described here under: Representing the Global Graph A lobal raph can be implemented as an adjacency matrix, w ich de ines an adjacency relation between the faces of a given object. To construct this we use the edge information that was computed earlier and enerate a B x B matrix, where B = number of faces the given o ject is comprised of, filled with ones and zero's. A one corresponds to an adjacency of faces (or an edge connecting the faces), whereas a zero defines no adjacency. This B x B matrix is the global graph. 3.1
a 9
9,
3.2
Finding the Envelope Face Set The envelope face set is the set of faces that make up the outer surfaces of a given object. The algorithm used for generating this set of faces follows a simple rule. If there exists a face such that none of the points of the object are within the positive half-space of that face, then that face is considered a member of the envelope face set. 3.3
Finding Interacting Feature Face Sets Section 2.3.3 describes the procedure for finding Interacting Feature Face Sets. In order to implement this process two steps are necessa : (1) Modify global graph, by removing nodes belongin to E S and links incident to them from the global gra h. (2) educe the modified global graph into it's constituent IF
FL.w
7
3.3.1 Modify Global Graph This algorithm uses the computer generated EFS list and the previously defined global graph. The only purpose of this function is to step through the global graph matrix, and replace any 1's that correspondwith faces in the EFS list with zeros. 3.3.2 Reduce the Modified Global Graph into IFFS's This task is accomplished through a set of nested while loops, counters, and tem orary variables. The algorithm used is based on the premise t at an IFFS is comprised of adjacent faces, and is listed below: Algorithm 1: Finding IFFSs Input: Modified global graph matrix Out ut: IFFSs BE&N (1)lnitialize IFFS counter to 1. Initialize LIST0 to contain all the faces of the modified global graph matrix. Initialize LlSTl to NULL. (2)Find the first row that contains a '1'. Add the row number to LlSTl and the faces that correspond to those 1's to LIST1. Remove the numbers added to LIST1 from LISTO.
I:
(3)For each element of LIST1, check the row that corresponds to it. If a row is found to contain l's, those values are added to LlSTl and remove from LISTO. This step continue until all the elements in LIST1 is examined and no more faces can be added to LlSTl. Let LIST1 be IFFS[counter] (4)lncrement IFFS counter by one. Reset LIST1 to NULL. If LIST0 contains only the row numbers containing only O's, stop, else loop back to step 2. END After this algorithm runs its course, a set of lists, each of which contains an IFFS will be available. 3.4 Obtaining Super Relation Graphs (SRG's) from IFFS's A super relation graph is a matrix derived from an IFFS, which describes the "super-concavity" and "face-to-face" relationships between any two faces of a particular IFFS. In order to generate this relational matrix from an IFFS, the angle between two faces is needed. To calculate the angle between two faces we will use their corresponding plane equations; In articular, we will use the values that determine the face normal. The angle between two planes is equal to the arc cosine of the dot product of the two normals divided by the magnitude of the two normals. Once the angle is calculated, the next step is to determine whether or not each plane is completely or partially within each others positive half space. The positive half space relation can be determined by substituting vertices of plane A into plane 6 s equation. and calculate the value. If the value is > 0, plane A is in plane B's positive half space. Based on the angle between the two faces and their half space relation, the SRG can be constructed. The SRG is a D x D matrix, where D = number of faces in the object. The SRG contains O's, l's, and 2's. A zero corresponds to no relation, a one corresponds to a super concavity relation, and a two refers to a face-to-face relation. 3.5 Find Feature Hypotheses The matching of SRG re uires the matching of both the super-concavity links and the ace-to-face links. The task is broken down into two stages. The first stage of the matching considers the super-concavity links on1 and generate hints. The second stage matches the face-to-)lace relationshi usethis of research, hint eneration is accomplished through t e In Artificial Neural!Jetworks(ANN) [9].
9
R.
ANN has been widely recognized as an effective and efficient pattern recognizer. To avoid an exhaustive raph matching in this work, ANN approach is used to generate gh ints. For each SRG, say GI, we generate subgraphs, G1k, k=l,2,.., havin exactly 4 nodes and containing only super-cancavity links. or every node of'Gi k, a sequence label which is from 1 to 4 is assigned to identify each node (each node is assigned a different value) and becomes G'1k Then the subgraph G'l k is transformed into a three tuple: &=(Xi, X2, X3). X i is obtained by multiplyingthe non-zero ranks of the 4 nodes. Rank is defined as the number of incident arcs of a node Therefore it can be represented as: X l = u Ri
9:
I
where Riis the rank of node i, Ri is not equal to 0 and iis the sequence label. The value of X 2 and X3 are determined by the the following decision rules: (1) If only one min rank node, then X 2 = X 3 = Sequence r m i n rank node 2) If there are two min rank nodes, n l and n2, then X 2 = equence Labelnl and X3 = Sequence Labeln2 (3) If there are three min rank nodes, then X 2 = X3 = Sequence Labelmax rank node (4) If four nodes have the same rank, then X2 = X3 = 0 For each pattern, Pk, there is an associated hint set. There are 30 possible pattern-hintsassociations in our problem domain and they are used to create a complete pattern dictionary. ANN plays the role of a pattern associator. The input
135
is the 3-tuple pattern transformed from a subgraph of a SRG. The output layer has eleven nodes whose activation represents the existence of a certain hint. More than one node can be activated at a time and therefore the activated nodes form a hint set. Back propagation algorithm used in this implementation, because it is one of the most popular artificial neural network paradigm and its capability as a pattern associator has been very well verified. After the hint set is generated, the hypotheses set can be created by selectin the romising hints from the hint set. This algorithm checks t e fo lowing hypothesis requirements: (1) whether one hypothesis is the other hypothesis's subgraph, if it is, then delete it; (2) whether face-to-face relationship is satisfied.
\ P
Hypotheses Verifications Section 2.3.6 describes the .principle of hypotheses verification. The algorithm for checking whether the feature volume of the hypothesis intersects with any part of the object. If any one of the facets intersects the volume then the feature is invalid and should be eliminated. It is observed that only the facets in the same cavity can intersect the volume of feature hypotheses. Algorithms for checking interference between feature volume and facets of the same cavity are developed. One example algorithm for checking thru-slot hypothesis is listed as follows: 3.6
Algorithm 3: Check interference of thru-slot hypothesis Input: Faces of thru-slot, (Sides Pi, P2, Base P3) A facet of the object [M)i = 1,2.... The edge of the facet f, ei, where ei = (vil , 42), ei lies on line Li Output: @i) intersect the feature (TRUE) or not (FALSE) BEGIN IF (Pl(vi) > 0, P2(vi) > 0 and Pg(vi) >O)for i = 1 or 2.... THEN return FALSE, ELSE IF (Pj(vi) < 0 for i = 1,2,3 ....)j = 1 or 2 or 3. THEN return FALSE, ELSE FOR each edge ei = (vil, vi2) DO BEGIN _ _ _ .. .
IF (Pj(vi1) < 0 and Pj(vi2) < 0)j = 1 or 2 or 3. THEN ei does not intersectfeature ELSE Find PT1, PT2 and PT3 where Li intersect P1, P2 and P3. IF P3(PT1) > 0 or P3(PT2) > 0 THEN ei intersect feature ELSE IF P3(PT1 < 0 and P3(PT2) < 0 THEN ei oes not intersect END IF none of ei intersect feature, THEN return FALSE ELSE return TRUE
d
END User Interface A graphical user interface is also designed and implemented for a user to visualize the 3.7
proceeds, after the cavities are extracted, the second screen display shows the four views of the cavities of the object; that is, only the faces belong to cavities are displayed. In addition, each IFFS will be displayed using different color. The recognition results as well as other intermediate representations and data (such as: Global Graphs, EFS, IFFSs and SRGs), are stored in a file. 4.0
Conclusions
A novel method, super relation graph (SRG) method,.to recognize machinable features in solid models and Its verifications are discussed in this paper. The envelope concept
136
is used to find the faces for constructing SRG. The recognizer uses the graph-based techniques combined with neural networks approach to generate feature hypotheses. Two new relations, super-concavity and face-to-face relation, between faces are defined in this paper. The generated hypotheses are then verified using computational geometry methods which perform the interference checkin between a feature hy thesis and facets in the same cavity itsel. The final output of t e feature recognizer is a decomposition of the cavity volume into a set of volumetric primitive features. The system is implemented in Borland C t t and is successfully integrated to I-DEAS VI solid modeling systems. The SRG method provides alternate feature interpretations which are useful to the optimization of process planning. The feature hypothesis elimination module, which checks the interference of the feature volume and object, not only verify the validity of a feature but also guarantees the tool accessibility. Although the proposed SRG method successfully recognizes interacting features, there are some limitations for the method. Only depressions are considered in this paper. Protrusions and protrusions in a de ression (such as a boss in a slot) are not considered. The S G method recognizes interacting features successfully in the case of orthogonal interaction. For nonorthogonal interactions, the SRG method only requires straightforward extension to the feature hypotheses verification module. The problem domain of prismatic parts can be easily expanded to include circular faces by adding more primitive feature types.
P
R
rFERENCES
1) de Floriani, L., 1987, Graph Based Approach to Object eature Recognition, Proceedings of Third ACM Symposium on Computational Geometry, Waterloo. (2) Henderson, M. R., 1984, Extraction of Feature Information from Three Dimensional CAD Data, Ph.D. Dissertation, Purdue Univ. 3) Hwang, J. L. and Henderson, M, 1991, Ap lying the berceptron to 3-D Feature Recognition, in Intelligent nqineering Systems Through Artificial Neural Networks, Dagli, C. H., Kumara, S. R. T. and Shin Y. C. eds., ASME Press, 10-13.
P
(4) Jakubowski, R., 1982, Syntactic Characterizationof Machine Parts Shape, Cybernetics & System: An International Journal, 13(1):1- 24. (5) Kao, C.-Y., 1992, Geometric Reasoning Using Super Relation Graph Method for Manufacturing Feature Recognition, M.S. Thesis, PennsylvaniaState University. (6) Lee, K. I., Lee, J. W. and Lee, J. M., 1989, Pattern Recognition and Process Planning of Prismatic Workpieces by Knowledge Based Approach," Annals of the CIRP, 38(1):485488.
(7) Marefat, M. and Kashya , R. L., 1990, Geometric Reasonin for Recognition of Three-fimensional Object Features, IEE Transactions on Pattern Analysis and Machine Intelligence, 12(10): 944965.
1
(8) Nna'i, 8. 0. and Kang, T.-S., 1990, "Interpretation of CAD Model hrough Neutral Geometric Knowledge," Al EDAM, 4(1): 15-45.
t
(9) Rumelhart, D. E., Hinton, G. E. and Williams, R. J., 1986, Parallel Distributed Processing: Explorations in the Mocrostructure of Cognition, Vol. 1, MIT Press, Cambridge. (10) Scholenius, G., 1992, Concurrent Engineering, Keynote paper, Annals of CIRP, 41(2): 645-655. (11) Vandenbrande, J. H., 1990, Automatic Recognition of Machinable Features in Solid Models, Ph.D. Dissertation, University of Rochester.