[vtkusers] create a polyData from selected cell

tasnim hanene-jeder at hotmail.fr
Fri May 18 11:01:56 EDT 2012


>The triangle filter should go between the thing you want to subdivide and
the subdivision filter. It doesn't seem like there is a need to triangle
filter the sphere source in this case.

So, i have to make my TriangleFilter between:

		 // Create a polydata object
  vtkSmartPointer<vtkPolyData> newdata =
    vtkSmartPointer<vtkPolyData>::New();

		vtkPoints* cellPoints = selected->GetPoints(); 
        newdata->SetPoints(cellPoints);    
 and :
int numberOfSubdivisions = 2;
		vtkSmartPointer< vtkLoopSubdivisionFilter > subdivisionFilter = 
vtkSmartPointer<vtkLoopSubdivisionFilter>::New();
subdivisionFilter->SetNumberOfSubdivisions(numberOfSubdivisions);

    subdivisionFilter->Update();

But,I didn't know what shall I make as inputconnection for my triangleFilter
:(

--
View this message in context: http://vtk.1045678.n5.nabble.com/create-a-vtkPolyData-from-selected-cell-tp5711827p5711972.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list