phidl
phidl copied to clipboard
pg.boolean returns polygons where properties are the same object in memory
See:
import phidl
a = phidl.geometry.bbox(bbox=[(0, 0), (1, 2)])
b = phidl.geometry.bbox(bbox=[(0, 0.5), (1, 1.5)])
d = phidl.geometry.boolean(a, b, operation="not")
phidl.quickplot([a, b])
set(id(p.properties) for p in d.polygons)
and prints:
{6076552704}
which means that
d.polygons[0].properties["a"] = 1
print(d.polygons[1].properties)
prints {'a': 1}
.
@joamatab, maybe also happens in gdsfactory
?