[vtkusers] Wrap of vtkMath.Cross / vtkMath.Normalize

Glen Lehmann glehmann at imaging.robarts.ca
Wed Sep 10 10:34:15 EDT 2003


Hey Mathieu,

I think you need to make 'a' into a list.  i.e. try;

import vtk
a=[1,2,3]
vtk.vtkMath.Norm(a)  #ok
vtk.vtkMath.Normalize(a)

Cheers,
Glen

Mathieu Malaterre wrote:

> Hi all,
>
>     Am I missing something or is there a problem with those methods: 
> vtkMath.Normalize & vtkMath.Cross
>
> ##########################
> import vtk
> a=1,2,3
> vtk.vtkMath.Norm(a)  #ok
> vtk.vtkMath.Normalize(a)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: object doesn't support item assignment
> ##########################
>
>
>
> Thanks,
> mathieu
>





More information about the vtkusers mailing list