RouteToManhattanRelativeToPosition

ipkiss3.all.RouteToManhattanRelativeToPosition(**kwargs)

Route a port to a manhattan direction at a coordinate value relative to the given position (coordinate is x for EAST/WEST direction, and y for NORTH/SOUTH) relation is either ‘>’ or ‘<’

Parameters:
start_portPort object

port to be routed (starting point of the Route)

bend_radiuspositive number

radius of the bends used in the route. Default is taken from TECH.WG.BEND_RADIUS

min_straightnonnegative number

minimum length of a straight section between bends. Default is taken from TECH.WG.SHORT_STRAIGHT

start_straightnonnegative number

minimum length of the first straight section. Default is the same as min_straight

end_straightnonnegative number

minimum length of the last straight section. Default is the same as min_straight

rounding algorithmShapeModifier object

algorithm which produces the bend shape given the coordinates of the waypoints. default is a circular bend

directionconstant EAST, WEST, NORTH, SOUTH

direction towards which the start_port must be routed

positionnumber

x-coordinate (if direction is NORTH/SOUTH) or y-coordinate (EAST/WEST) of output port

relationcharacter ‘<’ or ‘>’

indicates whether the output must be towards the EAST/NORTH (>) or towards the WEST/SOUTH (<) with respect of the start_port

Returns:
RouteToLine object

Examples

import si_fab.all as pdk
import ipkiss3.all as i3

start_port = i3.OpticalPort(name="in", position=(0.0, 0.0), angle_deg=45.0)

# create the route object
route = i3.RouteToManhattanRelativeToPosition(start_port=start_port,
                                              start_straight=10.0,
                                              end_straight=20.0,
                                              direction=i3.DIRECTION.WEST,
                                              relation='<',
                                              position=0.0)

# a route is a Shape, so we can use it to draw a waveguide
wg = i3.RoundedWaveguide()
layout = wg.Layout(shape=route)
layout.visualize()
../../../../_images/ipkiss3-all-RouteToManhattanRelativeToPosition-1.png
import si_fab.all as pdk
import ipkiss3.all as i3

start_port = i3.OpticalPort(name="in", position=(0.0, 0.0), angle_deg=45.0)

# create the route object
route = i3.RouteToManhattanRelativeToPosition(start_port=start_port,
                                              start_straight=10.0,
                                              end_straight=20.0,
                                              relation='>',
                                              direction=i3.DIRECTION.EAST,
                                              position=40.0)

# a route is a Shape, so we can use it to draw a waveguide
wg = i3.RoundedWaveguide()
layout = wg.Layout(shape=route)
layout.visualize()
../../../../_images/ipkiss3-all-RouteToManhattanRelativeToPosition-2.png