代码拉取完成,页面将自动刷新
import gdspy as gs
lib = gs.GdsLibrary()
cell = lib.new_cell('l2')
# set reference cordinate
X = 0
Y = 0
# determined by base material
W = 5
path1 = gs.Path(W, (X, Y + 2.5),number_of_paths = 2, distance = 10)
path1.segment(120,"+y")
path1.turn(25,"l")
path1.segment(100,"-x")
path1.turn(25,"rr")
path1.segment(250,"+x")
path1.turn(25,"ll")
path1.segment(250,"-x")
path1.turn(25,"rr")
path1.segment(250,"+x")
path1.turn(25,"ll")
path1.segment(250,"-x")
path1.turn(25,"rr")
path1.segment(250,"+x")
path1.turn(25,"ll")
path1.segment(220,"-x")
path1.turn(25,"rr")
path1.segment(220,"+x")
path1.turn(25,"ll")
path1.segment(220,"-x")
path1.turn(25,"rr")
path1.segment(220,"+x")
path1.turn(25,"ll")
path1.segment(220,"-x")
path1.turn(25,"rr")
path1.segment(220,"+x")
path1.turn(25,"l")
path1.segment(100,"+y")
path1.turn(25,"l")
path1.segment(300,"-x")
cell.add(path1)
lib.write_gds('E:/python/xiaoyu_GDSTest/resonator.gds')
gs.LayoutViewer(lib)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。