Repair exact visibility and hole rendering and streamline search state
This commit is contained in:
parent
8ad26cc3c1
commit
9ee786d138
1 changed files with 148 additions and 86 deletions
|
|
@ -150,6 +150,15 @@ class RoutingWorld:
|
|||
def _ensure_static_tree(self) -> None:
|
||||
self._static_obstacles.ensure_tree()
|
||||
|
||||
def corner_segment_visible(self, start: tuple[float, float], end: tuple[float, float]) -> bool:
|
||||
"""Allow endpoint contact while testing the open segment against keepouts."""
|
||||
self._ensure_static_tree()
|
||||
tree = self._static_obstacles.tree
|
||||
if tree is None:
|
||||
return True
|
||||
segment = LineString((start, end))
|
||||
return all(segment.relate_pattern(tree.geometries[index], "FF*******") for index in tree.query(segment))
|
||||
|
||||
def _ensure_static_raw_tree(self) -> None:
|
||||
self._static_obstacles.ensure_raw_tree()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue