[Builder / RenderPather] BREAKING remove aliases to old names
This commit is contained in:
parent
02f0833fb3
commit
778b3d9be7
18 changed files with 131 additions and 153 deletions
|
|
@ -1,5 +1,5 @@
|
|||
"""
|
||||
Tutorial: using `LazyLibrary` and `Builder.interface()`.
|
||||
Tutorial: using `LazyLibrary` and `Pather.interface()`.
|
||||
|
||||
This example assumes you have already read `devices.py` and generated the
|
||||
`circuit.gds` file it writes. The goal here is not the photonic-crystal geometry
|
||||
|
|
@ -10,7 +10,7 @@ from typing import Any
|
|||
from pprint import pformat
|
||||
|
||||
|
||||
from masque import Builder, LazyLibrary
|
||||
from masque import Pather, LazyLibrary
|
||||
from masque.file.gdsii import writefile, load_libraryfile
|
||||
|
||||
import basic_shapes
|
||||
|
|
@ -64,10 +64,10 @@ def main() -> None:
|
|||
|
||||
# Start a new design by copying the ports from an existing library cell.
|
||||
# This gives `circ2` the same external interface as `tri_l3cav`.
|
||||
circ2 = Builder(library=lib, ports='tri_l3cav')
|
||||
circ2 = Pather(library=lib, ports='tri_l3cav')
|
||||
|
||||
# First way to specify what we are plugging in: request an explicit abstract.
|
||||
# This works with `Pattern` methods directly as well as with `Builder`.
|
||||
# This works with `Pattern` methods directly as well as with `Pather`.
|
||||
circ2.plug(lib.abstract('wg10'), {'input': 'right'})
|
||||
|
||||
# Second way: use an `AbstractView`, which behaves like a mapping of names
|
||||
|
|
@ -75,7 +75,7 @@ def main() -> None:
|
|||
abstracts = lib.abstract_view()
|
||||
circ2.plug(abstracts['wg10'], {'output': 'left'})
|
||||
|
||||
# Third way: let `Builder` resolve a pattern name through its own library.
|
||||
# Third way: let `Pather` resolve a pattern name through its own library.
|
||||
# This shorthand is convenient, but it is specific to helpers that already
|
||||
# carry a library reference.
|
||||
circ2.plug('tri_wg10', {'input': 'right'})
|
||||
|
|
@ -89,10 +89,10 @@ def main() -> None:
|
|||
# Build a second device that is explicitly designed to mate with `circ2`.
|
||||
#
|
||||
|
||||
# `Builder.interface()` makes a new pattern whose ports mirror an existing
|
||||
# `Pather.interface()` makes a new pattern whose ports mirror an existing
|
||||
# design's external interface. That is useful when you want to design an
|
||||
# adapter, continuation, or mating structure.
|
||||
circ3 = Builder.interface(source=circ2)
|
||||
circ3 = Pather.interface(source=circ2)
|
||||
|
||||
# Continue routing outward from those inherited ports.
|
||||
circ3.plug('tri_bend0', {'input': 'right'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue