[vtkusers] using vtkImplicitFunction in two ways to clip a cylinder

David Gobbi david.gobbi at gmail.com
Tue May 3 13:20:06 EDT 2011


Hi Dean,

I get the feeling that you are looking for something similar to
vtkImplicitSelectionLoop for polydata surfaces.  No such thing exists
in VTK, that is why there is so many people have expressed interest
in the VTK Journal submission that clips polydata with polydata.

The way vtkImplicitDataSet works is similar to vtkImplicitVolume.  The
implicit value is interpolated from the data, and everywhere outside
the data has a value of OutValue.  So clipping with vtkImplicitDataSet
works well if the cells are volumetric, but if the cells are 2D, then you
end up with something akin to a delta function.

 - David


On Tue, May 3, 2011 at 10:48 AM, Dean Inglis <dean.inglis at camris.ca> wrote:
> Im having a problem getting a proof of principle established
> that demonstates clipping with vtkClipPolyData using vtkImplicitDataSet.
> I would ultimately like to clip a vtkPolyData with an arbitrary
> (non-parametric)
> surface defined by vtkPolyData composed of 2D cells (vtkTriangle,
> vtkTriangleStrip
> etc.).  I have coded two simple demos in tcl: one uses a vtkPlane as the
> vtkImplicitFunction and is controlled interactively with
> vtkImplicitPlaneWidget,
> the other uses a vtkPolyData output from a vtkPlaneWidget.  In the latter
> case
> I am using vtkImplicitDataSet as the function by assigning a scalar array
> (of 1's) to the
> polydata, but no clipping occurs.  Can anyone offer suggestion on how to get
> the latter demo working?
>
> best,
> Dean



More information about the vtkusers mailing list