2009/7/5 Dan Falck <dfa...@verizon.net>

> I figured the syntax out by reading some of the source from HeeksCAD.
> Here's my simple example:
>
> #!/usr/bin/env python
>
> from OCC.STEPControl import *
> from OCC.BRepPrimAPI import *
> from OCC.BRepBuilderAPI import *
>
> #just make a simple box
> S = BRepPrimAPI_MakeBox(150,200,110).Shape()
>
> st= STEPControl_Controller()
> st.Init()
> step_writer= STEPControl_Writer()
> step_writer.Transfer(S,STEPControl_AsIs)
> step_writer.Write("/home/dan/Desktop/box.stp")
>
>
> Thanks,
> Dan
>
>
> Dan Falck wrote:
> > Hi guys,
> >
> > Could anyone help me along with a short example for exporting STEP files?
> >
> > I think that I need to use "STEPCAFControl_Writer_Write" but am not sure
> > about the syntax.  I have been playing with STL export and am having a
> > bit of fun with it :)
> >
> > Thanks,
> > Dan
> >
>

Hi Dan,

A 'DataExchange' folder has recently been added in the subversion trunk. The
STEP.py module gives access to STEP import/export (as well as STEP_OCAF
export).

Here is the link to the source code:
http://svn.gna.org/viewcvs/pythonocc/trunk/Utils/DataExchange/STEP.py?rev=393&view=markup

Cheers,

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

Reply via email to