Search found 24 matches

Go to advanced search

by donjan
Tue Aug 20, 2019 2:48 pm
Forum: Python scripting and macros
Topic: Abusing FeaturePython Proxy kills save files.
Replies: 0
Views: 61

Abusing FeaturePython Proxy kills save files.

Tested on FreeCAD 0.18.2 and 0.18.3 on a Debian and two different Ubuntu releases. The issue is based on bad usage of the FeaturePython.Proxy member, where the error case should be handled much more gracefully. WARNING: use a document you don't care about to test the following code. We assign a Qt w...
by donjan
Tue Aug 20, 2019 12:16 am
Forum: Developers corner
Topic: Param object editor macro
Replies: 5
Views: 336

Re: Param object editor macro

Added live updating with a global addDocumentObserver(), then filtering for my object. Seems a bit overkill, but does the job.
selector_ui.jpg
selector_ui.jpg (65.96 KiB) Viewed 59 times
by donjan
Fri Aug 16, 2019 5:40 pm
Forum: Developers corner
Topic: Param object editor macro
Replies: 5
Views: 336

Re: Param object editor macro

A few updates: - hidden variable differentiating it from other App::FeaturePython objects. This enables a nicer user interface via dropdown selection. - "used in" lookup now properly respects word boundaries in expressions. The current script creates slightly different objects and won't recognise th...
by donjan
Sun Aug 11, 2019 10:26 pm
Forum: Developers corner
Topic: Param object editor macro
Replies: 5
Views: 336

Re: Param object editor macro

Had I been aware of the DynamicData workbench a few months ago, I probably would not have written this macro. Didn't find it because I never expected anyone to want to put this kind of functionality in a workbench. It's definitely a useful plugin, but I find its UX is rather convoluted due to the mu...
by donjan
Fri Aug 09, 2019 7:56 pm
Forum: Developers corner
Topic: Param object editor macro
Replies: 5
Views: 336

Re: Param object editor macro

Added a tooltip (also text when deleting) showing labels of where the property is used:
usedin.jpg
usedin.jpg (69.73 KiB) Viewed 249 times
by donjan
Fri Jul 19, 2019 11:36 pm
Forum: Developers corner
Topic: Param object editor macro
Replies: 5
Views: 336

Param object editor macro

For a while now I've been using App::FeaturePython objects filled with values to parametrise sketches, pads, etc. conveniently from the outliner. I want to share the corresponding GUI macro as I find it quite useful and it has reached some stage of maturity. Comments welcome. Usage: run the macro, s...
by donjan
Thu Mar 14, 2019 2:26 pm
Forum: Python scripting and macros
Topic: Part::PythonFeature removeProperty fails to setExpression to None
Replies: 2
Views: 157

Part::PythonFeature removeProperty fails to setExpression to None

FreeCAD 0.17 13541 (Git) on Ubuntu 18.04. The following code illustrates a problem with using FeaturePython objects as parameter buckets and deleting a leaf dependency parameter. doc = FreeCAD.ActiveDocument p1 = doc.addObject("App::FeaturePython", "params1") p2 = doc.addObject("App::FeaturePython",...
by donjan
Thu Jan 24, 2019 4:23 pm
Forum: Python scripting and macros
Topic: FreeCAD 0.18 Python3 bindings
Replies: 2
Views: 495

Re: FreeCAD 0.18 Python3 bindings

After purging the main repo package and installing from your PPA, I get: $ export PYTHONPATH=/usr/lib/freecad/lib && python3 Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. import FreeCAD FreeCAD 0.18, Libs: 0....
by donjan
Wed Jan 23, 2019 6:38 pm
Forum: Python scripting and macros
Topic: FreeCAD 0.18 Python3 bindings
Replies: 2
Views: 495

FreeCAD 0.18 Python3 bindings

Testing 0.18 from the daily repo on Ubuntu: $ export PYTHONPATH=/usr/lib/freecad-daily/lib && python3 Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import FreeCAD Traceback (most recent call last): File "...
by donjan
Sun Aug 26, 2018 7:32 pm
Forum: Help on using FreeCAD
Topic: Moderately simple file crashes FC 0.17
Replies: 5
Views: 204

Re: Moderately simple file crashes FC 0.17

Assuming your packagers push release builds into the PPAs, that's what I'm running with. Backtrace hangs waiting for FreeCAD, and the stack is gone if I kill it and then bt. So bt and then kill `pidof freecad`: Starting program: /usr/bin/freecad [Thread debugging using libthread_db enabled] Using ho...

Go to advanced search