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 clipping 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 part of the cell that is clipped away. Set the GenerateClippedData boolean on if you wish to access this output data.
To create an instance of class vtkClipDataSet, simply invoke its constructor as follows
obj = vtkClipDataSet
obj
is an instance of the vtkClipDataSet class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkClipDataSet = obj.NewInstance ()
vtkClipDataSet = 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. This value is ignored if
UseValueAsOffset is true and a clip function is defined.
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. This value is ignored if
UseValueAsOffset is true and a clip function is defined.
obj.SetUseValueAsOffset (bool )
- If UseValueAsOffset is true, Value is used as an offset parameter to
the implicit function. Otherwise, Value is used only when clipping
using a scalar array. Default is true.
bool = obj.GetUseValueAsOffset ()
- If UseValueAsOffset is true, Value is used as an offset parameter to
the implicit function. Otherwise, Value is used only when clipping
using a scalar array. Default is true.
obj.UseValueAsOffsetOn ()
- If UseValueAsOffset is true, Value is used as an offset parameter to
the implicit function. Otherwise, Value is used only when clipping
using a scalar array. Default is true.
obj.UseValueAsOffsetOff ()
- If UseValueAsOffset is true, Value is used as an offset parameter to
the implicit function. Otherwise, Value is used only when clipping
using a scalar array. Default is true.
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.
obj.SetMergeTolerance (double )
- Set the tolerance for merging clip intersection points that are near
the vertices of cells. This tolerance is used to prevent the generation
of degenerate primitives. Note that only 3D cells actually use this
instance variable.
double = obj.GetMergeToleranceMinValue ()
- Set the tolerance for merging clip intersection points that are near
the vertices of cells. This tolerance is used to prevent the generation
of degenerate primitives. Note that only 3D cells actually use this
instance variable.
double = obj.GetMergeToleranceMaxValue ()
- Set the tolerance for merging clip intersection points that are near
the vertices of cells. This tolerance is used to prevent the generation
of degenerate primitives. Note that only 3D cells actually use this
instance variable.
double = obj.GetMergeTolerance ()
- Set the tolerance for merging clip intersection points that are near
the vertices of cells. This tolerance is used to prevent the generation
of degenerate primitives. Note that only 3D cells actually use this
instance variable.
vtkUnstructuredGrid = obj.GetClippedOutput ()
- Return the Clipped output.
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.