Small Business Resources, Business Advice and Forms from AllBusiness.com

Business Exchange

Reverse engineering: extracting CAD data from existing parts.

Coordinate measuring machines (CMM) are widely used tools for performing fast accurate three-dimensional measurements of mechanical components. A typical CMM uses highly precise linear transducers and a microcomputer based controller to achieve typical measurement accuracies of (+ or -0.005 millimeter (+ or - 0.0002 inch). These devices can simplify otherwise complex three-dimensional inspection tasks. Important applications for CMMs can be realized by interfacing them with CAD software. Connecting the digital measurement capabilities of a CMM with the graphical communication capabilities of a CAD system enables the user to perform "reverse engineering." Reverse engineering refers to the process of creating engineering design data such as Cartesian c ordinates, surfaces, and orthographic drawings from existing components.

Reverse engineering has two major applications:

* Creating CAD models of surfaces that are based on appearance rather than on engineering requirements. Many external parts on consumer products such as shampoo bottles and automobile dashboards are designed largely for their pleasing appearance. Using a reverse engineering system, a model or prototype can be produced by a designer and digitized by a CMM. This digital information can be brought into a CAD package using the Initial Graphics Exchange Specification (IGES). The CAD system can then generate drawings or numerical control (NC) programs.

* Producing drawings of existing parts when the original design data are unavailable. In this case, drawings of undocumented components can be made or competitive assessments of other manufacturers' products can be performed.

We have developed a simple reverse engineering system, using a Brown and Sharpe Microval CMM and the widely used Autocad design and drafting software operating on an IBM-compatible PC. This system allows the user to digitize a mechanical component using the CMM and send the design data by means of the IGES exchange protocol to a CAD system, where the model can be modified and used for a variety of purposes. A program we have written, called C2C, provides the interface between the CMM and CAD systems.

CMM Measurements

A typical coordinate measuring machine is shown in Figure 1. It is designed to record the position of a spherical probe as it is moved along three coordinate axes as shown in Figure 2. The probe is typically placed in tangential contact with a component when a feature is being measured. Various calculations are automatically performed by the machine to determine the relationship between the probe and the actual geometry of the feature.

Accurate measurements of the probe position are made by the use of linear position transducers (such as graduated glass scales) mounted on the machine axes. These measurements are recorded by a microcomputer and are printed, stored, or transmitted to another computer for further processing. Various geometric calculations can be performed using the measurements such as determining angles, diameters, centers of circle, and form deviations such as roundness or perpendicularity.

In our reverse engineering system, data are transferred between the CMM and CAD units using IGES, which is a nonproprietary neutral format for exchanging design data between different CAD systems. IGES was originally published by the National Bureau of Standards (now the National Institute of Standards and Technology) in 1980. A consortium of government and private-sector representatives created the specification as a means of representing geometry and other design data (dimensions, layers, and annotation) in a file format.

The IGES exchange format is often a convenient means of exchanging data between CAD systems because it does not require a CAD system vendor to reveal proprietary information regarding the internal representation of geometry, data base structure, or algorithmic techniques. An existing drawing on a CAD system can be preprocessed using a software program provided by the CAD system vendor to translate the drawing into an IGES format file. The IGES file can be post-processed by a software program on a completely different CAD system to convert it into a drawing. Although there are many cases where conversion problems exist, the neutral file format is useful as a practical means of exchanging design data.

An example of an IGES file is shown in Figure 3. The IGES representation is an ASCII text file composed of five major sections:

* The START section, containing a human-readable header.

* The GLOBAL section, containing information about the CAD system where the drawing originated.

* The DIRECTORY ENTRY section, which lists all entities (such as lines, circles, arc, and dimensions) and relationships that exist among them.

* The PARAMETER DATA section, which gives specific information about entities such as the starting and ending points of a line.

* The TERMINATE section, containing a count of all lines that should be in each preceding section for data integrity purposes.

These five sections are used concurrently to describe all aspects of a drawing in a CAD system. In addition, strong internal relationships exist between the contents of the various sections in order to assure the integrity of the data in the file.

An IGES file is post-processed in order to convert it into a new CAD drawing. The role of the post-processing software is to read the IGES file, validate the integrity of the data contained in it, and translate the contents of the file into the format required for the CAD system. A typical CAD system has a proprietary internal data base that is used to represent geometry, organizational information, and annotation.

Once the internal data base is constructed from an IGES file, a graphic image of a drawing can be generated. If modifications are necessary, such as adding dimensions, these changes can be made on the new CAD system. This process should be the same as if the drawing was originally created on the system, since all of the geometric and logical data are represented in the data base.

C2C Software

In order to illustrate the application of a reverse engineering system linking a CMM and a CAD system, a software package called C2C was developed at the University of Detroit Mercy. This software links a Brown and Sharpe Microval CMM with Autocad, using IGES as a bridge between the two. (Note that the C2C software can be readily adapted to other CMMS, provided the machine has a serial communications capability.)

The C2C software is written in Turbo Pascal 5.0 and takes advantage of the powerful graphics and communications utilities inherent in that language. C2C performs RS-232 serial communications between a personal computer running Autocad and the CMM. Each time a point is digitized by the CMM probe, the CMM transmits the relevant coordinate data, in ASCII format, through a serial port. These data are received at the PC and recorded by C2C. IGES file entries are automatically created by C2C based on what type of geometric entity is being measured. C2C interacts with the user, providing prompts for the definition of features such as points, lines, and circles. For example, if the user wants to define a line representing the edge of a component, C2C will prompt the user to digitize two relevant points with the probe. These points will be used to create an entry in an IGES file. This process is repeated until all relevant features on the part have been digitized.

C2C provides a visual confirmation of the digitizing process by display,ing a simple line drawing of the geometry as it is being digitized, as shown in Figure 4. This function provides some feedback to the user on the accuracy of the operation. Once all of the desired geometry has been digitized, C2C can create an IGES file corresponding to the entities that the user has indicated. The IGES file provides the basis for construction of a CAD model of the component.

The IGES file can be post-processed by any CAD system that can accommodate IGES input. In this case, the IGESIN post-processor that is provided as part of Autocad Release 10 is used. IGESIN converts the IGES file to the internal data base format used by Autocad and displays the corresponding drawing. A component that was reverse-engineered by C2C is shown in Figure 5. This component is a special part designed for training CMM operators. It incorporates many geometric features that are typically measured on a CMM. The corresponding drawing created in Autocad by post-processing the IGES file generated by C2C is shown in Figure 6. Once the geometry has been translated into Autocad, it can be manipulated as an Autocad drawing. For example, dimensions can be added, entities can be placed on unique layers, or text can as shown in Figure 7.

Although the exact procedure depends on the CAD system being used, dimensioning the component drawing requires the CAD system operator to issue appropriate commands to extract the dimensional data from the CAD data base. Dimensioning can be efficiently done using the internal dimensioning functions supplied in Autocad. If an edge is to be dimensioned, all the user has to do is identify both the line corresponding to the edge and where the dimension text is to be located. Autocad extracts the length of the line from the data base and automatically constructs the extension line, dimension lines, and dimension text. Figure 7 shows the results of the dimensioning process. In this way, a complete engineering drawing can be created from an existing component in a relatively short period of time. Multiple Uses

There are numerous applications for a system that is capable of linking a CMM with CAD. The ability to extract geometric data from a component in the form of an engineering drawing is an important tool.

A reverse engineering system can be used to create a lost or nonexistent drawing of a broken or worn component that is being replaced. A duplicate component can often be reproduced readily from a CAD drawing by one of the popular CAD-tonumerical-control data-conversion programs or by converting the IGES data associated with a part directly into numerical control data. The form-deviation measuring capabilities of most CMMs can even allow the user to estimate some of the original tolerances on the component. A surface, edge, or contour in a styling model can be digitized and used to create NC cutter path data. This approach has been used in the automotive industry for die production from clay models for a number of years, but there is a need for continued development of the techniques used to create usable surface data from digitized models.

A reverse engineering system is also a powerful tool for conducting competitive assessments of existing products where it is virtually impossible to get access to engineering drawings, key dimensions, and tolerances. Linking a CMM and a CAD system can open up a revealing window on many of the characteristics of a competitive product and may lead to insights on how to improve products.

In addition, make sure to read these articles: