On 03-07-2010 09:27, Wangshiraz wrote:
> Hi,
> 
> I am trying to convert stl to iges using  code CADViewer which is under
> the samples\Tools folder. 
> after load the stl file:
> 
>         elif extension == "stl":
>             from OCC import TopoDS, StlAPI
>             shape = TopoDS.TopoDS_Shape()
>             stl_reader = StlAPI.StlAPI_Reader()
>             stl_reader.Read(shape,str(filename))
> 
>  I added this:
> 
>             from OCC import IGESControl
>             i  = IGESControl.IGESControl_Controller()
>             i.Init()
>             iges_writer = IGESControl.IGESControl_Writer()
>             iges_writer.AddShape(shape)
>             iges_writer.Write("my.iges")
>             print "added an object to the IGES file. "
> 
> But I didn't get the output file - my.iges.
> 
> stl_reader doesn't has GetOutput and 'import vtk' shows no vtk module.
> 
> What can I do?
> 
> Regards,
> 
> Cean
Hi,

About VTK [1], it's another lib, you have compile or in distro like
Fedora, Ubuntu, Debian have package from VTK. The stl_Reader from VTK
has GetOutput, from Python-OCC doesn't.

[1] - http://www.vtk.org/

>>
>> I put it here http://pastebin.org/375878 , it converts stl to step.
>>
> 
> 
> ------------------------------------------------------------------------
> 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载!
> <http://www.windowslive.cn/messenger/>
> 
> 
> 
> _______________________________________________
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users


_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to