View Issue Details

IDProjectCategoryView StatusLast Update
0004264DraftBugpublic2022-02-06 23:16
Reporterlouisgag Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Target Version0.20 
Summary0004264: Constructor from the makeArray Function in the Draft Workbench does not Allow Polar Array
DescriptionYes, I have not created a thread because I think the bug is quite obvious.
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
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
makeArray(object,center,totalangle,totalnum,[name]) for polar array

but because of this part from the code:

    elif arg4:
        obj.ArrayType = "ortho"
it forces any call with a non-null "arg4" argument (in this case the name of the array) to make an Orthogonal array, or when the arguments for are polar array are given to simply return an error about wrong argument type.
Steps To ReproduceThis is just an example:
Make a new document, go to Part workbench, make a cylinder, go to python console, type:
import Draft
Draft.makeArray(App.getDocument('Unnamed').getObject('Cylinder'),App.Vector(0,0,0),360,4,"testArray")
Tags#pending-forum
FreeCAD InformationOS: 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)

Activities

openBrain

2020-02-19 13:06

developer   ~0014162

@louisgag : according guidelines (big yellow bow on top of the page), could you please open a topic on the forum (Draft subforum) so it can be more widely discussed ?
Please cross-post ticket number in forum, and forum thread in this ticket. Thanks.

louisgag

2020-02-19 15:53

reporter   ~0014163

thanks for having a look at my report, here is the Forum thread I just opened.

yorik

2022-03-03 13:55

administrator   ~0016864

This ticket has been migrated to GitHub as issue 6030.

Issue History

Date Modified Username Field Change
2020-02-12 13:15 louisgag New Issue
2020-02-19 13:06 openBrain Status new => feedback
2020-02-19 13:06 openBrain Note Added: 0014162
2020-02-19 15:53 louisgag Note Added: 0014163
2020-02-19 15:53 louisgag Status feedback => new
2021-02-06 06:45 abdullah Target Version => 0.20
2022-02-06 23:16 Kunda1 Tag Attached: #pending-forum