ODB2GBR on LinuxThis 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.tgzThe 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: We will choose 220-01720-05a. We now can see the layout: Layers The viewer also shows us the layers defined in the ODB++ file. |
Running the odb2gbr Engine from the Command LineIf 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:
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="" xmnls:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=""> <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 <g2kVer>0</g2kVer> <g2kScale>2</g2kScale> <g2kBreakSR>0</g2kBreakSR> <g2kAnchor>0</g2kAnchor> <g2kOffset>0</g2kOffset> <g2kOrder>0</g2kOrder> <g2kXAnchor>0.0</g2kXAnchor> <g2kYAnchor>0.0</g2kYAnchor> <g2kXOffset>0.0</g2kXOffset> <g2kYOffset>0.0</g2kYOffset> <outputArgs></outputArgs> </odb2gbr> Running in Batch ModeOnce 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 echo if [ "$LNXBIT" = "64" ] If OS is 64 bit, then use the 64 bit engine then if [ -x $ENG ] then LIB64=${ODBINSTDIR}/lib64 64 bit libraries are in the subdirectory lib64 echo executing script $ENG else ENG=${ODBINSTDIR}/odb2gbrDlg32 echo executing script $ENG fi else ENG=${ODBINSTDIR}/odb2gbrDlg32 OS is not 64 bit, then use the 32 bit engine echo executing script $ENG fi echo defaults=`find $HOME/.artwork -name odb2gbr.Xdefaults -newer $ENG` if [ "$defaults" = "" ] then if [ -f $HOME/.artwork/odb2gbr.Xdefaults ] then echo echo echo renaming potentially stale \"$HOME/.artwork/odb2gbr.Xdefaults\" to \"$HOME/.artwork/odb2gbr.Xdefaults.old\" echo echo mv $HOME/.artwork/odb2gbr.Xdefaults $HOME/.artwork/odb2gbr.Xdefaults.old fi fi export LD_LIBRARY_PATH=${ODBINSTDIR}:${LIB64}:/usr/local/lib:$LD_LIBRARY_PATH $ENG $* run the engine with the argument (which is our .xml file) |