Skip to content

Commit b36c2c5

Browse files
committed
test fixed
1 parent 9d93935 commit b36c2c5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/pyedb/common/nets.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,13 @@ def mirror_poly(poly):
229229
except KeyError:
230230
pass
231231
cbb = comp.bounding_box
232-
x = [cbb[0], cbb[0], cbb[2], cbb[2]]
233-
y = [cbb[1], cbb[3], cbb[3], cbb[1]]
232+
if isinstance(cbb, tuple):
233+
x = [cbb[0][0], cbb[0][0], cbb[1][0], cbb[1][0]]
234+
y = [cbb[0][1], cbb[1][1], cbb[1][1], cbb[0][1]]
235+
else:
236+
# falling back to list format for bbox
237+
x = [cbb[0], cbb[0], cbb[2], cbb[2]]
238+
y = [cbb[1], cbb[3], cbb[3], cbb[1]]
234239
vertices = [(i, j) for i, j in zip(x, y)]
235240
vertices = mirror_poly(vertices)
236241
poly = Polygon(vertices)

0 commit comments

Comments
 (0)