Commit a806017d authored by Amy Squillacote's avatar Amy Squillacote

ENH: adding a GetClippedOutputPort method to vtkClipPolyData

parent 7c9c1610
......@@ -73,7 +73,7 @@ vtkActor cutActor
# The clipped part of the cow is rendered wireframe.
vtkPolyDataMapper restMapper
restMapper SetInput [clipper GetClippedOutput]
restMapper SetInputConnection [clipper GetClippedOutputPort]
restMapper ScalarVisibilityOff
vtkActor restActor
restActor SetMapper restMapper
......
......@@ -31,7 +31,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkClipPolyData, "1.56");
vtkCxxRevisionMacro(vtkClipPolyData, "1.57");
vtkStandardNewMacro(vtkClipPolyData);
vtkCxxSetObjectMacro(vtkClipPolyData,ClipFunction,vtkImplicitFunction);
......@@ -89,11 +89,6 @@ unsigned long vtkClipPolyData::GetMTime()
vtkPolyData *vtkClipPolyData::GetClippedOutput()
{
if (this->GetNumberOfOutputPorts() < 2)
{
return NULL;
}
return vtkPolyData::SafeDownCast(
this->GetExecutive()->GetOutputData(1));
}
......
......@@ -117,6 +117,13 @@ public:
// Return the Clipped output.
vtkPolyData *GetClippedOutput();
// Description:
// Return the output port (a vtkAlgorithmOutput) of the clipped output.
vtkAlgorithmOutput* GetClippedOutputPort()
{
return this->GetOutputPort(1);
}
// Description:
// Specify a spatial locator for merging points. By default, an
// instance of vtkMergePoints is used.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment