Sunteți pe pagina 1din 4

2010 Interational Conference on Computer, Mechatronics, Control and Electronic Engineering (CMCE)

N8CbDDgIO8luiOiOCOgDlODOIp8il HOm 5JL O b88OdODP


Xuesong Guan, Guangwei Meng, Xiuhua Yuan
Deparment of Mechanical Science and Engineering
Ji University
Changchun, China
Email: .

.c yc
Abstract-Recognition of machining features from the solid
model of product is the foundation of process planning,
manufacturability evaluation and other downstream
activities. In this paper, the method of feature recognition
from the STEP fle is studied. On the basis of analyzing the
grammar characteristic, geometric and topological
information in STEP fle, the lexical analyzer is designed by
using the object-oriented method and the related
information of features is extracted from the STEP fle. The
extracted information is converted into AAG and the neural
network is used to recognize the features. The
implementation of the proposed method shows that method
can recognize the machining features from the STEP fle
effectively.
Keywords-feature; ANN; STEP;AG
I. INTRODUCTION
The introduction of the defnition about feature in
design ad manufacturing enable the information of
product to be described more comprehensive. Feature
technology has been widely used in manufacturing and
machining feature recognition is the base ad foudation
of downstrea activities such as maufacturability
evaluation and process planning and so on [1-2].
Therefore feature recognition fom the CAD model
automatically has been an importat research area over
the past twenty years, much effort has been conducted in
this area and many kinds of recognition and extraction
approaches have been proposed [3-11].
To solve the problem of data exchanging ad sharing
between diferent solid modeling systems, te featue
recogition based on STEP fle is studied. In this paper, te
maufactue featue recognition includes two steps: frst,
the geometr ad topology inforation is extracted fom
the STEP fle ad stored in te memor and the extracted
inforation is converted into the attribute adjacent graph
(AAG); second, the AAG is decomposed into a series of
sub-graphs by using some rules and the neual network is
used to recognize the features.
II. INFORMATION EXTRCTION FROM STEP FILE
STEP is an uabiguous computer-interretable
representation of product data, which offers the facility of
an efcient exchange between design, engineering and
manufactuing systems ad uses EXPRESS to specif the
product inforation to be represented that enables
precision ad consistency of representation ad facilitates
implementation.
978-1-4244-7956-6/10/$26.00 2010 IEEE
54
STEP fle consists of two pars: the head fle ad data
segment. The head fle includes adinistation and
attribute inforation such as author, date ad so on, which
begins wit the key word "HADER". The data segment
is the principal pat of STEP fle, which includes a lot of
instatiated objects of entities tpes defmed by EXPRESS.
The data struce of STEP fle is teelike which is
composed of level of entity, face, edge ad point.
A. Mapping between STEP File and c++
The statement in data segment is defned by WSN
(Wirth Syntax Notation), which is a series of entities used
to describe the inforation of product. Te stcture of
sentence is shown as follows:
#entity identifcation = entity name (attribute 1 ,
attribute2, . . . )
The entity identifcation is a integer generated
randomly, the entity name is a series of reserved words
such as CARTESIAN ]OINT, ADVANCED] ACE ad
so on, the attribute may be value, string, three-coordinate,
reference, true-false value ad so on.
The geometric data of diferent modeling sofware in
STEP fle is instatiated exaples of entities. The featue
inforation extraction fom STEP fle is to extact
geometric and topology inforation fom data segment. I
this paper, object oriented programming method is used to
extract inforation. The key words in STEP fle are
suarized to build the data dictiona ad the mapping
relationship of the data tpes between STEP and C++.
According to the mapping relationship of data tpes
between STEP and C++, the mapping between the entity
defmed by EXPRESS ad the class defned in C++ is built,
the mapping rules ae shown as follows:
1) The different attributes of entity correspond to the
different member variables in class.
2) In order to guarantee the relationship between entities,
the variables corresponding to the entity number namely
entity identifcation and the entity number of the sub-entities
of this entity are added in the class.
B. Information Extaction
STEP fle is ASCII sequential fle, which is defmed by
WSN. I this paper, a lexical analyzer is designed to
extract inforation. The STEP fle is read in te lexical
analyzer on the for of strings. Te rule of inforation
extaction is keywords matching, the keywords which ae
the naes of entities used in this paper include
CLOSED_SHLL, "DVANCED] ACE, FACE_BOUND,
EDGE_LOOP, ORIENTED_EDGE, VERTEX]OINT,
and so on. Firstly, the number of ever type of entity in
CMCE 2010
STEP fle is recorded to detenine the cycle number. Ten,
beginning wit the keyword "CLOSED_SHLL", te
pointer address of ever face of entit is obtained by cycle
and the coordinate of ever vertex is obtained by accessing
these pointers. Finally, the related infonation is stored in
memory as middle fle fonat, which provides infonation
for featue recognition. Te process of infonation
extraction is shown as Fig. I.

Read in STEP fleJ
( Mapping rule _
I 1 1 i 11h 12ii 1 I

Data dic tionay )


.J`J D 1uTT` J 1I1 j21d2JJ'ii JJ1I` J /'j
1 j.
1 1uT` J` YY 1Y 1 1\h_h11
1dT`0`1Y lu 11 YY _ Y
N: 1uDT' J : : L\\ 1Y: _d\\N
N: 1uT` J: E/_\1X11 : : _\\
( lexical analyzer)

11 `J`T2J1J1J `h
-
I

rD - at - a dic
-
ti-on-ay )
Middle fle fonnat in memory J
Figure 1. Process of information extraction
When processing strings of ever line, te characters
such as ",", "=", "#", ''''', "(", ")" and so on are regaded
as separators and the string between the two separators is
matched with the keywords in data dictionay. Te class
according to keywords is instantiated ad the string is
converted into the needed infonation. By this means, the
entity identifcation, the value of attributes, te entity
identifcation of members of this entity, etc, and the
corresponding instatiated object are obtained.
Infonation quer ad feature recogition ae both on
the basis of middle fle fonat in memor. The middle fle
fonat provides a simple and efcient stctue for
orgaizing the feaure infonation, which is simila to the
structure of entities in STEP fle. Te instatiated object
corresponding to class is stored in dynaic data list of
ever basic class ad these objects are cross called by
pointer.
III. APPLICATION OF AAG
A. AAG Generation
The attributed adjacency graph (AAG) is used to
describe the boundar representation (B-Rep) data of pa
or feature with nodal plot. AAG is constructed in which
ever face becomes a unique node n; and ever edge
exists as a unique arc Ck. It can be defmed as a graph
G={N, C, A} where N is the set of nodes, C is the set of
connection acs between nodes and A is the set of
connection attributes which denote the kind of connection
(convex or concave). Concave connections are maked 0
and convex connections are marked 1.
The middle fle in memor needs to be converted ino
AAG to recognize te feature fom the solid model of par.
In middle fle, S is te solution space of entity, which is
defmed as ,,/,,,,,|
where SF is te set of
face, SL is the set of loop, SV is the set of point, e is the set
55
of relationship between geometic and topological entities.
SF ad SE ae mapped to N ad C respectively, te
mapping producer is briefy introduced as follows:
I)Te nodes in AAG ae created. Searching the list of
ADVANCED FACE in the middle fle, if the nuber of
instantiated objects in this list is N, te nuber of nodes in
AAG isN.
2) Te arcs in AAG are created. Ever edge in
EDGE LOOP corresponding to ever instantiated object
of AD\ ANCED FACE class is examined to fmd whether
the EDGE LOOP shaed the same edge with oter
EDGE LOOP. If tese two face shares the same edge, the
ac beteen of these two faces is generated. Te nonal
vector of these two adjacent faces ad the shaed edge
between faces are recorded to compute the convexity ad
concavity of the ac [3].
B. AAG Decomposition
A AGG can be broken down into sub-graphs to be
classifed as featues. A well-known heuristic which is
proposed by Joshi ad Chang [6] decomposes AAG as
follows: a face surrounded by convex edges at its
boundary is not a feature face ad can be removed fom
the AAG. The feature recognition procedure is called to
compare the nodes of the sub-graphs to a pre-defmed
feature libra. If the confguration of a paricular pre
defmed feature matches that of the graph, a fon feature is
identifed and extracted out. Faces that directly belong to
a sub-graph are the interal faces of the sub-graph. Faces
that are connected with te faces in the sub-graph but not
belong to it are the exteral faces of the sub-graph. Base
face is the main face of te sub-graph, which is only
connected with the interal faces. This approach reveals
many difculties in recognizing interacting features.
There have been some attempts to recognize interacting
features based on AAG by some researchers [5, 8]. I tis
paper, a set of heuistics proposed in reference [7] is used
to brea down te AAG into sub-graphs. Te adjacency
matrix A is used to represent the sub-graph, which is a
two-dimensional ad binar squae matix, the upper
triangular area is the convex space and the lower triangular
area is the concave space [7].
IV. FEATURE RECOGNITION
A. Articial Neural Netork Implementation
In the view of patter recognition, the feature
recognition fom the solid model is a question of
classifcations, so the use of neural networks in feature
recognition becomes possible. Now, tere have a few of
arifcial neural network (AN) algorithms are introduced
in feaure recognition [7-11]. The essence of the neural
network approach is te appropriate training of a neural
network in order to perfon a classifcation. This tries to
mime the way that a human identifes features on an
object without using any sort of rules ad recipes, to
characterize.
The basic AN architecture includes a input layer of
neurons, a number of hidden layers and a outut layer
with one or more neurons. I tis paper, a three-layer BP
neural network with one hidden layer is used to build the
feature recognizer. The input layer includes 15 neurons
and te hidden layer includes 10 neurons. Te number of
neurons in the output layer is equal to te number of
features to be recognized. In tis paper, there are 6 features
to be recognized, tey are slot, step, hole and blind hole
respectively.
B. Neural network trainning
The BP algorithm compares the desired output with
the actual outut of the network and calculates the eror.
Information about this error is propagated backwads to
the hidden neurons and the weights are adjusted
accordingly. Afer many repetitive presentation (epochs)
of the training set, the output of the network converges to
the desired target outputs. The "questions" method
proposed by Konstationos [7] is used to convert the
adjacency matrix of sub-graph into 15 binay values
according to I5 neurons in te input layer. The tansfer
fnction between input layer and hidden layer is tansig
and between hidden layer and outut layer is liner transfer
fnction. The momentum factor a is 0. 5, leaing rate 1 is
0.6. When the epochs ae 657, the output eror 0 is 0.01.
The input vectors and the output vectors of slot, step, hole
ad blind hole are shown in Fig. 2.
@@Om
Input

Input

"[0100 0101 1011 1001 P=(IOOO 1001 1011 1001


,\
P=[OOIO 0101 lOll 100]

1=(0100 1001 1111 1001
J[OOOI 0011 1001 100]
P=[0010 1001 1011 1001
1=(00010011 1010 1001
P=[OOIO 0101 1111 100]
S[OI
I=(OOOl 0101 1011 1001
Step P=[OOOIOIOI 1111 100]
The desired output-[ I 0 0 0 0 0] The desired output [0 0 I 0 0 0]
a=[0.9341 0.1064 -0.0655 0.0165 -0.0245 -0.0499 1 a=[-0.1230 -0.0781 1.0674 0.0809 0.0849 -0.11631
a=[0.8991 -0.0026 0.1375 0.0649 -0.0752 0.0112 ] a:I-0.0662 0.0048 1.1049 0.1014 -0.1756 0.0668]
a=[0.9432 0.0198 0.0584 -0.1362 0.0499 0.0465 ] 8"[0.1137 -0.0985 0.9084 -0.0223 0.1990 -0.0507]
a=[1.0902 -0.0184 -0.0555 0.0613 -0.0150 -0.0269 ] a=[0.0020 0.0884 0.9653 -0.0719 -0.0133 0.0373]
a=[0.9480 -0.1270 0.0301 0.1275 0.0481 0.0212]
a=[0.1535 0.1228 0.9204 -0.0837 -0.0673 0.0339]

Input

Input

P=[lOOO 1001 1011010]
P=[Oloo 1001 1111010]

P=[Oloo 1001 1111001]

P=[OOIO 10000111 010]
P:[oolO 1001 1111001]
P=[Oool 1000 lOll 010]
P=[OOOI 1001 1111001]
Via hole
P=[Oool 0100 0010 010]
Blind hole
P=IOooI 00100111 0101 P=IOOOI 0011 1001001]
The desired output [0 0 0 0 1 OJ The desired output-[O 0 0 0 0 I)
a=IO.OIII 0.0636 0.0909 0.0322 0.9020 0.1680]
a=[-0.0258 0.0679 0.0446 0.1529 0.9485 0.0666]
a=[ 0.0413 0.0125 -0.0323 0.0611 0.0413 0.9108J
a={-0.0474 -0.0061 -0.0123 0.0881 0.9949 -0.0116]
a=[-O.0072 -0.0257 0.0303 0.0054 -0.0992 1.0435]
a=[-0.0147 0.0950 0.0515 -0.0329 0.9246 -0.0012J
a=[0.0492 0.0467 -0.0195 -0.0015 0.9316 -0.087IJ
a=[ -0.0453 -0.0168 0.0051 0.0564 0.0334 0.9633]
a=[-0.0422 -0.0730 0.0204 0.0098 1.0408 0.0177]
a=[ -0.0031 0.0357 -0.0281 0.0184 -0.0503 0.9812[
Figure 2. Input ad output of the traning saples.
C Application Example
The featue recognition based on STEP consists of
two steps. First, the geometric ad topological information
of part is extracted fom the STEP fle ad the sub-graph
is generated, this step is realized wit C++. Second, the
AN is used to recognize features based on sub-graph,
this step is realized with Matlab neural network tools.
The part shown in Fig. 3 is used to illustrate the
procedure of feature recognition which is shown as
follows:
1) Te information is extacted fom the STEP fle by
using the data dictionar ad lexical analyzer and the
extracted information is stored in te form of work format
in memor.
2) Te convexity and concavity of arcs are calculated
and the AG of part is generated, shown in Fig. 3.
3) The AG is broken down into sub-graphs
according to a set of heuristics, shown in Fig. 4. The sub
graph is converted into adjacency matrix and the
adjacency matrix is converted into te input vectors of
56
AN, shown in Table 1. Te AN is used to recognize
the features and the result is shown in Table 2.
;;
w
w

'
0
'
N
(
::
:
Figure 3. A pat ad its AG.
yc
8
Blind hole I Blind hole 2 Step Hole Slot
Figure 4. Sub-graphs of AG in Fig. 3.
TALE I. INPUT VECTOR OF AN
Feature
Base Internal External
Input vector
feature face face
Step 2 3 1,4,7,9
1000 1001
101 1 100
Hole 10 1 1 7,8
1000 1001
101 1 010
Slot 24 23,25 1,8,9,31
0100 0101
101 1 100
Blind
18
14,15,
8
0010 1001
hole 1 16,17 1 1 1 1 001
Blind
33
26,29,31,
30
0010 1001
hole 2 32 1 1 1 1 001
TALE II. RCOGNITION RESULTS
Output vector
Output
feature
Slot Step Hole Blind hole
-0. 1230 1.0674 0.0849 -0. 1 163 Step
0.01 1 1 -0.0909 0.9020 -0.1680 Hole
0.9341 -0.0655 -0.0245 -0.0499 Slot
-0.0072 0.0303 -0.0992 1.0435 Blind hole
-0.0072 0.0303 -0.0992 1.0435 Blind hole
The four neurons in the output layer corespond to slot,
step, hole and blind hole respectively. In Table 2, the frst
set of output is [-0.1230, 1.0674, 0. 0849, -0.1163], the
output of the second neuron is most close to 1. So te
feature corresponding to te frst sub-graph is step. In te
recognition, the interacting feature is decomposed into
some simple features and the three-layer BP neural
network ca recognize all the features of part.
V. CONCLUSION
This work is aimed at recognizing features fom the
solid model of pat to provide support for subsequent work.
In tis paper, the related inforation of product is
extracted fom the STEP fle to generate the AG of par.
The AG is broken down into sub-graphs for feeding into
the AN recognizer. By tis way, the interacting feature is
decomposed into some simple features and te features of
pat can be recognized efectively. The STEP fle can be
exchanged between vaious systems ad compaies, which
ca solve te problem in sharing and exchanging of data.
To meet the needs of downstream activities, te new rules
of decomposing AG ad the metod of combining the
simple features into compounding feature should be
studied.
REFERENCES
[ 1] S. K. Gupta, D. S. Nau, "A systematic approach for analyzing the
manufacturability of machined parts", Computers Aided Desig,
vol. 27, 1995, pp.323-342.
[2] J. G. Cherg, X Y. Shao and Y. Chen, "Feature-based part
modeling and process planning for rapid response manufacturing",
Computers in Industrial Engineer, vol. 34, 1998, pp.525-530.
57
[3] S. Emad, N. Abouel and A. K Kamrani, "A new methodology for
extracting manufacturing features from CAD system", Computers
& Industrial Engineering, vol. 51,2006, pp.389-415.
[4] S. Meeran, J. M. Taib and M. T. Afzal, "Recognition features form
engineering drawing without using hidden lines: a faework to
link feature recognition and inspection systems", Interational
Journal of Production Research, vol. 41, 2003, pp.465-495.
[5] K. Rahmani and B. Arezoo, "A hybrid hint-based and graph-based
famework for recognition of interacting milling features",
Computers in Industr, vol. 58,2007, pp.304-312.
[6] S. Joshi and T. C. Chang, "Graph-based heuristics for recognition
of machined features from a 3D solid model", Computer-Aided
DeSign, vo1.20, 1998, pp.58-66.
[7] K. Nezis and G. Vosniakos, "Recognizing 2.5 shape features using
a neural network and heuristics", Computer-Aided Desig, vol. 27,
1997, pp. 523-539.
[8] Z. Huang and D. Yip-Hoi, "High-level feature recognition using
feature relationship graphs", Computer-Aidd DeSign, vol. 34,
2002, pp. 561-582.
[9] N.ursel Oztirk and F. Oztirk, "Neural network based non-standad
feature recognition to integrate CAD and CAM", Computer in
Industr, vol. 45, 2001, pp.l23-135.
[IO] A. H. Zulkifi and S. Meer, "Feature patters in recognizing non
interacting and interacting primitive, circula and slanting features
using a neural network", Interational Journal of Production
Research, vol. 37, 1999, pp.3063-3100.
[II] C. H. Dali, P. Poshyanonda and A. Bahrami, "Neuron computing
and concurrent engineering" in Parsei and Sulivan (EDs.),
Concurrent Engineering, Chapman and Hall, London, 1993,
pp.465-486.

S-ar putea să vă placă și