Verify route continuity and simplify automatic search setup
This commit is contained in:
parent
c200d0f7c1
commit
def1e4ea1d
1 changed files with 489 additions and 103 deletions
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from inire.geometry.components import build_component
|
||||
from inire.geometry.components import bend_fits_width, build_component
|
||||
from inire.model import resolve_bend_geometry
|
||||
from inire.seeds import Bend90Seed, SBendSeed, StraightSeed
|
||||
|
||||
|
|
@ -20,7 +20,10 @@ def materialize_path_seed(
|
|||
net_width: float,
|
||||
search: SearchOptions,
|
||||
clearance: float,
|
||||
) -> tuple[ComponentResult, ...]:
|
||||
) -> tuple[ComponentResult, ...] | None:
|
||||
if any(isinstance(segment, (Bend90Seed, SBendSeed)) and not bend_fits_width(segment.radius, net_width) for segment in seed.segments):
|
||||
return None
|
||||
|
||||
path: list[ComponentResult] = []
|
||||
current = start
|
||||
dilation = clearance / 2.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue