Draft: small bugfix

This commit is contained in:
Yorik van Havre 2014-01-15 19:49:43 -02:00
parent e8ab9bd2e0
commit 828c4618aa

View File

@ -1536,7 +1536,7 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
svg += 'L '+ str(v.x) +' '+ str(v.y) + ' '
else:
bspline=e.Curve.toBSpline()
if bsp.Degree <= 3:
if bspline.Degree <= 3:
for bezierseg in bspline.toBezier():
if bezierseg.Degree>3: #should not happen
raise AssertionError
@ -1859,7 +1859,11 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
if (DraftGeomUtils.findEdge(e,wiredEdges) == None):
svg += getPath([e])
else:
svg = getCircle(obj.Shape.Edges[0])
# closed circle or spline
if isinstance(obj.Shape.Edges[0].Curve,Part.Circle):
svg = getCircle(obj.Shape.Edges[0])
else:
svg = getPath(obj.Shape.Edges)
return svg
def getrgb(color,testbw=True):