ngsolve.solve Redraw not found

Hi,

I do have a minor question I was not able to find a solution too, thus I am asking the swarm for a solution. I installed netgen/ngsolve using the anaconda way (provided on Downloads) and tried some tutorials. All, that I tried worked flawlessly :slight_smile:
However, on 4.2 (4.2 Constructive Solid Geometry (CSG)) I encountered the problem, that I cannot import “Redraw” from ngsolve.solve. I results in the following error:

ImportError: cannot import name 'Redraw' from 'ngsolve.solve' (unknown location)

Importing Draw however works without any errors.
I am using Jupyter Notebook verison 6.1.4 running python 3.8.3.

I hope I provided enough details, that the problem can be understood. I want to use ngsolve in my thesis to perform some nonlinear hyperelastic computations using consistitutive models for metamaterials I just derived, but for now I am in the process of setting everything up. So the visualization might help me understand this, but I am sure I will get along without, I just wanted to ask, whether anyone of you might know a quick fix.

Thank you already and I hope this is the right place for this kind of question.

Best Regards,
Til

Hi Til,

This seems to be an error in the documentation (the reason is that Redraw was moved internally to another module).

To fix it, you can use

from ngsolve import Draw, Redraw

I will update the documentation, thanks for pointing this out.

Best,
Matthias

Hi Matthias,

thanks a lot for the quick answer :slight_smile: