| 3541 | { |
| 3542 | template <typename TInputIdType> |
| 3543 | int ExecuteDataSet(vtkGeometryFilter* self, vtkDataSet* input, vtkPolyData* output, |
| 3544 | vtkExcludedFaces<TInputIdType>* exc) |
| 3545 | { |
| 3546 | auto explicitSG = vtkExplicitStructuredGrid::SafeDownCast(input); |
| 3547 | if (explicitSG) |
| 3548 | { |
| 3549 | explicitSG->BuildLinks(); |
| 3550 | } |
| 3551 | |
| 3552 | vtkIdType cellId; |
| 3553 | int i; |
| 3554 | vtkIdType numCells = input->GetNumberOfCells(); |
| 3555 | double x[3]; |
| 3556 | vtkIdType ptId; |
| 3557 | vtkPointData* inPD = input->GetPointData(); |
| 3558 | vtkCellData* inCD = input->GetCellData(); |
| 3559 | vtkPointData* outPD = output->GetPointData(); |
| 3560 | vtkCellData* outCD = output->GetCellData(); |
| 3561 | vtkNew<vtkAOSDataArrayTemplate<char>> cellVisArray; |
| 3562 | char* cellVis; |
| 3563 | unsigned char* cellGhosts = nullptr; |
| 3564 | unsigned char* pointGhosts = nullptr; |
| 3565 | |
| 3566 | vtkDebugWithObjectMacro(self, << "Executing geometry filter"); |
| 3567 | |
| 3568 | if (inCD) |
| 3569 | { |
| 3570 | if (auto ghosts = inCD->GetGhostArray()) |
| 3571 | { |
| 3572 | cellGhosts = ghosts->GetPointer(0); |
| 3573 | } |
| 3574 | } |
| 3575 | if (inPD) |
| 3576 | { |
| 3577 | if (auto ghosts = inPD->GetGhostArray()) |
| 3578 | { |
| 3579 | pointGhosts = ghosts->GetPointer(0); |
| 3580 | } |
| 3581 | } |
| 3582 | |
| 3583 | auto cellClipping = self->GetCellClipping(); |
| 3584 | auto cellMinimum = self->GetCellMinimum(); |
| 3585 | auto cellMaximum = self->GetCellMaximum(); |
| 3586 | auto pointClipping = self->GetPointClipping(); |
| 3587 | auto pointMinimum = self->GetPointMinimum(); |
| 3588 | auto pointMaximum = self->GetPointMaximum(); |
| 3589 | auto extentClipping = self->GetExtentClipping(); |
| 3590 | auto extent = self->GetExtent(); |
| 3591 | // Determine nature of what we have to do |
| 3592 | if ((!cellClipping) && (!pointClipping) && (!extentClipping)) |
| 3593 | { |
| 3594 | cellVis = nullptr; |
| 3595 | } |
| 3596 | else |
| 3597 | { |
| 3598 | cellVisArray->SetNumberOfValues(numCells); |
| 3599 | cellVis = cellVisArray->GetPointer(0); |
| 3600 | } |
nothing calls this directly
no test coverage detected