Name collision-index additions by their inputs

Use add_route for route components and add_path_geometry for prepared polygons. Update the router, tests, and index helpers to use those names.
This commit is contained in:
Jan Petykiewicz 2026-11-29 19:12:15 -08:00
commit fd6f96f341

View file

@ -216,7 +216,7 @@ class RoutingWorld:
return "face enters a keepout"
return None
def add_path(
def add_path_geometry(
self,
net_id: str,
geometry: Sequence[Polygon],
@ -225,7 +225,8 @@ class RoutingWorld:
*,
physical_geometry: Sequence[tuple[int, Polygon]] | None = None,
) -> None:
self._dynamic_paths.add_path(
"""Add prepared path polygons and their component indexes."""
self._dynamic_paths.add_path_geometry(
net_id,
geometry,
dilated_geometry=dilated_geometry,
@ -233,7 +234,8 @@ class RoutingWorld:
physical_geometry=physical_geometry,
)
def install_path(self, net_id: str, path: Sequence[ComponentResult]) -> None:
def add_route(self, net_id: str, path: Sequence[ComponentResult]) -> None:
"""Validate and index the polygons of a route's components."""
if any(not component.physical_checks[0] for component in path):
return
proxies: list[Polygon] = []
@ -243,7 +245,7 @@ class RoutingWorld:
proxies.extend(component.collision_geometry)
dilated_proxies.extend(component.dilated_collision_geometry)
physical_geometry.extend((component_index, polygon) for polygon in component.physical_geometry)
self.add_path(net_id, proxies, dilated_proxies, physical_geometry=physical_geometry)
self.add_path_geometry(net_id, proxies, dilated_proxies, physical_geometry=physical_geometry)
def remove_path(self, net_id: str) -> None:
self._dynamic_paths.remove_path(net_id)