[vtkusers] STL file surface coordinate

tony hakki tony2007vtk at yahoo.com
Sat Dec 30 14:57:17 EST 2006


Thank you for your kind reply
tony


----- Original Message ----
From: Bill Lorensen <wlorens1 at nycap.rr.com>
To: tony hakki <tony2007vtk at yahoo.com>; Amy Squillacote <amy.squillacote at kitware.com>
Cc: VTK Ortak mail hesabi <vtkusers at vtk.org>
Sent: Saturday, December 30, 2006 8:06:08 PM
Subject: Re: [vtkusers] STL file surface coordinate

Tony,

Yes, if you first do a:

read>Update();

Bill

At 09:59 AM 12/30/2006, tony hakki wrote:

hello;
Can I use the following code for obtain STL file's  all (x,y,z) surface coordinates?Thanks in advance
tony
 

double X[3], Y[3], Z[3];

vtkSTLReader *read = vtkSTLReader::New();

 

..................

 

tkPolyData *Source=read->GetOutput();

// Put source points in SourcePoints

SourcePoints = Source->GetPoints();

// For each cell i do:

for (i = 0; i < ncells; i++) 

// Get the points belonging to this cell.

Source->GetCellPoints(i,cells);

 

pId = cells->GetId(0);

SourcePoints->GetPoint(pId,X);

pId = cells->GetId(1);

SourcePoints->GetPoint(pId,Y);

pId = cells->GetId(2);

SourcePoints->GetPoint(pId,Z);

 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061230/8140c84e/attachment.htm>


More information about the vtkusers mailing list