vtkDataSetSurfaceFilter does not pass coincident 2-D quadratic cells.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
vtkDataSetSurfaceFilter::UnstructuredGridExecute() puts all 2-D quadratic cells in the hash table. If the cells are coincident (share the same points) the cell is hidden. Consequently, the contract to pass all 2-d cells is not honoured.
The following changes were made to version 1.36.
-
Add the 2-D quadratic cells to the test for 2-d cell types :
else if (cellType == VTK_PIXEL || cellType == VTK_QUAD || cellType == VTK_TRIANGLE || cellType == VTK_POLYGON || cellType == VTK_TRIANGLE_STRIP || cellType == VTK_QUADRATIC_TRIANGLE || cellType == VTK_QUADRATIC_QUAD )
-
Do not add the triangulated cell to the hash table. Replace by a suitable warning :
else if ( cell->GetCellDimension() == 2 ) {
// cell->Triangulate(0,pts,coords); // for (i=0; i < pts->GetNumberOfIds(); i+=3) // { // this->InsertTriInHash(pts->GetId(i), pts->GetId(i+1), // pts->GetId(i+2), cellId); // } vtkWarningMacro(<< "2-D nonlinear cells must be processed with all other 2-D
cells.");
}
-
Process 2-D Quadratic cells with the other 2-D cells in the second pass :
else if ( cellType == VTK_QUADRATIC_TRIANGLE || cellType == VTK_QUADRATIC_QUAD ) { input->GetCell( cellId, cell ); cell->Triangulate( 0, pts, coords ); for ( i=0; i < pts->GetNumberOfIds(); i+=3 ) { outPts[0] = this->GetOutputPointId( pts->GetId(i), input, newPts, outputPD ); outPts[1] = this->GetOutputPointId( pts->GetId(i+1), input, newPts, outputPD ); outPts[2] = this->GetOutputPointId( pts->GetId(i+2), input, newPts, outputPD ); newPolys->InsertNextCell( 3, outPts ); outputCD->CopyData( inputCD, cellId, this->NumberOfNewCells++ ); } }
HTH John.