[vtkusers] Vtk.VtkPoints InsertNextPoint For Celltype is Tetra

alihadim ali.hadimogullari at netcad.com.tr
Tue May 12 10:15:19 EDT 2015


hi all,
I created vtk.vtkUnstructuredGrid data. This picture is,
<http://vtk.1045678.n5.nabble.com/file/n5731893/VtkTetra.png> 

*I'm writing code for data copy. and ouput picture is like under line. Can
you help me for situation?;*


vtk.vtkUnstructuredGrid unstructuredGrid1 = new vtk.vtkUnstructuredGrid();

vtk.vtkCellArray cellArray = new vtk.vtkCellArray();
vtk.vtkPoints points = new vtk.vtkPoints();
int counter = 0;

foreach (INetcad3DCell Cell in Cells)
{
counter = 0;
vtk.vtkTetra tetra = new vtk.vtkTetra();
foreach (var item in Cell.Points)
{ 
int ids = points.InsertNextPoint(item.X, item.Y, item.Z);
tetra.GetPointIds().SetId(counter, ids);
unstructuredGrid1.SetPoints(points); 
counter++; 
}

cellArray.InsertNextCell(tetra);
unstructuredGrid1.SetCells(10, cellArray);
}

<http://vtk.1045678.n5.nabble.com/file/n5731893/NewVtkTetra.png> 








--
View this message in context: http://vtk.1045678.n5.nabble.com/Vtk-VtkPoints-InsertNextPoint-For-Celltype-is-Tetra-tp5731893.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list