port translation is already handled in Pattern

This commit is contained in:
Jan Petykiewicz 2023-03-31 13:34:49 -07:00 committed by jan
parent 09291e58f7
commit cf634f1c16
2 changed files with 1 additions and 5 deletions

View File

@ -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:

View File

@ -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: