[vtkusers] STL file surface coordinate
Amy Squillacote
amy.squillacote at kitware.com
Thu Dec 28 14:55:35 EST 2006
You're printing the address of pt, not the coordinates pt contains.
Using cout, try something like the following.
cout << "point coordinates: " << pt[0] << " " << pt[1] << " " << pt[2]
<< "\n";
Also, please keep the discussion on the vtkusers list.
- Amy
tony hakki wrote:
> Sorry for my inconvenience, to show the coordinates on the screen I
> wrote that code;
>
> cout << "the point coordinates"<< pt<<'\n';
>
>
>
> but It shows like that: 0166E008, Mustn't It be three scalar like
> (x,y,z) ( or i.e (30,10,20) )
>
>
>
> thanks
>
> tony
>
>
>
> ----- Original Message ----
> From: Amy Squillacote <amy.squillacote at kitware.com>
> To: tony hakki <tony2007vtk at yahoo.com>
> Cc: VTK Ortak mail hesabi <vtkusers at vtk.org>
> Sent: Thursday, December 28, 2006 7:50:40 PM
> Subject: Re: [vtkusers] STL file surface coordinate
>
> Hi Tony,
>
> Do something like the following.
>
> vtkSTLReader *reader = vtkSTLReader::New();
> ...
> vtkPoints *points = reader->GetOutput()->GetPoints();
> int numPts = points->GetNumberOfPoints();
> int i;
> double *pt;
>
> for (i = 0; i < numPts; i++)
> {
> pt = points->GetPoint(i);
> // Now you have the point coordinates as a double[3].
> }
>
>
> - Amy
>
> tony hakki wrote:
> > hi all;
> > I would like to get surface coordinate of a STL data. how can I do
> > that? Now I just read the stl data
> > thanks in advance
> >
> > tony
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com <http://mail.yahoo.com/>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
More information about the vtkusers
mailing list