代码拉取完成,页面将自动刷新
import gdspy as gs
lib = gs.GdsLibrary()
cell = lib.new_cell('l1')
X = 0
Y = 0
points1 = [(X-5,Y-2.5), (X-5,Y+2.5), (X-79,Y+2.5), (X-79,Y-83), (X-39,Y-83), (X-39,Y-17.5), (X+39, Y-17.5), (X+39,Y-83),(X+79,Y-83),
(X+79,Y+2.5),(X+5,Y+2.5),(X+5,Y-2.5),(X+74,Y-2.5),(X+74,Y-78),(X+44,Y-78),(X+44,Y-12.5),(X-44,Y-12.5),(X-44,Y-78),(X-74,Y-78),(X-74,Y-2.5)]
points2 = [(X-36,Y-20.5),(X-36,Y-160.5),(X-124,Y-160.5),(X-124,Y-148.5),(X-182,Y-148.5),(X-182,Y-244.5),(X-124,Y-244.5),(X-124,Y-232.5),
(X-36,Y-232.5),(X-36,Y-318.5),(X-9,Y-318.5),(X-9,Y-314.5),(X-11,Y-314.5),(X-11,Y-312.5),(X-7,Y-312.5),(X-7,Y-318.5),
(X+7,Y-318.5),(X+7,Y-312.5),(X+11,Y-312.5),(X+11,Y-314.5),(X+9,Y-314.5),(X+9,Y-318.5),(X+36,Y-318.5),(X+36,Y-232.5),
(X+124,Y-232.5),(X+124,Y-244.5),(X+182,Y-244.5),(X+182,Y-148.5),(X+124,Y-148.5),(X+124,Y-160.5),(X+36,Y-160.5),
(X+36,Y-20.5)]
points3 = [(X-12,Y-44.5),(X-12,Y-184.5),(X-148,Y-184.5),(X-148,Y-180.5),(X-172,Y-180.5),(X-172,Y-212.5),(X-148,Y-212.5),(X-148,Y-208.5),
(X-12,Y-208.5),(X-12,Y-300.5),(X-1.5,Y-300.5),(X-1.5,Y-306.5),(X+2.5,Y-306.5),(X+2.5,Y-304.5),(X+0.5,Y-304.5),(X+0.5,Y-300.5),(X+12,Y-300.5),
(X+12,Y-208.5),(X+148,Y-208.5),(X+148,Y-212.5),(X+172,Y-212.5),(X+172,Y-180.5),(X+148,Y-180.5),(X+148,Y-184.5),(X+12,Y-184.5),(X+12,Y-44.5)]
poly1 = gs.Polygon(points1)
poly2 = gs.Polygon(points2)
poly3 = gs.Polygon(points3)
cap_fin = gs.boolean(poly2,poly3,"not")
cell.add(poly1)
cell.add(cap_fin)
lib.write_gds('E:/python/xiaoyu_GDSTest/corepart_1.gds')
gs.LayoutViewer(lib)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。