From 05dac2eeb3c80bc735418a93963167ec73684b8d Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 3 May 2014 14:06:14 +0200 Subject: [PATCH] + Exception handling in _BSpline.execute --- src/Mod/Draft/Draft.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 118c0307feea..414b352b5a8c 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -4013,7 +4013,12 @@ def execute(self, obj): spline.interpolate(obj.Points, True) # DNC: bug fix: convert to face if closed shape = Part.Wire(spline.toShape()) - shape = Part.Face(shape) + # Creating a face from a closed spline cannot be expected to always work + # Usually, if the spline is not flat the call of Part.Face() fails + try: + shape = Part.Face(shape) + except: + pass obj.Shape = shape else: spline = Part.BSplineCurve()