web page header logo

ODB2GBR on Linux

This page will explain how to use ODB2GBR on Linux in engine mode and to produce the Gerber files and the job deck needed by NETEX-G. We will take the user through a simple example.

The Example Array.tgz

The example we will use is a small ODB++ file called array.tgz. It has two STEPS - the ARRAY step and the 220-01720-05a step. For net tracing one does not want the array step as we need only a single circuit.

When you first open this file using the Valor viewer, you will have to choose which STEP to open. This is what the Valor viewer's dialog looks like:

list of ODB steps as shown by Valor viewer

We will choose 220-01720-05a. We now can see the layout:

snapshot of single ODB circuit


The viewer also shows us the layers defined in the ODB++ file.

layer stackup

Running the odb2gbr Engine from the Command Line

If you want to run the odb2gbr conversion from a command line then you must know something about the ODB++ file you wish to convert. You need to know:

  • The name of the STEP to convert
  • The layer or layers you wish to convert
  • All of the conversion parameters you want to use.

All of this information must be encoded into an XML file. A sample XML file is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<odb2gbr version="" xmlns=""

<inputFilePath>/home/cad/odb2gbr/examples/array.tgz</inputFilePath>  The input file name and path
<workDirPath>/home/cad/odb2gbr/examples</workDirPath>                working directory
<keepTemp>0</keepTemp>                                               0=don't keep temp files 1=keep temp files
<nonStd>1</nonStd>                                                   don't know what this does
<threadNum>2</threadNum>                                             number of concurrent threads
<inputArgs>-dbg</inputArgs>                                          any special input arguments 

<outputFilePath>/home/cad/odb2gbr/examples</outputFilePath>          output file name and path.
<stepName>array</stepName>                                           name of the STEP to process
<layerName>comp_+_top</layerName>                                    layer to convert
<layerName>smt</layerName>                                           layer to convert
<layerName>top</layerName>                                           layer to convert
<layerName>bottom</layerName>                                        layer to convert
<layerName>smb</layerName>                                           layer to convert
<layerName>comp_+_bot</layerName>                                    layer to convert
<layerName>ncroute_path</layerName>                                  layer to convert
<layerName>drill</layerName>                                         layer to convert

<arcResolutionDeg>9.0</arcResolutionDeg>                          arc resolution when booleanizing custom apts
<arcChordError>0.0</arcChordError>                                chord error to use when booleanizing custom apts
<scale>1.0</scale>                                                user defined scaling
<units>1</units>                                                  output units 1=   0=  
<outScale>0</outScale>                                            Output scale factor 
<showProgress>1</showProgress>                                    display progress 1=yes, 0=no
<butting>0</butting>                                              use butting polygons for output




Running in Batch Mode

Once the .xml file has been constructed you can run in batch or script mode. For example from the example directory:

$ ../bin/odb2gbr array.xml [enter]

What Does the odb2gbr Script Do?

when you invoke odb2gbr you are running a script. Let's see what it does.

#! /bin/bash

ODBINSTDIR=/home/cad/odb2gbr/bin      directory where the program executables reside

LIB64=                                these lines determine whether to use the 32 or 64 bit
ENG=${ODBINSTDIR}/odb2gbrDlg64        engine based on what libraries are present
LNXBIT=`getconf LONG_BIT`             returns either 32 or 64 depending on the OS

if [ "$LNXBIT" = "64" ]               If OS is 64 bit, then use the 64 bit engine     
  if [ -x $ENG ]
    LIB64=${ODBINSTDIR}/lib64         64 bit libraries are in the subdirectory lib64  
    echo executing script $ENG
    echo executing script $ENG
  ENG=${ODBINSTDIR}/odb2gbrDlg32      OS is not 64 bit, then use the 32 bit engine
    echo executing script $ENG


defaults=`find $HOME/.artwork -name odb2gbr.Xdefaults -newer $ENG`

if [ "$defaults" = "" ]

if [ -f $HOME/.artwork/odb2gbr.Xdefaults ]
echo renaming potentially stale \"$HOME/.artwork/odb2gbr.Xdefaults\" to \"$HOME/.artwork/odb2gbr.Xdefaults.old\"
mv $HOME/.artwork/odb2gbr.Xdefaults $HOME/.artwork/odb2gbr.Xdefaults.old


$ENG $*                                run the engine with the argument (which is our .xml file)

ARTWORK CONVERSION SOFTWARE, INC.                  Company Profile
417 Ingalls St.,     Santa Cruz, CA 95060         Tel (831) 426-6163     Fax 426-2824               email: info@artwork.com