[SOLVED] Bug report: CompoundFilter in command line

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
ker
Posts: 3
Joined: Mon Mar 19, 2018 4:09 pm

[SOLVED] Bug report: CompoundFilter in command line

Postby ker » Tue Mar 20, 2018 4:09 pm

Hi all,

CompoundFilter does not work in Python script in non-GUI-mode.

The attached macro works OK running in the GUI, but when run with:
FreeCADCmd CompoundFilter_bug_example.FCMacro
in command line, it gives error:
Exception while processing file: CompoundFilter_bug_example.FCMacro ['NoneType' object has no attribute 'Proxy']

The problem is in the file Mod/Part/CompoundTools/CompoundFilter.py, in line 47.
After replacing that line with
------
if obj.ViewObject:
_ViewProviderCompoundFilter(obj.ViewObject)
------
the code works OK in command line, too. Maybe the correction is bad, bus still works.

My installation:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13407 (Git)
Build type: Release
Branch: master
Hash: 2c2d781aa686b731f2a0e754dc30ebb76f3553e0
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

Best regards,
Janne Keränen
Attachments
CompoundFilter_bug_example.FCMacro
(1.14 KiB) Downloaded 26 times
Last edited by ker on Fri Jun 01, 2018 1:29 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 5135
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug report: CompoundFilter in command line

Postby Kunda1 » Tue Apr 03, 2018 7:45 pm

ker wrote:
Tue Mar 20, 2018 4:09 pm
Can you test with the most up to date 0.17 revision ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
DeepSOIC
Posts: 6844
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug report: CompoundFilter in command line

Postby DeepSOIC » Tue Apr 03, 2018 7:48 pm

Seems like a good fix to me =)
User avatar
Kunda1
Posts: 5135
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug report: CompoundFilter in command line

Postby Kunda1 » Sun Apr 15, 2018 5:18 pm

OP opened a ticket for this: issue #3381
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
ker
Posts: 3
Joined: Mon Mar 19, 2018 4:09 pm

Re: Bug report: CompoundFilter in command line

Postby ker » Mon May 28, 2018 2:12 pm

This bug still exists. Made a pull request today: https://github.com/FreeCAD/FreeCAD/pull/1477
Hopefully made it in the right way...
User avatar
Kunda1
Posts: 5135
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug report: CompoundFilter in command line

Postby Kunda1 » Tue May 29, 2018 4:58 pm

PR was merged. Thank you. Please mark thread as [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features