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

Method ClipWithBoxClipDataSet

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:2688–2722  ·  view source on GitHub ↗

------------------------------------------------------------------------------ In general, vtkBoxClipDataSet is much faster and makes fewer errors.

Source from the content-addressed store, hash-verified

2686//------------------------------------------------------------------------------
2687// In general, vtkBoxClipDataSet is much faster and makes fewer errors.
2688void vtkPDistributedDataFilter::ClipWithBoxClipDataSet(vtkUnstructuredGrid* grid, double* bounds,
2689 vtkUnstructuredGrid** outside, vtkUnstructuredGrid** inside)
2690{
2691 TimeLog timer("ClipWithBoxClipDataSet", this->Timing);
2692 (void)timer;
2693
2694 vtkUnstructuredGrid* in;
2695 vtkUnstructuredGrid* out;
2696
2697 vtkBoxClipDataSet* clipped = vtkBoxClipDataSet::New();
2698
2699 clipped->SetBoxClip(bounds[0], bounds[1], bounds[2], bounds[3], bounds[4], bounds[5]);
2700
2701 clipped->SetInputData(grid);
2702
2703 if (outside)
2704 {
2705 clipped->GenerateClippedOutputOn();
2706 }
2707
2708 clipped->Update();
2709
2710 if (outside)
2711 {
2712 out = clipped->GetClippedOutput();
2713 out->Register(this);
2714 *outside = out;
2715 }
2716
2717 in = clipped->GetOutput();
2718 in->Register(this);
2719 *inside = in;
2720
2721 clipped->Delete();
2722}
2723
2724//------------------------------------------------------------------------------
2725void vtkPDistributedDataFilter::ClipCellsToSpatialRegion(vtkUnstructuredGrid* grid)

Callers 1

Calls 8

SetBoxClipMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
SetInputDataMethod · 0.45
UpdateMethod · 0.45
GetClippedOutputMethod · 0.45
RegisterMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected