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:
- elflags
- Element flags (int, optional). Bit 15 specifies template data. Bit 14 specifies external data.
- plex
- Plex number (int, optional).
- layer
- Element layer (int)
- data_type
- Element data type (int)
- path_type
Type 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
- width
- Width of the path (int, optional). If the value is negative, then the width is absolute and not affected by magnification factor.
- bgn_extn, end_extn
- Start end end extensions for path_type 4 (int, optional).
- xy
- List of points (list of tuples (x, y)).
- struct_name
- Name of the referenced structure (bytes).
- strans
Transformation flags (int, optional). Bits have the following meaning:
- 0 – reclection about X axis
- 13 – absolute magnification
- 14 – absolute angle
- mag
- Magnification factor (float, optional).
- angle
- Rotation factor in degrees (float, optional). Rotation is counterclockwise.
- cols
- Number of columns (int).
- rows
- Number of rows (int).
- text_type
- Text type (int).
- presentation
Bit 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).
- string
- String for TEXT element (bytes).
- node_type
- Node type (int).
- box_type
- Box type (int).
- properties
- Element properties, represented as a list of tupes (propattr, propvalue). propattr is an int, propvalue is bytes. This attribute is optional.
Class for AREF GDSII element.
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 for BOUNDARY GDSII element.
boundary ::= BOUNDARY [ELFLAGS] [PLEX] LAYER DATATYPE XY [properties] ENDEL
Required attributes: layer, data_type, xy.
Optional attributes: elflags, plex, properties.
Class for BOX GDSII element.
box ::= BOX [ELFLAGS] [PLEX] LAYER BOXTYPE XY [properties] ENDEL
Required attributes: layer, box_type, xy.
Optional attributes: elflags, plex, properties.
Class for NODE GDSII element.
node ::= NODE [ELFLAGS] [PLEX] LAYER NODETYPE XY [properties] ENDEL
Required attributes: layer, node_type, xy
Optional attributes: elflags, plex, properties
Class for PATH GDSII element.
path ::= PATH [ELFLAGS] [PLEX] LAYER DATATYPE [PATHTYPE] [WIDTH] [BGNEXTN] [ENDEXTN] XY [properties] ENDEL
Required attributes: layer, data_type, xy
Optional attributes: elflags, plex, path_type, width, bgn_extn, end_extn, properties
Class for SREF GDSII element.
sref ::= SREF [ELFLAGS] [PLEX] SNAME [strans] XY [properties] ENDEL
Required attributes: struct_name, xy
Optional attributes: elflags, strans, mag, angle, properties
Class for TEXT GDSII element.
text ::= TEXT [ELFLAGS] [PLEX] LAYER TEXTTYPE [PRESENTATION] [PATHTYPE] [WIDTH] [strans] XY STRING [properties] ENDEL
Required attributes: layer, text_type, xy, string
Optional attributes: elflags, plex, presentation, path_type, width, strans, mag, angle, properties