From 2364288ba79390cfd22bcdbfc6e0f0c3bfdd4f34 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 31 Mar 2023 13:34:49 -0700 Subject: [PATCH] port translation is already handled in Pattern --- masque/builder/builder.py | 2 -- masque/builder/flatbuilder.py | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/masque/builder/builder.py b/masque/builder/builder.py index 3d05e76..7956b5e 100644 --- a/masque/builder/builder.py +++ b/masque/builder/builder.py @@ -429,8 +429,6 @@ class Builder(PortList): self """ self.pattern.translate_elements(offset) - for port in self.ports.values(): - port.translate(offset) return self def rotate_around(self, pivot: ArrayLike, angle: float) -> Self: diff --git a/masque/builder/flatbuilder.py b/masque/builder/flatbuilder.py index 6b9d93f..9994e2b 100644 --- a/masque/builder/flatbuilder.py +++ b/masque/builder/flatbuilder.py @@ -338,10 +338,10 @@ class FlatBuilder(PortList): self.ports[name] = p other_copy = other.deepcopy() + other_copy.ports.clear() other_copy.mirror2d(mirrored) other_copy.rotate_around(pivot, rotation) other_copy.translate_elements(offset) - other_copy.ports.clear() self.pattern.append(other_copy) return self @@ -356,8 +356,6 @@ class FlatBuilder(PortList): self """ self.pattern.translate_elements(offset) - for port in self.ports.values(): - port.translate(offset) return self def rotate_around(self, pivot: ArrayLike, angle: float) -> Self: