more bend work; bounds constrain edges
This commit is contained in:
parent
4714bed9a8
commit
58873692d6
15 changed files with 251 additions and 124 deletions
|
|
@ -16,26 +16,26 @@ def main() -> None:
|
|||
engine = CollisionEngine(clearance=2.0)
|
||||
danger_map = DangerMap(bounds=bounds)
|
||||
danger_map.precompute([])
|
||||
|
||||
|
||||
evaluator = CostEvaluator(engine, danger_map, greedy_h_weight=1.1)
|
||||
router = AStarRouter(evaluator, node_limit=100000)
|
||||
pf = PathFinder(router, evaluator)
|
||||
|
||||
|
||||
# 2. Define Netlist with various orientation challenges
|
||||
netlist = {
|
||||
# Opposite directions: requires two 90-degree bends to flip orientation
|
||||
"opposite": (Port(10, 80, 0), Port(90, 80, 180)),
|
||||
|
||||
|
||||
# 90-degree turn: standard L-shape
|
||||
"turn_90": (Port(10, 60, 0), Port(40, 90, 90)),
|
||||
|
||||
|
||||
# Output behind input: requires a full U-turn
|
||||
"behind": (Port(80, 40, 0), Port(20, 40, 0)),
|
||||
|
||||
|
||||
# Sharp return: output is behind and oriented towards the input
|
||||
"return_loop": (Port(80, 20, 0), Port(40, 10, 180)),
|
||||
}
|
||||
net_widths = {nid: 2.0 for nid in netlist}
|
||||
net_widths = dict.fromkeys(netlist, 2.0)
|
||||
|
||||
# 3. Route
|
||||
results = pf.route_all(netlist, net_widths)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue