From ed3e24ada99a0d581ca4f6c7a3b139b056b99954 Mon Sep 17 00:00:00 2001 From: Lukas Chrostowski Date: Sat, 2 Nov 2024 23:16:40 -0700 Subject: [PATCH] Update spiral_paperclip.py --- .../pymacros/pcells_EBeam_Beta/spiral_paperclip.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py index 853dcb70..8066d47b 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py @@ -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( @@ -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 @@ -411,7 +415,7 @@ def produce_impl(self): "optA", [ -length0 - devrec * (i), - 0, + radius - offset + devrec * (i - 1) + extra, ], self.wg_width, LayerPinRecN,