Note
Go to the end to download the full example code
S-Bend Routing
This example demonstrates how to use i3.ConnectSBend
to route between two optical ports that are slightly offset but facing each other.
import ipkiss3.all as i3
wg = i3.Waveguide()
circuit = i3.Circuit(
specs=[
i3.Inst(["wg1", "wg2"], wg),
i3.Place("wg1", (0.0, 0.0)),
i3.Place("wg2", (50.0, 20.0)),
i3.ConnectSBend(
"wg1:out", "wg2:in", sbend_type=i3.SBendType.Sine, min_bend_radius=10.0, connection_name="my_sbend"
),
],
)
Visualizing the layout
layout = circuit.Layout()
fig = layout.visualize(annotate=True, show=False)
fig.savefig("plot_connect_sbend.png")