disambiguate some variable names
This commit is contained in:
parent
f8e347c997
commit
d33afc2bfd
@ -304,15 +304,15 @@ def read(stream: io.BufferedIOBase,
|
|||||||
else:
|
else:
|
||||||
args['layer'] = (element.layer, element.data_type)
|
args['layer'] = (element.layer, element.data_type)
|
||||||
|
|
||||||
shape = Polygon(**args)
|
poly = Polygon(**args)
|
||||||
|
|
||||||
if clean_vertices:
|
if clean_vertices:
|
||||||
try:
|
try:
|
||||||
shape.clean_vertices()
|
poly.clean_vertices()
|
||||||
except PatternError:
|
except PatternError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pat.shapes.append(shape)
|
pat.shapes.append(poly)
|
||||||
|
|
||||||
if isinstance(element, gdsii.elements.Path):
|
if isinstance(element, gdsii.elements.Path):
|
||||||
if element.path_type in path_cap_map:
|
if element.path_type in path_cap_map:
|
||||||
@ -338,15 +338,15 @@ def read(stream: io.BufferedIOBase,
|
|||||||
else:
|
else:
|
||||||
args['layer'] = (element.layer, element.data_type)
|
args['layer'] = (element.layer, element.data_type)
|
||||||
|
|
||||||
shape = Path(**args)
|
path = Path(**args)
|
||||||
|
|
||||||
if clean_vertices:
|
if clean_vertices:
|
||||||
try:
|
try:
|
||||||
shape.clean_vertices()
|
path.clean_vertices()
|
||||||
except PatternError as err:
|
except PatternError as err:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pat.shapes.append(shape)
|
pat.shapes.append(path)
|
||||||
|
|
||||||
elif isinstance(element, gdsii.elements.Text):
|
elif isinstance(element, gdsii.elements.Text):
|
||||||
label = Label(offset=element.xy,
|
label = Label(offset=element.xy,
|
||||||
|
@ -566,8 +566,8 @@ class Pattern:
|
|||||||
for entry in self.shapes + self.subpatterns:
|
for entry in self.shapes + self.subpatterns:
|
||||||
entry.offset *= c
|
entry.offset *= c
|
||||||
entry.scale_by(c)
|
entry.scale_by(c)
|
||||||
for entry in self.labels:
|
for label in self.labels:
|
||||||
entry.offset *= c
|
label.offset *= c
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def rotate_around(self, pivot: vector2, rotation: float) -> 'Pattern':
|
def rotate_around(self, pivot: vector2, rotation: float) -> 'Pattern':
|
||||||
|
Loading…
Reference in New Issue
Block a user