heitzmann/gdstk

Cell.copy() doesn't seem to make a true deep copy because filter() applied to the copy modifies the original

steriana opened this issue · 1 comments

I'm trying to compute the bounding box of a Cell with some layers ignored. To do this I call Cell.copy() then run filter() on that copy to remove layers. But this seems to affect the original cell, such that the Cell.copy() operation did not actually do a deep copy.

Sample code is attached.
test.txt

That's by design. Deep copying a cell creates new objects for that cell, so the references are new. But it does not copy dependencies recursively.