[vtkusers] Cut function from geometry

Hentschel, Bernd hentschel at rz.rwth-aachen.de
Fri Apr 16 03:35:22 EDT 2004


Hi Marian,

Assuming that your cut surface is given as vtkPolyData (pCutSurface), the straight forward method would be to iterate through its points (pCutSurface->GetPoint(i,x)) and sample the scalar field at each single location(pDataSet->FindAndGetCell(...); pCell->EvaluatePosition(...)). The sampled data can be stored in a vtkFloatArray (pArray) of dimension 1 and then be supplied as scalar field to your poly data object (pCutSurface->GetPointData()->SetScalars(pArray). That should do the job.
The vtkCutter-class is supposed to work with an implicit function of your cut surface only. Unless you can provide such a desription of your cut surface it won't work.
Hope this helps...
Greetings,
	Bernd

> 
> Hi!
> 
> I'm searching for an option to display scalar grid data on an 
> irregular
> geometry surface. Best option would be if the surface could 
> be used somehow
> as cut function for vtkCutter or something like that.
> 
> Unfortunately, i'm a little bit lost in the classes-jungle of 
> vtk, and my
> ordered books haven't arrived yet. =)
> 
> So i would appreciate any hint on that, thanks in advance...
> 
> Greetings, Marian
> 


-- 
Dipl.-Inform. Bernd Hentschel
Competence Center for Virtual Reality and 3D-Visualization
Computing and Communication Center (CCC)
Aachen University (RWTH)
Seffenter Weg 23, 
D-52074 Aachen (Germany)
Fon: (+49) 241 / 80 - 24921
Fax: (+49) 241 / 80 - 22134
mailto:hentschel at rz.rwth-aachen.de
http://www.rz.rwth-aachen.de/vr/ 




More information about the vtkusers mailing list