ConnectManhattanTapered

class ipkiss3.all.ConnectManhattanTapered(connections=None, *args, **kwargs)

A connector that uses i3.RouteManhattan to connect two ports and returns a waveguide with a different trace template in the straight sections.

Parameters
min_straight_section_length: float and Real, number and number >= 0, optional

minimum_length of the straight sections.

straight_section_lengths: ( list<number >= 0> ), optional, *None allowed*

A list of lengths for the straight_template sections of each path segment.Length of list must be identical to number of segmentsIf unspecified, the default from i3.TaperedWaveguide is used.

straight_section_positions: ( list<fraction> ), optional, *None allowed*

A list of relative positions for the straight_template sections of each path segment. Length of list must be identical to number of segments.Each position is a number between 0 (closest to first waypoint) and 1 (closest to last waypoint).0.5 will place the expanded section in the middle of the segment.If unspecified, the default from i3.TaperedWaveguide is used.

straight_trace_template: ( PCell and _TraceTemplate ), optional, *None allowed*

template for the straight sections. If unspecified, the trace template of the start port is used and no tapering is applied.

taper_length: ( float and number > 0 ), optional, *None allowed*

length of the taper between the regular waveguide and the expanded waveguide.Ignored if taper_lengths is set. If unspecified, the default from i3.TaperedWaveguide is used.

taper_lengths: ( list<number >= 0> ), optional, *None allowed*

Lengths of the tapers for each section. Length of list must be identical to number of segments.If unspecified, the default from i3.TaperedWaveguide is used.

angle_step: float and number > 0, optional

angle step for rounding

bend_radius: float and number > 0, optional

bend radius for the auto-generated bends

control_points: list, optional

Control the routing by passing either a list of points through which the route has to pass,or a list of i3.H / i3.V instances.

end_straight: float and Real, number and number >= 0, optional

The length of the straight end section of the route

min_spacing: float and Real, number and number >= 0, optional

minimal spacing between parallel sections of the route

min_straight: float and Real, number and number >= 0, optional

The minimum length of any straight sections in the route

rounding_algorithm: optional

Rounding algorithm (ShapeRound, ShapeRoundAdiabaticSpline, …). Takes a shape as input and returns a new (rounded) shape.

start_straight: float and Real, number and number >= 0, optional

The length of the straight start section of the route

trace_template: ( PCell and _TraceTemplate ), optional, *None allowed*

Trace template to use for the waveguide between the two ports, when the ports have a different template, transitions will be added. When this property is left unspecified/None the trace_template of the start_port will be used

Examples

"""Demonstrates basic usage of ConnectManhattanTapered"""
from technologies import silicon_photonics  # noqa: F401
import ipkiss3.all as i3
from picazzo3.traces.rib_wg.trace import RibWaveguideTemplate

# Trace template for the ports
tt1 = RibWaveguideTemplate()
tt1.Layout(core_width=0.5)

# Trace template for the straight sections
tt2 = RibWaveguideTemplate()
tt2.Layout(core_width=0.8)

# Define some ports
port1 = i3.OpticalPort(position=(0.0, 0.0), angle=0.0, trace_template=tt1)
port2 = i3.OpticalPort(position=(100.0, 100.0), angle=180.0, trace_template=tt1)
# Ports with non-manhattan angles:
port3 = i3.OpticalPort(position=(0.0, 0.0), angle=-20.0, trace_template=tt1)
port4 = i3.OpticalPort(position=(50.0, 70.0), angle=100.0, trace_template=tt1)

# Create a connection
wg = i3.ConnectManhattanTapered.connect(
    port1, port2, name="example1", bend_radius=10.0, straight_trace_template=tt2
)
lo = wg.get_default_view(i3.LayoutView)
lo.visualize()

wg = i3.ConnectManhattanTapered.connect(
    port3, port4, name="example1_2", bend_radius=10.0, straight_trace_template=tt2
)
lo = wg.get_default_view(i3.LayoutView)
lo.visualize()
../../../_images/ipkiss3-all-ConnectManhattanTapered-1_00.png
../../../_images/ipkiss3-all-ConnectManhattanTapered-1_01.png
"""Customize the connection by setting the taper length and length of the straight sections"""
from technologies import silicon_photonics  # noqa: F401
import ipkiss3.all as i3
from picazzo3.traces.wire_wg.trace import WireWaveguideTemplate

# Trace template for the ports
tt = WireWaveguideTemplate()
tt.Layout(core_width=0.5)

# Trace template for the straight sections
tt2 = WireWaveguideTemplate()
tt2.Layout(core_width=0.8)

# Define some ports
port1 = i3.OpticalPort(position=(0.0, 0.0), angle=-90.0, trace_template=tt)
port2 = i3.OpticalPort(position=(0.0, 20.0), angle=90.0, trace_template=tt)

# Create a connection
wg = i3.ConnectManhattanTapered.connect(
    port1,
    port2,
    name="example2",
    taper_length=5.0,
    straight_section_lengths=[0, 0, 10, 0, 0],
    bend_radius=10.0,
    straight_trace_template=tt2,
)
lo = wg.get_default_view(i3.LayoutView)
lo.visualize()
../../../_images/ipkiss3-all-ConnectManhattanTapered-2.png
"""Example exploring more advanced features"""
from technologies import silicon_photonics  # noqa: F401
import ipkiss3.all as i3
from picazzo3.traces.wire_wg.trace import WireWaveguideTemplate
from picazzo3.traces.rib_wg.trace import RibWaveguideTemplate

# Trace template for the ports
tt = WireWaveguideTemplate()
tt.Layout(core_width=0.5)

# Trace template for the bends of the connecting waveguide
tt2 = RibWaveguideTemplate()
tt2.Layout(core_width=0.5)

# Trace template for the straight sections of the connecting waveguide
tt3 = RibWaveguideTemplate()
tt3.Layout(core_width=0.8)

# Define some ports
port1 = i3.OpticalPort(position=(0.0, 0.0), angle=0.0, trace_template=tt)
port2 = i3.OpticalPort(position=(100.0, 100.0), angle=0.0, trace_template=tt)

# Create a connection
wg = i3.ConnectManhattanTapered.connect(
    port1,
    port2,
    name="example3",
    control_points=[(30, 30)],
    taper_length=10.0,
    straight_section_lengths=[0.0, 30.0, 20.0, 0.0, 0.0],
    straight_section_positions=[1] * 5,
    bend_radius=10.0,
    trace_template=tt2,
    straight_trace_template=tt3,
)
lo = wg.get_default_view(i3.LayoutView)
lo.visualize()
../../../_images/ipkiss3-all-ConnectManhattanTapered-3.png