From 4334d0d50b0360c5af3d39b1853c60f381e6c7d8 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 3 Jun 2024 16:54:02 -0700 Subject: [PATCH] fix bounds calculation for arrays with manhattan rotation --- masque/pattern.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/masque/pattern.py b/masque/pattern.py index 0d98164..63dbfb2 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -436,6 +436,8 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable): corners = (rotation_matrix_2d(ref.rotation) @ ubounds.T).T bounds = numpy.vstack((numpy.min(corners, axis=0), numpy.max(corners, axis=0))) * ref.scale + [ref.offset] + if ref.repetition is not None: + bounds += ref.repetition.get_bounds() else: # Non-manhattan rotation, have to figure out bounds by rotating the pattern