routing_collisions
routing_collisions( route: photonforge.Component, obstacles: photonforge.Rectangle | photonforge.Circle | photonforge.Polygon | photonforge.Path | photonforge.Component | photonforge.Reference | collections.abc.Sequence[ photonforge.Rectangle | photonforge.Circle | photonforge.Polygon | photonforge.Path | photonforge.Component | photonforge.Reference ] = (), collision_layers: collections.abc.Sequence[tuple[int, int] | str] | None = None, collision_offset: float = 0,) -> tuple[list[photonforge.Polygon], list[photonforge.Polygon]]Find route collisions with obstacles and sibling route segments.
The route should be a component created by the internal parametric
routing functions, or a net emitted by route_auto. Obstacles may
be 2D structures, components, references, or sequences of those objects.
Components and references are expanded through get_structures,
optionally limited to collision_layers.
Args
- route: Route component to check.
- obstacles: Obstacles to test against the route geometry.
- collision_layers: Layers used to collect route and obstacle geometry. If
None, all structure layers are used. - collision_offset: Offset applied to route geometry before testing.
Returns
Tuple (obstacle_intersections, route_crossings). The first list
contains route-obstacle intersection polygons. The second list
contains intersections between route segments.