Draft: Fixed bug in wire offsets

This commit is contained in:
Yorik van Havre 2016-12-28 14:30:38 -02:00
parent 1d3df20b6f
commit 0408aa4a60
2 changed files with 9 additions and 2 deletions

View File

@ -1512,6 +1512,7 @@ def offset(obj,delta,copy=False,bind=False,sym=False,occ=False):
else:
return nr * math.cos(math.pi/obj.FacesNumber)
newwire = None
if getType(obj) == "Circle":
pass
elif getType(obj) == "BSpline":
@ -1566,8 +1567,12 @@ def offset(obj,delta,copy=False,bind=False,sym=False,occ=False):
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)

View File

@ -1674,6 +1674,8 @@ def fillet(lEdges,r,chamfer=False):
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 :