Automatic reconstruction of curved solids from three orthographic projections

This paper is devoted to the system of automatic reconstruction of curved solids using three orthographic projections consisting of straight lines and circular and elliptical arcs. There is a need for tools helping convert plane sketches into solid models when using systems of 3-d solid modeling (Solid Works, Solid Edge etc). Although there are many systems of this kind techniques of automatic modeling have not been introduces so far. The key problem here is that the methods currently used in these systems are not complete and imply further elaboration. Moreover, their authors only paid attention to the approaches and algorithms they used, but leaved out such important points as sketch format and import, results visualization method and their export to existing systems of 3D modeling. In this paper the authors conceived of the approach eliminating these drawbacks. In this paper authors are presenting the system of automatic reconstruction of curved solids using three orthographic projections as well as the algorithms and methods applied to perform this task.


I. INTRODUCTION
he systems of computer aided design (CAD) are widely used in the modern world: in mechanical design, electric design and so on.They allow accelerating a process of details' construction and allow their overall analysis by operating with 3D solid models of objects.However the transfer to such systems from 2D sketches is complicated by the fact that many organizations work with engineering drawings and do not presume to refuse the saved up databases.Manual transfer from engineering drawings to solid models is very timeconsuming and demands of high skilled staff.That's why the problem of automated transfer is relevant nowadays.
First time the problem of reconstruction of solid models was raised by Idesawa in 1973 [1].After that a great number of approaches to solution of this problem were introduced.The most popular methods use three orthographic projections as input information (front, top and side projections).These methods can be divided on wire-frame based (or B-rep: boundary representation) and volume-based (CSG: constructive solid geometry).
Wire-frame approach is based on construction of wireframe model which includes only 3D edges, construction model's surfaces and construction of solid model.There are three steps: construction of wire-frame model, construction of surfaces and construction of solid model.
Volume-based approach is based on the assumption that any object can be constructed from the finite number of predefined shape primitives using Boolean operations.Each of these primitives, for example cube, cylinder, cone etc. is reflected into three edges' groups constructing cycles at the projecting.The main idea of the approach is to seek and compare those cycles.When it is done, the set of elementary solid models is constructed.The final solid model is constructed from this set.
This article presents one wire-frame system for constructing solid model using three orthographic projections.It implements new method of wire-frame model construction, which uses extreme points without central lines processing [2], [3] and accelerates the construction of wire-frame model.Also the article presents the conceptual description of the developed system of automatic reconstruction of curved solids from three orthographic projections' architecture and used software tools.

A. Input data
Orthographic views can be received by many ways: scanned images, CAD-system's sketches etc.These views consist of straight lines, circular and elliptical arcs, moreover some methods [2], [3] need central lines of arcs and ellipses to be presented.

B. Wire-frame approach
All wire-frame oriented methods include following steps of solid model construction:  3D vertexes and edges that form the wire-frame are constructed.For brevity, we write 3D candidate vertexes, edges and faces as c-vertexes, c-edges and c-faces.This terminology underlines the fact that some elements will be marked as wrong during the following stages.

Construction of c-vertexes
C-vertex is created from three 2D vertexes, which belong to different views and satisfy following conditions: , , -2D vertexes belong to orthographic projections, ε -sketch's tolerance, which can be a result of scanning process or computers' digits representation limitations.
The main drawback of this approach is that it can't work properly with circular and elliptical arcs.To solve this problem Extreme points method has been developed [5].Its main idea uses decomposition of all arcs by their extreme points (Fig. 1).

C-edges construction
Let's mark the set of vertexes constructed at the previous stage as J.For c-edges construction it is necessary to find what pairs of c-vertexes can be connected and if they are, define the c-edge's equation which can be presented both in classical, and in a parametrical kind.
Full search of every possible c-vertexes' pairs is too timeconsuming and consequently consider only those pairs which are connected by an edge or a series of edges with the same equations even on one orthographic view.A five-point method and a method of conjugated diameters are used to find the equation of a 3D edge.
The main idea of five-points method [4] is that the 3D edge is uniquely defined by five points, therefore besides extreme points of edges consider three more points, see Fig. 2.
The conjugative diameters method [3] consists in construction of 3D edges using three c-vertexes and two conjugative diameters.The modification of this method, which operates with matrix representation of edges has been presented in [2].
Five points method is slower than conjugative diameters method but the last one requires additional information: central lines (Fig. 3).

2) C-surfaces construction
We shall understand a part of the surface limited by the closed contour.The goal of this stage is to define surfaces information from the wire-frame model.We shall consider two most popular approaches to the decision of this problem.The first leans exclusively on wire-frame model and called MIA (Minimal Internal Angle) [4].The second in addition uses the information from orthographic views and called MTA (Maximum Turning Angle) [3].

MIA (Minimum Internal Angle)
This approach searches for the minimal cycles consisting of wire-frame's edges, all of them should satisfy to same second order surface's equation.First three starting edges of a cycle is determined by the certain rules, then, if it is possible, surface equation is defined , and the next edges, satisfying to this equation are found.The process comes to the end when the cycle from edges becomes isolated.
In case if the current top is left with some edges, satisfying to the surface's equation the preference is given to the edge, which has minimum turning angle with predefined direction (it is defined during surface's equation defining).

MTA (Maximum Turning Angle)
Feature of this surfaces construction method is that surfaces are created from the cycles found not directly in frame model as in the previous method, but on 2D views.
The first stage is the defining of all cycles on orthographic views.Further in each cycle every edges pairs which have the common edge are checked, that their prototypes in the wireframe model have the common vertex too.
The type and mutual position of three-dimensional edges unequivocally determine type of a surface.Then all wireframe model edges which belong to the given surface are determined.For this purpose there is no need to examine all model edges, it is enough to check up only edges which images belong to a considered contour.
At the complex drawings analysis a situation when a number of edges will not belong to any of the constructed surfaces is possible, in that case these edges leave from the model.

3) Solid model construction
By this moment besides wire-frame model there is a set of surfaces available.Finally to construct three-dimensional solid model, it is necessary to understand, which of these sides superfluous and to determine their orientation i.e. what of the sides is external and what internal.
The wide distribution was received with following two representations of three-dimensional solid models: boundary representation (the model consists of oriented surfaces) and representation in the hierarchy of basic figures.Similarly it is possible to classify methods of solid model construction.
The first method uses boundary model representation [2], [3], [4], it is based on two postulates: 1 -each edge should belong to two various sides, and its orientation in these sides should be various; 2 -sides can cross each other only on the edges belonging wire-frame model.
Actually process of wire-frame model construction consists of consecutive inclusion of sides in intermediate model and its subsequent check on conformity to a set of heuristic rules which are based on the postulates described above.
The second method bases on wire-frame model representation as a set of primitives above which Boolean operations are made [5].It consists of two stages: at the first stage elementary solid models are searched, and at the second stage the primitive's operation are determined: a primitive has to be add or subtract from the model Essential advantage of this approach is that it operates with the same primitives, as the majority of 3D modeling systems thus simplifying its integration.Besides the given representation can be base for process of details decomposition.
At this stage several variants of model can be constructed.It is impossible to recognize correct models without additional information.

C. CSG approach
The main difference between the wire-frame approaches and the volume-base is the fact that in the latter at all stages the work occurs directly with solid model [6] - [9].
The final solid model is represented hierarchically from base bodies of the predetermined types (for example: the cylinder, a cube, etc.) above which Boolean operations are carried out.The process includes the following stages: First, on every orthographic view find all cycles of the certain types (they depend on types of elementary bodies from which the solid model is designed).Then three of connected cycles are searched on three orthographic views (their projections to the general coordinate axes coincide).Every three connected cycles constitute a base body.At the last stage define, what boolean operation needs to be applied to each constructed base body.The final model is the result of these operations.

A. Construction of wire-frame model
During this stage all 2D vertices on the orthographic views are looked through and all paths are extracted using this approach.Moreover, extreme points method is not used in existing systems or it demands an additional information on the form of central lines.This article presents the approach which eliminates this drawback and doesn't include the step of construction 3D vertices.It includes three steps: • construction of connections between edges • discovering of connected three of edges • construction of 3D edges Let's describe them in more details.

1) Construction of connections between edges
Two edges are called connected if one of their projection to the common edge contains another.All connections on every view are determined on this stage.2) Searching connected three of edges After all connections have been constructed, connected triples of edges can be determined.Such triples consist of edges, which belong to the view and each pair of edges is connected (Connected triple is demonstrated at Fig. 5).Every triple determines three projections of an 3D edge on a plane.Then the 3D edge is reconstructed by its three projections using the method, described in the previous chapter.The algorithm includes two steps: • Step 1: Denote three views as oxy , oxz , oyz .For , then 3D edge is constructed from three projections and it adds to the wire-frame model..

B. Surfaces extraction
The wire-frame model doesn't contain explicitly any information about the final model surfaces.To find such information MIA method [4] has been implemented in the system.Its base idea is to find spatial cycles.If equations of all cycle edges satisfy to the equation of a certain surface, then such edges determines the face and its contour.

C. Construction of solid model
When the final model set of surfaces has been constructed it is necessary to determine their orientation and to delete wrong faces, which have been constructed on the previous stage.Wrong faces appear because it is impossible to reconstruct a unique solid model using only three orthographic projections.
The basis of the presented algorithm is the method described in the work [5].We add some heuristic rules to the method to accelerate it.The algorithm includes following steps: • construction of minimal volumes • construction of false volumes • construction of the solid model

1) Construction of minimal volumes
Minimal volume is an area bounded by the closed contour, which consists of surfaces and doesn't include any other volumes.The model and its minimal volumes are illustrated on Fig. 6 The goal of this stage is to construct all minimal volumes of the model.The main idea is to take any face from the faces set and to fix normal direction.It is the base face (face ABCDHF at Fig. 7.The normal direction determines the direction of the face detour.For every edge the boundary face with minimal internal angle is determined.

2) False Volume
False volume is a volume which doesn't present in the final model, but has been constructed on the previous stage, other volumes are true volumes.To determine false volumes we use method from the work [5].The final model is a subset of the elementary solid models constructed on the previous step.This set is not unique, because three orthographic projections can not describe a model entirely.

IV. THE CONCEPTUAL DESCRIPTION OF SYSTEM
The implemented software system allows to load engineering drawings represented in one of the industry standard formats, to construct solid models from these drawings and to import the models to modern CAD systems.Three program modules are presented: • module of loading and working with dxf-format • module of construction of solid model • module of user interface and visualization

A. Module of loading and working with dxf format
А goal of this module is dxf-files loading and conversion to the inner format.The module is based on open source library dxf-lib from Ribbonsoft [10].It allows to convert dxf-files to the inner format and make different manipulations with received entities.The library works with following geometry objects: points, vectors, arcs of vector and ellipses.This set of objects determines the class of orthographic projections which can be processed by the system.

B. Module of solid model construction
This module makes wire-frame model and afterwards solid model of an object, the result is stored in the inner format, inherited from dxf-lib.The module is divided into three parts: 1) information preprocessing; 2) wire-frame model construction, 3) solid model construction.
The input dxf-file is assumed to contain three orthographic projections separated by two orthogonal lines.The first goal of this stage is to determine the view to which the entity belongs.The unexpected primitives in the dxf-file, which differ from points, vectors, elliptical and circle arcs, are ignored.
Then extreme points of arcs and ellipses are determined on every orthographic view.The arcs are divided by these points into elementary arcs, which are added to the view while divided arcs are removed.Also all entities are divided by the point of mutual crossing in the same way.Such preprocessing permits to make the system independent from the drawing representation and to use the extreme points method.
Then wire-frame model and solid model are constructed.

C. User interface and visualization module
Solid models constructed on the previous stage are stored to the inner format.This module is used to visualize these models and convert them to industry standards (IGES, STEP).It is based on open source OpenCascade system [11].This system is intended for visualization and processing of different graphic objects in 3D space.Moreover it contains some libraries to work with all popular formats of graphic information representation and to import files from one format to another.

V. EXPERIMENTAL RESULTS
During the experiments all models from articles [[1]- [5]] have been constructed (Fig. [8][9][10][11].Such test models have been chosen because the presented work is based on algorithms described in the mentioned works.

Fig. 4 .
Fig.4.Connections denote it as xy cur _ ) find elements on the views oxz and oyz , which connected with it.the wireframe model is constructed.•Step 2: If there is a connected pair among )