Skip to content

Commit

Permalink
fixed bug in all reader
Browse files Browse the repository at this point in the history
  • Loading branch information
atait committed Mar 13, 2019
1 parent c89e8f5 commit 84795f5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lygadgets/cell_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def pyaCell_reader(pya_cell, filename, *args, **kwargs):
else:
if issubclass(celltype, phidl.Device):
def phidlDevice_reader(phidl_device, filename, *args, port_layer=None, **kwargs):
# phidl_device is not really used. It is just there to determine type.
#### hacks, because sometimes pya saves an extra topcell called $$$CONTEXT_INFO$$$
from gdspy import GdsLibrary
gdsii_lib = GdsLibrary()
Expand All @@ -127,10 +128,7 @@ def phidlDevice_reader(phidl_device, filename, *args, port_layer=None, **kwargs)
port_layer = default_phidl_portlayer
tempdevice = wop(tempdevice, layer=port_layer)
# copy over from temporary device
for e in tempdevice.elements:
phidl_device.elements.append(e)
phidl_device.name = tempdevice.name
return phidl_device
return tempdevice
return phidlDevice_reader

# try: import gdspy
Expand Down

0 comments on commit 84795f5

Please sign in to comment.