[vtkusers] 2 questions about modification on the polydata

Leon Chen liming.leon at gmail.com
Sun Jul 17 05:24:48 EDT 2005


Hi all,

It seems that somebody asked the similar question before, but i can
not find the answer... So i hope you don't mind my asking again :P

***The first question is, how can I modify a 3d mesh (vtkPolyData
type)? In detail, I just want to move each point of the mesh to a new
position, one-by-one.

So for a single point on this mesh, can i move it? Here the orignal
topology will be kept.

***The second question, if i want to delele  a point on the mesh, what
should I do? I searched the internet, found out Tim Hutton asked the
same question several yeas ago... but there is no explict answer...
but somebody said something about this

-----quote:---

>The DeleteCell() method is used to "mark" a cell deleted, even though the
cell is not actually discarded (or removed from the contiguous
vtkCellArray) array. You have to refer to what's being marked to determine
if the cell has actually been deleted. That's a bit tricky.
>
>If you look in vtkDecimatePro, you'll see DeleteCell() in action.
DeleteCell() is used to mark triangles deleted. Later, GetCellType() is
used to determine whether a cell has been deleted (i.e., whether the type
has been set to VTK_EMPTY_CELL).
--------------

Here the topology of the mesh will be changed.

***** Is there anyone who has experience about dealing with polydata ?
Could you say something about modify the position & topology
information of the vtkPoloData type?

Thank you very much.


Leon



More information about the vtkusers mailing list