web page header logo

ODB++2GBR Data Structures

 

Introduction

The ODB++2GBR data structures are listed below.




ODB_SymbolInfo

typedef struct{
  char Name[MAX_NAME_CHAR];
  int Dcode;

  double Extent[4];
} ODB_SymbolInfo;



ODB_StepInfo

typedef struct{
  char Name[MAX_NAME_CHAR];
  int Step_index;

  double Extent[4];
  double ProfileExtent[4];

  ODB_LayerInfo * Layer_list;
  int Layer_index;
  int Layer_size;
} ODB_StepInfo;




ODB_LayerInfo

typedef struct{
  char Name[MAX_NAME_CHAR];
  int Layer_index; 

  int Context;       #BOARD=1 MISC=2
  int Type;          #COMPONENT=1 NONCOMPONENT=2
  double Extent[4];
  int Polarity;      #POSITIVE=1 NEGATIVE=2

  char StartName[MAX_NAME_CHAR];
  char EndName[MAX_NAME_CHAR];

  int Add_Type;      #COVERLAYER=1
                     #COVERCOAT=2
                     #PUNCH=3
                     #STIFFENER=4
                     #BEND_AREA=5
                     #PSA=6
  char Color[64];
} ODB_LayerInfo;



ODB_Drawable

/*** Draw Type ***/
#define LINE              1
#define PAD               2
#define ARC               3
#define SURFACE           4
#define TEXT              5
#define BARCODE           6
#define LASTDRAW          32767   //this will have all the pointers set to NULL;
/*** End Draw Type ***/


typedef struct{
  int Type;
  ODB_Line * Line;
  ODB_Pad * Pad;
  ODB_Arc * Arc;
  ODB_Surface * Surface;
  ODB_Text * Text;
  ODB_Barcode * Barcode;
} ODB_Drawable;



ODB_Barcode

/*** Orientation ***/
#define ROT1              0       //0 degrees, no mirror 
#define ROT2              1       //90 degrees, no mirror
#define ROT3              2       //180 degrees, no mirror
#define ROT4              3       //270 degrees, no mirror
#define ROT5              4       //0 degrees, mirror in X axis
#define ROT6              5       //90 degrees, mirror in X axis
#define ROT7              6       //180 degrees, mirror in X axis
#define ROT8              7       //270 degrees, mirror in X axis
/*** End Orientation ***/

typedef struct{
  float X_start;
  float Y_start;
  char Font[64];
  char Barcode[64];
  int Polarity;
  int Orientation;
  float Width;
  float Height;
  int FullAscii;                  //1 for full ASCII, 0 for partial ASCII
  int Checksum;                   //1 for checksum, 0 for no checksum
  int InvertBG;                   //1 for inverted background, 0 for no background
  int AddStr;                     //1 for an addition of a text string
  int StrPos;                     //1 for adding the string on top, 0 for bottom
  char Text[MAX_STRING_CHAR];

  ODB_Attribute * Attr_head;			
  ODB_Attribute * Attr_tail;
  int Attr_size;
} ODB_Barcode;



ODB_Text

typedef struct{
  float X_start;
  float Y_start;
  char Font[64];
  int Polarity;
  int Orientation;
  float Width;
  float Height;
  float WFactor;                  //width factor (in units of 12 mils)
  char Text[MAX_STRING_CHAR];
  int Version;

  ODB_Attribute * Attr_head;      
  ODB_Attribute * Attr_tail;
  int Attr_size;
} ODB_Text;



ODB_Polygon

/*** Polygon_Type ***/
#define SEGMENT           1				
#define CURVE             2				
/*** End Polygon_Type ***/
/*** Rotation ***/
#define CLOCKWISE         1
#define COUNTERCW         2
/*** End Rotation ***/
typedef struct{
  int Polygon_Type;
  double Extent[4];
  float X_end;
  float Y_end;
  float X_center;
  float Y_center;
  int Rotation;
} ODB_Polygon;



ODB_Surface

/*** Start Poly Type ***/
#define ISLAND            1
#define HOLE              2
/*** End Poly Type ***/
typedef struct{
  int Polarity;
  int Dcode;  
  double Extent[4];
  
  int Poly_Type;
  float X_start;
  float Y_start;

  ODB_Polygon * Polygon_list;
  int Polygon_index;
  int Polygon_size;

  ODB_Attribute * Attr_head;      
  ODB_Attribute * Attr_tail;
  int Attr_size;  
} ODB_Surface;



ODB_Arc

typedef struct{
  float X_start;
  float Y_start;
  float X_end;
  float Y_end;
  float X_center;
  float Y_center;
  int Polarity;
  int Dcode;  
  int Rotation;
  char Symbol[MAX_NAME_CHAR];			

  ODB_Attribute * Attr_head;      
  ODB_Attribute * Attr_tail;
  int Attr_size;
} ODB_Arc;



ODB_Pad

typedef struct{
  float X_start;
  float Y_start;
  int Polarity;
  int Dcode;  
  int Orientation;
  char Symbol[MAX_NAME_CHAR];			

  ODB_Attribute * Attr_head;     
  ODB_Attribute * Attr_tail;
  int Attr_size;
} ODB_Pad;



ODB_Line

typedef struct{
  float X_start;
  float Y_start;
  float X_end;
  float Y_end;
  int Polarity;
  int Dcode;  
  char Symbol[MAX_NAME_CHAR];			

  ODB_Attribute * Attr_head;			
  ODB_Attribute * Attr_tail;
  int Attr_size;
} ODB_Line;



ODB_Attribute

		
/*** Entity ***/
#define JOB               1		
#define STEP              2
#define SYMBOL            3
#define WHEEL             4
#define LAYER             5
#define FEATURE           6
#define COMPONENT         7
#define STACKUP           8
/*** End Entity ***/


/*** Attribute_Type ***/
#define BOL               1	  //Boolean
#define INT               2       //Integer
#define FLT               3       //Float
#define TXT               4       //Text
#define OPT               5       //Option
/*** End Attribute_Type ***/


typedef struct{
  char Name[MAX_NAME_CHAR];
  int Entity;
  int Attribute_Type;

  float Min;
  float Max;
  char Value[MAX_STRING_CHAR];
  char Option[MAX_STRING_CHAR];
  char Delete[MAX_STRING_CHAR];
  char Unit[32];

  ODB_Attribute * next;
} ODB_Attribute;

#endif



Download

Revision History

Price




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