[vtkusers] Match Connectivity

David Doria daviddoria at gmail.com
Tue Dec 7 07:56:39 EST 2010


On Mon, Dec 6, 2010 at 11:02 PM, Ambar C <ambarc at gmail.com> wrote:
> Hello,
>
> I have two meshes with the same number of vertices - I'm trying to go
> through the first mesh and change the connectivity (vtkCellArray) of
> the second so that they have the same connectivity in terms of which
> cell ids are matched. Currently, I'm attempting:
>
> denseCells->SetCells(baseCellCount, baseCells->GetData());
>
> where denseCells is the vtkCellArray of the mesh whose connectivity I
> want to change to match that of baseCells' mesh. Any suggestions?
>
> Cheers,
> Ambar

What is the type of denseCells? Typically the cells are all of the
same type (polys, for example), so you could use

polydata1->SetPolys(polydata2->GetPolys());

David



More information about the vtkusers mailing list