diff --git a/masque/file/gdsii.py b/masque/file/gdsii.py index a835c05..b28333b 100644 --- a/masque/file/gdsii.py +++ b/masque/file/gdsii.py @@ -304,15 +304,15 @@ def read(stream: io.BufferedIOBase, else: args['layer'] = (element.layer, element.data_type) - shape = Polygon(**args) + poly = Polygon(**args) if clean_vertices: try: - shape.clean_vertices() + poly.clean_vertices() except PatternError: continue - pat.shapes.append(shape) + pat.shapes.append(poly) if isinstance(element, gdsii.elements.Path): if element.path_type in path_cap_map: @@ -338,15 +338,15 @@ def read(stream: io.BufferedIOBase, else: args['layer'] = (element.layer, element.data_type) - shape = Path(**args) + path = Path(**args) if clean_vertices: try: - shape.clean_vertices() + path.clean_vertices() except PatternError as err: continue - pat.shapes.append(shape) + pat.shapes.append(path) elif isinstance(element, gdsii.elements.Text): label = Label(offset=element.xy, diff --git a/masque/pattern.py b/masque/pattern.py index 2c6fd96..2f5b769 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -566,8 +566,8 @@ class Pattern: for entry in self.shapes + self.subpatterns: entry.offset *= c entry.scale_by(c) - for entry in self.labels: - entry.offset *= c + for label in self.labels: + label.offset *= c return self def rotate_around(self, pivot: vector2, rotation: float) -> 'Pattern':