Skip to content

Commit

Permalink
Draft: small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 15, 2014
1 parent e8ab9bd commit 828c461
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Draft/Draft.py
Expand Up @@ -1536,7 +1536,7 @@ def getPath(edges=[],wires=[]):
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
Expand Down Expand Up @@ -1859,7 +1859,11 @@ def getText(color,fontsize,fontname,angle,base,text):
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):
Expand Down

0 comments on commit 828c461

Please sign in to comment.