The cause is directions = np.array([1, 0 ,0 ]), which is a (3, ) 1 dimension array.
It is ok for repeat_primitive() to use 1d array, it will be processed to np.ndarray in the function.
But for VTK method, directions parameter has to be np.ndarry(N,3)
Issue 1 can be resolved by modify the directions to directions = np.array([[1, 0, 0]]) as a (1,3) ndarray.
For Issue 2, I have add a condition to cover the case directions = [-1, 0, 0]
Fix the issue #770.
The cause is
directions = np.array([1, 0 ,0 ])
, which is a (3, ) 1 dimension array. It is ok forrepeat_primitive()
to use 1d array, it will be processed tonp.ndarray
in the function. But for VTK method, directions parameter has to benp.ndarry(N,3)
Issue 1 can be resolved by modify the directions to
directions = np.array([[1, 0, 0]])
as a (1,3) ndarray.For Issue 2, I have add a condition to cover the case directions = [-1, 0, 0]
Code to reproduce: