gdsfactory.routing.get_route_sbend#
- gdsfactory.routing.get_route_sbend(port1: ~gdsfactory.port.Port, port2: ~gdsfactory.port.Port, *, bend_s: ComponentFactory = <function bend_s>, allow_layer_mismatch: bool = False, allow_width_mismatch: bool = False, allow_type_mismatch: bool = False, **kwargs) Route [source]#
Returns an Sbend Route to connect two ports.
- Parameters:
port1 – start port.
port2 – end port.
bend_s – S-bend component factory.
- Keyword Arguments:
npoints – number of points.
with_cladding_box – square bounding box to avoid DRC errors.
cross_section – function.
allow_layer_mismatch – allow layer mismatch.
allow_width_mismatch – allow width mismatch.
allow_type_mismatch – allow type mismatch.
kwargs – cross_section settings.
import gdsfactory as gf c = gf.Component("demo_route_sbend") mmi1 = c << gf.components.mmi1x2() mmi2 = c << gf.components.mmi1x2() mmi2.movex(50) mmi2.movey(5) route = gf.routing.get_route_sbend(mmi1.ports['o2'], mmi2.ports['o1']) c.add(route.references) c.plot()
(
Source code
,png
,hires.png
,pdf
)