Reading and plotting VTK file data structure with python

后端 未结 2 1174
时光说笑
时光说笑 2021-02-06 05:28

I have a VTK file (unstructured grid) with points and cells.

I can import the file and read it into using the meshio python package.

If I

2条回答
  •  难免孤独
    2021-02-06 05:38

    Let me also draw your attention to

    4. vtkplotter

    which has a different approach, also built on top of vtk:

    from vtkplotter import *
    
    # read the data
    ugrid = loadUnStructuredGrid("mesh_mcve.vtk")
    
    # create the outline of the data as polygonal mesh and show it
    Mesh(ugrid).c('viridis').alpha(1.0).show()
    

    Plenty of examples can be found here along with API documentation.

提交回复
热议问题