MCPcopy Create free account
hub / github.com/Kitware/VTK / UnstructuredGridExecuteInternal

Method UnstructuredGridExecuteInternal

Filters/Geometry/vtkDataSetSurfaceFilter.cxx:1397–2288  ·  view source on GitHub ↗

======================================================================== Tris are now degenerate quads so we only need one hash table. We might want to change the method names from QuadHash to just Hash.

Source from the content-addressed store, hash-verified

1395// Tris are now degenerate quads so we only need one hash table.
1396// We might want to change the method names from QuadHash to just Hash.
1397int vtkDataSetSurfaceFilter::UnstructuredGridExecuteInternal(
1398 vtkUnstructuredGridBase* input, vtkPolyData* output, bool handleSubdivision)
1399{
1400 vtkSmartPointer<vtkUnstructuredGrid> tempInput;
1401 if (handleSubdivision)
1402 {
1403 // Since this filter only properly subdivides 2D cells past
1404 // level 1, we convert 3D cells to 2D by using
1405 // vtkUnstructuredGridGeometryFilter.
1406 vtkNew<vtkUnstructuredGridGeometryFilter> uggf;
1407 vtkNew<vtkUnstructuredGrid> clone;
1408 clone->ShallowCopy(input);
1409 uggf->SetInputData(clone);
1410 uggf->SetPassThroughCellIds(this->PassThroughCellIds);
1411 uggf->SetOriginalCellIdsName(this->GetOriginalCellIdsName());
1412 uggf->SetPassThroughPointIds(this->PassThroughPointIds);
1413 uggf->SetMatchBoundariesIgnoringCellOrder(this->MatchBoundariesIgnoringCellOrder);
1414 uggf->SetOriginalPointIdsName(this->GetOriginalPointIdsName());
1415 uggf->DuplicateGhostCellClippingOff();
1416 uggf->SetContainerAlgorithm(this);
1417 // Disable point merging as it may prevent the correct visualization
1418 // of non-continuous attributes.
1419 uggf->MergingOff();
1420 uggf->Update();
1421
1422 tempInput = vtkSmartPointer<vtkUnstructuredGrid>::New();
1423 tempInput->ShallowCopy(uggf->GetOutputDataObject(0));
1424 input = tempInput;
1425
1426 if (this->CheckAbort())
1427 {
1428 return 1;
1429 }
1430 }
1431
1432 vtkUnsignedCharArray* ghosts = input->GetPointGhostArray();
1433 vtkUnsignedCharArray* ghostCells = input->GetCellGhostArray();
1434 vtkCellArray* newVerts;
1435 vtkCellArray* newLines;
1436 vtkCellArray* newPolys;
1437 vtkPoints* newPts;
1438 int progressCount;
1439 vtkIdType i, j, k;
1440 int cellType;
1441 vtkIdType numPts = input->GetNumberOfPoints();
1442 vtkIdType numCells = input->GetNumberOfCells();
1443 vtkGenericCell* cell;
1444 vtkNew<vtkIdList> pointIdList;
1445 const vtkIdType* ids;
1446 vtkIdType numFacePts;
1447 vtkIdType inPtId, outPtId, numCellPts;
1448 vtkPointData* inputPD = input->GetPointData();
1449 vtkCellData* inputCD = input->GetCellData();
1450 vtkFieldData* inputFD = input->GetFieldData();
1451 vtkCellData* cd = input->GetCellData();
1452 vtkPointData* outputPD = output->GetPointData();
1453 vtkCellData* outputCD = output->GetCellData();
1454 vtkFieldData* outputFD = output->GetFieldData();

Callers 2

Calls 15

InitializeQuadHashMethod · 0.95
GetOutputPointIdMethod · 0.95
RecordOrigCellIdMethod · 0.95
InsertQuadInHashMethod · 0.95
InsertTriInHashMethod · 0.95
InsertPolygonInHashMethod · 0.95
InitQuadHashTraversalMethod · 0.95
DeleteQuadHashMethod · 0.95
CheckAbortMethod · 0.80

Tested by

no test coverage detected