Hi Bertwim,
I should have explained the cells better. The cells are descriptions of
how points are combined into geometric primitives that can be rendered
by OpenGL (or converted into those understood by OpenGL). Here is an
excerpt <http://www.vtk.org/VTK/img/file-formats.pdf> of the User Guide
describing VTK's cells, see p9-10.
Burlen
On 10/5/2014 8:17 AM, B.W.H. van Beest wrote:
Hi Burlen,
Thanks for your reply. On the cell-info: I now (finally) understood
what was there to be. After implementing the cells, I indeed got the
expected display. On the book: what keeps me from buying is that it
seems outdated (because it refers to version 3).
The texture coordinates I had found on Google indeed. What I needed
was how to apply it in Paraview/VTK. I will look into that again Maybe
it becomes clear now.
Thanks
Bertwim
On 10/05/2014 05:05 AM, Burlen Loring wrote:
I assume in your request data you are generating a vtkPolyData
dataset. At the end of request data call "dataset->Print(cerr);" .
That's the one of the best debug method when you don't see what you
think you should in PV while developing a new filter/source/reader
what ever. The information tab in the GUI gives a subset of that,
also useful.
texture coordinates are usually for applying an image to the surface.
google it and you'll find volumes of info. In pv they are optional.
the cell array I'm afraid is not. when generating poly or
unstructured data. If you have no cells what do you expect to see?
normals are per point.
some of your questions suggest that the book VTK user guide
<http://www.kitware.com/products/books/vtkguide.html> would be a good
investment for you.
Hope I didn't miss anything. ;-)
On 10/4/2014 8:30 AM, B.W.H. van Beest wrote:
Hello,
I need to write a new Source, representing a 'TriPrism",
i.e. a prism where the top and bottom planes are triangles. So far, I
failed.
Being unable to find appropriate documentation, I used the source code
of vtkCubeSource as an example, thinking it would be an easy change.
Wrong! The prism doesn't show on the screen. The
properties panel behaves as expected (and ok, as far I can see).
The member function 'RequestData' seems to be the important method.
But the code of the example (as well as other source examples) is on
closer inspection not clear to me at all.
The following is happening in the vtkCubeSource:
a) The point of the cube are generated. This is straightforward and
easily
translates to the triprism.
The new points are updated via a call "output->setPoints(
newPoints );"
b) The normals (to the side planes of the cube) are being calculated.
The new normals are updated via a call
"output->GetPointData()->SetNormals(newNormals);"
This is also straightforward for the triprism, but:
Q: although calculating the normals is straightforward,
in which order are they supposed to be given?
c) Also, texture coordinates (TCoords) are calculated.
Q: What are these? Are these mandatory?
d) Also, a new vtkCellArray is being created. ('newPolys')
Q: Same question. No clue what I should do here.
As usual, any clue of how to attack this is greatly appreciated.
Bertwim
_______________________________________________
Powered bywww.kitware.com
Visit other Kitware open-source projects
athttp://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki
at:http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview