Skip to content

route_length

route_length(
component: photonforge.Component,
layer: collections.abc.Sequence[int] | None = None,
port_spec: photonforge.PortSpec | None = None,
) -> float

Measure the length of parametric routes.

Internally, this functions adds the path lengths (without offsets) for all paths with distinct endpoints in a specific layer.

Args

  • component: Component with routes to be measured.
  • layer: Layer used to look for paths. If None, a best guess based on port_spec will be used.
  • port_spec: Port specification used for the route. If None, the component will be inspected and a best guess used.

Returns

Total path length.

See Also