vtkjs
The export
module provides a few macros for exporting data scenes within
ParaView’s rendering environment to the VTKjs format.
Export VTKjs
- pvmacros.export.vtkjs.exportVTKjs(FileName='', compress=False)[source]
This function will execute a script to export the current scene from your rendering into the VTKjs shareable file format.
- Parameters
- Returns
Prints the path to the saved ‘.vtkjs’ file.
- Return type
None
Note
To view, open the file in the VTKjs standalone web viewer found here
Use the
get_vtkjs_url.py
script in thePVGeo
repository to get a shareable link for the exported file.
Get VTKjs URL
- pvmacros.export.vtkjs.getVTKjsURL(*args)[source]
After using
exportVTKjs()
to create a.vtkjs
file from a ParaView data scene which is uploaded to an online file hosting service like Dropbix, use this method to get a shareable link to that scene on the PVGeo VTKjs viewer.Current file hosts supported: - Dropbox - GitHub
- Parameters
Example
>>> import pvmacros as pvm >>> # A Dropbox hosted file: >>> pvm.export.getVTKjsURL('dropbox', 'https://www.dropbox.com/s/6m5ttdbv5bf4ngj/ripple.vtkjs\?dl\=0')
>>> # A GitHib hosted file: >>> pvm.export.getVTKjsURL('github', 'https://github.com/OpenGeoVis/PVGeo/raw/docs/ripple.vtkjs')