Skip to content

Commit

Permalink
Draft: Fixed bug in wire offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Dec 28, 2016
1 parent 1d3df20 commit 0408aa4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Mod/Draft/Draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,7 @@ def getRadius(obj,delta):
else:
return nr * math.cos(math.pi/obj.FacesNumber)

newwire = None
if getType(obj) == "Circle":
pass
elif getType(obj) == "BSpline":
Expand Down Expand Up @@ -1566,8 +1567,12 @@ def getRadius(obj,delta):
newobj = None
if sym: return None
if getType(obj) == "Wire":
newobj = makeWire(p)
newobj.Closed = obj.Closed
if p:
newobj = makeWire(p)
newobj.Closed = obj.Closed
elif newwire:
newobj = FreeCAD.ActiveDocument.addObject("Part::Feature","Offset")
newobj.Shape = newwire
elif getType(obj) == "Rectangle":
length,height,plac = getRect(p,obj)
newobj = makeRectangle(length,height,plac)
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/Draft/DraftGeomUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,8 @@ def getCurveType(edge,existingCurveType = None):
existingCurveType = { 'Line' : [], 'Arc' : [] }
if issubclass(type(edge.Curve),Part.LineSegment) :
existingCurveType['Line'] += [edge]
elif issubclass(type(edge.Curve),Part.Line) :
existingCurveType['Line'] += [edge]
elif issubclass(type(edge.Curve),Part.Circle) :
existingCurveType['Arc'] += [edge]
else :
Expand Down

0 comments on commit 0408aa4

Please sign in to comment.