Home › Forums › Nazca › Generic Bend › Reply To: Generic Bend
27 October 2018 at 10:08
#5231
Moderator
Dear Douglas,
Your approach is much more complex (and error prone) than it needs to be. You better use the interconnect module to provide you with a pcurve connection.
Here is how it can be used for your problem:
import nazca as nd
import nazca.generic_bend as gb
# Define interconnect
myIC = nd.interconnects.Interconnect(radius=10, width=2, layer=10)
# Defining bends
bend1 = nd.bend(radius=10, angle=-30, width=2).put(0,0)
b = nd.strt(length=1, width=2).put(70,0)
bend2 = nd.bend(radius=10, angle=30, width=2).put(b.pin['a0'])
myIC.pcurve_p2p(bend1.pin['b0'], Rin=10, Rout=10).put()
# Defining straights
straight1 = nd.strt(length=10, width=2).put(0,20)
straight2 = nd.strt(length=10, width=2).put(60,40)
myIC.pcurve_p2p(straight1.pin['b0'], straight2.pin['a0']).put()
nd.export_gds(filename='no_issue1.gds')
Also note that the radius (Rin,Rout) you specify in the pcurve_p2p() function need to match the radius of the curves you connect to (with the proper sign).
Xaveer