You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have solved the issue.
The problem arises because the orientation of vtkCylinderSource is along global y.
Ive introduced another argument into repeat_sources (in utils.py), called orientation, which can be set to a rotation matrix. If this new argument is set to something besides None, the matrix is applied as a transformation to the glyph before mapping it to an actor. This way, any time a vtkSource is not aligned with the X axis, it can be transformed (arbitrarily with the new orientation argument) before creating any actors.
Then, I add this orientation argument to the cylinder method in actors.py.
How would you like me to contribute the fix to the repository?
Description
Directions passed to the cylinder actor do not refer to the unique axis of the cylinder.
Way to reproduce
from fury import actor,window
import numpy as np
scene = window.Scene()
centers = np.array([[-2,0,0],[0,0,0],[2,0,0]])
dirs = np.array([[1,0,0],[0,1,0],[0,0,1]])
arrows = actor.arrow(centers, dirs, dirs)
scene.add(arrows)
centers += np.array([0,1,0])
cyls = actor.cylinder(centers, dirs, dirs)
scene.add(cyls)
showm = window.ShowManager(scene)
showm.initialize()
showm.start()
The text was updated successfully, but these errors were encountered: