Hi Dalton, I was successfully using the commands below for exporting a solid into a step file.
file="test.stp" exporter=STEPExporter(file) exporter.add_shape(ent.Shape()) exporter.write_file() Good luck. Regards Damir On Thu, 2014-04-03 at 19:00 +0200, Tomáš Létal wrote: > Hi Dalton, > > > you could try to change the line "stepexporter.Write(arquivosaida)" to > "stepexporter.Write(arquivosaida.Shape())", I hope it helps. > > > Best regards > > > > ---------- Původní zpráva ---------- > Od: Dalton <dfazan...@gmail.com> > Komu: pythonocc-users@gna.org > Datum: 3. 4. 2014 15:49:19 > Předmět: [Pythonocc-users] STEP and Geom > > > Hi! I'm building an algorithm to construct a NURBS surface > with pythonnocc > and need to export it to a STEP file. > > I construct a Geom_BSplineSurface with the command line > > stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, > stepuknots, > stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) > > where all the parameters are already defined and it works > well. Then I try > to write it to a STEP file with the following lines > > stepexporter = STEPControl_Writer() > stepexporter.Transfer(stepnurbs, STEPControl_AsIs) > stepexporter.Write(arquivosaida) > > and I get the message error > > TypeError: in method 'STEPControl_Writer_Transfer', argument 2 > of type > 'TopoDS_Shape const' > > At GitHub, I was told to execute the command > > TopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs, ... > > but I still get a message error as below > > TypeError: in method 'new_BRepBuilderAPI_MakeFace', argument 1 > of type > 'TopoDS_Wire const' > > Sorry if this may seems a noobie question, but I am not an > specialist in > python or opencascade, just starting to learn. :) > > Best regards. > > > _______________________________________________ > 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 _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users