test: print all structure names
This commit is contained in:
parent
c1c8bc7a7d
commit
4565879ffb
16
test.py
16
test.py
@ -28,11 +28,23 @@ for arg in sys.argv[1:]:
|
|||||||
|
|
||||||
print("library name : {}".format(lib.name))
|
print("library name : {}".format(lib.name))
|
||||||
print("contains a total of {} structure(s)".format(len(lib.structures)))
|
print("contains a total of {} structure(s)".format(len(lib.structures)))
|
||||||
|
|
||||||
|
for name in lib.structures.keys():
|
||||||
|
#print(name, end = " ")
|
||||||
|
print("- {}".format(name))
|
||||||
|
for elem in lib.structures[name].elements:
|
||||||
|
if isinstance(elem, gds.Boundary):
|
||||||
|
for coord in elem.points:
|
||||||
|
coord = (coord[0] * lib.units_per_dbunit , coord[1] * lib.units_per_dbunit)
|
||||||
|
|
||||||
bar = progress.bar.IncrementalBar("linking structure references")
|
bar = progress.bar.IncrementalBar("linking structure references")
|
||||||
lib.link_srefs(callback)
|
lib.link_refs(callback)
|
||||||
|
|
||||||
except gds.ParserError as e:
|
except gds.ParserError as e:
|
||||||
print("parser error: {}".format(e))
|
print("parser error: {}".format(e))
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
continue
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
print("\nall done")
|
||||||
|
Loading…
Reference in New Issue
Block a user