Skip to content

Commit

Permalink
Update spiral_paperclip.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Nov 3, 2024
1 parent f668025 commit ed3e24a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def produce_impl(self):
points.pop(-1)
points.append(
DPoint(-length0 - devrec * i,
0)
radius - offset + devrec * (i - 1) + extra)
)
if not self.ports_opposite and not self.port_vertical:
points.append(
Expand Down Expand Up @@ -399,7 +399,11 @@ def produce_impl(self):
self.cell.clear(self.layout.layer(self.TECHNOLOGY["Waveguide"]))
devrec_box = self.cell.bbox()
if self.port_vertical:
devrec_box = (pya.Region(devrec_box) - pya.Region(pya.DBox(-length0 - devrec * (i+1), 0, -length0 - devrec * (i-0.5), -radius * 2 + offset - devrec * (i+3) - extra).to_itype(ly.dbu))).merged()
devrec_box = (pya.Region(devrec_box) - pya.Region(pya.DBox(
-length0 - devrec * (i+1),
radius - offset + devrec * (i - 1) + extra,
-length0 - devrec * (i-0.5),
-radius * 2 + offset - devrec * (i+3) - extra).to_itype(self.layout.dbu))).merged()
self.cell.shapes(LayerDevRecN).insert(devrec_box)

# Create the pins on the input & output waveguides
Expand All @@ -411,7 +415,7 @@ def produce_impl(self):
"optA",
[
-length0 - devrec * (i),
0,
radius - offset + devrec * (i - 1) + extra,
],
self.wg_width,
LayerPinRecN,
Expand Down

0 comments on commit ed3e24a

Please sign in to comment.