gdsii.elements – interface to GDSII elements
This module contains definitions for classes representing various GDSII elements. Mapping between GDSII elements and classes is given in the following table:
Possible instance attributes:
elflagsElement flags (
int, optional). Bit 15 specifies template data. Bit 14 specifies external data.plexPlex number (
int, optional).layerElement layer (
int)data_typeElement data type (
int)path_typeType of path endpoints (
int, optional). The values have the following meaning:
0 – square ends, flush with endpoints
1 – round ends, centered on endpoints
2 – square ends, centered on endpoints
4 – custom square ends
widthWidth of the path (
int, optional). If the value is negative, then the width is absolute and not affected by magnification factor.bgn_extn,end_extnStart end end extensions for
path_type4 (int, optional).xyList of points (
listof tuples(x, y)).struct_nameName of the referenced structure (
bytes).stransTransformation flags (
int, optional). Bits have the following meaning:
0 – reclection about X axis
13 – absolute magnification
14 – absolute angle
magMagnification factor (
float, optional).angleRotation factor in degrees (
float, optional). Rotation is counterclockwise.colsNumber of columns (
int).rowsNumber of rows (
int).text_typeText type (
int).presentationBit array that specifies how the text is presented (
int, optional). Meaning of bits:
Bits 10 and 11 specify font number (0-3).
Bits 12 and 13 specify vertical justification (0 – top, 1 – middle, 2 – bottom).
Bits 14 and 15 specify horizontal justification (0 – left, 1 – center, 2 – rigth).
stringString for
TEXTelement (bytes).node_typeNode type (
int).box_typeBox type (
int).propertiesElement properties, represented as a list of tupes (propattr, propvalue). propattr is an
int, propvalue isbytes. This attribute is optional.
- class gdsii.elements.ARef(struct_name, cols, rows, xy)
Class for
AREFGDSII element.- GDS syntax:
aref ::= AREF [ELFLAGS] [PLEX] SNAME [strans] COLROW XY [properties] ENDEL
Required attributes:
struct_name,cols,rows,xy.Optional attributes:
elflags,plex,strans,mag,angle,properties.
- class gdsii.elements.Boundary(layer, data_type, xy)
Class for
BOUNDARYGDSII element.- GDS syntax:
boundary ::= BOUNDARY [ELFLAGS] [PLEX] LAYER DATATYPE XY [properties] ENDEL
Required attributes:
layer,data_type,xy.Optional attributes:
elflags,plex,properties.
- class gdsii.elements.Box(layer, box_type, xy)
Class for
BOXGDSII element.- GDS syntax:
box ::= BOX [ELFLAGS] [PLEX] LAYER BOXTYPE XY [properties] ENDEL
Required attributes:
layer,box_type,xy.Optional attributes:
elflags,plex,properties.
- class gdsii.elements.Node(layer, node_type, xy)
Class for
NODEGDSII element.- GDS syntax:
node ::= NODE [ELFLAGS] [PLEX] LAYER NODETYPE XY [properties] ENDEL
Required attributes:
layer,node_type,xyOptional attributes:
elflags,plex,properties
- class gdsii.elements.Path(layer, data_type, xy)
Class for
PATHGDSII element.- GDS syntax:
path ::= PATH [ELFLAGS] [PLEX] LAYER DATATYPE [PATHTYPE] [WIDTH] [BGNEXTN] [ENDEXTN] XY [properties] ENDEL
Required attributes:
layer,data_type,xyOptional attributes:
elflags,plex,path_type,width,bgn_extn,end_extn,properties
- class gdsii.elements.SRef(struct_name, xy)
Class for
SREFGDSII element.- GDS syntax:
sref ::= SREF [ELFLAGS] [PLEX] SNAME [strans] XY [properties] ENDEL
Required attributes:
struct_name,xyOptional attributes:
elflags,strans,mag,angle,properties
- class gdsii.elements.Text(layer, text_type, xy, string)
Class for
TEXTGDSII element.- GDS syntax:
text ::= TEXT [ELFLAGS] [PLEX] LAYER TEXTTYPE [PRESENTATION] [PATHTYPE] [WIDTH] [strans] XY STRING [properties] ENDEL
Required attributes:
layer,text_type,xy,stringOptional attributes:
elflags,plex,presentation,path_type,width,strans,mag,angle,properties