Skip to content

Commit

Permalink
Draft: small bugfix in Drawing view
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jun 8, 2015
1 parent 48113f3 commit 895510e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Mod/Draft/Draft.py
Expand Up @@ -4369,7 +4369,8 @@ def execute(self, obj):
svg = ""
shapes = []
others = []
for o in obj.Source.Group:
objs = getGroupContents([obj.Source])
for o in objs:
if o.ViewObject.isVisible():
svg += getSVG(o,obj.Scale,obj.LineWidth,obj.FontSize.Value,obj.FillStyle,obj.Direction,ls,lc)
else:
Expand Down
11 changes: 7 additions & 4 deletions src/Mod/Draft/DraftGeomUtils.py
Expand Up @@ -670,10 +670,11 @@ def sortEdges(edges):
edict = dict()
nedges = []
for e in edges:
if e.Length != 0:
sdict.setdefault( e.Vertexes[0].hashCode(), [] ).append(e)
edict.setdefault( e.Vertexes[-1].hashCode(),[] ).append(e)
nedges.append(e)
if hasattr(e,"Length"):
if e.Length != 0:
sdict.setdefault( e.Vertexes[0].hashCode(), [] ).append(e)
edict.setdefault( e.Vertexes[-1].hashCode(),[] ).append(e)
nedges.append(e)
if not nedges:
print "DraftGeomUtils.sortEdges: zero-length edges"
return edges
Expand Down Expand Up @@ -824,6 +825,8 @@ def lookfor(aVertex, inEdges):

def invert(edge):
'''invert(edge): returns an inverted copy of this edge'''
if len(edge.Vertexes) == 1:
return edge
if geomType(edge) == "Line":
return Part.Line(edge.Vertexes[-1].Point,edge.Vertexes[0].Point).toShape()
elif geomType(edge) == "Circle":
Expand Down

0 comments on commit 895510e

Please sign in to comment.