From d9e0cbe6cbf4ea654d12b5050d0952520535ffb8 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 5 Oct 2013 18:20:17 -0300 Subject: [PATCH] Draft: Added a 'name' argument to makeArray() --- src/Mod/Draft/Draft.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 6cc4c3788..2fdafb374 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -879,16 +879,16 @@ def makeBlock(objectslist): select(obj) return obj -def makeArray(baseobject,arg1,arg2,arg3,arg4=None): - '''makeArray(object,xvector,yvector,xnum,ynum) for rectangular array, or - makeArray(object,center,totalangle,totalnum) for polar array: Creates an array +def makeArray(baseobject,arg1,arg2,arg3,arg4=None,name="Array"): + '''makeArray(object,xvector,yvector,xnum,ynum,[name]) for rectangular array, or + makeArray(object,center,totalangle,totalnum,[name]) for polar array: Creates an array of the given object with, in case of rectangular array, xnum of iterations in the x direction at xvector distance between iterations, and same for y direction with yvector and ynum. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, including the original. The result is a parametric Draft Array.''' - obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Array") + obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name) _Array(obj) obj.Base = baseobject if arg4: