match_path_lengths
match_path_lengths( routes: collections.abc.Sequence[photonforge.Component], matching: photonforge.PathLengthMatching | None = None, *, component: photonforge.Component | None = None, obstacles: collections.abc.Sequence[ photonforge.Rectangle | photonforge.Circle | photonforge.Polygon | photonforge.Path | photonforge.Component | photonforge.Reference ] | None = None, straight_kwargs: dict[str, Any] | None = None, bend_kwargs: dict[str, Any] | None = None, s_bend_kwargs: dict[str, Any] | None = None,) -> dictMatch 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 parent
component is given, all of its non-route references are treated as
keep-out obstacles automatically.
Args
- routes: Route components available for matching.
- matching:
PathLengthMatchingdescribing what to achieve. Itsnetsindex intoroutes; an emptynets(default) matches every route to the longest one. - component: Parent component containing the routes (and any devices, which become obstacles). Without one, the technology comes from the routes.
- obstacles: Extra keep-outs.
- straight_kwargs: Keyword arguments for
straight. - bend_kwargs: Keyword arguments for
bend. - s_bend_kwargs: Keyword arguments for
s_bend.
Returns
Report dict: handled flag, notes, targets, lengths,
residuals, added_bends, and per-route bend_census.
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