SV: [vtkusers] using GetNumberOfTriangles()
Markus voigt
markus-voigt at gmx.net
Sun Nov 12 13:51:06 EST 2006
Hi Darvann
thanks for your help.
I used the vtkSTLReader to load the file and the vtkPolyDataMapper
Now I used your code but I got this error message:
"'GetPoints' : is not a member of 'vtkPolyDataReader'"
Tron Darvann schrieb:
>
> This code will get the number of cells.
>
> If you only have triangles, it will be the number of triangles.
>
> // Read the surface (VTK type in this example)
>
> vtkPolyDataReader *surf = vtkPolyDataReader :: New();
>
> surf -> SetFileName(filename);
>
> surf -> Update();
>
> // Put surface points in Points
>
> vtkPoints Points = Surf -> GetPoints();
>
> // Get the number of cells, e.g. triangles
>
> ncells = Points -> GetNumberOfCells();
>
>
>
>
> Tron Darvann
> Research Engineer, PhD, 3D-Laboratory
>
> _Tel:_ (+45) 35 32 67 58 (lab) / (+45) 28 20 03 12 (mobile)
> _E-mail:_ trd at odont.ku.dk <mailto:trd at odont.ku.dk>
> _Skype:_ tron.darvann
> _Fax:_ (+45) 35 32 65 05
> _Mailing and Visiting Address:_
> 3D-Lab, School of Dentistry
> University of Copenhagen
> Nørre Alle 20
> DK-2200 Copenhagen N
> Denmark
>
> ------------------------------------------------------------------------
> *Fra:* vtkusers-bounces+trd=odont.ku.dk at vtk.org på vegne af
> mam06bhv at studserv.uni-leipzig.de
> *Sendt:* lø 11-11-2006 20:58
> *Til:* vtkusers at vtk.org
> *Emne:* [vtkusers] using GetNumberOfTriangles()
>
> Hello,
> does someone know how to use the function GetNumberOfTriangles() to
> get the
> numbers of triangles for a 3D model?
> thanks
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Dipl.-Inf.(FH) Markus Voigt, BSc(Hons)
Reichpietschstraße 63
04317 Leipzig
markus-voigt at gmx.net
More information about the vtkusers
mailing list