ugrid1.py 264 B

1234567891011
  1. """Cut an UnstructuredGrid with a Mesh"""
  2. from vedo import *
  3. ug1 = UnstructuredGrid(dataurl+'ugrid.vtk')
  4. print(ug1)
  5. cyl = Cylinder(r=3, height=7).x(3).wireframe()
  6. ug2 = ug1.clone().cut_with_mesh(cyl)
  7. ug1.wireframe()
  8. show(ug1, ug2, cyl, __doc__, axes=1).close()