[vtkusers] VTK hexahedronal unstructured grid

ISTB f.dshabarow at gmail.com
Tue Jul 24 08:55:04 EDT 2012


Here is the code, modified, but still not doing what it need.. Tested it by
storing in vtk and opening it with Paraview, but Paraview shows the same my
vtk window show, a shape that does not make sense. In vtk file I see exactly
what I wrote in the code, so it does not make sense to poste it. It has
400'000 point coordinates and 8 ids of hexahedron.

vtkSmartPointer<vtkUnstructuredGrid>      vUGrid =
vtkSmartPointer<vtkUnstructuredGrid>::New();
vtkSmartPointer<vtkCellArray>	         vCellArray =
vtkSmartPointer<vtkCellArray>::New();
vtkSmartPointer<vtkPoints>                      vPoints =
vtkSmartPointer<vtkPoints>::New();
vtkSmartPointer<vtkHexahedron>              vHexahedron =
vtkSmartPointer<vtkHexahedron>::New();


vPoints->Initialize();
for (unsigned int i = 0; i < mElements.size(); i++)
{
	//Adding approximately 400'000 points to vPoints
}

vHexahedron->Initialize();
vHexahedron->GetPointIds()->SetNumberOfIds(8); 
for (unsigned int j = 0; j < 8; j++) { 
     vHexahedron->GetPointIds()->SetId(j,j); 
}

vUGrid->SetPoints(vPoints);
vUGrid->InsertNextCell(vHexahedron->GetCellType(),
vHexahedron->GetPointIds()); 



--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-hexahedronal-unstructured-grid-tp5714868p5714883.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list