[vtkusers] Toroidal shape. How?

stefano mininel mininel.ml at gnbts.univ.trieste.it
Mon Feb 18 08:05:12 EST 2002


Hi everybody.
Using vtk 3.1.2.
I wanted to probe like in the xyPlot.tcl example (using instead C++) but
along a meridian line.
The easiest way I found was:
"
pMerid = vtkSphereSource::New();
    pMerid->SetRadius(xxx);
    pMerid->SetThetaResolution(180);
    pMerid->SetStartTheta(0);
    pMerid->SetEndTheta(180);
    pMerid->SetPhiResolution(0);
    pMerid->SetStartPhi(90);
    pMerid->SetEndPhi(90);  // I obtain the wanted meridian but with 3
times the n° of points needed
pCleaner = vtkCleanPolyData::New();
    pCleaner->SetInput(pMerid->GetOutput());
    pCleaner->SetTolerance(0.0);  // removing the unneeded points,
leaving only the 180 points
pProbe = vtkTransformPolyDataFilter::New();
    pProbe->SetInput(pCleaner->GetOutput());
    pProbe->SetSource(pMyValuesField);
...
"
and so on, using pProbeGetOutput() as input for a vtkXYPlot.
Everything ok for the plot, except ... if I try to have a 3d vision of
the probing line using the vtkTubeFilter, like in the xyPlot.tcl
example, it doesn't work ( "No input data" message). In fact I noticed,
saving pProbe on a file, it has points and scalars and NOT lines, so
there are no lines from which to create the tubes. I guess the cleaner
has cleaned too much.

So, what kind of filter ( or custom procedure ) should I add in between
the pProbe output and the vtkTubeFilter input to have this work?
Thanks in advance for any help.

    Stefano Mininel










More information about the vtkusers mailing list