<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thank u so much!<BR>
I tried vtkXMLPolyDataWriter and vtkSTLWriter, it showed that the output in vtp format is&nbsp;much smaller than stl format.<BR>
Thanks again!!!<BR>&nbsp;<BR>&gt; Date: Fri, 4 Jun 2010 13:30:30 -0400<BR>&gt; Subject: Re: [vtkusers] How can I save to STL format?<BR>&gt; From: daviddoria+vtk@gmail.com<BR>&gt; To: hawkingyy@hotmail.com<BR>&gt; CC: vtkusers@vtk.org<BR>&gt; <BR>&gt; 2010/6/4 noc &lt;hawkingyy@hotmail.com&gt;:<BR>&gt; &gt; Hi all,<BR>&gt; &gt;<BR>&gt; &gt; Now, I'm doing marching cubes. I wanna save the resault(the 3D image) to STL<BR>&gt; &gt; format,<BR>&gt; &gt; I tried this:<BR>&gt; &gt; --code--<BR>&gt; &gt; vtkSTLWriter * writeSTL = vtkSTLWriter ::New();<BR>&gt; &gt; &nbsp;&nbsp;writeSTL-&gt;SetFileName("D:/data/feet.stl");<BR>&gt; &gt; &nbsp;&nbsp;writeSTL-&gt;SetInput(stripper-&gt;GetOutput());&nbsp;&nbsp; //data from vtkStripper<BR>&gt; &gt; &nbsp;&nbsp;writeSTL-&gt;Write();<BR>&gt; &gt; --code--<BR>&gt; &gt;<BR>&gt; &gt; but it didn't work. The feet.stl is only 1KB.<BR>&gt; &gt; However, I can see the 3D surface in RenderWindow. I don't konw why.<BR>&gt; &gt; Could any one help me, please?<BR>&gt; &gt;<BR>&gt; &gt; Thanks so much!!!<BR>&gt; &gt;<BR>&gt; &gt; Regards,<BR>&gt; &gt;<BR>&gt; &gt; Danile<BR>&gt; <BR>&gt; Try using vtkXMLPolyDataWriter to write a .vtp file and open it in<BR>&gt; Paraview. If this result is also incorrect, then there is some problem<BR>&gt; upstream in the pipeline. It doesn't look like you are doing anything<BR>&gt; wrong with the vtkSTLWriter.<BR>&gt; <BR>&gt; David<BR>                                               <br /><hr />使用Messenger保护盾V2,支持多账号登录! <a href='http://www.windowslive.cn/safe/' target='_new'>现在就下载!</a></body>
</html>