Fix duplicates in gds with multiple top-level cells
Since the different patterns we are handed might reference the same Patterns, we have to deepcopy the entire list at once so that we don't make multiple copies of them.
This commit is contained in:
parent
5ba67af816
commit
64b8e4dec8
@ -90,7 +90,7 @@ def write(patterns: Pattern or List[Pattern],
|
|||||||
disambiguate_func = disambiguate_pattern_names
|
disambiguate_func = disambiguate_pattern_names
|
||||||
|
|
||||||
if not modify_originals:
|
if not modify_originals:
|
||||||
patterns = [p.deepcopy().deepunlock() for p in patterns]
|
patterns = [p.deepunlock() for p in copy.deepcopy(patterns)]
|
||||||
|
|
||||||
# Create library
|
# Create library
|
||||||
lib = gdsii.library.Library(version=600,
|
lib = gdsii.library.Library(version=600,
|
||||||
|
Loading…
Reference in New Issue
Block a user