Merge pull request #4341 from hyarion/feature-error-handling-get_svg

[0.19] [Draft] Add better error message in get_svg for direction
This commit is contained in:
Yorik van Havre
2021-02-08 16:08:18 +01:00
committed by GitHub
2 changed files with 24 additions and 0 deletions

View File

@@ -468,6 +468,8 @@ def get_svg(obj,
plane.alignToPointAndAxis_SVG(App.Vector(0, 0, 0),
direction.negative().negative(),
0)
else:
raise ValueError("'direction' cannot be: Vector(0, 0, 0)")
elif isinstance(direction, WorkingPlane.plane):
plane = direction