Skip to content

Commit

Permalink
Merge pull request #2369 from thomasdorch/coupler_kwargs
Browse files Browse the repository at this point in the history
Pass cross_section kwargs through coupler_straight
  • Loading branch information
joamatab committed Dec 9, 2023
2 parents d25e2d7 + 8ed7d85 commit f251faf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gdsfactory/components/coupler_straight.py
Expand Up @@ -12,6 +12,7 @@ def coupler_straight(
gap: float = 0.27,
straight: Component = straight,
cross_section: CrossSectionSpec = "xs_sc_no_pins",
**kwargs,
) -> Component:
"""Coupler_straight with two parallel straights.
Expand All @@ -20,6 +21,7 @@ def coupler_straight(
gap: between straights.
straight: straight component (straight, bend_euler, bend_heater).
cross_section: specification (CrossSection, string or dict).
kwargs: cross_section settings.
.. code::
Expand All @@ -28,8 +30,13 @@ def coupler_straight(
o1──────▼─────────o4
"""
component = Component()

x = gf.get_cross_section(cross_section, **kwargs)

straight_component = straight(
length=length, cross_section=cross_section, add_pins=False
length=length,
cross_section=x,
add_pins=False,
)

top = component << straight_component
Expand Down

0 comments on commit f251faf

Please sign in to comment.