[vtkusers] How can I save to STL format?

noc hawkingyy at hotmail.com
Fri Jun 4 22:57:53 EDT 2010


Thank u so much!

I tried vtkXMLPolyDataWriter and vtkSTLWriter, it showed that the output in vtp format is much smaller than stl format.

Thanks again!!!
 
> Date: Fri, 4 Jun 2010 13:30:30 -0400
> Subject: Re: [vtkusers] How can I save to STL format?
> From: daviddoria+vtk at gmail.com
> To: hawkingyy at hotmail.com
> CC: vtkusers at vtk.org
> 
> 2010/6/4 noc <hawkingyy at hotmail.com>:
> > Hi all,
> >
> > Now, I'm doing marching cubes. I wanna save the resault(the 3D image) to STL
> > format,
> > I tried this:
> > --code--
> > vtkSTLWriter * writeSTL = vtkSTLWriter ::New();
> >   writeSTL->SetFileName("D:/data/feet.stl");
> >   writeSTL->SetInput(stripper->GetOutput());   //data from vtkStripper
> >   writeSTL->Write();
> > --code--
> >
> > but it didn't work. The feet.stl is only 1KB.
> > However, I can see the 3D surface in RenderWindow. I don't konw why.
> > Could any one help me, please?
> >
> > Thanks so much!!!
> >
> > Regards,
> >
> > Danile
> 
> Try using vtkXMLPolyDataWriter to write a .vtp file and open it in
> Paraview. If this result is also incorrect, then there is some problem
> upstream in the pipeline. It doesn't look like you are doing anything
> wrong with the vtkSTLWriter.
> 
> David
 		 	   		  
_________________________________________________________________
一张照片的自白――Windows Live照片的可爱视频介绍
http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100605/3a0aface/attachment.htm>


More information about the vtkusers mailing list