Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Draft: Fixed arc direction in SVG projections
  • Loading branch information
yorikvanhavre committed Mar 21, 2015
1 parent 77f6684 commit df074d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchSectionPlane.py
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Draft/Draft.py
Expand Up @@ -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) + ' '
Expand Down

0 comments on commit df074d1

Please sign in to comment.