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:
Jan Petykiewicz 2020-01-07 22:17:00 -08:00
parent 5ba67af816
commit 64b8e4dec8

View File

@ -90,7 +90,7 @@ def write(patterns: Pattern or List[Pattern],
disambiguate_func = disambiguate_pattern_names
if not modify_originals:
patterns = [p.deepcopy().deepunlock() for p in patterns]
patterns = [p.deepunlock() for p in copy.deepcopy(patterns)]
# Create library
lib = gdsii.library.Library(version=600,