2009/12/13 Simon Kirkby <tig...@interthingy.com> > Hey All, > > Just got open cascade and pythonOCC working on my ubuntu box. What a > mission ! Can't wait for the .debs :) > > I'm attempting to write a bottle generator and I'm following the bottle > script in the scripts directory and the OC tutorial. > > the tutorial references the function > > /Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace); > > However the python interface does not seem to have this function . > > Has it moved, does it exist ? > How do I extract type and Z position data from a face ? > > > Good work on pythonOCC , I can see some seriously cool stuff coming out > of it. > I am using it for parametrically generating STL files to print on my > Makerbot reprap.. > > :) > > Simon > > Hi Simon,
The port of the C++ line /Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace); to pythonOCC is: import OCC.BRep aSurface = OCC.BRep.BRep_Tool().Surface(aFace) or, from OCC.BRep import * aSurface = BRep_Tool().Surface(aFace) If your purpose is to generate STL files form a parameterized geometry, I suggest you have a look to the Parametric Application Framework (PAF) built upon the salomegeometry library. A Quick tutorial is available here: http://www.pythonocc.org/wiki/index.php/PAF_tutorial Cheers, Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users