mirroring and normals

I have an actor with point normals, and I want to mirror it in X and Y directions. My approach is illustrated in attached python script mirroring.py (1.6 KB)

The output

shows two of the mirrors in black instead of the assigned colors. When I do not generate normals, the colors are OK. I suppose this is due to the normals now pointing inside instead of outside, or the cells having their orientation reversed? When I add a vtkReverseSense to the X and Y mirrors, the image looks OK mirrored_cube_with_reversesense .

Is there a method to have the transform fix the normals without having to use vtkReverseSense?
Thanks for your help!

1 Like

To position your actor, you can use origin, scale, and orientation properties of the actor.

As far as I know, UserTransform in the actor is a very low-level API. If you use us then you are expected to take care of all consequences. UserMatrix might work a bit better.

To VTK developers: It would be nice if VTK documentation would clarify what is expected when someone modifies an actor’s UserTransform or UserMatrix.

1 Like

Please open an issue for this; it’s just going to get (more :confused: ) lost here on Discourse.

Added an issue for improving documentation of these methods - https://gitlab.kitware.com/vtk/vtk/issues/17807

1 Like