View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003473||Draft||Bug||public||2018-05-12 23:22||2018-07-02 17:08|
|Target Version||Fixed in Version||0.18|
|Summary||0003473: Draft.array() and Draft.makeArray() not accepting z vector and z number parameters|
|Description||Reported on forum here:|
In the wiki:
can be used to create an array object in python, but calls to array() will fail if more than 5 parameters are used (in other words, if zvector and znum parameters are used). The error reported is that Draft.array() takes only 5 parameters, not 7. The wiki also provides information on the Draft.makeArray() parametric version of the function, but does not suggest zvector and znum parameters can be used with that function, but if only the x and y parameters are used to create the parametric array object, in the data tab there are options for modifying the IntervalZ and NumberZ properties. My guess is somebody forgot to add the necessary code to provide for the zvector and znum parameters for Draft.array() and Draft.makeArray() and also the Draft.makeArray() wiki was not updated to reflect the ability to use z parameters. The fix is to add the necessary code Draft.array() and Draft.makeArray() so that these 2 functions will accept 7 parameters. I propose the following code changes. First, modify Draft.array() so that it looks like this:
Next, modify Draft.makeArray() to this:
I do not believe any of the proposed changes would break any existing scripts that make use only of the x and y parameters.
The wiki will need to be updated for makeArray() to show the new z parameters are available.
|Steps To Reproduce||Run this macro to reproduce the error.|
|Additional Information||OS: Windows 10|
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13519 (Git)
Build type: Release
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
||@yorik please weigh in on this Draft ticket at your convenience|
added a pull request
Let me know if I did anything wrong as I'm new to github.
@yorik this ticket wasn't closed even though the PR was merged. Is there anything left?
Today I added another pull request related to this same issue. Z Interval is being set to 0,0,0 by default, which should be 0,0,1. The user can easily change the property, so it's very minor, but as it is with the default value no z-axis objects are being added (or at least if they're being added they're all going to the z=0 placement).
||@yorik please weigh in at your convenience, thanks|
||This is solved already (forgot which commit unfortunately)|
|2018-05-12 23:22||TheMarkster||New Issue|
|2018-05-14 01:20||Kunda1||Note Added: 0011250|
|2018-05-17 23:16||TheMarkster||Note Added: 0011256|
|2018-05-30 23:25||Kunda1||Note Added: 0011312|
|2018-05-30 23:26||Kunda1||Tag Attached: #tobeclosed|
|2018-05-31 04:18||TheMarkster||Note Added: 0011323|
|2018-06-20 15:13||Kunda1||Note Added: 0011455|
|2018-07-02 17:08||yorik||Note Added: 0011479|
|2018-07-02 17:08||yorik||Assigned To||=> yorik|
|2018-07-02 17:08||yorik||Status||new => closed|
|2018-07-02 17:08||yorik||Resolution||open => fixed|
|2018-07-02 17:08||yorik||Fixed in Version||=> 0.18|