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. 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.

Parameters:
  • 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.