[vtkusers] making new cell types?

s comp sscomp2004 at yahoo.com.au
Mon Sep 20 21:40:11 EDT 2004


Thanks for the advice Mathieu,
 
For now I wil just try using vtkConvexPointSet what is the cell type number of this? (if there is one - can it be used like other cell types when writing data to vtk file format?)
 
Sonam

Mathieu Malaterre <mathieu.malaterre at kitware.com> wrote:
Sonam,

See my interlaced comments.

s comp wrote:
> Is it possible to use cell types in vtk that are not mentioned in the 
> file formats documentation? (without modifying source). 

Yes, and no :)
You can use vtkConvexPointSet:
http://www.vtk.org/doc/nightly/html/classvtkConvexPointSet.html

But I don't consider this as long term solution.

> I would like to 
> use a cell type that is a cube with one corner cut off, so that the new 
> shape has 7 faces: 3 squares, and 4 triangles, and 7 vertices. Also as 
> mentioned in a previous post I would also like to use pyramids with more 
> than four sided base.

Then in that case I really suggest you copy/paste other vtkCell subclass 
and adapt to your changes. I believe that vtkConvexPointSet is really 
slow on cut/contour/clip operation. So I'd suggest you write your own class.


> Any advice on how I could do this would be greatly appreciated.

Adding a new subelement to vtkCell3d is not that hard. Have a look in 
the CVS for vtkHexagonalPrism. They used to be much more lighter and 
should give you some clue on how to start. BTW I believe that your 
pyramid with 5 points on the base is a degenerate case of a pentagonalprism.

HTH
Mathieu





---------------------------------
Find local movie times and trailers on Yahoo! Movies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040921/fd76232e/attachment.htm>


More information about the vtkusers mailing list