Skip to content

Commit

Permalink
Update spiral_paperclip.py
Browse files Browse the repository at this point in the history
putting the spiral middle (where it switches from CW to CCW), on one side, to reduce the number of SM to MM converters (two fewer). Thanks Pegah at UBC.
  • Loading branch information
lukasc-ubc committed Oct 30, 2024
1 parent accb5d3 commit f81a1be
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def produce_impl(self):
# spiral points
points = [
DPoint(-length0, offset),
DPoint(0.0, offset),
DPoint(0.0, -offset),
DPoint(-length0+radius*2, offset),
DPoint(-length0+radius*2, -offset),
DPoint(length0, -offset),
]
for i in range(1, self.loops * 2, 2):
Expand Down Expand Up @@ -447,6 +447,11 @@ def __init__(self):
from SiEPIC.utils.layout import new_layout
from SiEPIC.scripts import zoom_out

from SiEPIC._globals import Python_Env
if Python_Env == 'Script':
# For external Python mode, when installed using pip install siepic_ebeam_pdk
import siepic_ebeam_pdk

# load the test library, and technology
t = test_lib()
tech = t.technology
Expand Down Expand Up @@ -505,3 +510,12 @@ def __init__(self):
xmax = max(xmax, x + inst.bbox().width())

zoom_out(topcell)


# Display the layout in KLayout, using KLayout Package "klive", which needs to be installed in the KLayout Application
if Python_Env == 'Script':
from SiEPIC.scripts import export_layout
path = os.path.dirname(os.path.realpath(__file__))
file_out = export_layout (topcell, path, filename='spiral_paperclip', relative_path='', format='oas')
from SiEPIC.utils import klive
klive.show(file_out, technology=tech)

0 comments on commit f81a1be

Please sign in to comment.