Draft: Fixed arc direction in SVG projections

This commit is contained in:
Yorik van Havre 2015-03-01 12:42:35 -03:00
parent 77f6684dfe
commit df074d117e
2 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ class _ViewProviderSectionPlane:
elif prop == "LineWidth":
self.drawstyle.lineWidth = vobj.LineWidth
elif prop == "CutView":
if hasattr(vobj,"CutView"):
if hasattr(vobj,"CutView") and FreeCADGui.ActiveDocument.ActiveView:
sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
if vobj.CutView:
if self.clip:

View File

@ -1810,13 +1810,13 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
flag_large_arc = (((e.ParameterRange[1] - \
e.ParameterRange[0]) / math.pi) % 2) > 1
flag_sweep = (c.Axis * drawing_plane_normal >= 0) \
== (e.Orientation == "Forward")
== (e.LastParameter > e.FirstParameter)
# == (e.Orientation == "Forward")
for v in endpoints:
svg += 'A %s %s %s %s %s %s %s ' % \
(str(rx),str(ry),str(rot),\
str(int(flag_large_arc)),\
str(int(flag_sweep)),str(v.x),str(v.y))
print svg
elif DraftGeomUtils.geomType(e) == "Line":
v = getProj(vs[-1].Point)
svg += 'L '+ str(v.x) +' '+ str(v.y) + ' '