- Thank you received: 0
Creating User Interface for NGSolve using PyQt5
4 years 3 months ago #3051
by Luma
Replied by Luma on topic Creating User Interface for NGSolve using PyQt5
The script creating the clipping error is basically the one i started with (i attached it again). In my console window i get the warning:
libpng warning: bKGD: invalid
But i cant find anything related to ngsgui, all forum entries for this warning relate to *.png files...
Extracting the information manually from the ngsolve vtk object to convert it into pyqt seems too much of a task for me right now, but thanks for confirming
libpng warning: bKGD: invalid
But i cant find anything related to ngsgui, all forum entries for this warning relate to *.png files...
Extracting the information manually from the ngsolve vtk object to convert it into pyqt seems too much of a task for me right now, but thanks for confirming
Attachments:
4 years 3 months ago #3065
by Luma
Replied by Luma on topic Creating User Interface for NGSolve using PyQt5
Hi Christopher
not sure if you read my last posting but i noticed that for the example script i sent, the scene commands (i.e. scene.setShowWireframe(True) ) are also broken. Calling them leads to an error in ngsgui/startup.py:
'SpyderKernel' object has no attribute 'send_spyder_msg'
Im on ipykernel 5.3.4. So maybe still a kernel problem?
not sure if you read my last posting but i noticed that for the example script i sent, the scene commands (i.e. scene.setShowWireframe(True) ) are also broken. Calling them leads to an error in ngsgui/startup.py:
'SpyderKernel' object has no attribute 'send_spyder_msg'
Im on ipykernel 5.3.4. So maybe still a kernel problem?
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 3 months ago - 4 years 3 months ago #3066
by christopher
Replied by christopher on topic Creating User Interface for NGSolve using PyQt5
Hi, the solution scene has no wireframe,
you have to draw the mesh and
It seems like you are trying to use the Spyder integration. Which version of spyder do you use? I think I have tested it with 4.1
I cannot reproduce your flickering as well. Can you send the script that is producing it (you only included some pyqt scripts but they do not use ngsgui. Also do you have the most current versions of the software packages ngsgui and ngsolve? Which versions of python, pyqt,... are you using?
Best
Christopher
you have to draw the mesh and
Code:
meshscene.setShowSurface(False)
meshscene.setShowWireframe(True)
I cannot reproduce your flickering as well. Can you send the script that is producing it (you only included some pyqt scripts but they do not use ngsgui. Also do you have the most current versions of the software packages ngsgui and ngsolve? Which versions of python, pyqt,... are you using?
Best
Christopher
Last edit: 4 years 3 months ago by christopher.
4 years 3 months ago - 4 years 3 months ago #3068
by Luma
Replied by Luma on topic Creating User Interface for NGSolve using PyQt5
Hi Christopher,
my ultimate goal is to use a pyqt GUI to manipulate the output in the NGSgui Window (merging them into one window would be cool but is beyond my abilities). Thats why im using pyqt.
The examples i attached earlier open a pyqt window, that, besides the clipping error, succesfully changes the output in the ngsgui tab in Spyder. Btw you are correct, i am using Spyder 4.1.4 with Python 3.7, NGSolve 6.2.2004 and NGSgui 0.1.13.dev0.
The clipping error already occurs running the following simple poisson example without pyqt. It opens the NGSgui Tab in Spyder and displays the solution, but most of the times it has the clipping error.
my ultimate goal is to use a pyqt GUI to manipulate the output in the NGSgui Window (merging them into one window would be cool but is beyond my abilities). Thats why im using pyqt.
The examples i attached earlier open a pyqt window, that, besides the clipping error, succesfully changes the output in the ngsgui tab in Spyder. Btw you are correct, i am using Spyder 4.1.4 with Python 3.7, NGSolve 6.2.2004 and NGSgui 0.1.13.dev0.
The clipping error already occurs running the following simple poisson example without pyqt. It opens the NGSgui Tab in Spyder and displays the solution, but most of the times it has the clipping error.
Attachments:
Last edit: 4 years 3 months ago by Luma.
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 3 months ago - 4 years 3 months ago #3069
by christopher
Replied by christopher on topic Creating User Interface for NGSolve using PyQt5
Hm I cannot reproduce the clipping error yet...
With the setting of parameters, you are right, this wasn't working in spyder due to a change in their interface. It is fixed now. Note that to set the colormap you first have to turn autoscale off:
btw. it is possible to add buttons and stuff in the ngsgui, you can hook into it as an add on by installing a python package which provides an entry point for a ngsgui_plugin:
with your function taking the gui and modifying it:
best
Christopher
With the setting of parameters, you are right, this wasn't working in spyder due to a change in their interface. It is fixed now. Note that to set the colormap you first have to turn autoscale off:
Code:
scene2.setColormapAutoscale(False)
scene2.setColormapMax(0.8)
btw. it is possible to add buttons and stuff in the ngsgui, you can hook into it as an add on by installing a python package which provides an entry point for a ngsgui_plugin:
Code:
entry_points = {"ngsgui.plugin" : "yourname=your_lib.sublib:your_function"
Code:
def your_function(gui):
# add_buttons, menu entries...
best
Christopher
Last edit: 4 years 3 months ago by christopher.
4 years 2 months ago #3103
by Luma
Replied by Luma on topic Creating User Interface for NGSolve using PyQt5
Hi Christopher,
thanks for fixing the setting of parameters! Adding Buttons etc. to ngsgui is a great feature, but my application is too extensive to be embedded in the ngs window (it contains several scrollbars, sliders, progressbars and so on).
I might have some new info on the clipping error though:
When running the program from a terminal, the following message is shown:
b'active samplers with a different type refer to the same texture image unit', which relates to an OpenGL problem i think...
Displaying the edge numbers also reveals, that they are in fact in the right place and it is only a display-error.
Best wishes
Lukas
thanks for fixing the setting of parameters! Adding Buttons etc. to ngsgui is a great feature, but my application is too extensive to be embedded in the ngs window (it contains several scrollbars, sliders, progressbars and so on).
I might have some new info on the clipping error though:
When running the program from a terminal, the following message is shown:
b'active samplers with a different type refer to the same texture image unit', which relates to an OpenGL problem i think...
Displaying the edge numbers also reveals, that they are in fact in the right place and it is only a display-error.
Best wishes
Lukas
Attachments:
Time to create page: 0.111 seconds