Skip to content

Commit

Permalink
Draft: Added shoogen's fix to bspline to svg stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 17, 2014
1 parent 98cef33 commit 843838e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Mod/Draft/Draft.py
Expand Up @@ -1536,7 +1536,12 @@ def getPath(edges=[],wires=[]):
svg += 'L '+ str(v.x) +' '+ str(v.y) + ' '
else:
bspline=e.Curve.toBSpline()
if bspline.Degree <= 3 and not bspline.isRational():
if bspline.Degree > 3 or bspline.isRational():
try:
bspline=bspline.approximateBSpline(0.05,20, 3,'C0')
except RuntimeError:
print "Debug: unable to approximate bspline"
elif bspline.Degree <= 3 and not bspline.isRational():
for bezierseg in bspline.toBezier():
if bezierseg.Degree>3: #should not happen
raise AssertionError
Expand Down

0 comments on commit 843838e

Please sign in to comment.