[vtkusers] clipping a surface with its contour

Roman Putanowicz putanowr at twins.pk.edu.pl
Wed Nov 19 03:15:57 EST 2003


> Given a surface (not planar), is it possible to clip out the part
> outside its contour-isoline (which might have more than one connected
> components)? I would appreciate any helpful idea.
Hi Paul

Caveat emptor -- I have not tested this solutin :-)

You can construct an implicit function (cylinder like )
from the contour line (isoline).

Then having and implicit function you can use vtkClipPolyData
or vtkExtractGeometry.  


Two extracts from documentation should give you an idea:


vtkClipPolyData is a filter that clips polygonal data using either any
subclass of vtkImplicitFunction, or the input scalar data. Clipping
means that it actually "cuts" through the cells of the dataset,
returning everything inside of the specified implicit function (or
greater than the scalar value) including "pieces" of a cell. (Compare
this with vtkExtractGeometry, which pulls out entire, uncut cells.) The
output of this filter is polygonal data.


vtkImplicitSelectionLoop computes the implicit function value and
function gradient for a irregular, cylinder-like object whose cross
section is defined by a set of points forming a loop. The loop need not
be convex nor its points coplanar. However, the loop must be
non-self-intersecting when projected onto the plane defined by the
accumulated cross product around the loop (i.e., the axis of the loop).
(Alternatively, you can specify the normal to use.)


I hope that it will help.

Romek

-- 
    _/_/_/       _/     _/       _/_/_/_/_/    Roman Putanowicz 
  _/            _/     _/           _/         Inst.Comp.Meth.Civ.Eng.
 _/            _/     _/           _/          tel +48 12  628 2569
 _/_/_/racow   _/_/_/niversity of _/echnology  putanowr at twins.pk.edu.pl





More information about the vtkusers mailing list