Problems when use polydata to show models in file with paraview-web

I am editing to show my own objs in paraview-web browser. However I have met some problems.

  1. First of all, I have successfully shown models in web browser using polydata. But I can’t set the attributes like colors, or show models in vertexs, edges modes.
  2. Secondly, I want to show lines in this way, but failed finilly:
#Create two points, P0 and P1
p0 = [1.0, 0.0, 0.0]
p1 = [0.0, 1.0, 0.0]
lineSource = vtk.vtkLineSource()
  1. And thirdly, I find there are many usefull functions in web front-end, just like this:

    Could I use some API in about that?

So how can I figure out these problems? Anyone could show me help? Thanks!

I think you have too many questions and it is hard to follow. It might be easier to number them.

  1. It seems that you can show your geometry vertex by selecting “Points” rather than “Surface”. The same is probably true with color when using the drop down just below.

  2. Visualizer is based on ParaView, you need to use the abstraction layer called proxy to properly work with the rest of the framework. Basically in your vtk.vtkLineSource() code should be replaced by:

line = simple.Line()
line.Point1 = [1.0, 0.0, 0.0]
line.Point2 = [0,1,0]
  1. If you use the proxies, the UI will be generated automatically to let you edit the properties… Nothing to do on your side.
1 Like

Hi Sebastien,
Thank you for your helpful reply. I am really grateful to you.

With your help, I have known how to draw lines. It seems that using proxy to programming is what I really need. Is there any references about proxy? Such as how to set colors, or draw vertexes, etc.


Just use the ParaView GUI with “Start/Stop trace” (in Tools menu) which will map your actions into actual Python commands.

Thank you Sebastien,

I didn’t find the “Start/Stop trace” on paraview-web GUI. Like this:

Did I make something wrong?

But I find a much more useful api document.

I think this document would help me to display the vertex mode of models or change models colors though I am not sure.


I meant the Qt GUI not the web one…

Thank you Sebastien! I have to work on the web part. Luckily, we now decide to use the vtk server as the web’s render server which is faster than paraview server. However when we render about 48953 vtkpolydata objects, the vtk render sever can show up the first frame in the web page on browser, but can’t zoom or rotate with the simple mouse instructions. It seems that a luge number of vtkpolydata objects will affect the performance of render server.
Could you please offer some advices for us?

Thanks a lot.

you should use a multiblock if you can