From df074d117e08993efda530e124ccb3581c490556 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 1 Mar 2015 12:42:35 -0300 Subject: [PATCH] Draft: Fixed arc direction in SVG projections --- src/Mod/Arch/ArchSectionPlane.py | 2 +- src/Mod/Draft/Draft.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 560b965b09ea..fce4ff8fd573 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -255,7 +255,7 @@ def onChanged(self,vobj,prop): 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: diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 1073a26be0d2..e08b851f7d63 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -1810,13 +1810,13 @@ def getPath(edges=[],wires=[],pathname=None): 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) + ' '