DXF Conversion

Back Home Next

Home
CAVE Introduction
DXF Conversion
DXF Examples
LIMBO and CCC
CCC Examples
Acknowledgment
References

In the Spring of 1997,Heath Beres and Jeff Mattingly of Engineering Science and Mechanics, Virginia Tech developed guidelines for converting AutoCAD .DXF files into formats that can be read by the CAVE as their class project for ESM4714.   This page is the summary of their work. 

Computer models in DXF (Drawing Interchange File) format (may not be created by AutoCAD) can be converted into Open Inventor (tm) format, (.iv), and Performer Binary format (.pfb) by following the steps shown below.   

[Learn more about DXF Files Format]

 

Conversion Procedure

 

wpe3.jpg (18887 bytes)

Figure 4: Procedure to convert DXF file format to .iv and .pfb format

Note that DXF models that can be used in this procedures must be compatible with AutoCAD Release 12 (R12) format.  DXF models that are not in AutoCAD R12 format need to  be converted into R12 before following this procedure.

Back to Top

 

Procedure

Option 1: Follow 5 steps below. These steps are corresponding to Figure 1.

Step 1:    Download conversion utility programs and put them in a directory

                 pfnav.c++, pfbounds.c++, pftransform.c++, ScaleBounds.c++, DxfToIv, IvToVRML, DXFconvert

                Also download associated Makefiles for compiling purposes.

                 [Please Click here to download from Beres and  Mattingly's  project page]

Step 2:     Compile them under Unix C-shell

                %make pfnav          
		%make pfbounds          
		%make pftransform          
		%make scaleBounds          

Step 3:     Convert a R-12 compatible DXF model into a Open Inventor file

                 Supposed that I want to convert a  house.dxf  to house.iv.

                 Type

		%DxfToIv house.dxf house.iv          

                    You should now see a house.iv file in your directory.

Back to Top

Step 4:     Check the boundary of your Inventor file

        	%pfbounds house.iv         

            This will give you a range of your model in X, Y, and Z axis.

Step 5:      Convert the Inventor file into a Performer Binary file

	%pftransform -r -90 0 0 -s 0.77164 house.iv house.pfb	
	%pftransform -r (x-angle)(y-angle)(z-angle) 
	-s (scale-factor) (input.iv) (output.pfb)          

where:

x-angle
          - number of degrees about x-axis to rotate the image

y-angle
          - number of degrees about y-axis to rotate the image

z-angle
          - number of degrees about z-axis to rotate the image

scale-factor
          - factor to scale the image

Input.iv                                                                                                                                                                            Output.pfb
          -input Inventor .iv file to be converted into a  Performer file                            

Output.pfb              

         -specify an output filename with the Performer .pfb extension

You should now see a house.pfb file in your directory.

Back to Top

 

Option 2: Use an Automated Conversion Shell Script written by Heath Beres

    This Shell -Script enables users to convert DXF file into .iv and pfb in one step by  supplying variables used in option 1 into one command-line.   This option is very useful when you need to convert many .DXF files.

	%DXFconvert (input.dxf) (scale-factor) (x-rotation angle)        
	 (y-rotation angle) (z-rotation angle) 
        
	%DXFconvert house.dxf         

All parameters are similar to those used in option 1. The benefit of using this script is that the command-line parameters are all optional (except the input file) and are configurable. The default script values are:

X-rotation angle = 0
Y-rotation angle = 0
Z-rotation angle = 0
Scale-Factor = 0             

DXFconvert outputs the following files:

house.iv - the Inventor .iv file
house.wrl - the VRML .wrl file
house.pfb - the Performer .pfb file
house.bounds - the Pfbounds .bounds file            

[See the complete project and examples  by Heath Beres and Jeff Mattingly]

 

Lessons Learned

Later releases after AutoCAD R 12 have options enabling users to save models as various formats including DXF R12. This can be done under File Menu in AutoCAD.  In this projects I use DXF models that are not directly created by AutoCAD. Nevertheless, whenever I encountered DXF models that were not in AutoCAD R12 format, I needed to open them whit my AutoCAD R14 and export them as R12.

The software DxfToIv used here is version 1.0 developed in 1995 by Abaco Systems, Inc.  and Silicon Graphics, Inc.  AutoCAD R12 DXF  is the latest release supported by  DxfToIv ([Roger Brown, P.E., Silicon Graphics, Inc]).  There are no other versions of DxfToIv that I know of.  The DxfToIv is located in /usr/lib/showcase/ift in Silicon Graphics' s IRIXs or you can download from Heath Beres and Jeff Mattingly's project page

If running AutoCAD on IRIXs, there is a tool for direct Inventor/VRML file export from AutoCAD included in the Bonus Pack toolkit. [Roger Brown, P.E., Silicon Graphics, Inc]

DxfToIv is not the only program can be used to convert your favorite 3D models.  There is a program called 3dsToIv that able to convert 3D Studio files .3DS to Open Inventor .iv files.  3DS is  believed to be a better file format for 3D models.  Please click here for more details about 3dsToIv.

If you can convert your 3D models into .iv or .pfb, you are guaranteed to view them in the CAVE.

Back to Top

Back Home Next
Last updated: 05/09/99
Phuwanai Wanamakok: [best@vt.edu]   
CE&M/CEE Virginia Tech