Hi,

I conducted object rotation using **paraview.simple.Transform.rotate** function, tested on a cylinder with different angles, and found a possible wrong answer.

In the image above, black is the initial cylinder,

red is rotated by [45, 0,0] , which is correct

green is rotated by [45, 0, 90], which is also correct

blue is rotated by [45, 90, 0], which coincides with red, and I don’t think it is correct.

Does anyone have idea if it is a bug or I was wrong? Any advice or suggestion is appreciated!

Here is a link to refer, and below is part of code that I have used to generate the image above

rotate object given center and degrees

Blockquote

from paraview.simple import *

radius = 2

length = 50

// INITIAL CYLINDER

cylinder = Cylinder(registrationName=‘CylinderInitial’)

cylinder.Resolution = 389

cylinder.Height = length

cylinder.Radius = radius

Show(cylinder)

// INITIAL SPHERE

sphere = Sphere(registrationName=‘SphereInitial’)

sphere.Center = [0,0,0]

sphere.Radius = 4.0

Show(sphere)

// BLACK

transform_0 = Transform(Input=cylinder, registrationName= ‘rotate [0, 0, 0]’)

transform_0.Transform.Rotate = [0, 0, 0]

transform_0.UpdatePipeline()

Show(transform_0)

//RED rotation 1

transform_1 = Transform(Input=cylinder, registrationName= ‘rotate [45, 0, 0]’)

transform_1.Transform.Rotate = [45, 0, 0]

transform_1.UpdatePipeline()

Show(transform_1)

//GREEN rotation 2

transform_2 = Transform(Input=cylinder, registrationName= ‘rotate [45, 0, 90]’)

transform_2.Transform.Rotate = [45, 0, 90]

transform_2.UpdatePipeline()

Show(transform_2)

//BLUE rotation 3

transform_3 = Transform(Input=cylinder, registrationName= ‘rotate [45, 90, 0]’)

transform_3.Transform.Rotate = [45, 90, 0]

transform_3.UpdatePipeline()

Show(transform_3)