Skip to content

Commit

Permalink
Draft: minor fix in Offset
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Mar 3, 2014
1 parent 9202353 commit 80f2a3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Mod/Draft/Draft.py
Expand Up @@ -1434,6 +1434,7 @@ def getRadius(obj,delta):
else:
newobj = Part.Face(obj.Shape.Wires[0])
elif copy:
newobj = None
if sym: return None
if getType(obj) == "Wire":
newobj = makeWire(p)
Expand All @@ -1453,13 +1454,18 @@ def getRadius(obj,delta):
newobj.Radius = getRadius(obj,delta)
newobj.DrawMode = obj.DrawMode
newobj.Placement = pl
elif getType(obj) == "Part":
newobj = makeWire(p)
newobj.Closed = obj.Shape.isClosed()
elif getType(obj) == "BSpline":
newobj = makeBSpline(delta)
newobj.Closed = obj.Closed
formatObject(newobj,obj)
else:
# try to offset anyway
try:
newobj = makeWire(p)
newobj.Closed = obj.Shape.isClosed()
except:
pass
if newobj:
formatObject(newobj,obj)
else:
if sym: return None
if getType(obj) == "Wire":
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Draft/DraftTools.py
Expand Up @@ -3945,6 +3945,7 @@ def proceed(self):
if (len(obj.Shape.Wires) == 1) or (len(obj.Shape.Edges) == 1):
Draft.makeSketch(obj,autoconstraints=False)
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
self.finish()


Expand Down

0 comments on commit 80f2a3a

Please sign in to comment.