port translation is already handled in Pattern
This commit is contained in:
parent
09291e58f7
commit
cf634f1c16
@ -429,8 +429,6 @@ class Builder(PortList):
|
|||||||
self
|
self
|
||||||
"""
|
"""
|
||||||
self.pattern.translate_elements(offset)
|
self.pattern.translate_elements(offset)
|
||||||
for port in self.ports.values():
|
|
||||||
port.translate(offset)
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def rotate_around(self, pivot: ArrayLike, angle: float) -> Self:
|
def rotate_around(self, pivot: ArrayLike, angle: float) -> Self:
|
||||||
|
@ -338,10 +338,10 @@ class FlatBuilder(PortList):
|
|||||||
self.ports[name] = p
|
self.ports[name] = p
|
||||||
|
|
||||||
other_copy = other.deepcopy()
|
other_copy = other.deepcopy()
|
||||||
|
other_copy.ports.clear()
|
||||||
other_copy.mirror2d(mirrored)
|
other_copy.mirror2d(mirrored)
|
||||||
other_copy.rotate_around(pivot, rotation)
|
other_copy.rotate_around(pivot, rotation)
|
||||||
other_copy.translate_elements(offset)
|
other_copy.translate_elements(offset)
|
||||||
other_copy.ports.clear()
|
|
||||||
self.pattern.append(other_copy)
|
self.pattern.append(other_copy)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@ -356,8 +356,6 @@ class FlatBuilder(PortList):
|
|||||||
self
|
self
|
||||||
"""
|
"""
|
||||||
self.pattern.translate_elements(offset)
|
self.pattern.translate_elements(offset)
|
||||||
for port in self.ports.values():
|
|
||||||
port.translate(offset)
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def rotate_around(self, pivot: ArrayLike, angle: float) -> Self:
|
def rotate_around(self, pivot: ArrayLike, angle: float) -> Self:
|
||||||
|
Loading…
Reference in New Issue
Block a user