ipkiss3.pcell.routing.RouteManhattan

class ipkiss3.pcell.routing.RouteManhattan(points=[], closed=None, **kwargs)

Routes the input_port to the output_port using a manhattan pattern (straight sections along EAST, WEST, NORTH, SOUTH directions). When the input ot output port is not at a Manhattan direction it will be directed first to the closest one.

Parameters:

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

input_port: Port, optional

The port to route from

port_angle_decision: float, optional

end_face_angle: optional

Use this to overrule the ‘dangling’ angle at the end of an open shape

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

minimal spacing between parallel sections of the route

output_port: Port, optional

angle_in: float, optional

The angle of start section of the route

angle_out: float, optional

The angle of the end section of the route

closed: optional

domain: __Domain__, optional

The domain ( e.g. OpticalDomain, ElectricalDomain) of the route

points: optional

points of this shape

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

The length of the straight end section 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 used to generate the bends. Can be circular, spline, …

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

The length of the straight start section of the route

start_face_angle: optional

Use this to overrule the ‘dangling’ angle at the start of an open shape

size_info: SizeInfo, locked

get the size information on this Shape

start_pos: Coord2, locked

end_pos: Coord2, locked

See also

RouteManhattanBasic

Examples

"""
It's important to remark that ElectricalPorts don't have an angle by default.
By default the direction of the route will be based on the angle of the flightline between
the two specified ports.

You can also force the direction of the port by specifying an angle, this is demonstrated in this example
"""

from technologies import silicon_photonics
import ipkiss3.all as i3
from ipkiss3.pcell.routing import RouteManhattan
from ipkiss3.pcell.wiring import ElectricalPort, ElectricalWire, ElectricalWireTemplate

input_port = ElectricalPort(name="in", position=(5.0, 0.0))
output_port = ElectricalPort(name="out", position=(20.0, 50.0))

# create the route object
route = RouteManhattan(input_port=input_port,
                       output_port=output_port)

tpl = ElectricalWireTemplate()
wire = ElectricalWire(trace_template=tpl)
layout = wire.Layout(shape=route)
layout.visualize()
../../../_images/ipkiss3-pcell-routing-RouteManhattan-1.png
"""
Routing between electrical ports works equally well.
"""

from technologies import silicon_photonics
import ipkiss3.all as i3
from ipkiss3.pcell.routing import RouteManhattan
from ipkiss3.pcell.wiring import ElectricalPort, ElectricalWire, ElectricalWireTemplate

input_port = ElectricalPort(name="in", position=(5.0, 0.0))
output_port = ElectricalPort(name="out", position=(20.0, 50.0))

# create the route object
route = RouteManhattan(input_port=input_port,
                       output_port=output_port)

tpl = ElectricalWireTemplate()
wire = ElectricalWire(trace_template=tpl)
layout = wire.Layout(shape=route)
layout.visualize()
../../../_images/ipkiss3-pcell-routing-RouteManhattan-2.png
from technologies import silicon_photonics
import ipkiss3.all as i3
from ipkiss3.pcell.routing import RouteManhattan

input_port = i3.OpticalPort(name="in", position=(5.0, 0.0))
output_port = i3.OpticalPort(name="out", position=(20.0, 30.0), angle_deg=180.0)

# create the route object
route = RouteManhattan(input_port=input_port,
                       output_port=output_port)

# a route is a Shape, so we can use it to draw a waveguide
wg = i3.RoundedWaveguide(trace_template=i3.TECH.PCELLS.WG.DEFAULT)
layout = wg.Layout(shape=route)
layout.visualize()
../../../_images/ipkiss3-pcell-routing-RouteManhattan-3.png
"""
You can also create routes that don't take the sizes of bends into account, by
setting rounding_algorithm to None.
This is useful when you don't want your traces to be rounded:
"""
from technologies import silicon_photonics
import ipkiss3.all as i3
from ipkiss3.pcell.routing import RouteManhattan

input_port = i3.OpticalPort(name="in", position=(5.0, 0.0))
output_port = i3.OpticalPort(name="out", position=(20.0, 30.0), angle_deg=180.0)

# create the route object
route = RouteManhattan(input_port=input_port,
                       output_port=output_port,
                       rounding_algorithm=None)

# a route is a Shape, so we can use it to draw a waveguide
wg = i3.Waveguide(trace_template=i3.TECH.PCELLS.WG.DEFAULT)
layout = wg.Layout(shape=route)
layout.visualize()
../../../_images/ipkiss3-pcell-routing-RouteManhattan-4.png