Skip to content

Instantly share code, notes, and snippets.

@AleksandarKostovic
Last active June 8, 2019 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AleksandarKostovic/70d8325327df77c1330c4a138af7906f to your computer and use it in GitHub Desktop.
Save AleksandarKostovic/70d8325327df77c1330c4a138af7906f to your computer and use it in GitHub Desktop.
import nazca as nd
import nazca.demofab as demo
with nd.Cell("Coupler") as coupler:
# Upper arm
demo.shallow.sinebend(distance=100, offset=-40).put(0, 50)
demo.shallow.strt(length=20).put()
demo.shallow.sinebend(distance=100, offset=40).put()
# Lower arm
demo.shallow.sinebend(distance=100, offset=40).put(0, -50)
demo.shallow.strt(length=20).put()
demo.shallow.sinebend(distance=100, offset=-40).put()
# Pins
nd.Pin("a0").put(0, 50, 180)
nd.Pin("a1").put(0, -50, 180)
nd.Pin("b0").put(220, 50, 0)
nd.Pin("b1").put(220, -50, 0)
C = coupler.put(0)
#pin b0 is the pin that will attach eopm to the DC, but the c0 is planned to be an external pin like in laser module
demo.eopm_dc(length=150).put(C.pin['b0'])
pad = demo.pad_dc().put()
demo.metaldc.bend_strt_bend(pad.pin['c0']).put()
nd.export_gds()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment