Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 19 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
19
Dung lượng
877,16 KB
Nội dung
COMPUTER VISION AND IMAGE UNDERSTANDING Vol 68, No 2, November, pp 127–145, 1997 ARTICLE NO IV970548 Feature Identification from Vectorized Mechanical Drawings Noshir A Langrana, Yuan Chen, and Atish K Das Department of Mechanical & Aerospace Engineering, Rutgers—The State University of New Jersey, P.O Box 909, Piscataway, New Jersey 08855 Received October 24, 1994; accepted August 24, 1996 samy and Langrana [4] Like the other vectorizing methods published in the literature [8–10], the line extraction algorithms (such as line tracking and curve fitting) used in RENDER are based on low level local processing which introduces errors in the recognized entities The vectorization algorithm uses a number of parameters to alleviate this problem; however, these problems have not been completely solved [4, 5] A post-processing system called PRENDER [11] was developed to correct the errors introduced during vectorization P-RENDER re-creates the output obtained from RENDER It includes procedures for attribute assignment, re-creation of arcs, recognition of dashed lines, and global alignment of the points in the drawing The contribution of the present work is a methodology that has been developed for recognition of two-dimensional (2-D) and three-dimensional (3-D) geometric features from drawings consisting of orthographic views of mechanical components A vectorized representation of the drawing obtained from RENDER and P-RENDER, which were developed previously, serves as an input for the feature recognition module The methodology developed is for recognizing features from drawings of mechanical components only High-level information such as features present in the component are important for product design since they provide a better definition of the component Several feature recognition methods have been developed in the past 20 years Most of them are either volume-based or surface-based and involve pattern matching, entity growing, and volume decomposition Sakurai and Gossard [12] used a graph matching method They used geometric information like parallelism, perpendicularity, and face geometry in addition to number of faces, face connectivity, and edge/face classification to describe features Kyprianou [13] applied syntactic pattern recognition to recognize features He developed a shape grammar that used convex/concave classification of edges, vertices, and faces Henderson [14] developed a rule-based feature recognizer using template matching Features like holes, slots, and pockets were formalized using templates that were made up of pattern rules and were matched with a pattern matching algorithm Staley et al [15] used syntactic Algorithms to identify 2-D geometric features from the vectorized form of a scanned engineering drawing have been developed These are based on a pattern matching process where the entities present in the vectorized drawing are checked for specific pattern primitives The pattern primitives present in an entity are compared with the overall direction of the entity to arrive at the 2-D features that are present A library of 2-D geometric features has been developed for comparative purposes For 3-D reconstruction and feature recognition a separation reference point is first found in order to group the entities into their respective views, i.e., top, front, and right side view This separation reference point is then used to transfer the points belonging to the three orthographic views, expressed in the 2-D coordinate system, to a 3-D coordinate system The 2D feature recognition algorithm is applied to each of the three views and the 2-D features recognized in each view are combined using a set of matching primitives and matching rules to arrive at the 3-D features present in the component 3-D features with linear sweep or rotational sweep and uniform thickness can be recognized 1997 Academic Press INTRODUCTION Engineering drawings are used as a means of communication between engineers Before computer aided drafting systems came into existence engineering drawings were created manually A large number of these manually created drawings are still in use in the industry Maintaining and updating these manually created paper based drawings is an expensive and time consuming process Hence, an automated system which will scan these drawings and convert them into a format recognizable by computer aided drafting systems is very desirable Recognition of features of the component from the drawings can also be very useful Most previous work has addressed the problem of automating segmentation and recognition of components in mechanical engineering drawings and documents [1–7] A system called RENDER (restoration of engineering drawings into the CAD database) for automatically recognizing the various line entities present in a drawing from a scanned input of the drawing was developed by Naga127 1077-3142/97 $25.00 Copyright 1997 by Academic Press All rights of reproduction in any form reserved 128 LANGRANA, CHEN, AND DAS pattern recognition to recognize holes from the 2-D crosssectional descriptions of the part obtained from the 3-D solid model Most of the methods described above and others are based on a top-down approach where features are recognized starting from the solid model of the component which may be represented in the form of boundary representation (B-rep) or CSG data The method for feature recognition proposed here is based on a bottom-up pattern matching approach where the 3-D features are directly recognized from the orthographic views, rather than on creating and processing the 3-D model of the component Since the input to the system is the vectorized output of a scanned 2-D drawing this approach cannot be compared with the methods developed for feature recognition from solid models As a first step in our feature recognition process, the output from RENDER and P-RENDER is processed to assign pattern attribute numbers [16] to the points, depending on the kind of primitives they belong to Some of the simple (or primary) 2-D geometric features such as a circle, a triangle, or a keyway are then detected by looking at the sequence of attribute numbers of the points belonging to the various entities Recognition of the secondary 2-D features such as V-slot, T-slot, and rectangular slots present on the boundary is done by determining the pattern primitives present on a closed contour (boundary) and the direction (clockwise or counterclockwise) of the closed contour The steps involved in the recognition of 2-D features are described in Section The idea is to recognize the 2-D features [17] present in each of the three views first and then combine these 2D features with a set of predefined matching primitives and matching rules to determine the 3-D features present in the component The matching rules which match a feature from one view to the other are based on the concept of orthographic projections Hence, first the entities belonging to each of the three views need to be determined to carry out the 2-D feature recognition process for each view This is done by determining a separation reference point and grouping the entities for each view depending on their location with respect to this point Once the group of entities for each of the three views are obtained, the separation reference point is used to transfer the points (belonging to the various entities) from the 2-D coordinate system in which they are expressed to a 3-D coordinate system Matching primitives and matching rules have been defined for recognizing 3-D features with linear sweep or rotational sweep and uniform thickness The 3-D feature recognition process is followed by the removal of the unused entities in the drawing so that the component can be represented by the minimum number of entities needed to express the features present and to describe it com- pletely The processing steps involved in 3-D feature recognition process are described in Section 2-D GEOMETRIC FEATURE RECOGNITION 2.1 Pattern Primitives RENDER [4] is used to obtain the vectorized image of the drawing P-RENDER [11] is then used as a postprocessing system to assign attributes to the points, recreate the arcs, recognize the dashed entities, and perform global alignment of the points The output consists of entities which are made up of primitives such as lines, arcs, and circles The points belonging to these entities are stored in a CAD format which is of the form ‘‘x, y, z, attribute.’’ The attribute of a point is designated based on the primitive it belongs to [16] x, y, and z store the coordinates of the point Even though the input is a 2-D drawing all three coordinates are required to represent the points in the three orthographic views, each of which has a different pair of axes The attribute of a point denotes whether a point is a start or end point of a line, center of a circle, center of an arc, etc Figure shows the pattern primitives which have been defined and the attribute numbers corresponding to the points belonging to each of those primitives The pattern primitives A to G are used for primitives which are made up of solid line entities and primitives H to L are used for primitives containing dashed line entities Some of the simple geometric features such as a circle, a triangle, or a key-way are recognized by analyzing the attribute numbers To recognize the more complicated (secondary) features present in a closed contour representing the boundary of an object, the global direction of the closed contour has to be determined first This is done by a slope tracing algorithm 2.2 Direction of the Closed Contour The output from the vectorization and re-creation modules consists of clusters of points which represent straight lines, arcs, and circles The attributes of the points define the direction of an entity locally However, for the recognition of geometric features the overall direction of a closed contour, represented by a cluster of points, needs to be determined The direction of the contour is important as it determines an appropriate feature This can be explained using Figs 2a–2c In Figs 2a–2c the bottom left corner point is taken as the starting point for the contour In Fig 2a the sequence of attribute numbers is 1257222 with CCW (counterclockwise) direction, in Fig 2b it is 1222256 with CW (clockwise) direction, and in Fig 2c it is 1256222 with CCW direction The kind of feature present in the contour depends on the direction of the primitives as well as the overall direction FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 129 FIG Pattern primitives of the contour In Fig 2a the CCW direction of the contour and the presence of a CW arc represented by attribute numbers 257 implies that there is a semicircular slot on the boundary, whereas in Figure 2c the CCW direction and the attribute numbers 256 (representing a CCW arc) implies that there is an outward semicircular projection on the boundary Hence, both the overall direction of the contour and the sequence of attribute numbers have to be considered together to identify a feature The direction of the closed contour is identified in two steps (I) Obtaining the basic contour from a closed contour using a slope tracing method The goal in this step is to retain only those points which represent change in slope and omit the rest of the points The points which are remaining define the basic contour For example, AEFG in Fig represents the basic contour for the closed contour ABCDEFG in Fig The following four steps are used to determine the points which are to be retained: (a) Retain the first point in the contour and use the first line segment (the line segment between the first two points) as the first basic line (b) 130 LANGRANA, CHEN, AND DAS FIG Determination of basic contour for Fig FIG Direction of the contour and sequence of attribute numbers Omit all the subsequent points which give lines having the same slope as the basic line when connected to the first point Retain the last point which gives the same slope (c) Obtain a new basic line which is the first line with a slope change and retain the corresponding points (d) Execute step (b) with the new basic line Repeat this procedure until the end of the contour is reached Once the basic contour is identified, the algorithm derived by Jakubowski [18] is used to determine the direction of the basic contour (II) Determining the direction of the basic contour Figure shows the basic contour of Fig where P and S are the lines AE and EF, respectively Let (a1 , a2), (e1 , e2), and ( f1 , f2) be the coordinates of points A, E, and F Then a determinant D(P, S) can be defined as 1 Depending on the relative orientation of P and S, D(P, S) is either positive or negative, as shown in Fig If two consecutive lines in the basic contour are oriented in such a way that D(P, S) Ͼ then they denote CCW direction and if D(P, S) Ͻ then they denote CW direction For a basic contour the direction for each pair of consecutive lines is determined and the final direction is obtained by comparing the total number of CW and CCW segments 2.3 Feature Recognition on the Boundary Once the basic contour and its direction are determined the following steps are used to recognize the geometric features along the boundary of the closed contour (a) Obtain a basic line segment and identify the next available line segment which has the same slope as this basic line segment using the slope tracing method (b) Identify all the points which are in between (from the list of points representing the closed contour) the two lines identified in step (a) (c) Based on the number of points obtained in step (b) (i.e., the number of points skipped) use specific tests on | | D(P, S) ϭ a1 e1 f1 a2 e2 f2 FIG Closed contour or boundary of an object FIG Direction of the basic contour FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS FIG Recognizing features on the boundary the size of the line segments connecting these points to identify the geometric feature present The different kinds of tests which are done and the corresponding feature recognized if those tests are satisfied are shown in Fig (d) Use specific tests on the slope of the line segments connecting the points obtained in step (b) to determine whether the feature identified in step (c) is an inward feature or an outward feature 131 The feature recognition process described above can be explained using an example shown in Fig Let us assume that the points representing the closed contour have been stored in such a way that the basic contour has a CCW direction For this example AB is obtained as the basic line segment (step (a)) and C and D are the points which are obtained from step (b) Thus the number of points skipped is two which means that the feature present is a square, rectangular, dovetailed or trapezoidal slot (inward), or projection (outward) The length of the sides BC, CD, and BE (step (c)) are compared and since BC Ͻ CD and BC Ͻ BE the feature is identified to be of rectangular shape The slopes of the lines AB and BD are compared (step (d)) and since in this case slope(AB) Ͻ slope(BD) the feature is identified as a rectangular slot on the boundary The type of tests carried out depends on the number of points skipped (step (b)) which can be 1, 2, 3, or for the features which have been defined in our library A FIG Flowchart for recognition of various features 132 LANGRANA, CHEN, AND DAS FIG Feature library and recognition criteria flowchart of the feature recognition process is shown in Fig The specific tests which are done and the corresponding feature recognized if those tests are satisfied are shown in Fig 2.4 2-D Feature Library The attributes of the points representing the vectorized primitives such as lines, arcs, and circles and the direction of the closed contour were used to recognize geometric features The library of geometric features which can be recognized this way is shown in Fig Some of the more simple geometric features are recognized by looking at the attributes of the points only The following is the list of simple geometric features which can be recognized (shown in Fig 9) in this way (1) Circle: A circle is represented by its center (attribute 1) and a point on the circumference of the circle (attribute 4) Thus a circle is recognized from the sequence 14 of the attribute numbers (2) Semicircle: A semicircle is a combination of a straight line and an arc A semicircle is recognized by searching for a sequence of attribute numbers which are of the form 1572, 1562, 1257, or 1256 depending on the direction of the arc FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 133 representing a key-way are 122257 or 122256 The distance between the center of the arc and the groove of the keyway is compared with the radius of the arc to determine if it is an outward or inward key-way 2.5 Experimental Results of 2-D Feature Recognition from Vectorized Mechanical Drawings The 2-D feature recognition module was developed in C language in a UNIX environment on SUN and added as a separate module to RENDER [4] and P-RENDER [11] The overall system was tested for many sample problems drawn on A size paper (8 Љ ϫ 11Љ) The drawings were scanned at a resolution of 144 dpi using a HP ScanJet Plus scanner The results from the 2-D feature recognition part for some of the drawings are shown in Figs 10–12 Example (Fig 10) shows a component with several inward slots These types of slots are generally found in mechanical components although all of them may not be present together The drawing was successfully vectorized FIG Library of simple geometric features recognized by processing attribute sequences (3) Triangle: A triangle is made up of three straight line segments The sequence of attribute numbers 1222 represents a triangle when the first and the last point have the same coordinates To identify a specific kind of triangle such as a right triangle, additional checks on the coordinates of the points are performed (4) Quadrangle: A quadrangle is made up of four straight line segments The sequence of attribute numbers which represents a quadrangle is 12222 The coordinates of the first and the last point also have to be the same In general, the sequence of attribute numbers 12222 n terms represents an n-sided polygon (5) Oblong (slot): An oblong slot consists of two parallel straight line segments and two semicircular arcs at the ends The sequence of attribute numbers which represents an oblong slot are 1256256 (CCW) or 1257257 (CW) (6) Key-way: A key-way consists of three straight line segments and an arc The sequence of attribute numbers FIG 10 An object with several inward slots on its boundary 134 LANGRANA, CHEN, AND DAS FIG 11 An object with a key-way hole and re-created to obtain all the straight line entities Using the currently developed system for 2-D feature recognition, all the slots were recognized and quantified (see table in Fig 10) Example (Fig 11) consists of line segments, arc, circles, and key-ways This drawing was initially vectorized as 12 lines, arcs, and circles After the refinement process, the original lines, arc, and circles were re-created and quantified The feature recognition system recognized the key-way present The maximum error in radius as shown in Fig 11 was 0.015 in Example (Fig 12) was vectorized as 28 lines, arcs, and circle This drawing was re-created with lines, arcs, and circle A circular hole and two oblong slots were recognized by the 2-D feature recognition system The maximum error in radius as shown in Fig 12 was 0.029 in It can be seen that the error in computation is significantly low or negligible 3-D GEOMETRIC FEATURE RECOGNITION Engineering drawings provide a very effective and practical method for describing the three-dimensional shape of an object These drawings are organized into two or more two-dimensional views in which no one view by itself may be sufficient to completely characterize the object being represented Drawing interpretation is not difficult for engineers to However, to it automatically poses many problems A complex object may be represented by 2-D views containing several hundred lines and curves Engineering drafting has standard methods for representing objects and so creating these 2-D views may not be very difficult However, to read and interpret the 2-D drawings and extract the 3-D information (geometric features) about the object automatically still remains a challenge [19–22] The previous section presented techniques for 2-D feature recognition From a 3-D point of view, these 2-D FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 135 FIG 12 A shaft support fixture features represent features of the projected views The goal is to combine the 2-D features recognized in adjacent views and to interpret them to recognize the 3-D features present in the object [23–25] A representation of a mechanical component or object is usually expressed in one of three ways: (1) Cubic parts (linear sweep), (2) Turned parts (rotational sweep, axisymmetric), and (3) Combination or complex objects A 3-D feature recognition system guided by a matching process was developed to recognize features in mechanical components which can be generated by a linear or rotational sweep with uniform thickness The input to the system is a refined vectorized drawing of the 2-D views representing the component The various entities present in the drawing, however, are not grouped according to the views they belong to Hence, the first step is to group the entities according to their respective views This is done by ob- taining a separation reference point and then grouping the entities based on their relative location with respect to this point Once the entities are grouped or clustered according to their respective views, each view is processed by the 2D feature recognition process The 2-D features recognized are then matched from one view to the other using a set of matching rules to determine the 3-D features which have been developed based on the concepts of orthographic projection 3.1 Reference Point to Divide Views and 3-D Coordinate Transformation In this research we have assumed that third angle projection is used for the orthographic views Hence, we have drawings for the top view, front view, and right side view for the component The refined vectorized drawing which serves as an input has information which is mixed and not separated according to the views Therefore, the first step is to determine which entities belong to which view and then store them separately This is accomplished by using 136 LANGRANA, CHEN, AND DAS The highest point belongs to the top view and the rightmost point belongs to the side view A search routine is first used to determine the highest point and the rightmost point and the entities they belong to For the example shown in Fig 13, L is found to be the highest point which belongs to the entity LDKG and R is found to be the rightmost point which belongs to the entity RPEF Next, the lowest point (D) in the entity LDKG which contains the highest point L is determined This is followed by identifying all the adjacent entities and/or entities which have at least one point which lies between the highest and the lowest point Among all these entities the one which has the lowest point is identified This process is repeated until there is no change in the y-coordinate of the lowest point and the lowest point at this stage actually is identified as the lowest in the top view Similar reasoning is used to determine the leftmost point in the side view starting from FIG 13 Reference point for separating entities belonging to different views the adjacency property of the entities The entities belonging to a particular view lie in the close vicinity of each other Thus, once an entity belonging to a particular view is found the other entities belonging to that view can be determined by searching around that entity Figure 13 demonstrates the method used for separating the entities In this figure, the 2-D (x, y) scanning coordinate system is selected with its origin at A at the bottom left-hand corner The (x, y) coordinates of all the points are converted to 3-D (X, Y, Z) coordinates as described below From Fig 13 we see that each view is separated from the others by a certain distance The first step is to find a reference point (C) for separating the entities It can be seen from Fig 13 that all the entities belonging to the side view are to the right of point C and all the entities belonging to the top view lie above point C Hence, once the separation reference point (C) is found its coordinates can be compared with the coordinates of the points belonging to the various entities to separate them according to their respective views The y-coordinate of the separation reference point is the y-coordinate of the lowest point in the top view and the x-coordinate is the x-coordinate of the left-most point in the side view The coordinates of the points belonging to the various entities (i.e., straight lines, arcs, and circles) either are known explicitly or can be computed easily FIG 14 Flowchart of the algorithm for determining the separation reference point FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 137 on the circle The lowest point belonging to the circle is the point E Since there are no other entities between points L and E which have point(s) lower than E, E is taken to be the lowest point in the top view Figure 15b shows a mechanical drawing with a cubic base The highest point for this drawing is found to be point B, which belongs to the entity ABCD The lowest point in the entity ABCD is the point D The entity EFGH, in which the point H is the lowest point, is found to be adjacent to ABCD Thus all the entities have points lying between D and H and the adjacent entity KLMN is obtained The lowest point among all these entities is determined and this point L serves as the lowest point in the top view The separation reference point (C) is also used to transfer the three views drawn in the 2-D coordinate systems to the 3-D coordinate system to aid the recognition of 3D features The point A shown in Fig 13 is the origin of the coordinate system for the drawing The separation reference point C also belongs to this 2-D coordinate sys- FIG 15 Determination of the separation reference point point R in entity RPEF For the example shown in Fig 13 points D and E are found to be the lowest and leftmost points in the top and side views, respectively The x-coordinate of the leftmost point in the side view and the ycoordinate of the lowest point in the top view give the xand y-coordinates of the separation reference point (C) Figure 14 is the flowchart showing the algorithm for obtaining the y-coordinate of the separation reference point The algorithm for obtaining the x-coordinate is identical when the highest and lowest points are replaced by the rightmost and lowest points, respectively All the entities which have points that are above the reference point belong to the top view and the entities which have points which are to the right of the reference point belong to the side view The remaining entities belong to the front view The two examples shown in Fig 15 describe the use of the algorithm Figure 15a shows a mechanical part with a circular base The highest point is the point L which lies FIG 16 Calculation of coordinates in a 3-D coordinate system (a) Top view XZ plane, (b) front view XY plane, and (c) right side new YZ plane 138 LANGRANA, CHEN, AND DAS Nine matching primitives have been defined as shown in Table They include two point solid and dashed primitives and sets of four point solid and dashed primitives Matching primitives switch their coordinate value from right to left or from low to high for the purpose of feature recognition Fifteen rules are defined in Table These 15 rules are divided into three groups Rules to are used if a 2-D feature is recognized in the top view and it is to be matched with a matching primitive present in the front view Similarly, rules to 10 are used for matching 2-D features in the front view with matching primitives in the top view and rules 11 to 15 are used for matching 2-D features in the side view with matching primitives in the front view In Fig 17a a V-type slot was recognized in the front TABLE Matching Primitives for Recognizing 3-D Features FIG 17 Primitive and rule matching for a component with a through V-slot tem However, by using point C as origin and by assigning proper axes and their directions to the three views, the points belonging to each of the views are assigned coordinates in the 3-D coordinate system Figure 16a shows point C used as an origin for the top view with the XZ-coordinate system The Z-coordinates of all the points in the top view are positive, the X-coordinates of all the points are negative, and the Y-coordinates are zero after they are recalculated using point C as origin Similarly, point C is used as the origin of the XY-coordinate system (Fig 16b) for the front view and the origin of the YZ-coordinate system (Fig 16c) for the side view to obtain the coordinates of the points in the 3-D coordinate system The locations of the points and the entities in the 3-D coordinate system are then used to recognize the 3-D features 3.2 Matching Primitives and 3-D Feature Recognition The entities belonging to the various views are first separated using the separation reference point The 2-D features present in each of the views are then recognized using the method described in the previous section These 2-D features are then compared with the entities belonging to the other views to see if they match any of the matching primitives (as defined in Table 1) and if they satisfy any of the matching rules (as defined in Table 2) in order to identify the 3-D features they actually represent in the component FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 139 TABLE Matching Rules for Recognizing 3-D Features view This V-type slot matched with three two-point dashed lines in the top view, thus satisfying matching rule This led to the conclusion that the component has a Vtype through slot in it In Fig 18a a circle was recognized in the top view which matched with two four point dashed matching primitives ABCD and EFGH Thus matching rules and were satisfied, which meant that the component had an upper blind hole and a lower blind hole Some additional examples were tried Their results are shown and discussed in Section 3.4 140 LANGRANA, CHEN, AND DAS FIG 19 A rectangle block FIG 18 Primitive and rule matching for a component with four point blind entity in its views TABLE Summary of 3-D Feature Recognition Results Obtained for Six Sets of Orthographic Views RENDER P-RENDER Example number Straight lines Circles Total entities Straight lines Dashed lines 4a 44 41 53 96 2 44 43 53 98 20 20 26 30 4 2 solid ϩ dashed 23 28 30 37 5b 163 163 35 44 6c 104 11 115 14 24 11 49 a Figure 19 Figure 21 c Figure 23 b Circles Total entities Geometric feature Rectangular slot through holes inward rectangular slots Through hole Rear cir peg Right cir peg Left cir peg Dove-tail slot T-slot through holes blind holes upper cir peg FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 141 FIG 20 Recognized features and entity table for the component shown in Fig 19 3.3 Detection of Unused Entities After the features have been recognized the entities which were not used for feature recognition are detected These entities are the ones which are not needed to repre- sent the features in the component Hence, these entities can be stored away in a separate layer However, these entities cannot be deleted completely since they are needed for the completeness of the drawing An entity is considered to be a used entity if it satisfies one of the following 142 LANGRANA, CHEN, AND DAS RENDER and P-RENDER, respectively, and then the 3D features were recognized All the unused entities present in the drawings were detected The details of the experimental results for three examples are discussed below Figure 19 shows the drawing of a rectangle block with one through hole and three pegs The table in Fig 20a shows that RENDER vectorized this drawing as 96 FIG 21 A component with a cross slide five criteria: (a) the entity is a solid or dashed circle, (b) the entity was used as a matching primitive, (c) the entity has features recognized on the boundary, (d) the entity is the boundary of a rectangular block, or (e) the entity is matched as a matching primitive to a nonhorizontal or nonvertical entity from one of the other views Figure 22c shows an example which uses criterion (e) for retaining entities An entity is considered to be unused for feature recognition if it satisfies one of the following three criteria: (a) the entity is an unused matching primitive, (b) the entity is the boundary of a cubic in the side view, or (c) the entity belongs to the side view of a turning part with uniform thickness In Fig 17b two unused matching primitives in the top view and one in the side view were detected using the set of criteria discussed above Figure 18b is the drawing for a cubic block Two unused matching primitives in the side view and the boundary for the side view were detected from this drawing Some additional examples are shown in the next section 3.4 Experimental Results of 3-D Feature Recognition The system was tested on six sets of orthographic views (18 two-dimensional views) drawn on A size paper (8 Љ ϫ 11Љ) and a summary of the results is shown in Table It is necessary to define the mechanical features present in the drawings in the feature library The six example problems satisfy this requirement The drawings were scanned with a resolution of 144 dpi using a HP ScanJet Plus scanner The scanned drawings were vectorized and re-created by FIG 22 Features recognized and entity table for the cross slide example FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS 143 through holes, and upper blind holes were recognized as features by matching rules 1, 2, and The recognized features (all in the XZ-plane) with their locations and dimensions are shown in Fig 24a For an axisymmetric turning part the right side view can be removed Thus, the side view along with three dashed lines in the front view were removed The drawing without the unused entities is shown in Fig 24c The total number of entities for representing features reduced from 115 to 27 (Fig 24b) The above three examples indicate that the drawings (orthographic projections) of mechanical components with linear sweep, rotational sweep, and uniform thickness can be vectorized and converted into 3-D CAD feature form More matching primitives and matching rules can be defined to recognize different 3-D features FIG 23 A component with circular turning part CONCLUSIONS straight lines, two solid circles, and no dashed straight lines or dashed circles P-RENDER re-created the drawing to represent it with 30 lines, two solid circles, one dashed circle, and four dashed lines Matching rules 1, 7, 12, and 13 (see Table 2) were then used to obtain the 3-D features whose location and dimensions are shown in Figure 20b One through hole in the XZ-plane, one rear circular peg in the XY-plane, and a right-side and a left-side peg in the YZ-plane were the features which were recognized Twelve unused entities were detected in the re-created drawing and the resulting drawing without the unused entities is shown in Fig 20c The total number of entities required to represent the features in the component were reduced from 98 to 25 (Fig 20a) Figure 21 is an example of a cross slide RENDER vectorized the drawing with 163 straight lines P-RENDER re-created the drawing with 35 lines and dashed lines as shown in Fig 22a A through T-slot and a through dovetail slot were recognized from matching rules and 11 The location and dimensions of the two features recognized are given in the table shown in Fig 22b Ten unused entities were detected in the re-created drawing The drawings without the unused entities are shown in Figure 22c Thus, the total number of entities required to represent the feature was reduced from 163 to 34 are shown in Fig 22a Figure 23 shows the drawing of a circular turning part which was vectorized with 11 circles and 104 straight lines using RENDER (Fig 24a) P-RENDER re-created the drawing to obtain 14 solid lines, 11 circles, and 24 dashed lines as shown in Figure 24b One upper peg, Algorithms for recognizing features from 2-D orthographic views have been developed A 2-D geometric feature library was created to recognize 2-D features in each of the views The entities belonging to the three orthographic views are separated by obtaining a separation reference point Matching primitives and matching rules defined are then used to interpret the 2-D features obtained in each view to determine the 3-D features with linear and rotational sweep The system described above is not perfect For example, the example drawings used in this paper have an overall rectangular shape with sharp corners Difficulties are encountered in vectorization when these corners are actually chamfered and are represented by small arcs in the drawing Specifically, when the arcs are too small, they are recognized as small line segments or the chamfer is not recognized at all Another difficulty is related to inaccuracies introduced due to scanning and vectorization The methodology developed for feature recognition is heavily dependent on the output from RENDER and P-RENDER All the basic entities—straight line segments, arcs, and circles—have to be recognized correctly from the scanned drawing for all the features to be recognized The above problems can be removed to a great extent if the dimensional information present in the drawing is recognized and compared with the processed drawing to check for consistency The recognition of dimension sets from vectorized 2-D drawings and reconstruction of the drawing is the subject of ongoing research The drawings which were used for the present study did not have dimensional information 144 LANGRANA, CHEN, AND DAS FIG 24 Features recognized and entity table for the component with circular turning part REFERENCES D Pao and R Jayakumar, Graphic feature extraction for automatic conversion of engineering line drawing, Int Conf Document Anal Recognit 2, 1991, 533–541 M Karima and K S Sadhal, From paper drawings to computer aided design, IEEE Comput Graphics Appl., 24–39, 1985 D Casasent and R Krishnapuram, Curved object location by hough transformations and inversions, Pattern Recognit 20, 1987, 181–188 V Nagasamy and N A Langrana, Engineering drawing processing and vectorization system, Comput Vision Graphics Image Process 49, 1990, 379–397 R Kasturi and L O’Gorman, Document image analysis: An overview of techniques for graphics recognition, Syntactic Struct Pattern Recognit Workshop, 1, 1990, 179–197 R Kasturi and S T Bow, A system for interpretation of line drawings, IEEE Trans Pattern Anal Mach Intell 12, 1990, 978–991 C P Lai and Rangachar Kasturi Detection of dashed lines in engineering drawings and maps Int Cong Document Anal Recognit 2, 1991, 507–515 FEATURE IDENTIFICATION FROM MECHANICAL DRAWINGS I Chakravarty, A single-pass chain generating algorithm for region boundaries, Comput Vision Graphics Image Process 15, 1981, 182–193 M S Landy and Y Cohen, Vectorgraph coding: efficient coding of line drawings, Comput Vision Graphics Image Process 30, 1985, 331–344 10 J R Parker, Extracting vectors from raster images, Comput Graphics 12, 1988, 75–79 11 Y Chen, N A Langrana, and A K Das, Perfecting vectorized mechanical drawings, Comput Vision Image Understanding 63(2), 1996, 273–286 12 H Sakurai and D C Gossard, Shape feature recognition from 3D solid models, in ASME Int Computers in Engineering Conference, San Francisco, 1988, pp 515–519, The American Society of Mechanical Engineers 13 L Kyprianou, ‘‘Shape Classification in Computer Aided Design.’’ Ph.D thesis, University of Cambridge, UK, 1980 14 M R Henderson, ‘‘Extraction of Feature Information from Three Dimensional CAD Data,’’ Ph.D thesis, Purdue University, West Lafayette, Indiana, 1984 15 S M Staley, M R Henderson, and D C Anderson, Using syntactic pattern recognition to extract feature information from a solid modeling database, Comput Mech Eng 2(2), 1983, 61–65 16 B Bailey, ‘‘Prime MEDUSA User’s Guide.’’ Prime Computer, Natick, MA, 1988 145 17 Y Chen and N A Langrana, Restoration of cad database and shape feature recognition, in Proceedings of the Conference on Design Theory and Method, New York, 1992, pp 118–131, The American Society of Mechanical Engineers 18 R Jakubowski, A structure representation of shape and its features, Inf Sci 39, 1986, 129–151 19 B Aldefeld, On automatic recognition of 3d structures from 2D representations, Comput Aided Des 15, 1983, 59–63 20 T W Elizabeth and N H Michael, Rule-based geometrical reasoning for the interpretation of line drawings, Appl Artif Intell 635, 1986, 621–627 21 I V Nagendra and U G Gujar, 3-D object from 2-D orthographic views—a survey, Comput Graphics 12, 1988, 111–114 22 S L Wang, Constructing three dimensional geometric models from planar views using knowledge-base system Comput Eng 1, 1988, 309–312 23 K S Mortensen and B K Belnap, A rule-based approach employing feature recognition for engineering graphics characterization, Comput Aided Eng J., 221–228, 1989 24 J J Shah, Assessment of features technology, Comput Aided Des 23, 1991, 331–343 25 J J Shah and C S Palat, Unification of form feature definition methods, in Workshop in Intelligent CAD System, pp 232–243, 1991