Skip to content

Commit

Permalink
0000893: Draft upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Oct 18, 2013
1 parent f654c63 commit e18fb98
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/Mod/Draft/Draft.py
Expand Up @@ -2127,15 +2127,17 @@ def makeFaces(objectslist):
result = False
for o in objectslist:
for w in o.Shape.Wires:
if w.isClosed() and DraftGeomUtils.isPlanar(w):
try:
f = Part.Face(w)
if f:
newobj = FreeCAD.ActiveDocument.addObject("Part::Feature","Face")
newobj.Shape = f
addList.append(newobj)
result = True
if not o in deleteList:
deleteList.append(o)
except:
pass
else:
newobj = FreeCAD.ActiveDocument.addObject("Part::Feature","Face")
newobj.Shape = f
addList.append(newobj)
result = True
if not o in deleteList:
deleteList.append(o)
return result

def makeWires(objectslist):
Expand Down Expand Up @@ -2287,7 +2289,7 @@ def makeWires(objectslist):

# no result has been obtained
if not result:
msg(translate("draft", "Unable to upgrade these objects\n"))
msg(translate("draft", "Unable to upgrade these objects.\n"))

if delete:
names = []
Expand Down

0 comments on commit e18fb98

Please sign in to comment.