上个教程展示修改gds中的Label,如要修改图层,比如将Si波导换为SiN波导,过程是一样的:
from si_fab import all as pdk
from ipkiss3 import all as i3
class demo(i3.GDSCell):
def _default_filename(self):
return "SpiralCircular.gds"
class Layout(i3.GDSCell.Layout):
def _generate_elements(self, elems):
elems = super()._generate_elements(elems)
for elem in elems:
if elem.layer == i3.TECH.PPLAYER.SI:
elem.layer = i3.TECH.PPLAYER.SIN
return elems
if __name__ == '__main__':
demo().Layout().visualize()
demo().Layout().write_gdsii("SpiralCircular_2.gds")
结果如下: