Skip to content

Commit

Permalink
Merge pull request #505 from gdsfactory/fix-error-in-waypoints
Browse files Browse the repository at this point in the history
fix error in width calculation of waypoints
  • Loading branch information
sebastian-goeldi authored Oct 29, 2024
2 parents 8ca6c56 + 50a58a9 commit ffc2c33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kfactory/routing/manhattan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ def _backbone2bundle(
x = -width // 2

for pw in port_widths:
x += pw // 2 + spacing // 2
x += pw // 2

_pts = [p.dup() for p in backbone]
p1 = _pts[0]
Expand All @@ -2001,7 +2001,7 @@ def _backbone2bundle(
p2.y = _e.p2.y
p1 = p2

x += spacing - spacing // 2 + pw - pw // 2
x += spacing + pw - pw // 2
pts.append(_pts)

return pts
Expand Down Expand Up @@ -2151,7 +2151,7 @@ def _route_waypoints(
_w += widths[i] // 2
backbone_start_trans.append(rot_t * kdb.Trans(0, _w))
backbone_end_trans.append(rot_t * kdb.Trans(2, False, 0, _w))
_w += widths[i] - widths[i] // 3 + separation
_w += widths[i] - widths[i] // 2 + separation
start_manhattan_routers = route_smart(
start_ports=start_ts,
end_ports=backbone_start_trans,
Expand Down

0 comments on commit ffc2c33

Please sign in to comment.