This code illustrates the problem
import klayout.db as kdb
ly = kdb.Layout()
top = ly.create_cell("TOP")
l1 = ly.layer(1, 0)
dss = kdb.DeepShapeStore()
rr = kdb.Region(kdb.Box(0, 0, 100, 100))
r = kdb.Region(top.begin_shapes_rec(l1), dss)
r += kdb.Region(kdb.Box(0, 0, 1000, 1000))
# this spoils the dss object, if
# 1. the first region is a deep region
# 2. the second region is a flat region
# 3. both regions are boxes
# after this operation, bounding boxes are no
# longer updated inside the DSS.
randrr = r & rr
r += kdb.Region(kdb.Box(1000, 1000, 2000, 2000))
# bbox should be 0,0;2000,2000
# bbox is 0,0;1000,1000!
print(f"r={r} bbox={r.bbox()}")
Expected output is:
r=(0,0;0,1000;1000,1000;1000,0);(1000,1000;1000,2000;2000,2000;2000,1000) bbox=(0,0;2000,2000)
Actual output is:
r=(0,0;0,1000;1000,1000;1000,0);(1000,1000;1000,2000;2000,2000;2000,1000) bbox=(0,0;1000,1000)
This problem does not happen with version 0.29.8, but with 0.29.10.
This code illustrates the problem
Expected output is:
Actual output is:
This problem does not happen with version 0.29.8, but with 0.29.10.