We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d93935 commit b36c2c5Copy full SHA for b36c2c5
src/pyedb/common/nets.py
@@ -229,8 +229,13 @@ def mirror_poly(poly):
229
except KeyError:
230
pass
231
cbb = comp.bounding_box
232
- x = [cbb[0], cbb[0], cbb[2], cbb[2]]
233
- y = [cbb[1], cbb[3], cbb[3], cbb[1]]
+ if isinstance(cbb, tuple):
+ 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]]
239
vertices = [(i, j) for i, j in zip(x, y)]
240
vertices = mirror_poly(vertices)
241
poly = Polygon(vertices)
0 commit comments