Diagram of sectional quantities

My request is related to a typical problem occurring in postprocessing of finite element results for plane elements such as shells for mechanical applications. Usually one would like to display sectional forces as diagrams, but plotted directly onto the 3D model, as in


.

I can imagine that it should be feasible to create a paraview filter that can do the following:

  • create a cut using vtkcutter filter
  • select the component to display (membrane force x/y/magnitude,
    bending moments, shear force etc)
  • scale the diagram appropriately

Similar functionality would be useful for beam/truss results, visualizing forces along the elements.

The request was submitted a while ago in the mailing list, without receiving much attention.

Thanks and best regards
Matthias

1 Like

Hi @Matthias ,

Tbh 3D charts are lacking in VTK and not exposed in ParaView, so no lucks there.

You could emulate yhay by creating an actual polydata with the correct data.

You could try to emulate as you suggest but at some point you will need to add a programmable filter to do what you want.

You should give it a go and let us know how it goes.

Still a good feature request imo.

Thanks for your reply. I guess I was hoping to avoid having to code it myself. I will try to come up with something and post if I’m successful…

I’ve implemented a python plugin that creates a polydata representing the diagrams:

The integration into paraview was surprisingly easy, I was wondering why I haven’t done that sooner…

For the fine-tuning I have a couple of questions:

  1. Array selection: Is it possible to have a way of exclusively selecting an array (as in the dropdown in the toolbar)?
  2. I would like to set meaningful defaults, for example the center of the dataset for Origin. If I do this in the method RequestData it will be applied whenever I hit “Apply”, which means that I can’t modify the origin.
  3. How to set the default value of a smproperty to a value that depends on the model (e.g. the center of the bounding box)?
  4. Are there other controls, for instance a spin box for setting the scale factor, as in the WarpByVector filter?

Here ist the script containing the plugin as well as a test dataset:
diagram_filter.py (4.5 KB)
shells1.vtu (510.5 KB)

Thanks!
Matthias

Yes, you should use a array list domain instead of array selection domain.

Yes, you can set the defaults

Use bounds array domain

Yes, use DoubleRangeDomain

More doc here:
https://kitware.github.io/paraview-docs/latest/cxx/PluginHowto.html

Thank you for your help Matthieu. For the functionality I got everything to work. For the fine-tuning of the interface I’d probably need to better understand the basics of the API. I’ll leave it as it is for now, hoping that in the future someone will post more examples…

All examples are in paraview/Examples/Plugins