[vtkusers] mesh resolution

Bernhard Mayrhofer bernhard at wien-zentral.kolping.at
Mon Mar 22 09:19:07 EST 2004


Hi!

i want to calculate the mesh resolution of triangulated data (from objreader->trianglefilter->decimate->polydatanormals->polydata ). i indend to calculate the median length between connected points (i didn´t found a method, which can do this or similar)

i used following code to obtain the length:

cPoints=ViewNormals->GetOutput()->GetNumberOfCells();
for(ID=0;ID<cPoints;ID++)
{
ViewNormals->GetOutput()->GetCell(ID,cell);
cell->GetEdge(ID); //cell..vtkCell
length[ID]=sqrt(cell->GetEdge(ID)->GetLength2()); //length..floatarray
}

i think there are a view problems. not all values of length stored in the array are possible, there are extremly big values. i think this are random values. i don´t know if ID<cPoints is ok.

I also tried following instead:

edge=cell->GetNumberOfEdges();

the value was 3. i think this is because i used vtkTriangleFilter.
Now i have no more ideas. Maybe you can help me.

Thanks a lot
Bernhard


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040322/183ddf4a/attachment.htm>


More information about the vtkusers mailing list