Skip to content

Commit

Permalink
Fix numpy exception with polygon scaling
Browse files Browse the repository at this point in the history
CURA-10004
  • Loading branch information
wawanbreton committed Sep 6, 2023
1 parent 02c30e9 commit b0bb0a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UM/Math/Polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit b0bb0a0

Please sign in to comment.