Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Mesh.draw a simple wrapper to skfem.visuals.vedo #748

Merged
merged 5 commits into from
Sep 22, 2021

Conversation

kinnala
Copy link
Owner

@kinnala kinnala commented Sep 21, 2021

Fixes #361.

This is quite cool I think. First pip install vedo. Then try

from skfem import *
m = MeshHex().refined(3)
m.draw(point_data={'y': m.p[0]}).show()

Then pressing 4 and l on the keyboard gives this fancy picture:

screenshot

Interfacing with vedo is done through a VTK file because the API of vedo is quite complex and this seems to do most of the things that we'd like to do.

@kinnala
Copy link
Owner Author

kinnala commented Sep 21, 2021

For some reason I can't get this to work in ipython. It detects that I'm in Jupyter Notebook even though I'm not.

@kinnala
Copy link
Owner Author

kinnala commented Sep 22, 2021

If there are boundaries, then this interactive mode shows only the first one. I wonder what is the easiest way to toggle between those.

@gdmcbain
Copy link
Contributor

I confirm that this works under MS-Windows too, after a pip install vedo. Very nice.

@kinnala
Copy link
Owner Author

kinnala commented Sep 22, 2021

Trying to do something about boundaries, waiting for marcomusy/vedo#464 to get resolved.

@kinnala
Copy link
Owner Author

kinnala commented Sep 22, 2021

I mean, it should simply work after the above issue gets resolved, so I guess this can be merged?

@kinnala kinnala merged commit 06875f1 into master Sep 22, 2021
@kinnala kinnala deleted the add-initial-vedo-support branch September 22, 2021 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vedo, formerly known as vtkplotter
2 participants