From c9b3f06737b88912d9ba22e508151c54dea99f63 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Thu, 30 May 2024 11:44:13 -0700 Subject: [PATCH] add bend_info --- gdsfactory/components/bend_circular.py | 5 ++++- gdsfactory/components/bend_euler.py | 5 ++++- gdsfactory/components/bend_s.py | 8 ++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gdsfactory/components/bend_circular.py b/gdsfactory/components/bend_circular.py index b5a2ea080..51214a43f 100644 --- a/gdsfactory/components/bend_circular.py +++ b/gdsfactory/components/bend_circular.py @@ -53,7 +53,10 @@ def bend_circular( x.validate_radius(radius) c.add_route_info( - cross_section=x, length=c.info["length"], n_bend_90=abs(angle / 90.0) + cross_section=x, + length=c.info["length"], + n_bend_90=abs(angle / 90.0), + min_bend_radius=radius, ) return c diff --git a/gdsfactory/components/bend_euler.py b/gdsfactory/components/bend_euler.py index 0d8bf3f0f..375deade4 100644 --- a/gdsfactory/components/bend_euler.py +++ b/gdsfactory/components/bend_euler.py @@ -82,7 +82,10 @@ def bend_euler( c.absorb(ref) c.add_route_info( - cross_section=x, length=c.info["length"], n_bend_90=abs(angle / 90.0) + cross_section=x, + length=c.info["length"], + n_bend_90=abs(angle / 90.0), + min_bend_radius=c.info["radius_min"], ) return c diff --git a/gdsfactory/components/bend_s.py b/gdsfactory/components/bend_s.py index 9100264b1..8f348d319 100644 --- a/gdsfactory/components/bend_s.py +++ b/gdsfactory/components/bend_s.py @@ -47,6 +47,14 @@ def bend_s( bend_ref = c << bend c.add_ports(bend_ref.ports) c.copy_child_info(bend) + + x = gf.get_cross_section(cross_section) + c.add_route_info( + cross_section=x, + length=c.info["length"], + n_bend_s=1, + min_bend_radius=c.info["min_bend_radius"], + ) return c