I’m still on the steep part of the vtk learning curve.
I’m following the ImplicitPaneWidget2 example for this. I’m trying to use that methodology for the “clip widget” to clip the result of implicit functions that have been processed by a vtkSampleFunction.
If someone could point me to an existing example for this, that would be great.
Part of what I have is
vtkNew<vtkSampleFunction> sample; sample->SetSampleDimensions(150, 150, 150); sample->SetImplicitFunction(implicitBoolean); sample->SetModelBounds(bounds, bounds, bounds, bounds, bounds, bounds); clipper->SetInputConnection(sample->GetOutputPort()); // Create the 0 isosurface contours->SetInputConnection(sample->GetOutputPort()); contours->GenerateValues(1, 1, 1); // Map the contours to graphical primitives contourMapper->SetInputConnection(contours->GetOutputPort()); contourMapper->ScalarVisibilityOff(); contourMapper->Update(); clipper->SetInputConnection(contourMapper->GetOutputPort());
When the last line (above) is executed, I get the following error:
vtkAlgorithm.cxx:893 ERR| vtkOpenGLPolyDataMapper (0xb90890): Attempt to get output port index 0 for an algorithm with 0 output ports.
And of course, the implicit function never appears in the render window, but the clipper widget does.
Any thoughts about this would be appreciated.