[vtkusers] Re: What's Wrong With This?!?
Andrea Gavana
andrea.gavana at gmail.com
Wed Mar 22 11:49:18 EST 2006
Hello Goodwin,
thank you very much for your suggestions. This is what I have tried:
1) Call SetNumberOfComponents() before SetNumberOfTuples() => VTK Crashes
2) Take vtkExtractGrid out of the pipeline => VTK Crashes
3) Try using vtkPoints::Allocate() and vtkPoints::SetTuple3(): VTK crashes
even before showing the 3D window: the problem is here, as you suggested in
your point. I am unable to finish the call to SetTuple3 in a loop if the
number of points is greater than 100 or something. I can finish the loop if
I choose, i.e., 50 points. I attach the example with SetTuple3 as
"prova3.py" (using
real simple grid data)
4) I get the same runtime error from Windows if I simply use SetData()
instead of SetTuple3() and Allocate(), if I choose more than 100 points. If
I use 50 points, for example, I get the 3D window with a nice cube. I attach
another example as "prova4.py" with SetData() instead of SetTuple3() and
Allocate().
Probably I have made some mistake somewhere for the SetTuple3/Allocate
example, but I am quite sure about the SetData() example. It is
fantastically difficult to find examples of use of VTK in Python on the
net...
For the samples I used Numpy instead of Numeric because Numpy is much more
friendly in creating a 3D grid... I get the error message when I change the
values for nx, ny, nz to bigger values.
Does anyone have some suggestion for me? It's really complicated to find out
what the problem is when I get only a windows error message... at least a
Python/VTK error messages would be much more useful...
Thank you very much for your help and suggestions.
Andrea.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060322/aeb547d5/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prova3.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060322/aeb547d5/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prova4.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060322/aeb547d5/attachment.asc>
More information about the vtkusers
mailing list