Section: Visualization Toolkit Graphics Classes
To use this filter, you must decide if you will be clipping with an implicit function, or whether you will be using the input scalar data. If you want to clip with an implicit function, you must: 1) define an implicit function 2) set it with the SetClipFunction method 3) apply the GenerateClipScalarsOn method If a ClipFunction is not specified, or GenerateClipScalars is off (the default), then the input's scalar data will be used to clip the polydata.
You can also specify a scalar value, which is used to decide what is inside and outside of the implicit function. You can also reverse the sense of what inside/outside is by setting the InsideOut instance variable. (The cutting algorithm proceeds by computing an implicit function value or using the input scalar data for each point in the dataset. This is compared to the scalar value to determine inside/outside.)
This filter can be configured to compute a second output. The second output is the polygonal data that is clipped away. Set the GenerateClippedData boolean on if you wish to access this output data.
To create an instance of class vtkClipPolyData, simply invoke its constructor as follows
obj = vtkClipPolyData
obj
is an instance of the vtkClipPolyData class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkClipPolyData = obj.NewInstance ()
vtkClipPolyData = obj.SafeDownCast (vtkObject o)
obj.SetValue (double )
- Set the clipping value of the implicit function (if clipping with
implicit function) or scalar value (if clipping with
scalars). The default value is 0.0.
double = obj.GetValue ()
- Set the clipping value of the implicit function (if clipping with
implicit function) or scalar value (if clipping with
scalars). The default value is 0.0.
obj.SetInsideOut (int )
- Set/Get the InsideOut flag. When off, a vertex is considered
inside the implicit function if its value is greater than the
Value ivar. When InsideOutside is turned on, a vertex is
considered inside the implicit function if its implicit function
value is less than or equal to the Value ivar. InsideOut is off
by default.
int = obj.GetInsideOut ()
- Set/Get the InsideOut flag. When off, a vertex is considered
inside the implicit function if its value is greater than the
Value ivar. When InsideOutside is turned on, a vertex is
considered inside the implicit function if its implicit function
value is less than or equal to the Value ivar. InsideOut is off
by default.
obj.InsideOutOn ()
- Set/Get the InsideOut flag. When off, a vertex is considered
inside the implicit function if its value is greater than the
Value ivar. When InsideOutside is turned on, a vertex is
considered inside the implicit function if its implicit function
value is less than or equal to the Value ivar. InsideOut is off
by default.
obj.InsideOutOff ()
- Set/Get the InsideOut flag. When off, a vertex is considered
inside the implicit function if its value is greater than the
Value ivar. When InsideOutside is turned on, a vertex is
considered inside the implicit function if its implicit function
value is less than or equal to the Value ivar. InsideOut is off
by default.
obj.SetClipFunction (vtkImplicitFunction )
vtkImplicitFunction = obj.GetClipFunction ()
obj.SetGenerateClipScalars (int )
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
int = obj.GetGenerateClipScalars ()
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
obj.GenerateClipScalarsOn ()
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
obj.GenerateClipScalarsOff ()
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
obj.SetGenerateClippedOutput (int )
- Control whether a second output is generated. The second output
contains the polygonal data that's been clipped away.
int = obj.GetGenerateClippedOutput ()
- Control whether a second output is generated. The second output
contains the polygonal data that's been clipped away.
obj.GenerateClippedOutputOn ()
- Control whether a second output is generated. The second output
contains the polygonal data that's been clipped away.
obj.GenerateClippedOutputOff ()
- Control whether a second output is generated. The second output
contains the polygonal data that's been clipped away.
vtkPolyData = obj.GetClippedOutput ()
- Return the Clipped output.
vtkAlgorithmOutput = obj.GetClippedOutputPort ()
- Specify a spatial locator for merging points. By default, an
instance of vtkMergePoints is used.
obj.SetLocator (vtkIncrementalPointLocator locator)
- Specify a spatial locator for merging points. By default, an
instance of vtkMergePoints is used.
vtkIncrementalPointLocator = obj.GetLocator ()
- Specify a spatial locator for merging points. By default, an
instance of vtkMergePoints is used.
obj.CreateDefaultLocator ()
- Create default locator. Used to create one when none is specified. The
locator is used to merge coincident points.
long = obj.GetMTime ()
- Return the mtime also considering the locator and clip function.