Home › Forums › Nazca › Creating priority rule for overlapping layers in specific regions › Reply To: Creating priority rule for overlapping layers in specific regions
14 October 2020 at 11:20
#6265
Moderator
Dear Marios,
This is best done with a combination of nazca and klayout. Here is an example nazca script:
import nazca as nd
nd.add_xsection("marios")
nd.add_layer2xsection(xsection="marios", layer=1)
nd.add_layer2xsection(xsection="marios", layer=2, growx=10)
nd.add_layer2xsection(xsection="marios", layer=3, growx=12)
marios = nd.interconnects.Interconnect(xs="marios", radius=100)
marios.strt(length=200, width=2).put(-100, 0, 0)
marios.bend(radius=100, angle=-45, width=1.5).put(0, -2.2, 0)
marios.bend(radius=100, angle=45, width=1.5).put(0, -2.2, 180)
nd.export_gds()
and the corresponding klayout script (save as “some_name.drc”):
# Run with: klayout -b -r some_name.drc
source("nazca_export.gds")
target("output.gds", "processed")
# Input waveguide layer (and "heal" tiny gaps)
wg = input(1).sized(1.nm).sized(-1.nm)
red = input(2)
blue = input(3)
# Subtract waveguide from red layer and output blue and new red layers
result = (red - wg)
result.output(12)
blue.output(13)
Run the latter script as argument to klayout from the command line:
“klayout -b -r some_name.drc” and your output will be in the output.gds file.
Xaveer