[Fixed] Little UI glitch - Z88 Results Task View

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

[Fixed] Little UI glitch - Z88 Results Task View

Post by UR_ »

Just observed at latest build :open_mouth:

workflow:
- loading "FemCalculixCantilever3D_newSolver" example from FreeCAD's start page
- ensure Edit->Preferences
Screenshot 004.png
Screenshot 004.png (5.79 KiB) Viewed 1086 times

- activate analysis
- open "Calculix_static_results", choose "Abs displacements" and close dialog
- open "Z88_static_results"
:boom:


mouse pointer stalls:
Screenshot 005.png
Screenshot 005.png (19.01 KiB) Viewed 1086 times

and got this error message in report view:

Code: Select all

Finish Editing CalculiX_static_results
TypeError: bad argument type for built-in operation

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\aio\Miniconda3\envs\freecad-dev\Library\Mod\Fem\femguiobjects\_ViewProviderFemResultMechanical.py", line 328, in abs_displacement_selected
    self.result_selected("Uabs", self.result_obj.DisplacementLengths, "mm")
  File "C:\Users\aio\Miniconda3\envs\freecad-dev\Library\Mod\Fem\femguiobjects\_ViewProviderFemResultMechanical.py", line 455, in result_selected
    self.update_colors_stats(res_values, res_unit, minm, avg, maxm)
  File "C:\Users\aio\Miniconda3\envs\freecad-dev\Library\Mod\Fem\femguiobjects\_ViewProviderFemResultMechanical.py", line 462, in update_colors_stats
    res_values
SystemError: <built-in method setNodeColorByScalars of FemGui.ViewProviderFemMesh object at 0x00000275A942ED98> returned a result with an error set
Start Editing Z88_static_results

tested with:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18127 (Git)
Build type: Release
Branch: master
Hash: a1984aeece19910c334bcd7a6622d400ddb9bd8d
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Last edited by UR_ on Mon Sep 16, 2019 3:36 pm, edited 1 time in total.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

I never ever use this pref enabled ... :mrgreen: I even developed the pref to be able do deactivate the behavior. I will have a look anyway. Thanks for reporting.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

confirmed for:

Code: Select all

OS: Debian GNU/Linux 10 (buster) (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18110 (Git)
Build type: Unknown
Branch: master
Hash: 145fe107e497f73bf5510e77654ac6d0a53eb352
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

offtopic: ... strange I am on

Code: Select all

$ git log -1
commit 60c0db78dd4b6ea68485aa99c4568108df0cf52b (HEAD, sfmaster/master, origin/master, origin/femtmp, origin/femdev, origin/HEAD, femtmp)
Author: Bernd Hahnebach <bernd@bimstatik.org>
Date:   Sat Sep 7 22:35:08 2019 +0200

    FEM: gmsh tools, move group code in separate def and add some comments
$ 
but

Code: Select all

$ ./bin/FreeCADCmd 
FreeCAD 0.19, Libs: 0.19R18110 (Git)
(c) Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>> 
github says 18129 my FreeCAD says 18110 ?!?
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Little UI glitch - Z88 Results Task View

Post by UR_ »

bernd wrote: Sat Sep 07, 2019 10:07 pm github says 18129 my FreeCAD says 18110 ?!?

The only reason I can think of:
Coding is faster than building!
:scream:
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

no, same commit :shock:
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

Would you create an issue on mantis and assign it to me?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Little UI glitch - Z88 Results Task View

Post by UR_ »

bernd wrote: Sat Sep 14, 2019 8:56 pm git commit 9472edb
Wouldn't it be better, if an "invalid" radio button is preselected by "restore-dialog-settings", preselection should be redirected to "none" immediately, instead of selecting a greyed out radio button.


e.g.

Code: Select all

    def abs_displacement_selected(self, state):
        if len(self.result_obj.DisplacementLengths) > 0:
            self.result_selected("Uabs", self.result_obj.DisplacementLengths, "mm")

should be:

Code: Select all

    def abs_displacement_selected(self, state):
        if len(self.result_obj.DisplacementLengths) > 0:
            self.result_selected("Uabs", self.result_obj.DisplacementLengths, "mm")
        else:
            self.form.rb_none.setChecked(True)
            self.none_selected(True)
Of course code should be duplicated to all radio buttons.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Little UI glitch - Z88 Results Task View

Post by bernd »

Post Reply