[vtkusers] How do I get a single Cell from a CellArray ?

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Apr 6 11:18:29 EDT 2004


Hi Ingo,

Even more confusing: vtkCellArray is an array of integers
(vtkIdTypeArray *Ia)!

For reasons of speed and compactness, cells in vtkPolyData are
implicitly represented rather than explicitly having a collection of
vtkCell objects. So a quad with points 1,2,3,4 in the points list, is
implicitly represented in vtkCellArray as 4 1 2 3 4, ie, the number of
vertices (4) then the points list.

vtkCell* vtkPolyData::GetCell(vtkIdType cellId) creates a vtkCell object
for you, on the fly, and fills it with the correct point ids and point
coords.

>> So... how do I get a vtkCell object from my vtkCellArray ?
You can't... because vtkCellArray just knows about the cell topology (ie
the number and ordering of vertices) not the point coordinates (ie the
geometry).

This is just my understanding and probably should come with some
disclaimer.

Hth,

Goodwin

Message: 12
Date: Tue, 6 Apr 2004 16:20:39 +0200
From: "de Boer Ingo" <I.deBoer at polytec.de>
To: <vtkusers at vtk.org>
Subject: [vtkusers] How do I get a single Cell from a CellArray ?


Hi,

I have generated a vtkCellArray. In vtkPolyData I have a=20 simple
function to retrieve a single cell:

vtkCell* vtkPolyData::GetCell(vtkIdType cellId)

Why don't I have that in the vtkCellArray ?

I only have=20
void GetCell(vtkIdType loc, vtkIdType &npts, vtkIdType* &pts); which is
somehow an 'internal method' (that is what the docs say)

So... how do I get a vtkCell object from my vtkCellArray ?

greets
  Ingo


---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255

--__--__--

Message: 13
Subject: RE: [vtkusers] How do I get a single Cell from a CellArray ?
Date: Tue, 6 Apr 2004 16:32:39 +0200
From: "de Boer Ingo" <I.deBoer at polytec.de>
To: <vtkusers at vtk.org>


> Why don't I have that in the vtkCellArray ?
Ahh.. Bcause vtkCellArray is not a collection of vtkCell objects... A
bit confusing... Or am I missing something... ? Like vtkFloatArray is an
data array of floats shouldn't be vtkCellArray an array of vtkCells ?

greets
  Ingo


---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255
=20


--__--__--

_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers


End of vtkusers Digest




More information about the vtkusers mailing list