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 |
Reporter | TheMarkster | Assigned To | yorik | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.17 | ||||
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: https://forum.freecadweb.org/viewtopic.php?f=22&t=28611&sid=a15235a1de099a8ea65ad5d907f1d6f6 In the wiki: Draft Array it states:
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 Branch: releases/FreeCAD-0-17 Hash: 1a8b868018f45ea486c0023fdbfeb06febc1fb89 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) | ||||
Tags | #tobeclosed | ||||
FreeCAD Information | |||||
|
@yorik please weigh in on this Draft ticket at your convenience |
|
added a pull request https://github.com/FreeCAD/FreeCAD/pull/1460 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? ref: https://github.com/FreeCAD/FreeCAD/commit/e74a18f09c84c8a46f87a52fdab484e5ca897a58 https://github.com/FreeCAD/FreeCAD/commit/f9212edc6d030a090aff4d40a5b58055c3c9b128 https://github.com/FreeCAD/FreeCAD/commit/e0ef642d248422ea4e97060b180163f6f2c8f9ec |
|
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). https://github.com/FreeCAD/FreeCAD/pull/1486 |
|
@yorik please weigh in at your convenience, thanks |
|
This is solved already (forgot which commit unfortunately) |
Date Modified | Username | Field | Change |
---|---|---|---|
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 |