This bug does not show from the GUI because it always first makes an orthogonal array and then converts it.
I've created a bug report on the tracker and I am transcribing it here below.
I verified it on 0.19 and 0.18.4 but it probably also affects other earlier versions.
When in Python mode, trying to construct an array with a name using for example
Code: Select all
Draft.makeArray(App.getDocument('Unnamed').getObject('Cylinder'),App.Vector(0,0,0),360,4,"testArray")
from the function (line 1249 from Draft.py) does not allow to directly make a polar array with a name.
Indeed, the instructions in the code say
Code: Select all
makeArray(object,center,totalangle,totalnum,[name]) for polar array
but because of this part from the code:
Code: Select all
elif arg4:
obj.ArrayType = "ortho"
Here a simple example:
Make a new document, go to Part workbench, make a cylinder, go to python console, type:
Code: Select all
import Draft
Draft.makeArray(App.getDocument('Unnamed').getObject('Cylinder'),App.Vector(0,0,0),360,4,"testArray")
because it thinks an ortho array is requested.Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/louis/local/Mod/Draft/Draft.py", line 1295, in makeArray
obj.IntervalY = arg2
TypeError: type must be 'Vector' or tuple of three floats, not int
OS: Ubuntu 18.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.Unknown
Build type: Unknown
Python version: 2.7.17
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: C/Default (C)