gdstk.read_rawcells

gdstk.read_rawcells(infile) dict

Load cells form a GDSII file without decoding them.

Parameters:

infile (str or pathlib.Path) – Name of the input file.

Returns:

Dictionary of gdstk.RawCell indexed by name.

Examples

>>> cell1 = gdstk.Cell("CELL_1")
>>> cell1.add(gdstk.rectangle((0, 0), (2, 1)))
>>> cell2 = gdstk.Cell("CELL_2")
>>> cell2.add(gdstk.Reference(cell1, (-1, 0)))
>>> library = gdstk.Library()
>>> library.add(cell1, cell2)
>>> library.write_gds("test.gds")
>>> raw_cells = gdstk.read_rawcells("test.gds")
>>> print(raw_cells.keys())
dict_keys(['CELL_2', 'CELL_1'])
>>> print(len(raw_cells["CELL_1"].dependencies(True)))
0
>>> print(len(raw_cells["CELL_2"].dependencies(True)))
1
>>> deps = raw_cells["CELL_2"].dependencies(True)
>>> print(deps[0] is raw_cells["CELL_1"])
True