[vtk-developers] Is this Bug? Vtk.VtkPoints InsertNextPoint For Celltype is Tetra.

alihadim ali.hadimogullari at netcad.com.tr
Thu May 14 06:59:05 EDT 2015


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

I'm writing code for data copy and ouput picture is like under line(new data
has changed!)I realized a situation. İf I use code 

foreach (var item in Cell.Points)
{ points.InsertPoint(item.Id, item.X, item.Y, item.Z);
tetra.GetPointIds().SetId(counter, item.Id);
unstructuredGrid1.SetPoints(points); counter++; }  I didnt't take for
situation! 

Can you help me for situation? 
My Code;

tk.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/n5731909/NewVtkTetra.png> 



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


More information about the vtk-developers mailing list