[Paraview] new Source plugin: no show!

Burlen Loring bloring at lbl.gov
Sat Oct 4 23:05:16 EDT 2014


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 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20141004/3050642d/attachment.html>


More information about the ParaView mailing list