[python]gdspy安装后测试代码
创始人
2025-05-30 10:10:01

gds源码:https://github.com/heitzmann/gdspy

GitHub - heitzmann/gdspy: Python module for creating GDSII stream files, usually CAD layouts.

import gdspy

# The GDSII file is called a library, which contains multiple cells.
lib = gdspy.GdsLibrary()

# Geometry must be placed in cells.
cell = lib.new_cell('FIRST')

# Create the geometry (a single rectangle) and add it to the cell.
rect = gdspy.Rectangle((0, 0), (2, 1))
cell.add(rect)

# Save the library in a file called 'first.gds'.
lib.write_gds('first.gds')

# Optionally, save an image of the cell as SVG.
cell.write_svg('first.svg')

# Display all cells using the internal viewer.
gdspy.LayoutViewer()

结果:

 

相关内容

热门资讯

2025新版教程“欢乐五张到底... 亲,欢乐五张这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很多用户的牌特别好,总...
2025新版教程“万博体育到底... 无需打开直接搜索微信:万博体育有挂吗本司针对手游进行,选择我们的四大理由:1、软件助手是一款功能更加...
2025新版教程“南通情怀到底... 2025新版教程“南通情怀到底是不是有挂”确实真的有挂(详细教程)是一款可以让一直输的玩家,快速成为...
2025新版教程“太仓麻将到底... 无需打开直接搜索微信:太仓麻将有挂吗本司针对手游进行,选择我们的四大理由:1、软件助手是一款功能更加...
2025新版教程“新乐游戏到底... 您好,新乐游戏这款游戏可以开挂的,确实是有挂的,通过微信【8198015 】很多玩家在这款游戏中打牌...