FC becomes unusable after inserting an electrostatic potential constraint

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

FC becomes unusable after inserting an electrostatic potential constraint

Post by uwestoehr »

I found a bug in
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15780 (Git)
Build type: Release
Branch: master
Hash: f94e76c1116ec3b818961ff65131b3d86fa5b95e
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

To reproduce:
- create a new document, there create a simple body, e.g. a block
- create a new simulation
- now use the menu Model -> Electrostatic Contraint

result: In the report panel I get this error messages:
Traceback (most recent call last):
File "C:\Users\USti\Desktop\FreeCAD_0.18.15780_Conda_Py3QT5-WinVS2015_x64\Mod\Fem\femguiobjects\_ViewProviderFemConstraintElectrostaticPotential.py", line 52, in setEdit
task = _TaskPanel(vobj.Object)
File "C:\Users\USti\Desktop\FreeCAD_0.18.15780_Conda_Py3QT5-WinVS2015_x64\Mod\Fem\femguiobjects\_ViewProviderFemConstraintElectrostaticPotential.py", line 72, in __init__
self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject")
<class 'AttributeError'>: module 'femtools.femutils' has no attribute 'getSingleMember'

- now try to do something in the analysis e.g. double-click on "CalculiXccxTools"

result: you get the message that there is a dialog active: Image
But there is no active task and no open dialog.

result: Working with FEM becomes impossible.

workaround: right-click on the contraint in the model view and then chose "Finish Editing"

OK to report this as bug? It seems related to issue #3804 but is different I think.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by uwestoehr »

This bug also occurs when inserting these 2 constraints:

- ConstraintInitialFlowVelocity
- ConstraintFlowVelocity

The error messages are the same:
  • File "C:\Users\USti\Desktop\FreeCAD_0.18.15780_Conda_Py3QT5-WinVS2015_x64\Mod\Fem\femguiobjects\_ViewProviderFemConstraintInitialFlowVelocity.py", line 51, in setEdit
    task = _TaskPanel(vobj.Object)
    File "C:\Users\USti\Desktop\FreeCAD_0.18.15780_Conda_Py3QT5-WinVS2015_x64\Mod\Fem\femguiobjects\_ViewProviderFemConstraintInitialFlowVelocity.py", line 69, in __init__
    self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject")
    <class 'AttributeError'>: module 'femtools.femutils' has no attribute 'getSingleMember'
  • File "C:\Users\USti\Desktop\FreeCAD_0.18.15780_Conda_Py3QT5-WinVS2015_x64\Mod\Fem\femguiobjects\_ViewProviderFemConstraintFlowVelocity.py", line 52, in setEdit
    task = _TaskPanel(vobj.Object)
    File "C:\Users\USti\Desktop\FreeCAD_0.18.15780_Conda_Py3QT5-WinVS2015_x64\Mod\Fem\femguiobjects\_ViewProviderFemConstraintFlowVelocity.py", line 72, in __init__
    self._mesh = FemUtils.getSingleMember(analysis, "Fem::FemMeshObject")
    <class 'AttributeError'>: module 'femtools.femutils' has no attribute 'getSingleMember'
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by bernd »

:shock: ... I will have a look. I did the refactor in this regard some time ago. Seams I did forget something.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by Jee-Bee »

uwestoehr wrote: Sun Feb 03, 2019 3:23 pm ...
please use code tags (looks like </>) makes reading much easier and keeps indentiation.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by bernd »

confirmed:

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15780 (Git)
Build type: Unknown
Branch: master
Hash: f94e76c1116ec3b818961ff65131b3d86fa5b95e
Python version: 3.7.2
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)


BTW: these only work on Elmer solver AFAIK
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by bernd »

same for ElectrostaticPotential
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by bernd »

git commit 80f2ccc3 the code refactor
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by uwestoehr »

Thanks for the quick fix.

In case it is important to keep the overview, I opened now this bug report: issue #3814
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FC becomes unusable after inserting an electrostatic potential constraint

Post by bernd »

uwestoehr wrote: Sun Feb 03, 2019 8:23 pm Thanks for the quick fix.

In case it is important to keep the overview, I opened now this bug report: issue #3814
changed commit message in this regard https://github.com/FreeCAD/FreeCAD/pull ... bc984a6515
Post Reply