[vtkusers] vtkstreamtracer on a surface

ZACK chihebz at hotmail.com
Fri Feb 23 12:34:58 EST 2018


Hi Guys,

I have a problem displaying streamlines on outside surfaces of a volume. My
streamlines are visible only on the inside volume. Any help will be much
appreciated. below is an image to help explain the problem.

Here are my unstructured girds stream tracer code:

        vtkUnstructuredGrid * pGlobalUGrid =
(vtkUnstructuredGrid*)m_pUnstructuredGridModel->GetOutput();
        vtkSmartPointer<vtkPolyData> pPolydata =
vtkSmartPointer<vtkPolyData>::New();

        if (pGlobalUGrid != NULL)
                pPolydata->SetPoints(pGlobalUGrid->GetPoints());

        // Source of the streamlines
        vtkSmartPointer<vtkPointSource> seeds =
                vtkSmartPointer<vtkPointSource>::New();

        seeds->SetRadius(0.2);
        seeds->SetInput(pPolydata);
        seeds->SetCenter(pPolydata->GetCenter());
        seeds->SetNumberOfPoints(m_iNbrOsTreamPoints);


        vtkSmartPointer<vtkRungeKutta4> sph_rk4 =
vtkSmartPointer<vtkRungeKutta4>::New();

        vtkSmartPointer<vtkStreamTracer> streamer =
vtkSmartPointer<vtkStreamTracer>::New();
       
streamer->SetInputConnection(m_pUnstructuredGridModel->GetOutputPort());
        streamer->SetStartPosition(0.0, 0.0, 0.0);
        streamer->SetSourceConnection(seeds->GetOutputPort());
        streamer->SetMaximumPropagation(100);
        streamer->SetIntegrator(sph_rk4);
        streamer->SetIntegratorTypeToRungeKutta4();
        streamer->SetMinimumIntegrationStep(m_CurrentMinValue);
        streamer->SetMaximumIntegrationStep(m_CurrentMaxValue);
        streamer->SetIntegrationDirectionToBoth();
        streamer->SetComputeVorticity(false);
        streamer->Modified();


What you think, I am missing in my code??

<http://vtk.1045678.n5.nabble.com/file/t342218/StreamTracer_problem.png> 



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list