ConnectManhattanTapered

class ipkiss3.all.ConnectManhattanTapered

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

Parameters:
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_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.

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

minimum_length of the straight sections.

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.

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.

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.

cover_layers: List with type restriction, allowed types: <class ‘ipkiss.primitives.layer.Layer’>, optional

Layers that can be used to generate additional coverage of the trace (e.g. manhattan corners). The ‘cover_bends’ property has to be set to True for this to take effect.

cover_bends: ( bool, bool_ or int ), optional

Adds rectangular blocks in the bends to avoid as much as possible non-manhattan angles. Needs to be configured together with the ‘cover_layers’ property.

fixed_bend90: ( PCell ), optional, *None allowed*

An optional override for the 90 degree bends used in the routing. The bend should have exactly two optical ports and the angle of the bend should be equal to 90 degrees. The trace template of the bend should match trace_template. Bends are assumed to be bi-directional in the routing. If the route requires non 90 degree angles, they will generated using bend_radius, angle_step and rounding_algorithm. Likewise when there isn’t enough space to place the fixed bend, it will be replaced by an autogenerated one.

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

minimal spacing between parallel sections of the route

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

The length of the straight end section of the route

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

The length of the straight start section of the route

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

The minimum length of any straight sections in the route

angle_step: float and number > 0, optional

angle step for rounding

rounding_algorithm: optional

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

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 i3.CP through which the route has to pass,or a list of i3.H / i3.V instances.

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"""
import si_fab.all as pdk  # 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"""
import si_fab.all as pdk  # 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"""
import si_fab.all as pdk  # 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
"""Example showcasing fixed bend usage"""
import si_fab.all as pdk  # 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)

# Bend to use for the 90 degree sections
bend = i3.RoundedWaveguide(trace_template=tt1)
bend.Layout(shape=[(-10.0, 0.0), (0.0, 0.0), (0, 10.0)], bend_radius=10.0)

# 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=90.0, trace_template=tt1)

# Create a connection
wg = i3.ConnectManhattanTapered.connect(
    port1,
    port2,
    name="example4_1",
    taper_length=10.0,
    bend_radius=5.0,
    trace_template=tt1,
    straight_trace_template=tt2,
    fixed_bend90=bend,
)
lo = wg.get_default_view(i3.LayoutView)
lo.visualize()

wg = i3.ConnectManhattanTapered.connect(
    port3,
    port4,
    name="example4_2",
    taper_length=10.0,
    bend_radius=5.0,
    trace_template=tt1,
    straight_trace_template=tt2,
    fixed_bend90=bend,
)
lo = wg.get_default_view(i3.LayoutView)
lo.visualize()
../../../../_images/ipkiss3-all-ConnectManhattanTapered-4_00.png
../../../../_images/ipkiss3-all-ConnectManhattanTapered-4_01.png