[library / gdsii] cleanup using new library rework

This commit is contained in:
Jan Petykiewicz 2026-07-13 21:37:52 -07:00
commit 7b589e4f44
14 changed files with 696 additions and 391 deletions

View file

@ -11,7 +11,7 @@ from typing import Any
from pprint import pformat
from masque import ILibrary, LibraryBuilder, Pather, Pattern, cell
from masque import ILibrary, LibraryBuilder, Pather, Pattern, PortsLibraryView, cell
from masque.file.gdsii import writefile
from masque.file.gdsii.lazy import readfile
@ -53,7 +53,7 @@ def main() -> None:
# imported on first materialization, but the raw source remains untouched
# until we build the final library.
gds_lib, _properties = readfile('circuit.gds')
builder.add_source(gds_lib.with_ports_from_data(layers=[(3, 0)], max_depth=1))
builder.add_source(PortsLibraryView(gds_lib, layers=[(3, 0)], max_depth=1))
print('Registered imported cells:\n' + pformat(list(gds_lib.keys())))