issue_856.py 365 B

123456789101112131415161718
  1. from vedo import *
  2. def func(widget, e):
  3. x = widget.value
  4. m = msh.clone()
  5. ids = m.find_cells_in_bounds(xbounds=(-10,x))
  6. m.delete_cells(ids)
  7. plt.remove("frog").add(m).render()
  8. msh = Mesh("data/frog.obj").texture("data/frog.jpg")
  9. msh.name = "frog"
  10. plt = Plotter(axes=1)
  11. plt.add_slider(func, xmin=-6, xmax=3, value=-6)
  12. plt.show(msh)
  13. plt.close()