How to change AxisOfSymmetry in paraview

Hi Paraview community,
In the file, I want to change the AxisOfSymmetry from 1 to 2, can anyone suggest an easy way to change it in Paraview? Thanks!
!!
vtkSuperquadricSource::vtkSuperquadricSource(int res)
{
res = res < 4 ? 4 : res;

this->AxisOfSymmetry = 1; // y-axis symmetry
!!

You can do that by creating a very simple XML only plugin.
https://www.paraview.org/Wiki/ParaView/Plugin_HowTo#XML_Only

Thanks Mathieu! I have looked at the method you suggested. While it seems a little difficult for me to understand the code. Do you have any other example/document for me to learn how to write the plugin? I am using paraview 5.6, I hope to do it in the GUI.

Here you go :

  • Save SuperquadricAxisOfSymmetry.xml somewhere on your computer
  • Open ParaView
  • Tools -> Manage Plugin -> Load New -> SuperquadricAxisOfSymmetry.xml
  • Sources -> Alphabetical -> mySuperquadricSource

Thanks Mathieu for your help. I can successfully load the file your provided, while I could not see it. (I tested other examples, they can be seen.)

One more question, since I need to use TensorGlyph ( in TensorGlyph—>select superquadric), how to make this change (AxisOfSymmetry=2) also works for TensorGlyph?

while I could not see it.

What do you mean ?

One more question, since I need to use TensorGlyph ( in TensorGlyph—>select superquadric), how to make this change (AxisOfSymmetry=2) also works for TensorGlyph?

Once again, you need to do that in the xml plugin and point to your new superquadric source

I mean from Alphabetical, I can not find mySuperquadricSource. (I have tryed other examples, I can find them.).

Thanks again!

I restarted ParaView :sweat_smile: and I am able to find it!! It works!!! I really appreciated your help.