plug-in tools

Varimetrix to GIG Converter

Purpose

The Varimetrix to GIG Converter is a small program that plugs into the Varimetrix CAD system. This converter can be started from a running copy of Varimetrix by selecting the Export GIG option from the User Menu. It will convert Varimetrix models to files in GIG's Intercol format.

Note that the Varimetrix to GIG Converter does not plug into GIG. You do not even need to have a GIG installed on the same machine that Varimetrix and the Converter tool are on.

Note: the latest version of the Varimetrix to GIG Converter can always be found on the Varimetrix CD's, starting with VX release 5.1. The VX 5.1 CD contains converters for all platforms (SGI, HP, Sun, Linux). On this GIG 3.2 CD, only an SGI version is included.

Introduction

The Varimetrix to GIG interface enables the transfer of solid models from the Varimetrix engineering software product to the GIG visualisation system. Using this interface, it is possible to make high-quality renderings and animations of Varimetrix objects using all of GIG's visualisation possibilities.

Because the interface is entirely based on the transfer of NURBS surfaces, no quality loss is imposed on the transferred geometry in contrast to polygon based interfacing methods. No huge amounts of data are involved, the model files are relatively small and the quality of the rendered images and animations is superior.

The interface is integrated in the Varimetrix menu system, and so is easy to access and learn for the Varimetrix user. The interface aquires the geometry information directly from the Varimetrix design database and outputs a GIG Intercol file.

With the Varimetrix to GIG Converter you can transfer:

Assemblies can not be exported; you will have to select individual parts.

The converter consists of the following files:

VX_GIGEXPORT	the executable  		~/utils/
3d_startup	VX interface file	   	~/lib/scriptvx/
3d_user_menu	VX interface file	   	~/lib/scriptvx/
fcm_dirs	VX interface file	   	~/lib/scriptvx/
fcm_types	VX interface file	   	~/lib/scriptvx/
user_templates	VX interface file	   	~/lib/scriptvx/
vx		VX startup script	   	~/lib/scriptvx/
After a normal installation of GIG 3DGO or GIGVIZ, the executable can be found in the 'utils' directory. The VX interface files are in the 'lib/scriptvx' directory. You will have to copy these files to a place where Varimetrix can access them; this is described below for both local and system-wide installations.

Prerequisites for using the Varimetrix to GIG Converter

To install and use this converter, you should have the following:

This is enough to convert models into GIG readable format (you do not need a GIG password for the converter anymore). To actually use and view the model within GIG, you also need: The converter on this CD is compatible with VX 5.0 and GIG 3.2. It will not work with earlier versions of both Varimetrix and GIG. Compatibility with newer versions is based on the statements about upward compatibility from both VX and GIG. Always check out the version information that comes with your GIG Converter.

Installing the converter locally

In a local installation, Varimetrix must be started from the directory where all files are placed. It is convenient to create a separate directory for this purpose. Assume that GIG has been installed under the account gig and that VX has been installed under the account vx.
First create the directory. For example:

cd ~vx
mkdir gig_export
Secondly put the converter files in this directory:
cp ~gig/utils/VX_GIGEXPORT ~vx/gig_export/
cp ~gig/lib/scriptvx/* ~vx/gig_export/
Edit the vx script in such a way that the VX_PATH environment variabele points to the right directory (It should be the same as in the OPENVX/driver/vx script).

Installing the converter system-wide

When the converter should be available to more than one person, it is better to make a system-wide installation. However this type of installation will take a little more work.

The VX interface and script files listed above should be replaced respectively concatenated to the Varimetrix system files.

Edit the vx script in such a way that the VX_PATH environment variabele points to the right directory (It should be the same as in the OPENVX/driver/vx script).

Using the converter

The Varimetrix to GIG converter is very easy to use. One of the benefits of a NURBS-based interface is that it doesn't need any tuning or entity mapping. Essentially, exporting a part is a procedure of selecting a part and naming a file.

The interface is available in the Varimetrix Modeler under the user_menu button, in the top menu area on the screen. When this button is pressed, the user menu appears at the left side of the screen, containing a button named ExportGIG.

When this button is pressed, the system prompts:

Exporter
Select solids to export
   solid >
Using the Varimetrix selection methods, one or more solids can be selected (e.g. left and right mouse buttons). When done, confirm by pressing the < Enter>-key or the middle mouse button.

The system prompts:

Enter intercol file to create
   file >
The standard Varimetrix filemanager will now be displayed. Push the Ext/Type button and select the file type int - gig intercol. Push the File button to go to the directory where the file has to be created, or type the name of the file (without extension) directly in the corresponding input field. Confirm using the Accept button.

The interface starts to work and an hourglass is displayed while the conversion takes place. When the interface is ready, the prompt GIG Exporter finished is displayed.

Now quit the modeler by chosing File - Quit from the top menu bar, and confirm to exit.

Importing a part into GIG

The next step is to import the part into GIG. The output file should be written (or later copied) to a directory where GIG can find it. The file is in GIG's Intercol format, and should therefore go to one of the intlib directories. This can either be ~gig/lib/intlib or ~gig/projects/my_prj/intlib. The file name must have the extension .int (in lower case).

The intlib directory of the currently active project could also be accessed using the environment variable LD:

When this is done, GIG can be started with startgig. Choose Channels and push the get intercol button. You will see the usual dialog for choosing files. The reading of the file may take some time, again depending on the size and complexity of the part. When the file is read, the imported part should appear on the screen.

Troubleshooting

If you do not have write permission for the directory or the file that you specified, then a warning will be displayed. If no warning is displayed but the Intercol file still does not appear, then perhaps your Varimetrix to GIG Converter password has not been installed correctly. In this case, an appropriate warning should appear in your UNIX shell or in a VX log file.

It is not possible to convert VX models to Intercol files by choosing the Save as option in the File menu and specifying the Intercol file type - you do have to start the converter first from the User Menu.

Comments

The wireframe part on your screen may not look like your Varimetrix part. This is because it is exported as a NURBS model, and GIG shows the control polygon of the untrimmed NURBS surface in wireframe (and flat shaded) mode. When rendering the image, your part will look like it did in Varimetrix.

There are advantages and disadvantages to the fact that the converter is a NURBS based interface. As a NURBS interface, it uses an industry standard geometry entity for conversion. NURBS surfaces offer high precision. Varimetrix is a NURBS-based modeler, and GIG knows about NURBS, so no special translations are required for the converter to successfully export information from Varimetrix to GIG.
A downside of exporting NURBS is that all parts, surfaces etc. are exported as NURBS, even when they might also be treated as CSG primitives. A cube for example will not be converted as a cube, but as six (untrimmed) NURBS surfaces. When you need real fast ray-tracing, you might consider making a mix of Varimetrix and GIG modeling.

Unexpected appearance of Nurbs models in GIG
Varimetrix uses B-spline or Nurbs surfaces to carry its data to GIG. The default representation of Nurbs in the GIG interface is the Nurbs control polygon. This polygon often does not resemble the actual shape of the object. Choosing another display mode will show a better representation of the Nurbs.

In some cases, a Nurbs object will be regarded as 'solid' when it should be 'hollow' or the other way around. For example, a hollow cylinder in Varimetrix might appear as a solid cylinder, with end planes, in GIG. In this case you can toggle the solid/hollow box in the solid construct menu for each individual Nurbs object.

Large CAD files

Sometimes a CAD model that has been converted to Intercol format produces a model that is too large for the standard configuration of GIG. In these cases, stack overflow error messages can appear while reading the Intercol file. Usually, this can be solved by copying a configuration file with larger configuration values to your home directory. This will cause GIG to require more swapspace. The large configuration file should not be necessary for Intercol files of less than 10 MB.

See also
get intercol, confile.