Skip to content

Commit

Permalink
Manhattan routing edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecea committed Oct 23, 2023
1 parent 3fde89b commit 7f9895d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gdsfactory/routing/manhattan.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,14 @@ def _generate_route_manhattan_points(

p = (p[0], sigp * _y)
if count == 1: # take care of the start_straight case
p = (p[0], -sigp * max(start_straight_length, _y))
p = (p[0], sigp * max(start_straight_length, _y))

a = 180
elif (
-p[0] - (end_straight_length + 2 * bs1 + bs2 + min_straight_length)
> -threshold
):
print("here2")
# go sufficiently up, and then east
p = (
p[0],
Expand Down Expand Up @@ -1082,8 +1083,12 @@ def route_manhattan(
s = gf.c.straight()
pt = c << s
pb = c << s
pb.rotate(90)
pt.move((400, 50))
route = gf.routing.get_route(

pb.movex(400)
pb.movey(100) # -10
route = route_manhattan(
pb.ports["o2"],
pt.ports["o1"],
cross_section="xs_sc_auto_widen",
Expand Down

0 comments on commit 7f9895d

Please sign in to comment.