Tagged: gds layer number
17 August 2021 at 19:28 #6560CameronMember
Very simple task: how do I draw different waveguides, each with their own specified dimensons, onto different specified gds layer numbers in a single cell, where I can see all layers overlapping?
For example, I want box 1 = 10 x 10 on gds layer 1, box 2 = 12 x 12 on gds layer 2, and box 3 = 14×14 on gds layer 3.
A related question: when I run this code and export the gds:
It draws the structure I specified in layer #1, with the 10 x 0.5 dimensions. Then it adds a second layer #2 object bounding the layer #1 but with a greater width around the waveguide, but I have no control over that width or length, nor can I add a 3rd or 4th box? It makes no sense to me.
My goal is to simply draw multiple overlapping waveguides, each onto a different gds layer number which I specify, and each with a separate specified width and length. I’ve spent 2 hours and can’t figure out how to do this seemingly simple task.
Many, many thanks in advance for your help.22 August 2021 at 17:32 #6564XaveerModerator
To start with the second question: what you see is the effect of the way “cross sections” are implemented.
This is done to have a single structure write all relevant layers, typically of a waveguide.
In demofab this is done for (in your example) the “Shallow” cross section. You can find the cross sections by calling
You can see which layers are part of the cross sections by calling
nd.show_xsection_layer_map(), which shows indeed that there are two layers: “Shallow” and “ShallowTrench” that get drawn, where the second is 8 microns wider than the first. The first is as wide as the specified width of the waveguide.
How to work with cross sections is explained in tutorial https://nazca-design.org/xsections_and_layers/ and https://nazca-design.org/implement-a-cross-section/
To make use of this, a post-processing step may be needed in order to subtract one structure from the other. This is efficiently done in KLayout. See my answer to this post for some explanation: https://nazca-design.org/forums/topic/creating-priority-rule-for-overlapping-layers-in-specific-regions/
The answer to your first question is related: you can specify an absolute or relative “grow” in x and y to achieve what you want. This example will use an absolute grow.
import nazca as nd nd.add_layer(name="Main", layer=(1, 0), accuracy=0.001) nd.add_layer(name="Grow1", layer=(2, 0), accuracy=0.1) nd.add_layer(name="Grow2", layer=(3, 0), accuracy=0.1) nd.add_layer2xsection("Myxs", layer="Main") nd.add_layer2xsection("Myxs", layer="Grow1", growx=2, growy=2) nd.add_layer2xsection("Myxs", layer="Grow2", growx=4, growy=4) nd.strt(xs='Myxs', width=10, length=20).put() nd.export_gds()
- This reply was modified 1 month ago by Xaveer.
- You must be logged in to reply to this topic.