Draft: fix Link(Path)Array
This commit is contained in:
@@ -1288,9 +1288,6 @@ def makeArray(baseobject,arg1,arg2,arg3,arg4=None,arg5=None,arg6=None,name="Arra
|
||||
if len(obj.Base.ViewObject.DiffuseColor) > 1:
|
||||
obj.ViewObject.Proxy.resetColors(obj.ViewObject)
|
||||
baseobject.ViewObject.hide()
|
||||
formatObject(obj,obj.Base)
|
||||
if len(obj.Base.ViewObject.DiffuseColor) > 1:
|
||||
obj.ViewObject.Proxy.resetColors(obj.ViewObject)
|
||||
select(obj)
|
||||
return obj
|
||||
|
||||
@@ -1329,9 +1326,6 @@ def makePathArray(baseobject,pathobject,count,xlate=None,align=False,pathobjsubs
|
||||
if len(obj.Base.ViewObject.DiffuseColor) > 1:
|
||||
obj.ViewObject.Proxy.resetColors(obj.ViewObject)
|
||||
baseobject.ViewObject.hide()
|
||||
formatObject(obj,obj.Base)
|
||||
if len(obj.Base.ViewObject.DiffuseColor) > 1:
|
||||
obj.ViewObject.Proxy.resetColors(obj.ViewObject)
|
||||
select(obj)
|
||||
return obj
|
||||
|
||||
@@ -5939,8 +5933,9 @@ class _PathArray(_DraftLink):
|
||||
else:
|
||||
FreeCAD.Console.PrintLog ("_PathArray.createGeometry: path " + obj.PathObj.Name + " has no edges\n")
|
||||
return
|
||||
base = self.pathArray(obj.Base.Placement,w,obj.Count,obj.Xlate,obj.Align)
|
||||
return _DraftLink.buildShape(self,obj,pl,base)
|
||||
base = calculatePlacementsOnPath(
|
||||
obj.Base.Shape.Placement.Rotation,w,obj.Count,obj.Xlate,obj.Align)
|
||||
obj.Shape = _DraftLink.buildShape(self,obj,pl,base)
|
||||
|
||||
def getWireFromSubs(self,obj):
|
||||
'''Make a wire from PathObj subelements'''
|
||||
|
||||
@@ -40,7 +40,7 @@ Report to Draft.py for info
|
||||
|
||||
import six
|
||||
|
||||
import FreeCAD, FreeCADGui, os, Draft, sys, DraftVecUtils, math
|
||||
import FreeCAD, FreeCADGui, os, Draft, sys, traceback, DraftVecUtils, math
|
||||
|
||||
try:
|
||||
from PySide import QtCore, QtGui, QtSvg
|
||||
@@ -150,6 +150,7 @@ class todo:
|
||||
else:
|
||||
f()
|
||||
except:
|
||||
FreeCAD.Console.PrintLog (traceback.format_exc())
|
||||
wrn = "[Draft.todo.tasks] Unexpected error:", sys.exc_info()[0], "in ", f, "(", arg, ")"
|
||||
FreeCAD.Console.PrintWarning (wrn)
|
||||
except ReferenceError:
|
||||
@@ -171,6 +172,7 @@ class todo:
|
||||
func()
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
except:
|
||||
FreeCAD.Console.PrintLog (traceback.format_exc())
|
||||
wrn = "[Draft.todo.commit] Unexpected error:", sys.exc_info()[0], "in ", func
|
||||
FreeCAD.Console.PrintWarning (wrn)
|
||||
# restack Draft screen widgets after creation
|
||||
@@ -185,6 +187,7 @@ class todo:
|
||||
else:
|
||||
f()
|
||||
except:
|
||||
FreeCAD.Console.PrintLog (traceback.format_exc())
|
||||
wrn = "[Draft.todo.tasks] Unexpected error:", sys.exc_info()[0], "in ", f, "(", arg, ")"
|
||||
FreeCAD.Console.PrintWarning (wrn)
|
||||
todo.afteritinerary = []
|
||||
|
||||
Reference in New Issue
Block a user