A suggestion for a new FEM mesh GMsh icon

About the development of the FEM module/workbench.

Moderator: bernd

jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: A suggestion for a new FEM mesh GMsh icon

Post by jmaustpc »

Hi Sudhanshu
Sudhanshu wrote: Fri Jul 31, 2020 3:55 pm I am not able to click on the drop down and take a screenshot at the same time,
I have a tip regarding that! :)

All you do is set a time delay, usually 2 or 3 seconds is adequate. So you click "take a screen shot", you then have a couple of seconds to click on something and only then is the screenshot actually taken. If you select the option to include the mouse pointer, then this also allows you to point at something with the mouse pointer. I am using Linux, some Ubuntu and mostly KDE Kubuntu. But as far as I know most screen capture application can do these things.

Jim
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: A suggestion for a new FEM mesh GMsh icon

Post by Sudhanshu »

jmaustpc wrote: Sat Aug 01, 2020 12:27 am Hi Sudhanshu
Sudhanshu wrote: Fri Jul 31, 2020 3:55 pm I am not able to click on the drop down and take a screenshot at the same time,
I have a tip regarding that! :)

All you do is set a time delay, usually 2 or 3 seconds is adequate. So you click "take a screen shot", you then have a couple of seconds to click on something and only then is the screenshot actually taken. If you select the option to include the mouse pointer, then this also allows you to point at something with the mouse pointer. I am using Linux, some Ubuntu and mostly KDE Kubuntu. But as far as I know most screen capture application can do these things.

Jim
Thanks for that nice tip! :D
Here are how the drop down implementations look for now:
solvers_drop_down.png
solvers_drop_down.png (23.92 KiB) Viewed 1240 times
meshers_drop_down.png
meshers_drop_down.png (20.24 KiB) Viewed 1240 times
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: A suggestion for a new FEM mesh GMsh icon

Post by johnwang »

Sudhanshu wrote: Sat Aug 01, 2020 12:45 am
Here are how the drop down implementations look for now:
Will the last pick stay there? Or every time you have to choose once? I only use gmsh, so don't want to choose every time.

The calculix solver should have a dedicate icon. 'Solver' is not a good one in this case. And the two of them should has a little different. Otherwise you can't tell in this arrange by just looking at it.

The netgen icon maybe change the color of letter N.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: A suggestion for a new FEM mesh GMsh icon

Post by Sudhanshu »

Sudhanshu wrote: Fri Jul 31, 2020 7:30 pm
bernd wrote: Fri Jul 31, 2020 7:10 pm exactly, no netgen icon if not compiled against netgen.
But I need to check for netgen in the groupcommands package, so I need that variable in python.
How do I get that? :?:
This seems like a difficult task.
The FCWithNetgen is added as a preprocessor definition in src/Mod/FemGui/CMakeLists and so it is available in the C++ code.
But since python is an interpreted language, it seems we can't have the same thing in python.
At least not the same flag in an easy way.
So are we better of implementing this in C++ only?
Last edited by Sudhanshu on Mon Aug 17, 2020 9:33 pm, edited 2 times in total.
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: A suggestion for a new FEM mesh GMsh icon

Post by Sudhanshu »

johnwang wrote: Sun Aug 02, 2020 12:53 am
Sudhanshu wrote: Sat Aug 01, 2020 12:45 am
Here are how the drop down implementations look for now:
Will the last pick stay there? Or every time you have to choose once? I only use gmsh, so don't want to choose every time.
Yes, the last pick will stay.

johnwang wrote: Sun Aug 02, 2020 12:53 am The calculix solver should have a dedicate icon. 'Solver' is not a good one in this case. And the two of them should has a little different. Otherwise you can't tell in this arrange by just looking at it.

The netgen icon maybe change the color of letter N.
The icons will change later on, once we are done with the drop down implementation.
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: A suggestion for a new FEM mesh GMsh icon

Post by johnwang »

Sudhanshu wrote: Fri Jul 31, 2020 3:55 pm
This was a much better way of implementation.
So here we go: https://github.com/Sudhanshu-Dubey14/Fr ... 648e4ca108
I tried this.

When you restart FreeCAD, you have to choose the mesher again.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: A suggestion for a new FEM mesh GMsh icon

Post by Sudhanshu »

Sudhanshu wrote: Sun Aug 02, 2020 7:06 am This seems like a difficult task.
The FCWithNetgen is added as a preprocessor definition in src/Mod/FemGui/CMakeLists and so it is available in the C++ code.
But since python is an interpreted language, it seems we can't have the same thing in python.
At least not the same flag in an easy way.
So are we better of implementing this in C++ only?
It took a decent amount of searching but I think I have found at least one way of checking whether FreeCAD was compiled with Netgen or not in Python.

The idea is to have a function in C++ (maybe in Fem/Gui/Command.cpp) that checks the FCWithNetgen flag and returns 1 or 0. Then in python we can use ctypes to call that function and know whether Netgen is there or not.

This approach has a few drawbacks:

1. It's very difficult to find and load the exact library from which our function would be accessible. Is it libFreeCADGui.so? :?:
2. ctypes is very platform dependent but it is the only built-in module out of all the alternatives given in this post.

So how shall we proceed now?
Post Reply