2010/4/9 Guillaume Bouchard <guillaume.bouch...@insa-lyon.fr> > Hello, > > Thank for your nice and quick answers, I'm answering back in only one mail > for > Jelle Feringa, Brian Bishop and Thomas Paviot. > > On Thu, Apr 08, 2010 at 04:07:54PM +0200, Jelle Feringa wrote: > > PythonOCC has a split personality; part of the project is very > > pythonic, which is the layer we build upon the wrappers. > > The reason why the wrappers arent very pythonic is that we want the > > documentation of OCC to be valid for pythonOCC. > > I quite agree with that kind of purpose ;) (Btw, I don't know if the > documentation of OCC is something good, it took me hours to find it, and > except > from the complete API, there is small (or no) description of arguments and > their purpose. Take a look at StlAPI::StlAPI_Writer::SetCoeficient for > exemple > ;) > > > In [2]: api = StlAPI.StlAPI_Writer() > > > > In [3]: api. > > api.GetASCIIMode api.__delattr__ api.__reduce_ex__ > > api.GetRelativeMode api.__dict__ api.__repr__ > > api.SetASCIIMode api.__doc__ api.__setattr__ > > api.SetCoefficient api.__getattribute__ api.__str__ > > api.SetDeflection api.__hash__ api.__weakref__ > > api.SetRelativeMode api.__init__ api._kill_pointed > > api.Write api.__module__ api.this > > api.__class__ api.__new__ api.thisown > > api.__del__ api.__reduce__ > > Which version of Python-OCC do you run. I have pythonOCC-0.4 and: > > Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) > [GCC 4.4.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import OCC > >>> from OCC import StlAPI > >>> api = StlAPI.StlAPI_Writer() > >>> api.SetASCIIMode > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: 'StlAPI_Writer' object has no attribute 'SetASCIIMode' > >>> dir(api) > ['ASCIIMode', 'RelativeMode', 'SetCoefficient', 'SetDeflection', 'Write', > '__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__format__', > '__getattribute__', '__hash__', '__init__', '__module__', '__new__', > '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', > '__str__', '__subclasshook__', '__weakref__', '_kill_pointed', 'this', > 'thisown'] > > Am I missing something ? >
Oops, you're right. It's an issue I fixed after the 0.4 version was released. Here is what I have from the latest svn revision on my Mac machine: >>> api = StlAPI_Writer() >>> dir(api) ['GetASCIIMode', 'GetRelativeMode', 'SetASCIIMode', 'SetCoefficient', 'SetDeflection', 'SetRelativeMode', 'Write', '__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_kill_pointed', 'this', 'thisown'] >>> api.GetASCIIMode() 1 >>> api.SetASCIIMode(False) >>> api.GetASCIIMode() 0 >>> You have to checkout checkout/compile the pythonocc subversion trunk. Best Regards, Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users