Intersection now returns a pin_layout fixed during LEF computation.

This commit is contained in:
mrg 2022-05-13 13:56:16 -07:00
parent 4345136d1a
commit fbb2ea5fb6
1 changed files with 2 additions and 3 deletions

View File

@ -119,14 +119,13 @@ class lef:
old_blockages = list(self.blockages[pin.layer])
for blockage in old_blockages:
if blockage.overlaps(inflated_pin):
intersection_shape = blockage.intersection(inflated_pin)
intersection_pin = blockage.intersection(inflated_pin)
# If it is zero area, don't split the blockage
if intersection_shape[0][0]==intersection_shape[1][0] or intersection_shape[0][1]==intersection_shape[1][1]:
if not intersection_pin or intersection_pin.area() == 0:
continue
# Remove the old blockage and add the new ones
self.blockages[pin.layer].remove(blockage)
intersection_pin = pin_layout("", intersection_shape, inflated_pin.layer)
new_blockages = blockage.cut(intersection_pin)
self.blockages[pin.layer].extend(new_blockages)
# We split something so make another pass