Skip to content
Snippets Groups Projects
Commit dedc2eaa authored by Robert Maynard's avatar Robert Maynard
Browse files

Correct an issue with converting dax data to vtk polydata.

Change-Id: I6b56a2b3f643be8e726b30444c5c103c9d717925
parent c5333aac
No related branches found
No related tags found
No related merge requests found
......@@ -111,18 +111,19 @@ void convertCells(ContainerTag, GridType& grid, OutputType* output)
//get the portal from the grid.
typedef typename GridType::CellConnectionsType::PortalConstControl
DaxPortalType;
DaxPortalType daxPortal = grid.GetCellConnections.GetPortalConstControl();
DaxPortalType daxPortal = grid.GetCellConnections().GetPortalConstControl();
//ask the vtkToDax allocator to make us memory
::vtkToDax::vtkAlloc<vtkCellArray, CellType::NUM_POINTS> alloc;
vtkCellArray* cells = alloc.allocate(num_cells+alloc_size);
vtkIdType* cellPointer = cells->GetPointer();
vtkIdType index = 0;
for(vtkIdType i=0; i < num_cells; ++i)
{
*cellPointer = CellType::NUM_POINTS;
++cellPointer;
for(vtkIdType j=0; j < CellType::NUM_POINTS; ++j, ++cellPointer)
for(vtkIdType j=0; j < CellType::NUM_POINTS; ++j, ++cellPointer, ++index)
{
*cellPointer = daxPortal.Get(index);
}
......@@ -174,10 +175,10 @@ void convertPoints(ContainerTag, GridType& grid, OutputType* output)
//get the coord portal from the grid.
typedef typename GridType::PointCoordinatesType::PortalConstControl
DaxPortalType;
DaxPortalType daxPortal = grid.GetPointCoordinates.GetPortalConstControl();
DaxPortalType daxPortal = grid.GetPointCoordinates().GetPortalConstControl();
std::copy(daxPortal.GetBeginIterator(),
daxPortal.GetEndIterator(),
std::copy(daxPortal.GetIteratorBegin(),
daxPortal.GetIteratorEnd(),
raw_pts);
output->SetPoints( points );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment