export module privides a few macros for exporting data scenes within
ParaView’s rendering environment to the VTKjs format.
This function will execute a script to export the current scene from your rendering into the VTKjs shareable file format.
Prints the path to the saved ‘.vtkjs’ file.
- To view, open the file in the VTKjs standalone web viewer found here
- Use the
get_vtkjs_url.pyscript in the
PVGeorepository to get a shareable link for the exported file.
Get VTKjs URL¶
exportVTKjs()to create a
.vtkjsfile 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
>>> 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')