routing_collisions¶
- photonforge.routing_collisions(route, obstacles=(), collision_layers=None, collision_offset=0)[source]¶
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 throughget_structures(), optionally limited tocollision_layers.- Parameters:
route (Component) – Route component to check.
obstacles (Rectangle | Circle | Polygon | Path | Component | Reference | Sequence[Rectangle | Circle | Polygon | Path | Component | Reference]) – Obstacles to test against the route geometry.
collision_layers (Sequence[tuple[int, int] | str] | None) – Layers used to collect route and obstacle geometry. If
None, all structure layers are used.collision_offset (float) – 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.- Return type: