Draft: Fixed import of DXF splines - fixes #1743

This commit is contained in:
Yorik van Havre 2015-01-02 17:05:27 -02:00
parent 12afbc9ed5
commit fe994efa66

View File

@ -300,7 +300,7 @@ def getColor():
def formatObject(obj,dxfobj=None):
"applies color and linetype to objects"
if dxfGetColors and dxfobj:
if dxfGetColors and dxfobj and hasattr(dxfobj,"color_index"):
if hasattr(obj.ViewObject,"TextColor"):
if dxfobj.color_index == 256:
cm = getGroupColor(dxfobj)[:3]
@ -595,6 +595,9 @@ def drawSpline(spline,forceShape=False):
ob = Draft.makeBSpline(verts)
ob.Closed = closed
return ob
else:
if dxfDiscretizeCurves:
sh = Part.makePolygon(verts+[verts[0]])
else:
sp = Part.BSplineCurve()
# print(knots)