----------------------------------------------------------------------------
| 3216 | |
| 3217 | //---------------------------------------------------------------------------- |
| 3218 | int vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet* dataSetInput, vtkPolyData* output, |
| 3219 | vtkGeometryFilterHelper* info, vtkPolyData* excludedFaces) |
| 3220 | { |
| 3221 | const auto uGrid = vtkUnstructuredGrid::SafeDownCast(dataSetInput); |
| 3222 | #ifdef VTK_USE_64BIT_IDS |
| 3223 | bool use64BitsIds = (dataSetInput->GetNumberOfPoints() > VTK_TYPE_INT32_MAX || |
| 3224 | dataSetInput->GetNumberOfCells() > VTK_TYPE_INT32_MAX); |
| 3225 | if (use64BitsIds) |
| 3226 | { |
| 3227 | using TInputIdType = vtkTypeInt64; |
| 3228 | vtkExcludedFaces<TInputIdType> exc; |
| 3229 | if (excludedFaces) |
| 3230 | { |
| 3231 | exc.ExcludedFaces = excludedFaces; |
| 3232 | vtkCellArray* excPolys = excludedFaces->GetPolys(); |
| 3233 | if (excPolys->GetNumberOfCells() > 0) |
| 3234 | { |
| 3235 | exc.Links = new vtkStaticCellLinksTemplate<TInputIdType>; |
| 3236 | exc.Links->BuildLinks( |
| 3237 | dataSetInput->GetNumberOfPoints(), excPolys->GetNumberOfCells(), excPolys); |
| 3238 | } |
| 3239 | } |
| 3240 | if (uGrid && !uGrid->GetPolyhedronFaces()) |
| 3241 | { |
| 3242 | using TFaceIdType = vtkTypeInt8; |
| 3243 | return ExecuteUnstructuredGrid<TInputIdType, TFaceIdType>( |
| 3244 | this, dataSetInput, output, info, &exc); |
| 3245 | } |
| 3246 | else |
| 3247 | { |
| 3248 | using TFaceIdType = vtkTypeInt32; |
| 3249 | return ExecuteUnstructuredGrid<TInputIdType, TFaceIdType>( |
| 3250 | this, dataSetInput, output, info, &exc); |
| 3251 | } |
| 3252 | } |
| 3253 | else |
| 3254 | #endif |
| 3255 | { |
| 3256 | using TInputIdType = vtkTypeInt32; |
| 3257 | vtkExcludedFaces<TInputIdType> exc; |
| 3258 | if (excludedFaces) |
| 3259 | { |
| 3260 | exc.ExcludedFaces = excludedFaces; |
| 3261 | vtkCellArray* excPolys = excludedFaces->GetPolys(); |
| 3262 | if (excPolys->GetNumberOfCells() > 0) |
| 3263 | { |
| 3264 | exc.Links = new vtkStaticCellLinksTemplate<TInputIdType>; |
| 3265 | exc.Links->BuildLinks( |
| 3266 | dataSetInput->GetNumberOfPoints(), excPolys->GetNumberOfCells(), excPolys); |
| 3267 | } |
| 3268 | } |
| 3269 | if (uGrid && !uGrid->GetPolyhedronFaces()) |
| 3270 | { |
| 3271 | using TFaceIdType = vtkTypeInt8; |
| 3272 | return ExecuteUnstructuredGrid<TInputIdType, TFaceIdType>( |
| 3273 | this, dataSetInput, output, info, &exc); |
| 3274 | } |
| 3275 | else |
no test coverage detected