Paraviewweb and Draco

Hi everyone,

In paraviewweb I need to output mesh and associated field data in the draco format. Known Python wrappers (actually, I’ve found only one so far, GitHub - seung-lab/DracoPy: Python wrapper for Google's Draco mesh compression library.) do not support encoding of additional geometry attributes.

Basically, the idea is to create a C++ paraview plugin for filter which will use native C++ Draco API to output Draco encoded buffers. Then this plugin will be used by paraviewweb to forward compressed data further over the network.

So the question - is this possible and could theoretically work?


It should be possible. But you will need to handle the
vtkPloyData => Draco Draco => vtkPolyData

The only unknown from my side is the draco API. But if you handle vtkDataArray => TypedArray, you should be good with little remapping.

1 Like

Sebastien, thank you for the help.

Could you please give another tip on how to declare a plugin method which is then can be called from pvpython?

If your ParaView plugin have some vtk modules, those will be available in your python.
You can see it used here:

In that case it just expose some pre-existing code in VTK but you can see plugins with vtkModules in them as ref.