<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">hello;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Can I use the following code for obtain STL file's all (x,y,z) surface coordinates?Thanks in advance</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">tony</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#0000ff size=2>
<P>double</FONT><FONT size=2> X[3], Y[3], Z[3];</P></FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=2>
<P>vtkSTLReader *read = vtkSTLReader::New();</P>
<P> </P>
<P>..................</P>
<P> </P><FONT size=2>
<P>tkPolyData *Source=read->GetOutput();</P></FONT><FONT color=#008000 size=2>
<P>// Put source points in SourcePoints</P></FONT><FONT size=2>
<P>SourcePoints = Source->GetPoints();</P><FONT color=#008000 size=2>
<P>// For each cell i do:</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>for</FONT><FONT size=2> (i = 0; i < ncells; i++) </P>
<P></FONT><FONT color=#008000 size=2>// Get the points belonging to this cell.</P></FONT><FONT size=2>
<P>Source->GetCellPoints(i,cells);</P></FONT><FONT color=#008000 size=2>
<P> </P></FONT><FONT size=2>
<P>pId = cells->GetId(0);</P>
<P>SourcePoints->GetPoint(pId,X);</P>
<P>pId = cells->GetId(1);</P>
<P>SourcePoints->GetPoint(pId,Y);</P>
<P>pId = cells->GetId(2);</P>
<P>SourcePoints->GetPoint(pId,Z);</P>
<P> </P></FONT></FONT></FONT></DIV></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>