You are on page 1of 13

PII: S0010-4485(98)00033-5

Computer-Aided Design, Vol. 30, No. 9, pp. 727739, 1998


q 1998 Elsevier Science Ltd. All rights reserved
Printed in Great Britain
0010-4485/98/$19.00+0.00

Automatic recognition of
interacting machining features
based on minimal condition
subgraph
S Gao and J J Shah*

Convex hull

This paper presents a methodology for efficiently recognizing both


isolated and interacting features in a uniform way. The conventional,
graph-based recognition method is combined with hint-based feature
recognition to recognize and extract alternative interpretations of
interacting features. First, all isolated (non-intersecting) features are
recognized based on a Manufacturing Face Adjacency Graph.
Interacting features are then recognized based on the features
minimal condition subgraph (MCSG) that is used as a feature hint.
Unlike previous hint-based recognition methods, the MCSGs of all
features are defined, generated and completed in a uniform way,
independent of the feature type. Hints are defined by an Extended
Attributed Adjacency graph, generated by graph decomposition and
completed by adding virtual links, corresponding to entities lost by
interactions. An efficient algorithm for generating virtual links is
developed. A new classification of feature interactions is also
presented. q 1998 Elsevier Science Ltd. All rights reserved

Extended attributed adjacency


graph (EAAG)
Feature interaction

Feature
General feature
Hint
Interacting feature
Isolated feature
Isolated island

Keywords: feature recognition, feature interaction, graph


matching, machining feature
Machining feature

Definitions and nomenclature


Manufacturing face adjacency
graph (MFAG)

Access direction

direction from which a cutter can


access a machining volume in order
to cut it
Attributed adjacency graph (AAG) a graph whose nodes are faces, arcs
are face adjacencies, and arc attributes are edge convexity flags
CH-face
a face common to the part and its
convex hull
Concave adjacency graph (CAG)
a connected subgraph of PCAG in
which all arcs are concave
Concave edge
an edge,is concave if the solid angle
between its incident faces is greater
than 1808. The incident faces may be
planar or quadric

Merged face
Minimal condition subgraph
(MCSG)
Obstacle face

Open pocket
Partly concave adjacency graph
(PCAG)
Predefined feature

*To whom correspondence should be addressed. Tel: 001 602 965 6145;
Fax: 001 602 965 2412; e-mail: jami.shah@asu.edu
State Key Laboratory of CAD and CG, Zhejiang University, Hangzliou,
Peoples Republic of China
Mechanical and Aerospace Engineering, Arizona State University,
Tempe, AZ 85287, USA
Paper Received: 15 September 1997. Revised: 20 April 1998. Accepted: 20
April 1998

Stock face
Stock
Support surface

727

the smallest convex polyhedron


containing all points in a part
an AAG with 5 arc attributes and 5
node attributes
intersections between feature
boundaries that result in altering their
characteristic topology and/or
geometry
stereotypical geometric shapes
associated with some engineering
significance
those types of features whose
topological entity numbers are not
fixed
a features topological and/or
geometric entities left in the nominal
geometry of a part after an interaction
a feature intersected with some other
feature
a feature without any interaction with
other features
a protrusion put on the bottom face of
a feature, not touching any other
feature faces except the bottom face
of the feature
a continuous volume that can be
removed by a single machining
operation in a single set-up
an AAG without any node
corresponding to a convex hull or
stock face
a face shared by more than one
feature
the maximal sub EAAG of a feature
which remains in the EAAG of the
part
the closest face to a feature that
prevents a cutter from accessing the
feature along its locally accessible
direction
a pocket with more than one accessible direction
a concavely connected subgraph of
MFAG
one that has a fixed topology and has
been defined in a library
a face of the part coincident with
some face of the stock of the part
raw material from which a part is
machined out
the surface to which the face is
attached

Automatic recognition of interacting machining features: S Gao and J J Shah


Unproductive edge
Unusable virtual link

Virtual link (VL)

extension of such an edge will either


generate no virtual link or an
unusable one
a virtual link that can only be used to
extend a predefined feature into a
larger open pocket or nonsense
feature
a face adjacency relationship
representing an edge deleted by
feature interaction

INTRODUCTION
Seamless and effective integration of CAD, CAPP and
CAM is increasingly demanded by manufacturing industries. To realize this, an intelligent interface between CAD
and CAPP is imperative, since CAPP expects part
representation in terms of manufacturing features, whereas
CAD describes parts by their solid model or design features.
Feature recognition enables such an interface between CAD
and CAPP. Feature recognition can be used to find
manufacturing features of a part from its solid model.
Much research has been conducted in this area and many
feature recognition approaches have been proposed 14.
One important type of feature recognition method, called
graph-based recognition, recognizes features by matching a
feature graph to the appropriate subgraph, in a graph representation of the part. The advantages of graph-based recognition are: (1) it is applicable to many domains not just
machining; (2) it allows the user to add new feature types
without changing the code; (3) it is suitable for incremental
feature modeling 5; and (4) it can recognize isolated features
effectively. On the negative side, feature interaction and
multiple interpretations of features cannot be handled well
with graph-based recognition.
The major objective of this paper is to develop a new
graph-based recognition method which can satisfy the
following three conditions: recognize features in several
common situations, involving a variety of feature interactions with one general purpose algorithm; produce alternative feature interpretations; and provide reasonable
computational efficiency. To satisfy these conditions, we
combine the conventional graph-based recognition method
with the hint-based feature recognition. To recognize interacting features we use the minimal condition subgraph
(MCSG) as a feature hint. The MCSGs for features are
defined by an extended attributed adjacency graph
(EAAG), which is generated by graph decomposition and
completed by adding related virtual links in a uniform way,
independent of feature type. The concept of a manufacturing
face adjacency graph (MFAG) is introduced to improve the
efficiency of recognizing isolated features and to reduce the
search space for virtual links, unifiable faces and features.
Also, an algorithm is devised to speed up the generation of
virtual links.
The paper is organized as follows. In the second section
we review the previous work in manufacturing feature
recognition. The third section introduces some new concepts used in our work and gives an overview of our
approach. The fourth and fifth sections give details of the
recognition procedure for isolated and interacting features,
respectively. The generation of alternative interpretations of
interacting features is described in the sixth section. The
implementation and testing are given in seventh section.
Finally, the advantages and limitations of our approach
are discussed in the eighth section.

728

LITERATURE REVIEW
In the area of feature recognition, many techniques have
been proposed and implemented. For a comprehensive
review of feature recognition the reader is referred to
Refs 14. Here, we focus on the work that is more closely
related to our approach, namely, the recognition of
interacting features, particularly graph-based and hintbased recognition.
The approach presented by Joshi and Chang in Ref. 6, can
be considered typical of graph-based feature recognition
methods, in which both the part and the features are represented by attributed adjacency graphs (AAG). Features are
recognized by matching feature patterns to patterns in the
parts AAG. The approach given in Ref. 6 can break down a
large search space by graph decomposition and can deal
with two specific types of feature interactions by heuristics.
However, their graph decomposition is not always correct
and it may lead to the loss of some types of features like
chamfers and T-slots.
Marefat and Kashyap 7,8 developed a graph-based recognition technique, which is the first attempt to treat general
feature interactions based on the generate-and-test paradigm
and the virtual link concept. They define features by cavity
graphs, which extend a features AAG to include some geometric constraints on the orientations of the feature faces.
To recognize interacting features, they first recover virtual
links using an AI technique and add them into the cavity
graph of the part, then they generate all hypothesized features by subgraph matching. The incorrect hypotheses are
then eliminated by rule-based experts. Some problems with
this method include: (1) it does not always find all the
necessary virtual links, and sometimes determines incorrect
virtual links 9; (2) there are many incorrect feature hypotheses that need to be eliminated. Although the geometric
constraints in the features cavity graph can effectively
eliminate many incorrect feature hypotheses, the cavity
graph representation of the feature limits the method to
polyhedral objects; and (3) there is no evidence that the
method can be extended to generate volumetric features
and multiple interpretations of features.
Trika and Kashyap 9 extended Marefats work in the generation of virtual links and the verification of feature
hypothesis. They generated virtual links by exact geometric
computation rather than uncertainty reasoning, and verified
feature hypotheses satisfying the features cavity graph by
checking the regularized intersection of the feature volume
and the part. They demonstrated that their method is tractable and complete over seven basic classes of features and
iso-oriented polyhedral parts. However, both the part
domain and the feature classes are limited to iso-oriented
polyhedral parts and seven basic machining feature classes
(step, blind step, slot, blind slot, prismatic hole, pocket and
enclosed box). Only single interpretations of features can be
extracted. The virtual link generation algorithm is not efficient, as observed from the execution times given in Ref. 9.
Vandenbrande and Requicha 10 proposed the hint-based
feature recognition approach. A feature hint is defined as
a features geometric entities left in the nominal geometry of
a part after an interaction. For example, a pair of parallel
opposing faces is a hint that a slot may be present. To
recognize arbitrarily interacting features, they first extract
all the feature hints by searching the B-reps of the part, then
test them for validity through geometric completion procedures, that attempt to construct the largest volumetric

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 1

A part and its EAAG

feature based on a variety of AI and computational geometry


techniques. Finally, they represent a features interaction with
others by segmenting the feature into optional and required
volumes. This approach deals with feature interactions in a
general manner. However, since the hint generation and completion algorithms in this approach are not general, but
depend on the specific feature type, new algorithms need to
be developed and added to the system in order to recognize
new, user-defined feature classes. Usually, many hints need
to be explored for almost every feature class, which may
become cumbersome for some feature classes like a dovetail
slot. Han and Requicha extended Vandenbrandes work in
Refs 4,11. A reasoning method for rating and prioritizing the
hints was added to further reduce the possibilities to be
explored and the order in which to explore them.
The hint-based feature recognition method has also been
investigated by Regli and Nau 12,13. Their approach
addresses a class of machinable features expressible as
MRSEV (material removal shape element volumes). The
problem is that all the prismatic cavities are classified as
pockets in this method, which makes it difficult to machine
some types of features such as T-slots with methods particularly efficient for them. As with Vandenbrandes work,
there are also many hints needed.
The volume decomposition method is also popular 3,1418.
It generally decomposes the removal (machining) volume
into convex cells first, then combines the cells to generate
machining features based on some rules. This method is
good at dealing with arbitrary feature interactions and generating multiple interpretations of features. However, it also
has some disadvantages, such as computational complexity
and, in some cases, inability to generate nonconvex delta
machining features.

BASIC CONCEPTS AND OVERVIEW OF


APPROACH
Before outlining our minimal condition subgraph approach,
we need to define some basic concepts.

Subgraph definitions
Attributed adjacency graph
The idea of attributed adjacency graphs (AAG) was
proposed by Joshi and Chang, and Falcidieno and De

Floriani in Refs 6,19,20. The nodes of an AAG represent


faces, arcs represent edges, and the attribute of the arcs is a
Boolean variable to represent edge convexity. A part and its
AAG are shown in Figure 1. The AAG of a pan can be
easily derived from the parts B-reps, and is more suitable
for feature recognition than the raw B-reps.
Extended attributed adjacency graph (EAAG)
In order to enable an AAG to support feature recognition
more effectively, we need to extend the AAG by adding
several edge and face attributes. The new edge attributes are
associated with the graph arcs and the face attributes with
the nodes of the graph, as shown in Table 1. These
attributes, like the convexity attribute, are Boolean variables. The extended attribute adjacency graph contains five
attributes: convexity, existence, loop, geometry and blend
type. These are defined in Table 1. The definition of a
smooth edge is that its incident faces must have C 1
continuity. The face attributes stored with the nodes are of
five types, as listed in Table 1. The source attribute of the
node represents whether the face coincides with a face of the
stock or not. Since stock faces are not machined, they are
eliminated. The convex hull (CH) attribute specifies
whether the given face coincides with a face of the
convex hull of the part or not. Since we have aimed our
approach at machining features. the B-reps of both the part
and its stock are used as the input to our program. Also, note
that the stock is not necessarily the convex hull of the part.
The other node attributes include: number of loops in the
face; split status, which signifies whether the node
represents a unifiable face; and face geometry, whether
planar or non-planar. As will be explained throughout this
paper, these attributes play a role in either repairing the
effects of interactions, or recognizing specific feature types.

Table 1 Attributes stored in EAAG


Arc (edge) attributes

Node (face) attributes

Convexity: convex or concave


Existence: real edge or a virtual
edge
Loop type: edge is on an inner or
an outer loop
Geometry: curved or straight edge
Blend type: smooth or sharp

Source: stock or part face


Convex hull: CH-face or nonCH-face
No. of loops: single or multiple
Split status: unifiable or not
Geometry: planar or nonplanar

729

Automatic recognition of interacting machining features: S Gao and J J Shah


Table 2 Attribute values for selected entities of Figure 1
Face no.

Source

CH

No. of loops Split

Geom.

Edge no.

Convex

Exist.

o_loop

Blend

f0
fl
f2
f

T
T
F

T
T
F

1
1
1

P
P
P

f 0 f 1
f 2 f 3
f 3 f 6
ff

T
F
F

F
F
T

T
T
T

T
T
T

Figure 2

T
T
F

Two MFAGs contained in the part in Figure 1

For example, the existence and the split status attributes are
used in repairing; the number of loops and loop type help
identify islands; edge blend type and edge/face geometry
help classify feature types. Table 2 gives attribute instances
for a few of the faces and edges of the model of Figure 1.
Although the illustrations of EAAG in this paper only show
the convexity attribute for simplicity of drawing, the other
EAAG attributes are equally important for our algorithm.
Manufacturing face adjacency graph
The manufacturing face adjacency graph (MFAG) is defined
as a connected subgraph of the EAAG of a part, in which no
node represents either a stock face or a CH-face. It can be
easily observed that a parts EAAG usually contains more
than one MFAG, and all MFAGs of the part can be derived
by simply deleting all the stock faces, all the CH-face nodes,
and all the incident arcs to them from the parts EAAG. Two
MFAGs contained in the part EAAG of Figure 1 are shown
in Figure 2. In this example, the stock of the part is assumed
to be the convex hull. The EAAG contains 16 faces; there
are seven faces that are coincident with the stock/CH (f 0, f 1,
f 7, f 12 f 15); when these seven are removed we obtain two
disjointed graphs, as shown in Figure 2. These are the
MFAGs of the part. The significance of MFAG is that it can
be used to reduce the search space for depression features
effectively. Specifically, searching for depression features
can be restricted in each MFAG, according to the
observation that the EAAG of depression features of a
part is always contained in one and only one MFAG of the
part, because the depression feature consists of a set of
connected nonstock and non-CH faces of the part. It should
be pointed out that when the stock of the part is larger than
the convex hull of the part, there must be some faces that are
CH-face but not stock face of the part. Since each CH-face
that is not a stock face forms a single face feature and is easy
to recognize, we exclude them from MFAGs with the help
of the CH-face attribute.
Partly concave adjacency graph
The partly concave adjacency graph (PCAG) is defined as a
concavely connected subgraph of MFAG, which means that
for every pair of vertices in the subgraph, there is a path
between them, and every arc of the path is concave. Note
that a single node which has only convex arcs is a special
PCAG, according to the definition of PCAGs; we will refer
to it as a single face graph (SFG). In addition, we can easily
observe that the EAAGs of non-convex pockets, open
pockets and some interacting features, are PCAGs.
730

Therefore, we will use PCAGs in MFAGs as hints of


these kinds of features. Two PCAGs contained in the MFAG
of Figure 2b are shown in Figure 3.
Concave adjaceny graph (CAG)
The concave adjaceny graph (CAG) is defined as a
connected subgraph of PCAG, in which all arcs between
the nodes of the subgraph are concave. Obviously, a SFG is
a also a special CAG. It can be readily observed that the
EAAGs of almost all basic machining features, including a
step, blind step, slot, blind slot, hole, convex pocket,
chamfer, etc., are CAGs. Therefore, it is prudent to use
CAGs in MFAGs as hints of pre-defined features. The two
PCAGs shown in Figure 3 also happen to be CAGs, but the
PCAG shown later in Figure 7b is not a CAG. Note that the
difference between CAG and PCAG is that PCAG may
contain convex arcs, while CAG cannot.
Minimal condition subgraph
The MCSG (minimal condition subgraph) of a feature is
defined as the maximal sub-EAAG of a feature which
remains in the EAAG of the part. An example MCSG is
shown in Figure 4b for the slot (f 2, f 3, f 6) of Figure 1a. Also
shown are the EAAG before and after the interaction; the
lost concave edge is shown by a dotted line in Figure 4c.
The feature MCSG defined above have the following
properties:

Every feature of the part has at least one non-empty


MCSG.
MCSGs of different feature instances of the same feature
class may be very different, depending on how they
interact with other features. If a feature instance does
not interact with any other features, its MCSG is the
same as its EAAG. In the worst case, if a feature instance
interacts with many features, its MCSG may degenerate
to one EAAG node.
Feature MCSG is defined independent of the feature
type, which provides the possibility of dealing with the
MCSGs of all kinds of features with the same procedures.

Figure 3 Two PCAGs contained in the NIFAG shown in Figure 2b

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 4

Illustration of the MCSG of the slot (f 2, f 3, f 6) contained in the part in Figure 1a

Figure 5

Feature interaction classification

Interacting features
Two volumetric features are defined as interacting features
if their boundaries intersect, so that they share a non-empty,
common volume. More than two volumetric features are
called interacting features if every one of them interacts
with at least another one and all of them form a connected
volume. We classify feature interactions into six categories
according to three types of topology variations caused by
feature interaction: merging of faces, loss of concave edges,
and splitting of faces. Merged faces are those that are shared
by more than one feature. To completely cover all
combinations of the above three conditions would require
eight types of feature interactions. However, two combinations are impossible because both split face and lost concave
edge cannot be true simultaneously; this reduces the
possible types to six, as shown in Figure 5 and Table 3. It
should be noted that there is no direct correspondence
between our six interaction classes and the two interaction
types identified by Joshi and Chang 1.

Virtual links
A Virtual link (VL) is defined as a face adjacency
relationship not contained in the parts B-reps as a result
of feature interaction. Such links are useful for recognizing
interacting features by the graph-based method. Four types
of VLs were identified and used in this work.
Type (a): let f 1 be a planar or cylindrical face and f 2 be a
planar face of the part. If f 1 is completely in the positive
half space of f 2, while f 2 is just partly in the positive half
space of f 1, and the extension of f 1 intersects f 2, as
shown in Figure 5e, then we set up a virtual link
between f 1 and f 2 and define it as type (a). In addition,
f 1 is called the extension face of the virtual link.

Table 3 Classification of feature interactions


Feature type

Merged faces

Lost concave edge

Split faces

I
II
III
IV
V
VI

N
N
N
Y
Y
Y

N
N
Y
N
Y
N

N
Y
N
N
N
Y

Type (b): let f 1 and f 2 be two planar faces of the part. If


both f 1 and f 2 are completely in the positive half space
of each other, and the extensions of f 1 and f 2 intersect
each other, as shown in Figure 5c, then we set up a
virtual link between f 1 and f 2 and define this link as
type (b).
Type (c): let f 1 be the face shared by two different
features. Then, f 1 is split into two faces f 1 and f9 1 by
virtual edges, so that f 1 and f9 1 are completely contained
in different features, as shown in Figure 5d. For each
virtual edge we set up a corresponding virtual link
between f 1 and f9 1 and define this link as type (c).
Type (d): let f 1 and f 2 be two planar faces of the part. If
both f 1 and f 2 are adjacent to the same cylindrical face
along two smoothly concave arcs (the cylindrical face
here is a fillet feature), then we set up a virtual link
between f l and f 2 and define this link as type (d).

Unifiable faces
Unifiable faces are a set of faces satisfying the following
two conditions: (1) all faces are on the same surface and
with the same orientation, and (2) each face of the set can be
extended along one of its edges to touch an edge of another
face of the set without intersecting any face not in the set. As
an example, f 1 and f 2 in Figure 5b are unifiable faces. It
should be pointed out that although some commercial solid
modelers can unify the faces, satisfying the first condition
mentioned above, they do not check if these faces satisfy the
second condition. An algorithm for searching unifiable faces
is developed based on similar techniques used in the virtual
link generation algorithm (see Recognizing Interacting
Features section).

Minimal condition subgraph approach: overview


Based on the above concepts, we present a new approach for
automatic recognition of machining features from the B-rep
solid models. The part domain consists of parts with planar
and quadric surfaces. In our approach, features are divided
into two groups: predefined and general. Predefined features
include step, blind step, slot, blind slot, T-slot, hole, blind
hole, chamfer, etc. These are stored in the library of
predefined features. The general features group comprises
compound features, general pocket, through pocket and
open pocket; these are stored in a heuristic rule library. The
731

Automatic recognition of interacting machining features: S Gao and J J Shah

Decompose the part EAAG into separate MFAGs by


deleting all the stock face nodes and all their incident
arcs from the parts EAAG.
For each MFAG, check if there are type (d) virtual links;
if so, set up the virtual links first, then mark all corresponding cylindrical face nodes as fillets and exclude
them from the MFAG.
Check each MFAG to see if it matches the EAAG of a
certain feature; if so, mark it as a MCSG of the isolated
feature.

We first match the MFAG with the EAAG of every feature in the predefined feature library one by one. If it does
not match any of them, it is checked further by every rule in
the heuristic rule library sequentially, to determine if it has
the characteristic pattern corresponding to one of the general features. Owing to space limitations, we will only
describe the heuristic rule for a pocket as an example. The
characteristic rule is as follows:
if there exists a node in the MFAG, each arc of which is
concave, and all other nodes of the MFAG are adjacent
to it, then this MFAG corresponds to a pocket.
Figure 6

Overview of recognition algorithm

feature representation consists of the features EAAG,


feature parameters, access directions, obstacle faces,
isolated islands, parameter extraction methods, interacting
features, etc. As the specific EAAG of each feature is
defined in a similar way to that in Ref. 6 (except for the
additional attributes), they are not discussed further.
The major steps in our approach are shown in Figure 6.
The inputs to the program are the B-reps of the part and the
stock to be used. In our current implementation, these are
ACIS 2.0 .sat files. The program can be conceptually
thought of as consisting of six main phases:
(1) Pre-processing: constructing AAG, finding the edge and
face attributes and constructing EAAG; splitting them
into a set of MFAGs.
(2) Recognizing isolated features.
(3) Recognizing interacting features.
(4) Completing interacting features.
(5) Determining one interpretation for each set of interacting features; producing alternative interpretations on
demand.
(6) Creating the feature model (data structure) of the part.

RECOGNIZING ISOLATED FEATURES


An isolated feature is a feature instance that does not
interact with other features except the CH-face feature
instance. If a general feature, such as a compound slot, does
not interact with any other feature, it is also considered an
isolated feature, called an isolated general feature. According to the MCSG definition and the properties of the isolated
feature, it can be easily observed that the MCSG of the
isolated feature has two characteristics. One is that it is the
same as its features EAAG. The other is that it is separated
from other nodes of the parts EAAG by the convex arcs
linking its nodes and stock face nodes. Based on these two
observations, we generate the MCSGs of all isolated
features of the part in three steps:
732

Since isolated features are completely determined by


their MCSGs, the MCSG completion makes no sense for
them. Therefore, we can set up their feature representation
as soon as their MCSGs are generated. In this way, all types
of isolated features, including compound features, general
pocket, chamfer, T-slot, etc., can be recognized first in a
more efficient manner, which is consistent with human perception. Multiple interpretations of isolated general features
are produced by heuristic rules for general features. Since
isolated general features are special cases of interacting
features, they may sometimes be machined as single
features.

RECOGNIZING INTERACTING FEATURES


If a MFAG does not correspond to an isolated feature, it is
assumed to represent a group of interacting features; the
MFAG may contain more than one features MCSG. We
generate these MCSGs by graph decomposition. This is
followed by completion of the interacting feature by adding
lost entities back.

Generation of MCSGs
In order to generate all the interacting feature MCSGs
contained in a MFAG, we decompose the MFAG into
separate PCAGs first. This is based on the observation that
interacting features MCSGs are always PCAGs (in some
cases, a PCAG could itself be a CAG). Before decomposition, all unifiable faces in the MFAG are determined, and
each of them is treated as one node of the MFAG, to ensure
that the maximal MCSGs can be found. The specific
decomposition method is simple. The PCAG partition of the
MFAG is obtained as follows: (1) choose an arbitrary node
of the MFAG as the first node of the first PCAG, and
complete the PCAG by iteratively extending it to include all
those nodes of the MFAG which have at least one concave
arc with one node of the PCAG; and (2) construct other
PCAGs similarly until the union of all PCAGs is equal to the
MFAG. It can be easily observed that the above PCAG
partition of the MFAG is unique. After decomposition, each

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 7

A part with merged faces and its MFAG and PCAG

PCAG of the MFAG is checked to see if it is a CAG or if it


corresponds to a general feature. If any of these is true, it is a
feature MCSG and pushed on the MCSG stack; otherwise it
is not a feature MCSG. We observe that a PCAG is not a
feature MCSG when it contains one or more merged faces
caused by type IVVI feature interactions. Therefore, we
decompose such a PCAG into separate CAGs by splitting
relevant merged faces, so as to generate all the feature
MCSGs involved. The specific algorithm consists of
following four steps. Here, we take the part as well as its
MFAG and PCAG shown in Figure 7 as an example to
illustrate the algorithm.
Find the primary merged faces of the PCAG
We first find all the convex arcs between the nodes of the
PCAG. As the given PCAG is not a CAG, there exists at
least one such convex arc, similar to e in Figure 7a. Denote
each convex arc by C i, and let f i and f9 i be the two adjacent
faces of C i. Let F i and F9 i be the faces having concave arcs
with both f i and f9 i. Note that both F i and F9i may not exist.
Check if F i and F9 i do exist; if one of them exists, we call
{fi , f9 i, F i, F9i } the tetrad of Ci and store it; otherwise Ci is
not taken into account. All of the existing F i and F9 i
comprise primary merged faces.
In the example, e is a convex arc, primary merged faces
consist of F 3 and F 4, and the tetrad of e is {F 5, F 6, F 3, F 4}.
Split all related merged faces of the PCAG
To split F i and F9 i effectively, we first choose the split face,
S i, between f i and f9 i, based on the following two principles:

S i is involved in more tetrads of the PCAG.


S i has more faces of the PCAG intersecting its support
surface.

All the relevant merged faces are split, including F i and


F9 i, as well as those faces which have concave arcs with F i

Figure 8

or F9 i and intersect the S is support surface. Note that those


tetrads having the same F i and S i with a previous tetrad are
ignored.
For our example, either F 5 or F 6 can be selected as a
proper split face. Suppose we choose F 5 as the split face,
then F 3, F 4 and F 2 are split, as shown in Figure 8a.
Modify the PCAG
After a face F of the PCAG is split, a new node F9
corresponding to the new generated face is inserted into the
PCAG, together with a convex virtual link [type (c) VL]
between F and F9. All the old arcs between F and other faces
are rebuilt according to the new adjacency relationship
between F, F9 and those faces. In addition, a concave virtual
link [type (a) VL] is set up between the split face and the
nonprimary merged face split by it.
After this step, the PCAG shown in Figure 7b is changed
to the graph depicted in Figure 8b.
Obtain CAG
At this stage, the PCAG should be the union of separate
CAGs. Now all the CAGs of the PCAG can be obtained
readily with a method similar to that of obtaining PCAGs
from MFAG. Figure 9 shows two CAGs derived from the
PCAG of Figure 7b.

MCSG completion
The interacting feature MCSGs generated by the algorithm
given in the last section, need to be completed. By
completion we mean finding and adding the lost parts of
the EAAG caused by feature interactions. The lost part of an
interacted features EAAG consists of lost nodes and lost
concave arcs [type (a) or (b) virtual links]; that is, there are
no such arcs in the parts EAAG. These lost arcs have to be

Splitting of the merged faces in Figure 7

733

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 9

Two CAGs derived by decomposing PCAG of Figure 7b

recovered. The lost nodes are just disconnected with the


MCSG and can be easily found after lost concave arcs are
recovered. The MCSG completion algorithm consists of two
stages: generate all virtual links, and construct the
completed feature for the MCSG. Each of these is discussed
in this section.
Phase 1 generate all virtual links of the MCSG
Trika and Kashyap 9 have shown that those, and only those
face pairs that satisfy the following two conditions can form
type (a) or (b) virtual links:

Condition 1: the two faces are not connected and can be


extended to intersect each other.
Condition 2: the two faces are, at least partly, in the
positive half space of the each other.

Therefore, to generate all virtual links we simply need to


find all face pairs that satisfy the above two conditions.
Determining whether two faces can be extended to intersect
each other is time-consuming. Therefore, it is advisable to
reduce the search space. Instead of taking the set of all
nonparallel face pairs of the part that are not concavely
connected, as the search space for virtual links used in
Ref. 9, we achieved reduction by adding another two necessary conditions:

Condition 3: both faces must be nonstock faces and in


the same MFAG.
Condition 4: at least one of the two faces contains one or
more convex edges shared with another nonstock face.

In addition, we also exclude, in advance, all face pairs


which can only form unusable virtual links, which are defined
as those that will only extend a predefined feature to a larger
open pocket or a nonsense feature. The virtual link (VL)
between F 1 and F 5 in Figure 10 is an example. Obviously,
it can be only used to extend the blind slot {F 1, F 2, F 3, F 4} to
a larger open pocket. The specific algorithm for generating all
virtual links of the MCSG is described below.
Assume the face set of the given MCSG to be {F i, i
1,m} and the face set of the MFAG to which the MCSG

Figure 10 Virtual link generation

734

belongs to be (M j, j 1,n}. First we assume m . 1, we will


discuss the case of m 1 later. We present now on the
algorithm for generating all virtual links related to a given
face of the MCSG, since all virtual links of the MCSG are
just the sum of the virtual links of all its faces. Assume F i to
be a given face of the MCSG, and let {E k, k 1,N} be the
set of all convex edges shared by another nonstock face of
F i. Suppose F ik is the adjacent face of F i along E
k. To find all virtual links of F i, we extend it along each
useful E k and determine the first face it can intersect. The
algorithm is divided into two steps.
Eliminate all unproductive E k. Firstly, a convex edge E k is
considered unproductive if no virtual link, or only unusable
virtual links, can be obtained by extending F i along E k (see
previous paragraphs for a definition of unusable VL). Every
E k in {E k, k 1, N} is checked as follows to see if it is
unproductive or not.

If F i is a unifiable face along E k, or E k has been used in


generating this MCSG, or E k smoothly convex, then E k
is unproductive and eliminated from {E k, k 1,N} for
no virtual link can be generated based on the E k.
If E k coincides with a concave edge between F i and
another face, say F j, then the only usable virtual link
that might be generated by extending E k must be the
adjacency relationship between F i and F j, which is
obviously not a virtual link. Therefore, E k is unproductive and eliminated from (E k, k 1,N}.

Determine the first face that F i can intersect by extending F i


along each useful E k. Secondly, to illustrate this algorithm,
we use the part in Figure 1 as an example. Take f 11 as F i,
take e as E k, then f 10 corresponds to F ik.

First, every M j (j 1,n) is checked to see if both Mj and


F ik are in the positive half space of the other face; if so,
the M j is pushed onto a stack S.In the example, after this
step, the stack S contains three faces, i.e. f 2, f 4 and f 8.
Next, all faces in S are sorted according to their distance
to F ik. Here, the distance between F ik and the face in S is
defined as follows: if two faces are parallel, it is the
normal distance between two faces. Otherwise, it
refers to the distance between the midpoint of E k and
the intersection point between an auxiliary line and the
face in S. If F i is a planar face, the auxiliary line takes the
midpoint of E k as its root point and the cross product of
the direction of E k, and the normal of F i as its direction;
if F i is a cylindrical face, the auxiliary line is the same as
the axis line of F i.The stack S of the example is now
sorted as f 8, f 4, f 2.
Next, starting from the face closest to F ik, each face S i in
S is checked in order to see if it can be intersected by the
extension of F i along E k. If both S i and Fi are planar, we
first project them on the intersection line between their
corresponding surfaces, then check if the two projections share a common segment. If F i is a cylindrical
face, we check if the intersection between S i and the
surface of F i exists. If so, and S i is not adjacent to F i,
a virtual link n between F and S i is determined. If there is
no such virtual link in the current virtual link list, then it
is added into the virtual link list and its data structure is
set up. The VL data structure consists of its type and two
face pointers. Finally, the type of n is determined. If S i is
totally in the positive half space of F i, n is a type (b)
virtual link; otherwise it is a type (a) virtual link. After n

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 11 The extended MCSG of an one node NICSG

is determined, all the faces left in S need not be checked


further.In this step, only f 8 in S of the example is
checked, and a type (a) virtual link between f 11 and f 8
is added to the virtual link list.
Finally, if n is a type a virtual link, by the coherence,
those virtual links between the S i and those faces in {F j,
j! i} that have convex arc with F ik are also determined
without going through the above process. Observe that,
after all virtual links of the MCSG have been generated,
every type (b) virtual link among them needs to be
checked further, because it still may be an unusable
virtual link and should be eliminated. The specific
method is simple, so we do not describe it here.

To illustrate this step, it is better to take the part in


Figure 10 as an example. Suppose a type (a) virtual link
between F 1 and F 4 in Figure 10 has been identified. Then
the virtual links between F 4, F 2 and F 3 will be identified by
coherence without any calculation.
Degenerate MCSG. Now we consider the special case of an
MCSG comprising of only one face node F with m 1.
Since it is reasonab1e for it to correspond to an open pocket,
all its virtual links are useful and need to be found in order to
complete it correctly. First we find a virtual link between F
and another face, F9 by extending F along one of its convex
edges by the same method described above. Next, we
continue to look for other possible virtual links between F
and other faces based on coherence. We check all the faces
adjacent to F9 to find those faces that are adjacent to F9
along an edge intersecting the support surface of F. We
then set up virtual links between these faces and F. This
process is repeated until all the faces having virtual links
with F have been processed.
Phase 2 construct the corresponding feature for the
MCSG
After all virtual links of an MCSG have been generated, we
start to construct its corresponding feature, based on our
virtual link classification. Assume that the MCSG contains
more than one face node. The construction process consists
of three steps:

Extend the MCSG based on all its virtual links as follows. For each virtual link V, if it is type (a) and its

extension face is a node of the MCSG, then V together


with its other face node is added to the MCSG; if V is a
type (b) virtual link, then if both its face nodes are nodes
of the MCSG, just V itself is added to the MCSG; otherwise, another MCSG which contains another face node
of V is merged with the current MCSG. This extended
MCSG is equal to the EAAG of the corresponding feature of the MCSG. Taking the slot (f 2, f 3, f 6) in Figure 1a
as an example, its MCSG is shown in Figure 4a, and the
extended MCSG is the same EAAG as shown in Figure
4c, which corresponds exactly to a slot.
Determine the type of the corresponding feature of the
MCSG by sequentially matching the extended MCSG
with all predefined features and heuristic rules.
Generate the volume of the corresponding feature by
directly invoking the volume generation procedure of
the feature. For each generic predefined feature, the feature volume is generated by simply intersecting the
stock using the positive half space of every feature
face. Note that the volume generated in this way is the
maximal volume of the feature; the volumes of the
interacting features may share some common volume,
which is not good for manufacturing efficiency if, for
example, NC tool paths are generated for each interacting feature separately. However, this is not a real concern because these volumes are just the intermediate
result. The final feature model of the part is generated
by the procedure described in the following section.

For degenerate MCSG (only one face node), the difference with the general case is that its corresponding feature is
not completely determined by its extended MCSG. An
example is shown in Figure 11, where F 1 is a MCSG; its
extended MCSG consists of F 1 and F 2, while its corresponding feature is a slot comprising of F 1, F 2 and F 3. To solve
this problem, we continue to extend the MCSG to include all
those MCSGs which contain a face node having a virtual
link with the original MCSG. Then we find the maximal
valid feature containing the original extended MCSG by
searching the new extended MCSG. This maximal volume
feature is the corresponding feature of the MCSG.

GENERATION OF ALTERNATIVE
INTERPRETATIONS
Generally, interacting features can be interpreted in many
different ways. In this work, we use the approach of
Sakurai 14, with some modifications, to generate alternative
interpretations of interacting features.
Assume all the features generated by completing MCSGs
involved in a MFAG to be {FT i, i 1,n}. We call this
feature set the initial interpretation of the interacting features. Set N n.
(1) Choose one feature from {FT i, i 1,N} arbitrarily, say
FT N; push it on a stack. Then subtract the volume of

Figure 12 An example of interacting features and alternative interpretations

735

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 13 Test part 1 and its recognized features

FT N from the volumes of some other FT i (i 1,N 1).


Note that, unlike Ref. 14, we do not subtract FT N from
all FT i(i 1,N 1) because some FT i may become
invalid after subtraction. Figure 5c shows an example
part in which the result of subtracting a step from a hole
is no longer a predefined feature. In our approach, such
FT i is checked by analyzing the interaction relationship
between FT i and FT N, and no subtraction performed
between it and FT N. After the subtraction operation,
both the volume and the EAAG of FT i are updated.
We update the EAAG of such FT i by marking those
nodes that are shared by FT N as useless nodes. Finally,
N is set as N 1.
(2) Repeat (1) until N 1. At that point, all the features in

Figure 14 Test part 2 and features recognized by the system (highlighted)

736

the stack represent one interpretation of the interacting


features.
(3) Set up the final feature representation of each feature in
the stack. First, the type of the feature is determined
again according to its updated EAAG. If feature type
is changed, then a new feature of the new type is created. The parameters of the new feature are derived
based on the updated volume of the original feature
before the original feature is deleted. Observe that the
new feature here differs from the normal feature of the
same type in accessible directions. As an example, FT 3
in Figure 12c is considered to be a step in that interpretation, but obviously the direction n cannot be used
as the normal accessible direction of the step when
machining FT 3. To reflect this distinction, which is
useful for CAPP, we introduce an obstacle face set
into the feature representation, each face of which indicates a forbidden access direction of the feature. All the
faces corresponding to the useless nodes in the original
EAAG of the original feature form the obstacle face set
of the new feature. For example, F 1 forms the obstacle
face set of FT 3.
Since there are N ways to choose a feature in the first step
of the algorithm, at most N! different interpretations of the
interacting features with N features as its initial interpretation can be generated by the above algorithm. This is illustrated by Figure 12. Since generating exhaustive sets of
interpretations is unrealistic, we decided to generate only
one desirable interpretation initially based on heuristics for
efficient machining, similar to those used in Ref. 14.

Automatic recognition of interacting machining features: S Gao and J J Shah

Figure 15 Test part 3

blind holes, one slot, two blind slots and one T-slot, as
shown in Figure 13. There are several groups of interacting
features in this set, like the slot and two holes in the midsection of the part. The execution time was 0.2 s on the HP
C180 workstation.
Figure 14(a) shows test part no. 2, the so-called CAM-I
ANC101 test part. In this example, the stock is taken as the
bounding box of the part, observe that the stock is not the
same as the convex hull of the part. A total of 28 features
were recognized by our algorithm as the first feature interpretation of the part. Figure 14b shows three pockets, one
blind slot, and one face feature with an isolated island in it.
Figure 14c shows four holes, one face feature, and another
face feature with an isolated island in it. Figure 14d shows
nine blind holes and one face feature (note that this face is a
CH-face). Two compound holes recognized are highlighted
in Figure 14e. Five other features recognized are highlighted in Figure 14f, including three pockets, one blind
hole and one open pocket. The execution time for this part
was 0.45 s on the HP C180.
Test part 3 is shown in Figure 15a. The stock of test part 3

However, if the user does not like the initial feature set,
alternative interpretations will be produced as and when
the user demands.

IMPLEMENTATION AND TESTING


The proposed algorithm has been implemented using the
ACIS 2.0 solid modeler, C language, running on HP
C180 Unix workstations. We have tested the recognizer for
various parts including popular industry test parts, such as
CAMI/ANC101 and the Gehaeuse. The test parts involve all
interaction types defined in the Subgraph definitions section.
Three of the test parts and their initial (default) feature
interpretations are shown in Figures 1315.
Test part 1 is shown in Figure 13. Its stock is specified to
be a block corresponding to the convex hull of the part; the
stock is not shown. For this part, 11 features were recognized by our algorithm as the first feature interpretation of
the part. Features found were three steps, two holes, two

Table 4 Comparison of test part characteristics and system performance


Test

Total no.
of faces

Total no.
of edges

No. of
No. of
convex edges MFAGs

No. of
PCAGs

No. of
CAGs

No. of features
recognized

No. of
possible FI a

Execution time
(s)

1
2
3

31
99
38

98
209
105

17
102
17

10
29
13

10
28
13

11
28
8

4
4
8

0.2 s
0.45 s
0.22 s

5
5
1

FI feature interpretations.

737

Automatic recognition of interacting machining features: S Gao and J J Shah


is a cylinder which is the same as the convex hull of the part.
Our algorithm recognized 13 features from the part as the
initial feature interpretation. Figure 15b shows four through
holes and one blind hole. Figure 15c shows four steps.
Figure 15d shows two holes and one slot. Another slot is
highlighted in Figure 15e. The execution time for test part 3
was 0.22 s.
A summary of results for the three test parts is given in
Table 4. The execution time refers to the time spent in
generating the first feature interpretation of the part, including the time for reading the ACIS.sat file, recognizing
features, extracting feature parameters, and calculating
tool access directions for each feature.

approach, the open pocket is first recognized as an isolated


feature. It is processed by a heuristic procedure which determines whether there exist other better interpretations of it,
and if so, it generates the best one according to the given
rules. The heuristic procedure is being developed based on
both the geometry and the manufacturing knowledge. At
present, we can extract all slots and steps contained in an
open pocket if required by the user.
Finally, this method does not contribute anything toward
the recognition of features with sculptured surfaces. Owing
to the complexity of sculptured surfaces, it is a challenge for
all the existing feature recognition methods which are
usually limited to features defined by planar and quadric
surfaces.

DISCUSSION
ACKNOWLEDGEMENTS
In this paper, we have presented a hybrid approach for
automatic recognition of machining features from B-rep
solid models. The approach combines aspects of graphbased and hint-based feature recognition with delta volume
decomposition, so that it can deal with all six types of
feature interactions with high efficiency. Theoretically, the
computational complexity of the algorithm can be shown to
be:
O[M p N p T p (M N)],
where M the maximum number of edges per face (nonstock and non-CH); T the maximum number of arcs (convex, nonstock and outloop) per MFAG; and N the
maximum number of nodes per MFAG.
The hybrid recognition method presented in this paper
offers several advantages over previous methods. Feature
MCSGs are used as feature hints, so that the hints for all
types of features can be generated and completed with the
same procedure. This makes it possible for the user to add
new features without changing the code. In our approach,
the user just needs to create a feature instance with ACIS in
order to add a new type of feature all its properties are
automatically extracted and stored in a feature library. All
MCSGs are generated by graph decomposition without
redundant MCSG being produced. Features are completed
by the same completion algorithm (independent of feature
type) based on an efficient virtual link generation algorithm,
which achieves its high efficiency by minimizing the search
space for virtual links and not generating unusable virtual
links. A new feature interaction classification and a virtual
link classification are used to support the recognition of
interacting features. The manufacturing face adjacency
graph proposed enables all isolated features to be recognized before interacting features. MFAG also plays an
important role in reducing the search spaces for virtual
links, unifiable faces and features. Unlike other graphbased methods, our approach can generate alternative interpretations of interacting features.
One issue not yet addressed is that of open pockets, which
are still problematic. At present, there are two main kinds of
methods to recognize open pockets. One 21,7,9,1418 treats
them as interacting features, always dividing them into
many predefined features first. This method is timeconsuming. Even worse is that sometimes it is unreasonable,
since it is better to machine an open pocket as a single
feature. In another approach 6,13, open pockets are recognized as single features, but no other interpretation can be
provided which may exist and may be better. In our
738

This work was conducted during the period when the first
author was a visiting scholar at the Design Automation
Laboratory at Arizona State University. His visit was supported by the Pao Yu-Kong and Pao Zhao-Long Scholarship. Partial funding was provided by a DARPA/RaDEO
project. The authors are also grateful to the following
researchers at the Design Automation Laboratory: Hiren
Dedhia, Sachin Solkhan, Roshan DeSouza, Boming Xu
and Bernie Bettig for their suggestions and critique.

REFERENCES
1. Shah, J. J., Mantyla, M. and Nau, D., eds, Advances in Feature Based
Manufacturing. Elsevier/North-Holland, Amsterdam, 1994.
2. Salomons, O., Constraint specification and satisfaction in feature
based design for manufacturing, PhD thesis, University of Tarente,
1995.
3. Tseng, Y. J. and Joshi, S. B., Recognizing multiple interpretations of
interacting machining features. Computer-Aided Design, 1994, 26(9),
667688.
4. Han, J. H., 3D geometric reasoning algorithm for feature recognition,
PhD thesis, University of Southern California, 1996.
5. Laakko, T. and Mantyla, M., Feature modeling by incremental feature
recognition. Computer-Aided Design, 1993, 25(8), 479492.
6. Joshi, S. and Chang, T. C., Graph-based heuristics for recognition of
machined features from a 3D solid model. Computer-Aided Design,
1988, 20(2), 5866.
7. Marefat, M. and Kashyap, R. L., Geometric reasoning for recognition
of three-dimensional object features. IEEE Transactions on Pattern
Analysis and Machine Intelligence, 1990, 12(10), 949965.
8. Ji, Q., Marefat, M. and Lever, P. J., An evidential reasoning approach
for recognizing shape feature. In Proceedings of the 11th IEEE Conference on AI for Applications, 1995.
9. Trika, S. N. and Kashyap, R. L., Geometric reasoning for extraction of
manufacturing features in isooriented polyhedrons. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1993, 16(11),
10871100.
10. Vandenbrande, J. H. and Requicha, A. A. G., Spatial reasoning for the
automatic recognition of machinable features in solid models. IEEE
Transactions on Pattern Analysis and Machine Analysis, 1993,
15(12), 1269.
11. Han, J. H. and Requicha, A. A. G., Integration of feature based design
and feature recognition, ASME International Computers in Engineering Conference, September 1995.
12. Regli, W. C., Gupta, S. K. and Nau, D. S., Feature recognition for
manufacturability analysis, ASME International Computers in Engineering Conference, Minneapolis, 1994.
13. Regli, W. C., Geometric algorithms for recognition of features from
solid models, PhD thesis, The University of Maryland, College Park,
MD, 1995.
14. Sakurai, H., Volume decomposition and feature recognition: Part I
polyhedral objects. Computer-Aided Design, 1995, 27(11), 833843.
15. Sakurai, H. and Dave, P., Volume decomposition and feature

Automatic recognition of interacting machining features: S Gao and J J Shah


recognition: Part H curved objects. Computer-Aided Design, 1996,
28(6/7), 519532.
16. Kim, Y. S., Volumetric feature recognition using convex decomposition. In Advances in Feature Based Manufacturing, ed. J. J. Shah,
M. Mantyla and D. Nau. Elsevier/North Holland, Amsterdam,
1994.
17. Shen, Y. and Shah, J. J., Feature recognition by volume decomposition
using half-space partitioning. In Proceedings of the ASME Computers
in Engineering, Minneapolis, 1994.
18. Coles, J., Crawford, R. and Wood K., Form feature recognition using

Shuming Gao is currently a professor


of Computer Science at Zhejiang University and is serving as the Vice
Director of State Key Laboratory of
CAD&CG at Zheijiang University.
He received his BS in Mathematics
from Anhui University, and his MS
and Ph.D. in Applied Mathematics
from Zhejiang University, P.R.
China. He was a visiting scholar in
Design Automation Laboratory at
Arizona State University from 1996
to 1997. His research interests include feature modeling, solid
modeling, CAD/CAM integration, and virtual reality in design and
manufacturing.

base volume decomposition. In Proceedings of the ASME Design


Automation Conference 1, 1994.
19. Falcidieno, B. and Giannini F., Extraction and organization of forrm
features into a structured boundary model. In Proceedings of Eurographics87, Amsterdam, 1987.
20. Floriani, D. and Bruzzone, E., Building a feature-based object description
fromaboundarymodel.Computer-AidedDesign, 1989, 21(10), 602610.
21. Ferreira, J. and Hinduja, S., Convex hull-based feature recognition
method for 2.5 components. Computer-Aided Design, 1990, 22(1),
4149.

Jami J. Shah is Professor of Mechanical & Aerospace Engineering and


Director of Design Automation Lab at
Arizona State University, where he
has been since 1984. He has authored
over 90 technical papers on geometric
modeling, features, databases, process planning, and design automation.
He is co-author of the first textbook
on features, titled Parametric &
Feature based CAD/CAM.

739

You might also like