Draft: Added a 'name' argument to makeArray()

This commit is contained in:
Yorik van Havre 2013-10-05 18:20:17 -03:00
parent b833e6aaf8
commit d9e0cbe6cb

View File

@ -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: