A NEW METHOD FOR EXTRACTING 3D SOLID MODELS OF OBJECTS USING 2D TECHNICAL DRAWINGS

- In this study, a new method called “3D-Space” have been developed to obtain 3D models of prismatic machine parts using 2D technical drawings. The algorithm basicaly works in the following manner: 3 basic views (i.e. top, front, left side) of an object are supplied as inputs while the output is a 3D solid view of corresponding object. To start with a raw bounding box spatially big enough to contain the complete final object is taken. Following the operations executed on it, the result is the 3D solid view of the 2D drawings. The basic views of the object are used to determine the nature of the operation to be applied on the raw entity. A feedback mechanism is also incorporated into the system to check the correctness of the final product. The results show that in most of the cases the algorithm works as expected. However there are some restrictions which are given in the text.


INTRODUCTION
Engineering drawings are the most important technological documents used at design, construction, production and cataloging stages of projects. In addition, they help to form a common language for sharing the information between the technical colleagues working in differently countries. Today, in the industry we may find millions of technical drawings produced previously and kept for possible usage in the future. Many new designs are either modified or improved versions of these previously developed works. Therefore an algorithm producing a solid view of an object using perpendecular projections of the same object may be useful for several applications including CAD/CAM systems.

LITERATURE SURVEY
Reconstruction of the prismatic parts using the perpendecular views, has been a research topic since 1970. It was firstly put forward by Idesawa [1]. At the same time, Lafue [2] has developed a mechanism to construct solids using 3D projections. In this algorithm, the faces take the primary importance instead of edges. Markowsky and Wesley, have developed an algorithm which explores the possibility of all 3D volumetric solutions starting from a wireframe model [3]. However, the developed algorithm only works with convex objects with limited number of facets. This algorithm has been further improved by the authors to extract multiple facets on complex 3D objects using 2D views. The improved algorithm works and reaches to a solution even when the projection is so complicated. Aldefeld has developed an algorithm constructing machine parts consisting of simple primitives [4]. While, Sakurai and Gossard, have developed a system which improved the mechanisms suggested in [3]. With this system the evaluations of concave and circular lines become possible [5]. So Bin has proposed a semi automated algorithm [6] where he uses 2D views of 5 primitives (i.e. cube, pyramid, cylinder, cone and sphere) to extract 3D solids. Similarly Liquette has proposed an algorithm where he constructs 3D solid views using perpendecular views of convex, cylindrical, conical or toric faceted primitive objects [7]. However, in this approach the normals of the concave faces must be parallel to the projections. In another study, Masuda removes the errors of 2D views when reconstructing 3D views of the objects [8]. Shum uses six perpendecular views to construct 3D scenes. In this approach the views are grouped into pairs. With each pairs a sweeping operation is performed to obtain simple volumetric sub-objects. Finally these are combined togather to form a 3D final object [9]. In this approach, however, all of the lines must be continuous. Kuo has further improved this algorithm to directly construct 3D objects without the 'sub-object' production phase. Another study we would like to mention here is performed by Shin, where he uses 3 perpendecular views to construct 3D views by using the geometrical aspects of the parts and the topological links inbetween them [10]. The limitation of this approach is that, the concave faces must be paralel to one of the main coordinate axis.
In this study we are suggesting a new mechanism which departs from the above, in many aspects. The main novelty of our approach is that, the volumetric 3D scene generation can also be interpreted as the production details (i.e. step by step) of the raw material processed at a CAM based machine (i.e. since we start producing the 3D solid from a raw bounding box containing the whole object). The details of which shall be explained in the following sections. Section 3 explains the basic concepts and preparations before the execution of the algorithm. While section 4 exhibits the details of the algorithm and finally section 5 concludes this paper.

THE PREPARETION OF DRAWINGS FOR THE '3D SPACE' ALGORITHM
To be able to run our algorithm on 2D drawings of an object, the first step is recording them in a database. At this stage, • subdividing the intersection points of drawn objects, • distribution of the lines to different views, • determination of the aspects of the elements, • determination of the links between the elements that forms the object are accomplished. Then the listed operations follow: • the lines need to be subdivided at the intersection points, circles and areas need to be seperated into sub-regions from the quarter points, • after the operation of subdividing the lines we need to determine which lines belong to which view, • the smallest rectangular border frame contains all the views. In fact this border frame also represents a volumetric bounding box of the raw material, • for each sub-element which are contained in a view (i.e. vertex, corner, edge, surface) the establisment of the links inbetween the elements is required. For this purpose 5 files are formed, • the base view is determined, this view is the view where surfaces of the object are best visible. This could either be determined automaticaly or manually,

The Projection Method
The projections of the edges of each view are reflected on each axis are produced. To be able to to that, the corners on the edges and surfaces are taken and each corner is represented on the projection line as a dot. For example as figure 1 illustrates if the the projected corners are St type, they are reflected onto both axises, however, the corners with the Tx and Lx tags are only reflected onto x axis while the ones with Ty and Ly tags are reflected onto y axis only.
The projection lines (intersecting with the axis), corresponding to the lines of each plane found at the baseview -which are essentially continuous lines-are searched in the other views. The solutions that are found are essentially counterparts of the continuous lines or areas of the base view. Afterwards, among these solutions, common solutions are searched: the results are 3D space informations of the surface found in the baseview.
In some cases, the solutions found in 3D space can be more than one. In such a situation the solution containing the highest z coordinate value is selected. If a surface with continuous exterior border contains a second surface than the height values of this surface can not be equal with the exterior surface. As it may be seen in figure 1 the heigth of the interior surface can either be lower or higher than the exterior surface. If it is higher, the interior area is called and 'island' otherwise a 'pocket'.

The Area Method
To be able to construct a volumetric object a bottom area called "bottom surface" is required. Similarly a top surface is required and named as the "top surface". After determining them within the algorithm, an area called "bottom sweep" is determined and the volumes are obtained by sweeping the bottom surface areas towards top surface areas. The bottom surfaces are 3D surfaces formed by the common solution of projected surfaces while the formation of top surfaces are based on subtracting the previous bottom surface from each used top surface. To be able to understand the described mechanism a coloring scheme has been developed (which appear as different gray-scale intencities in the text). The colors are useful in deciding the order of operations, the type of the concept adopted and whether a cutting operation shall be performed. They are as follows: • Red color: no cutting operations can be performed on the areas colored with red. Therefore the final volumetric object surfaces are in red. In the sub-objects the surfaces common with the final object are colored in red. • Green color: cutting operations can safely be performed on the surfaces colored with green. This color is used at the exterior facing surfaces of the sub-objects. • Blue color: this color is used at the common surfaces of the sub-objects. After processing one sub-object the color of the remaining sub-objects becomes green. The cutting operation can not be directly performed on the surfaces in this color. However, when the neighboring surface is processed, this becomes possible.

Formation of bottom surfaces
In the main view of 3D positions and shape of continuous lines are determined by projections and named as "bottom surfaces" afterwards all the correponding edges of the bottom surfaces are colored in red. They are classified into 3 sub-classes: • Straight and solid bottoms: this type of bottom surfaces does not contain any curved or sloopy edges, in other words there are only straigt surfaces so the bottom of the object can not be void and therefore it is solid. • Sloopy and curvature bottom surfaces: these are surfaces containing curves and sloppyness and they are handled togather in the operations. • Flat and non-solid bottoms: these are surfaces obtained by taking the projections from the sight view of sloopy and curvature surfaces and therefore are not solid.
As figure 2 illustrates the bottom surfaces also shows the operations to be executed on the sub-objects which need to be subtracted during the production phase. In the figure, z represents the height and z1 represents the max height value of the bottom surface while z2 is the lowest value. Therefore in flat bottoms (z1=z2) while in sloppy and curvature bottoms z1>z2. If the main direction of the view is changed then another coordinate axis may be used to represent the height. When ordering the bottom surfaces the z2 values are used and the following rules are applied: -The higher valued (i.e the ones with greater z2) bottom always takes the precedance -In the case of equal valued (i.e z2) surfaces the flat surface is processed first and the sloppy or curvature surfaces are evaluated afterwards. -Among the curvatured or sloppy bottom surfaces the ones with higher z2 takes the precedance.

Construction of top surfaces
The areas which are going to form the upper surfaces of constructed parts are named as 'top surfaces'. These areas are used to form the bottom and height of the sweep surfaces which will be described later. After the formation of each volume new top surfaces are formed to be used at the following volume, to do this the first 'top' need to be constructed. As the first top, the rectengular top surface of bounding box (raw material) is taken the edges of this first top are in green.
After the formation of the top and the volume, the corresponding bottoms are formed by extracting from the tops. To be able to exract a bottom from the top it must be within its boundaries. Depending on the type of the bottom to be subtracted, two methods are used to form the new tops.

The formation of components and swept bottom
For each newly formed component essentially two areas need to be determined first, namely: the top and the bottom. The bottoms have been formed by reflection method. While the formation of tops have been achieved using the previously formed volumes. However the final volumetric surface is neither of them. Therefore to be able to form the volume a swept bottom is required. The swept bottoms (S-bottom) are formed depending on the flatness, sloppyness or roundness of the current bottom. The swept bottom is used to determine the type of the object and the colors of its edges.
In    Figure 6. The formation of 3D object.

Formation of 3D object
Initially the object is presumed to be a prismatic bounding box. Removing the negative pieces which will be processed, leaves the target 3D object. As figure 6 illustrates this is performed by the volumetric subtraction operations which are done in the order of the heights of the bottoms.

The second-check of the object and determination of the missing volumes
After the application of the algorithm on the view, the 3D object is formed. However one need to be certain that all the negative objects are substracted from the newly formed object. For this aim a second-checking procedure need to be done.
Using the 3D object which has just been formed, its basic views (i.e control views) are extracted. These are compared to the other views afterwards. If these are extra lines on the original drawing, than the control views, that means that these are volumes which has not been substracted from the main object. Therefore, if there are continuous missing lines at any of the basic views, this view is taken by the algorithm re-executed. In this application the bounding box is taken again and the volumes are subtracted one by one. After disposing all the subtracted volume the only volume containing the subject area that has been searched is taken and this volume is subtracted from the last state of the object.

RESULTS AND CONCLUSIONS
The method that we proposed, takes a prismatic raw bounding box at the outset -which will constitude the final object-and determines the volumes which need to be subtracted from the initial box. At this stage 3 terms called bottom, sweep bottom and top have been described. In determining bottoms, reflection method have been used. Our approach presents many news aspects to the explored subject namely: -The 3D surfaces of object pictured in the basic view are represented by a newly developed method called 'reflection method'. Following another new method called '3 area method' is used to determine the objects. In this method, the lower boundaries (i.e. z) of the object are represented by the bottoms determined by reflection method while the tops represent the higher boundaries (i.e. z) of the object and finally the sweep bottoms which are the product of these two areas are formed which in turn forms the volumes of the object.
-The prismatic volume is supposed to contain the whole object, therefore giving us the ability to use it as the raw material. The processing percentages can be incorporated by adding extra lines to the 2D views.
-The procedure volumes can be back-checked to see whether there are any discrepencies in the object. If so they are corrected.