Command

Get_Vector

The Get_Vector command tells QIS to return all "visible" data in the current window and to return it as a stream of primitives. This means that the client will either render this data itself or will use the data for some other purpose than to display it.

Primitives

The basic primitives are:
  • boundaries
  • paths
  • text elements
  • structure references
vector_test

Sample Data

If you would like to download a small GDSII file and the associated return from the Get_Vector command the files are linked below.

vector_test.gds  2 KB

get_vector.txt   8 KB


Boundary

The boundary is a polygon. It must have a minimum of three vertices and can have up to 8192 vertices. It should not self-intersect. In addition to returning the coordinates of the boundary QIS also returns:
  • layer
  • datatype
  • structure
Boundary Syntax
B,structure name,layer:datatype,number of vertices, x1 y1  x2 y2 ... xn yn 

B                 -  indicates boundary data follows.

structure name    -  the name of the structure containing this boundary. a string 
                     typically 32 characters long but could be longer for non standard 
                     GDSII. We have even seen structure names with spaces. Maximum 
                     structure name length is 127.


layer:datatype     - the layer and datatype of this boundary. integer 0-1024

number of vertices - the number of vertices to follow. Note: GDSII always has one
                     extra vertex (i.e. the first and last are always on the same point)
                     
x1 y1 x2 y2 … xn yn -  coordinate of the vertices. These are in user units or data base units, 
                     (depending on which one is chosen is Set_Vector_Unit).  Therefore, if the
                     GDSII file is in units of microns you will be getting microns back
                     and will include decimal values.
Example
Client: Get_Vector \n
Server: Vector_Data \n
        B,TOP,5:0,4,0 0 10 0 10 10 0 10 \n
        Get_Vector\n

Path

A path is a series of connected segments of equal width. While a path may have a width=0 it most likely will have a non-zero width. A path can have up to 8192 vertices. The path should not self intersect although it is possible that you might get one that does. The end of the path can be of three types:

  • type 0 - [F]flush at vertex
  • type 1 - [R]half round extension
  • type 2 - [H]half width extension square

A path belongs to a layer and has a datatype (default datatype=0). It will also be tagged with the structure from which it originated.

Path Syntax
P,structure,layer:datatype,width,type,number_of_vertices, x1 y1  x2 y2 ... xn yn 



P                 -  indicates path data follows.

structure name    -  the name of the structure containing this path. a string 
                     typically 32 characters long but could be longer for non standard 
                     GDSII. We have even seen structure names with spaces. Maximum 
                     structure name length is 127.


layer:datatype     - the layer and datatype of this path. integer 0-1024

width              - width of the path in DBU or user units (depending on which one is 
                     chosen in Set_Vector_Unit).


type               - end type F=flush R=1/2 round extension H= 1/2 square extension

number of vertices - the number of vertices to follow. You can expect an absolute
                     maximum of 8192 vertices.

x1 y1 x2 y2. xn yn -  coordinate of the vertices. These are in user units or data base 
                       units (depending on which one is chosen in Set_Vector_Unit).  
                       Therefore, if the GDSII file is in units of microns you will be 
                       getting microns back and will include decimal values.

Example
Client: get_vector \n
Server: get_vector \n
        P,TOP,5:0,2,F,6,0 0 10 0 10 10 20 10 20 20 30 0\n
        get_vector\n

Note: The path width returned by QIS is after all transformations. If the path was 2 um wide in its structure but the structure is inserted at 10X, then the returned width (and coordinates of course)would be 10X.


Text

Text is a string of text along with geometric information including:

  • font number
  • reference location (any of 9)
  • reference coordinate
  • rotation
  • mirror
  • magnitude
  • structure containing the text

The proper rendering of text depends on two external items -- a font file which defines the actual strokes used to produce each character and the "height" of the font -- neither which is part of the GDSII stream data.

The magnitude is only a relative value - A magnitude of 1 may produce text that is 0.1 or 100 units high depending on how the font is designed.

Text Syntax
T,structure,layer:texttype,x,y,font,scale,rotation,reflection(X or N),hor_just,vert_just,
4, x1 y1 x2 y2 x3 y3 x4 y4,"text string"

T              -  indicates text data to follow
structure      -  name of structure this text belongs to
layer:textype  -  layer number (0-1024) and textype (0-1024) but typically=0
x,y            -  text insertion coordinates
font           -  one of 4 (0,1,2,3) 
scale          -  insertion magnitude
rotation       -  rotation about insertion point (ccw from X axis)
reflection     -  N=no reflection X=around X axis
      
                              Text justification        0,0---1,0---2,0
horiz_just     -  0, 1 or 2   specifies where the        |     |     |
vert_just      -  0, 1 or 2   insertion point is        0,1   1,1   1,2
                              within the 9 points        |     |     |
                              in the text extent box    0,2---1,2---2,2

4              -  number of vertices to follow (which is 4)

x1 y1 x2 y2 x3 y3 x4 y4  -  bounding box of the text. 
                      This is used to reflect the                                                          
                      transformations that have been applied.


"text_string"  -  the actual string of text delimited by quote marks.

Structure Reference

Strictly speaking, a structure reference is not a primitive at all - it is merely a symbol but outputting might be useful for some applications. If you don't need this info you can throw away the data.

Syntax

S,structure,parent,x,y,scale,rotation,reflection(X or N),5,x1 y1 ... x5 y5 

S           -  indicates structure data to follow
structure   -  name of the structure (string)
parent      -  name of this structure's parent (one level up in hierarchy)
x,y         -  insertion coordinates
scale       -  insertion scale
rotation    -  insertion rotation (CCW from X axis)
reflection  -  N=none, X = around X axis
5           -  number of vertices to follow for the extents box
 x1 y1      -  vertices of the extent box. Note that there are 5 sets and
 x2 y2         that  x1 y1 == x5 y5 
 x3 y3 
 x4 y4 
 x5 y5 

Example

S,TESTCHIP,TOP,2000,4500,1,0,N,5,200 450 800 450 800 1250 200 1250 200 450 

Array Structure Reference

In addition to structure reference, there is array structure reference. It starts with "A" for array, and it has the additional rows and columns after the reflection

Syntax

A,structure,parent,x,y,scale,rotation,reflection(X or N),8,6,5,x1 y1 ... x5 y5 

A           -  indicates array data to follow
structure   -  name of the structure (string)
parent      -  name of this structure's parent (one level up in hierarchy)
x,y         -  insertion coordinates
scale       -  insertion scale
rotation    -  insertion rotation (CCW from X axis)
reflection  -  N=none, X = around X axis
8           -  rows
6           -  columns
5           -  number of vertices to follow for the extents box
 x1 y1      -  vertices of the extent box. Note that there are 5 sets and
 x2 y2         that  x1 y1 == x5 y5 
 x3 y3 
 x4 y4 
 x5 y5 

Example

A,PLUG2,TOPMOSTST,160.500,127.500,1.00000,90.00000,N,8,6,5,162 127 162 147 147 147 147 127 162 127
When QIS receives Get_Vector, it sends out the above Vector_Data and ends with Get_Vector\n.

For more information about the differences between the long and short data formats for structures and arrays, see the section on Set_Reference_Vector_Format.