finesse.model.Model.path¶
- Model.path(from_node, to_node, via_node=None)[source]¶
Retrieves an ordered container of the path trace between the specified nodes.
The return type is an
OpticalPath
instance which stores an underlying list of the path data (see the documentation forOpticalPath
for details).- Parameters
from_node :
Node
Node to trace from.
to_node :
Node
Node to trace to.
via_node :
Node
(or sequence of)Node(s) to traverse via in the path.
- Returns
out :
OpticalPath
A container of the nodes and components between from_node and to_node in order.
- Raises
e1 :
NodeException
If either of from_node, to_node are not contained within the model.
If no path can be found between from_node and to_node.