Skip to content

Enable status bars for the glyph filter#779

Merged
banesullivan merged 1 commit intomasterfrom
feat/glyph-status
Jun 14, 2020
Merged

Enable status bars for the glyph filter#779
banesullivan merged 1 commit intomasterfrom
feat/glyph-status

Conversation

@banesullivan
Copy link
Copy Markdown
Member

The glyph filter has a reputation for taking a long time... this enables a bit more transparency to what it's up to. (Typically its the clean operation that will take a while...)

@banesullivan
Copy link
Copy Markdown
Member Author

I don't think this actually works...

@akaszynski
Copy link
Copy Markdown
Member

Seems to work.

import vtk
import numpy as np
import pyvista as pv
from pyvista import examples

mesh = pv.PolyData(np.random.random((100000, 3))*1000)

source = vtk.vtkSphereSource()
source.Update()
geom = source.GetOutput()

glyphed = mesh.glyph(geom=geom, progress_bar=True)
Cleaning: 100%|███████████████████████████████████████████████████████████[00:00<00:00]
Computing Glyphs: 100%|███████████████████████████████████████████████████[00:00<00:00]

PyVista_188

@akaszynski
Copy link
Copy Markdown
Member

Progress bar genuinely moves during the glyphing, though I had to make the "star field" quite dense to get it to actually need the progress bar.

@banesullivan
Copy link
Copy Markdown
Member Author

Ah, thanks for testing this... I was having weird issues with the status bar going from 0 to 100 the other day without updating.

This “star field” is really cool btw

@akaszynski
Copy link
Copy Markdown
Member

This “star field” is really cool btw

Had fun with that one. I wanted to make a quick video/gif following the camera angle. It would be super cool if we could "record" the camera angle and then replay that. We could accomplish this by starting a thread that records the camera position at various timesteps and then creates another video, or perhaps a "watch" feature that simply saves frames every timestep until the user closes out the plotter.

Perhaps record(filename, timestep)? That way you don't need an external recorder to save gifs.

@akaszynski
Copy link
Copy Markdown
Member

Also could include a "press r to start recording" so the user could setup the camera angle.

Actually, this is something I'd really make use of...

@banesullivan
Copy link
Copy Markdown
Member Author

Agreed. That would be incredibly useful and I can help implement this.

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.

2 participants