From c848a0f34fe3c3ab1eeab7035bf61d7efaaa1f27 Mon Sep 17 00:00:00 2001 From: ttemth Date: Mon, 13 May 2024 18:56:50 +0300 Subject: [PATCH] Minor edits to tutorial files. --- examples/python/tutorial-1.py | 5 ++--- examples/python/tutorial-4.py | 2 ++ examples/python/tutorial-5.py | 13 +++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/python/tutorial-1.py b/examples/python/tutorial-1.py index 2feab31..58241dc 100644 --- a/examples/python/tutorial-1.py +++ b/examples/python/tutorial-1.py @@ -2,7 +2,7 @@ if __name__ == "__main__": c = gf.Component( - "training" + "training-1" ) # Component can be though to be a canvas to draw on. It maps to GDS cells. # define components using standard gdsfactory functions @@ -27,8 +27,7 @@ b3.mirror() # Each component has ports defined. Connecting moves the component so the ports are matching. - s1.connect("o2", b1.ports["o1"]) - + b1.connect("o1", s1.ports["o2"]) b2.connect("o1", b1.ports["o2"]) b3.connect("o1", b2.ports["o2"]) b4.connect("o1", b3.ports["o2"]) diff --git a/examples/python/tutorial-4.py b/examples/python/tutorial-4.py index d36050c..c521a8d 100644 --- a/examples/python/tutorial-4.py +++ b/examples/python/tutorial-4.py @@ -1,5 +1,7 @@ import gdsfactory as gf +# import gvtt + @gf.cell def arm(angle: float = 90.0) -> gf.Component: diff --git a/examples/python/tutorial-5.py b/examples/python/tutorial-5.py index 7b64639..7b20d36 100644 --- a/examples/python/tutorial-5.py +++ b/examples/python/tutorial-5.py @@ -1,5 +1,7 @@ import gdsfactory as gf +import gvtt + @gf.cell def arm(): @@ -62,8 +64,15 @@ def mzi(): mymzi.x = 0.0 die = c << gf.get_component("die") - p1 = c << gf.get_component("edge_coupler_rib", pos=-250, die=die) - p2 = c << gf.get_component("edge_coupler_rib", pos=1000, die=die, side="E") + + p1 = c << gvtt.components.edge_coupler_rib() + p1.xmin = die.xmin + die.info["frame_margin"] + p1.y = -250 + + p2 = c << gvtt.components.edge_coupler_rib() + p2.rotate(180) + p2.xmin = die.xmax - die.info["frame_margin"] + p2.y = 250 routes = gf.routing.get_bundle_all_angle( [mymzi.ports["o1"], mymzi.ports["o2"]], [p1.ports["o1"], p2.ports["o1"]]