Combine the correct regions for output boolean
| 1298 | |
| 1299 | // Combine the correct regions for output boolean |
| 1300 | void vtkLoopBooleanPolyDataFilter::Impl::PerformBoolean(vtkPolyData* output, int booleanOperation) |
| 1301 | { |
| 1302 | // vtkSmartPointer<vtkThreshold> thresholder = |
| 1303 | // vtkSmartPointer<vtkThreshold>::New(); |
| 1304 | // vtkSmartPointer<vtkDataSetSurfaceFilter> surfacer = |
| 1305 | // vtkSmartPointer<vtkDataSetSurfaceFilter>::New(); |
| 1306 | |
| 1307 | vtkPolyData* surfaces[4]; |
| 1308 | for (int i = 0; i < 4; i++) |
| 1309 | { |
| 1310 | surfaces[i] = vtkPolyData::New(); |
| 1311 | } |
| 1312 | |
| 1313 | this->ThresholdRegions(surfaces); |
| 1314 | // thresholder->SetInputData(this->Mesh[0]); |
| 1315 | // thresholder->SetInputArrayToProcess(0, 0, 0, 1, "BooleanRegion"); |
| 1316 | // thresholder->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); |
| 1317 | // thresholder->SetLowerThreshold(-1.0); |
| 1318 | // thresholder->SetUpperThreshold(-1.0); |
| 1319 | // thresholder->Update(); |
| 1320 | // surfacer->SetInputData(thresholder->GetOutput()); |
| 1321 | // surfacer->Update(); |
| 1322 | // surfaces[0]->DeepCopy(surfacer->GetOutput()); |
| 1323 | |
| 1324 | // thresholder->SetInputData(this->Mesh[0]); |
| 1325 | // thresholder->SetInputArrayToProcess(0, 0, 0, 1, "BooleanRegion"); |
| 1326 | // thresholder->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); |
| 1327 | // thresholder->SetLowerThreshold(1.0); |
| 1328 | // thresholder->SetUpperThreshold(1.0); |
| 1329 | // thresholder->Update(); |
| 1330 | // surfacer->SetInputData(thresholder->GetOutput()); |
| 1331 | // surfacer->Update(); |
| 1332 | // surfaces[1]->DeepCopy(surfacer->GetOutput()); |
| 1333 | |
| 1334 | // thresholder->SetInputData(this->Mesh[1]); |
| 1335 | // thresholder->SetInputArrayToProcess(0, 0, 0, 1, "BooleanRegion"); |
| 1336 | // thresholder->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); |
| 1337 | // thresholder->SetLowerThreshold(1.0); |
| 1338 | // thresholder->SetUpperThreshold(1.0); |
| 1339 | // thresholder->Update(); |
| 1340 | // surfacer->SetInputData(thresholder->GetOutput()); |
| 1341 | // surfacer->Update(); |
| 1342 | // surfaces[2]->DeepCopy(surfacer->GetOutput()); |
| 1343 | |
| 1344 | // thresholder->SetInputData(this->Mesh[1]); |
| 1345 | // thresholder->SetInputArrayToProcess(0, 0, 0, 1, "BooleanRegion"); |
| 1346 | // thresholder->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); |
| 1347 | // thresholder->SetLowerThreshold(-1.0); |
| 1348 | // thresholder->SetUpperThreshold(-1.0); |
| 1349 | // thresholder->Update(); |
| 1350 | // surfacer->SetInputData(thresholder->GetOutput()); |
| 1351 | // surfacer->Update(); |
| 1352 | // surfaces[3]->DeepCopy(surfacer->GetOutput()); |
| 1353 | |
| 1354 | vtkSmartPointer<vtkAppendPolyData> appender = vtkSmartPointer<vtkAppendPolyData>::New(); |
| 1355 | |
| 1356 | // If open intersection case, make sure correct region is taken |
| 1357 | if (this->IntersectionCase == 2) |
no test coverage detected