match_path_lengths¶
- photonforge.match_path_lengths(routes, matching=None, *, component=None, obstacles=None, straight_kwargs=None, bend_kwargs=None, s_bend_kwargs=None)[source]¶
Match the (optical) path lengths of existing routes, in place.
Works on routes created by
route(),route_auto(), or a netlist, by splicing displacement-neutral meanders into them; everything outside the spliced windows stays identical, endpoints and access regions are never modified, and no colliding geometry is ever emitted (illegal results are reverted and reported as refusals). When a parentcomponentis given, all of its non-route references are treated as keep-out obstacles automatically.- Parameters:
routes (Sequence[Component]) – Route components available for matching.
matching (PathLengthMatching | None) –
PathLengthMatchingdescribing what to achieve. Itsnetsindex intoroutes; an emptynets(default) matches every route to the longest one.component (Component | None) – Parent component containing the routes (and any devices, which become obstacles). Without one, the technology comes from the routes.
obstacles (Sequence[Rectangle | Circle | Polygon | Path | Component | Reference] | None) – Extra keep-outs.
straight_kwargs (dict[str, Any] | None) – Keyword arguments for
straight().bend_kwargs (dict[str, Any] | None) – Keyword arguments for
bend().s_bend_kwargs (dict[str, Any] | None) – Keyword arguments for
s_bend().
- Returns:
handledflag,notes,targets,lengths,residuals,added_bends, and per-routebend_census.- Return type:
Report dict
Note
A matched route is no longer what its own parameters would build, so it loses its
parametric_function:Component.update()on it would otherwise rebuild it unmatched. Routes the pass leaves alone keep theirs.See also
route_auto()