Frank,

Thanks for the feedback. I just commited a few updates this afternoon:

- the == operator is wrapped in python wherever it is defined in OCC,
- better handle of Standard_Integer passed by reference parameter.

Note: Windows user can find prebuilt binary for Python2.5 at: 
http://www.pythonocc.org/Releases/daily

Happy to see that it works,

Thomas

Frank Conradie a écrit :
> Thomas, never mind - I compiled the latest SVN and comparing Handles 
> works as expected!
>
> Thanks for the continued effort,
> Frank
>
> Frank Conradie wrote:
>> Hi Thomas
>> That's great news on the == operator, but I have a related question:
>>
>> Will the == operator now work for Handles as well, meaning work in 
>> Python as it does in C++?
>>
>> The reason I ask is that I wish to use h1 == h2 in Python to find out 
>> whether two handles are referencing the same underlying object, e.g. 
>> the same as this C++ code:
>>
>>         Handle(Geom_Surface) hsur1 = BRep_Tool::Surface(face1);
>>         Handle(Geom_Surface) hsur2 = BRep_Tool::Surface(face2);
>>         if (hsur1 == hsur2) {     // face1 and face2 lie on same surface
>>              ...
>>
>> Thanks,
>> Frank Conradie
>>
>>
>> Thomas Paviot wrote:
>>> Jelle Feringa a écrit :
>>>   
>>>>> This can be done directly in the SWIG wrapper. For the TopoDS_Shape 
>>>>> class, the != operator is already wrapped with python (a call to 
>>>>> IsNotEqual() method). Don't know why the == operator is ignored. 
>>>>> Certainly a stupid mistake from me.
>>>>>       
>>>> Wow, that would be beautiful...
>>>>     
>>>
>>> That's what I thought: due to a bug in the SWIG_generator.py script, 
>>> only the operator != was wrapped. I fixed it and now the == operator 
>>> should work.
>>>
>>> I currently rebuild all the solution. Many modules are impacted by this 
>>> change.
>>>
>>> Thomas
>>>
>>> _______________________________________________
>>> 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
>   

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

Reply via email to