+ Exception handling in _BSpline.execute

This commit is contained in:
wmayer 2014-05-03 14:06:14 +02:00
parent 07f3f8257b
commit 05dac2eeb3

View File

@ -4013,7 +4013,12 @@ class _BSpline(_DraftObject):
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()