# Before:
# topcell -> a -> b -> c -> d
# topcell -> b -> c -> d
# topcell -> c -> d # After:
# topcell
下面的code保存为flatten.txt. 执行calibredrv flatten.txt
set lay [layout create "abcd.gds" -dt_expand -preservePaths -preserveTextAttributes] set topcell [$lay topcell] $lay flatten cell $topcell $lay gdsout out.gds