Hi i´d like to cap the parts i clip and i used the code of this example
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/CapClip
And i also tried this:
for (int i = 0; i < (int)clipFilters_.size(); i++) {
clipFilters_[i]->SetClipFunction(boolean_opsEahcPlane[i]);
clipFilters_[i]->InsideOutOn();
clipFilters_[i]->Update();
clipFilters_[i]->Modified();
}
// Now extract feature edges
auto boundaryEdges = vtkSmartPointer<vtkFeatureEdges>::New();
boundaryEdges->SetInputConnection(clipFilters_[clipFilters_.size() - 1]->GetOutputPort());
boundaryEdges->BoundaryEdgesOn();
boundaryEdges->FeatureEdgesOff();
boundaryEdges->NonManifoldEdgesOff();
boundaryEdges->ManifoldEdgesOff();
auto boundaryStrips = vtkSmartPointer<vtkStripper>::New();
boundaryStrips->SetInputConnection(boundaryEdges->GetOutputPort());
boundaryStrips->Update();
// Triangulate the polyline contour
vtkSmartPointer<vtkContourTriangulator> triangulator =
vtkSmartPointer<vtkContourTriangulator>::New();
triangulator->SetInputConnection(boundaryStrips->GetOutputPort());
triangulator->Update();
vtkSmartPointer<vtkAppendPolyData> appendFilter =
vtkSmartPointer<vtkAppendPolyData>::New();
appendFilter->AddInputConnection(triangulator->GetOutputPort());
appendFilter->AddInputConnection(clipFilters_[clipFilters_.size() - 1]->GetOutputPort());
// Remove any duplicate points.
vtkSmartPointer<vtkCleanPolyData> cleanFilter =
vtkSmartPointer<vtkCleanPolyData>::New();
cleanFilter->SetInputConnection(appendFilter->GetOutputPort());
cleanFilter->Update();
Actor->GetMapper()->SetInputConnection(cleanFilter->GetOutputPort());
Actor->GetMapper()->Update();
but it does not work for me. I get a weird behaviour. Is there any other fiter to close the gaps or to clip with cap?. Thanks