From b0bb0a0b4c9257bbeb0128f00db342cd77260719 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 6 Sep 2023 15:56:39 +0200 Subject: [PATCH] Fix numpy exception with polygon scaling CURA-10004 --- UM/Math/Polygon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UM/Math/Polygon.py b/UM/Math/Polygon.py index 053ac349cf..8bfb9a03f3 100644 --- a/UM/Math/Polygon.py +++ b/UM/Math/Polygon.py @@ -160,6 +160,9 @@ def scale(self, factor: float, origin: Optional[List[float]] = None) -> "Polygon point. If `None`, the 0,0 coordinate will be used. :return: A transformed polygon. """ + if not self.isValid(): + return self + if origin is None: origin = [0, 0]