Hi Franck, In C++, the '=' operator can be overloaded, but not in C++. The ShapeFix_Wire.ModifyTopologyMode() method cannot be wrapped as-is in python. I had to implement a function transformator in order to handle this typical C++ behaviour. This is fixed in the rev.625 of the svn trunk: http://svn.gna.org/viewcvs/pythonocc/trunk/src/wrapper/SWIG_generator.py?rev=634&r1=625&r2=634
The ModifyTopoplogyMode method is then splitted in two different methods Get and Set: SetModifyTopologyMode(boolean) and GetModifyTopologyMode() So, if you want to set it to True, you have to: sfw.SetModifyTopologyMode(True) to know which topology mode is used, you just have to: print sfw.GetModifyTopologyMode() Note that the SWIG_Generator.py script implements this behaviour for all methods that returns Standard_Integer & and Standard_Real & by reference parameters. This will be released in the next 0.4 release. If you update to the latest svn trunk revision, I'm afraid you won't get anything compile: I currently work on a GarbageCollector to improve pythonOCC memory management, and the svn trunk does not compile yet. I hope this will be finished in a couple of weeks (I'll be on holidays for one week from tomorrow untill next week-end). Best Regards, Thomas 2009/10/23 Frank Conradie <fr...@qfin.net> > In the ShapeFix classes you often have to set flags in this manner: > > sfw = new ShapeFix_Wire (oldwire, face ,tolerance); > sfw->ModifyTopologyMode() = Standard_True; > > This obviously does not work in Python: > > sfw = ShapeFix_Wire (oldwire, face ,tolerance) > sfw.ModifyTopologyMode() = True > > >>> SyntaxError: can't assign to function call > > How would I set the value of these "returned references"? > > Thanks, > Frank > > > _______________________________________________ > 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