[vtkusers] determine mesh connectivity from point data

Robert Haines rhaines at manchester.ac.uk
Wed Oct 14 10:05:47 EDT 2009


Hi Luke,

I'll admit I've not used vtkGeometryFilter but..

> vtkPolyData *output = vtkPolyData::New();
>
> newPoints->Squeeze();
> output->SetPoints(newPoints);
> newPoints->Delete();
>
> newNormals->Squeeze();
> output->GetPointData()->SetNormals(newNormals);
> newNormals->Delete();
>
> vtkDelaunay3D *del3D = vtkDelaunay3D::New();
> del3D -> SetInput( output );
> del3D -> BoundingTriangulationOn();
> vtkGeometryFilter *geoFilter = vtkGeometryFilter::New();
> geoFilter->SetInputConnection(del3D->GetOutputPort());
> geoFilter->SetOutput(output);
> geoFilter->Update();
>
> anyone have any suggestions?

Shouldn't that be

output = geoFilter->GetOutput()

?

Or just pass it straight into a vtkPolyDataMapper for drawing it?

Cheers,
Rob

> Robert Haines wrote:
>>> I have what is hopefully a simple question.
>>>
>>> I have an array of points in 3D and I would like generate a  
>>> vtkPolyData object. Is there a way to generate the polygons  
>>> automatically? or do i have to come up with a algorithm to sort  
>>> them and determine the connectivity?
>>
>> vtkDelaunay3D will triangulate points in 3D into a set of  
>> tetrahedrons. http://www.vtk.org/doc/release/5.4/html/a00405.html
>>
>> Rob
>>

-- 
Robert Haines

Research Associate, RealityGrid          Tel. : +44 (0)161 275 6067
Research Computing Services              Fax. : +44 (0)161 275 0637
University of Manchester                 Email: rhaines at manchester.ac.uk
Oxford Road                              Web  : www.realitygrid.org
Manchester, M13 9PL                           : www.rcs.manchester.ac.uk




More information about the vtkusers mailing list