Skip to content

Commit

Permalink
add bend_info
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed May 30, 2024
1 parent 65aaeac commit c9b3f06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion gdsfactory/components/bend_circular.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion gdsfactory/components/bend_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions gdsfactory/components/bend_s.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit c9b3f06

Please sign in to comment.