gdsfactory.routing.route_south#
- gdsfactory.routing.route_south(component: Component, optical_routing_type: int = 1, excluded_ports: tuple[str, ...] | None = None, straight_separation: float = 4.0, io_gratings_lines: list[list[ComponentReference]] | None = None, gc_port_name: str = 'o1', bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, taper: ComponentSpec | None = <function taper>, select_ports: Callable = functools.partial(<function select_ports>, port_type='optical'), port_names: Strs | None = None, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), min_length: float = 0.01, auto_widen: bool = False, auto_widen_minimum_length: float = 100, taper_length: float = 10, width_wide: float = 2, **kwargs) Routes [source]#
Returns Routes to route a component ports to the south.
- Parameters:
component – component to route.
optical_routing_type – routing heuristic 1 or 2 1 uses the component size info to estimate the box size. 2 only looks at the optical port positions to estimate the size.
excluded_ports – list of port names to NOT route.
straight_separation – in um.
io_gratings_lines – list of ports to which the ports produced by this function will be connected. Supplying this information helps avoiding straight collisions.
gc_port_name – grating coupler port name.
bend – spec.
straight – spec.
taper – spec.
select_ports – function to select_ports.
port_names – optional port names. Overrides select_ports.
cross_section – cross_section spec.
kwargs – cross_section settings.
- Works well if the component looks roughly like a rectangular box with:
north ports on the north of the box. south ports on the south of the box. east ports on the east of the box. west ports on the west of the box.
import gdsfactory as gf c = gf.components.ring_double() c = gf.Component() ref = c << gf.components.ring_double() r = gf.routing.route_south(ref) for e in r.references: c.add(e) c.plot()
(
Source code
,png
,hires.png
,pdf
)