Draft: Fixed import of DXF splines - fixes #1743
This commit is contained in:
parent
12afbc9ed5
commit
fe994efa66
|
@ -300,7 +300,7 @@ def getColor():
|
||||||
|
|
||||||
def formatObject(obj,dxfobj=None):
|
def formatObject(obj,dxfobj=None):
|
||||||
"applies color and linetype to objects"
|
"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 hasattr(obj.ViewObject,"TextColor"):
|
||||||
if dxfobj.color_index == 256:
|
if dxfobj.color_index == 256:
|
||||||
cm = getGroupColor(dxfobj)[:3]
|
cm = getGroupColor(dxfobj)[:3]
|
||||||
|
@ -595,6 +595,9 @@ def drawSpline(spline,forceShape=False):
|
||||||
ob = Draft.makeBSpline(verts)
|
ob = Draft.makeBSpline(verts)
|
||||||
ob.Closed = closed
|
ob.Closed = closed
|
||||||
return ob
|
return ob
|
||||||
|
else:
|
||||||
|
if dxfDiscretizeCurves:
|
||||||
|
sh = Part.makePolygon(verts+[verts[0]])
|
||||||
else:
|
else:
|
||||||
sp = Part.BSplineCurve()
|
sp = Part.BSplineCurve()
|
||||||
# print(knots)
|
# print(knots)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user