[vtkusers] How do I get points from vtkClipPolyData?

Timo Frenzel rohlof at gmx.de
Thu Oct 28 06:51:35 EDT 2004


Hi,

i clipped PolyDataSet with vtkClipPolyData and added it to the renderer.
I can pick the new meshes and points, but i cannot add them to my
PolyDataSet.

Which filter or data conversion i have to use to copy the point and cell
informations?

Heres my code:

vtkClipPolyData *boneclipper = vtkClipPolyData::New();
boneclipper -> SetInput(polydatastructure);
boneclipper -> SetClipFunction(plane);      //defined vtkplane
boneclipper -> GenerateClippedOutputOn();
boneclipper -> SetValue(0.0);

polydatastructure -> Update();

vtkPolyDataMapper *clipMapper = vtkPolyDataMapper::New();
clipMapper -> SetInput((vtkPolyData *)boneclipper -> GetOutput());

vtkActor *clipActor = vtkActor::New();
clipActor -> SetMapper(clipMapper);

ren -> AddActor(clipActor);

// First and not working attempt to get point data from the vtkClipPolyData
// Whats my fault?
vtkPolyData *clipData = vtkPolyData::New();
clipData -> DeepCopy((vtkDataSet *)boneclipper->GetOutput());
clipData -> Update();
clipData -> BuildLinks();

Thx in advance, Timo Frenzel

-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!




More information about the vtkusers mailing list